LoadAsset | Alternative Asset management solution?

Alrighty, so I’m trying to seek more feasable method(s) to go about previewing the viewports. Main issue I’m encountering is loading an asset as it’s being hovered over.

Couple factors being:

  1. Requires Server communication, hence Client LoadAssets’ are unsupported
  2. It’ll take a few for a function to remove unnecessary objects from the Loaded Model and then display it

Currently:
I have different models saved in the inventory, I have a module containing all models and their corresponding ID’s, and using LoadAsset to spawn one of the models/as it’s clicked.

In seek of:

  1. An alternative approach/suggestion(s) to using LoadAsset
  2. If continue using it, should they all be “Preloaded” on the Server or fire a rem/signal to request a spawn of a Model? (Con being having to reach out to server for each model, and repeat upon render)

I’d have to request the Asset upon spawning/clicking the viewport frame button, and request the Asset upon displaying within the frame. (x2-3 LoadAsset calls at minimum)

Edit: I’m working on a viewport frame that clones slots based on data. Display a static image, and animate via viewport on hover. Issue lying in seeking alternatives to replicating LoadAsset to the client while possibly maintaining accessibility to Universes. (Builders work on Assets externally versus editing an Asset in a Studio with a large chunk of terrain) Im even open to other User engaging UI ideas! May not be applicable as optimal as thought of specifically because of the ease of use for the Builders …

5 Likes

Still looking for solutions if any!

2 Likes

My reply could not be useful at all, but I would like to participate in this cause I feel interested.

What about a server script “preload” all model assets and place them in ReplicatedStorage so any client can :Clone() them from their side without needing rems and server LoadAsset()?

I made a couple of systems like this, and its totally inefficient to constantly ask the server to load the assets in order to show them in a Vport that client owns… And… its not like its awesomely efficient having models with client access on RepS… (kinda depends)

As you mentioned, inefficiency.

Of course it’d work, only thing is the amount of LoadAsset calls to even “Load” the Assets upon server start. If any happen to fail … I may be SOL. However, your solution is near my solution, just seeking if there’s any alternates. You seem to have mentioned the exact problem.

1 Like

Yeah, its what I think of the remotes approach, on the other side, if the client ask only once per item to server and server LoadAsset and place it in RepS, and return call to client to tell them to clone it from there, in that way you wouldn’t be loading all assets since the start of server, those would be loaded on a “needing basis”. So any other client that needs to load the same item can easily find it in RepS and clone it, if the model is not there yet, then client ask server to LoadAsset

That wont be a issue, if LoadAsset fails with any model, you just wrap in a pcall handle the response and retry that item on a loop until its ready.

How many items you want to “preload”?

Let’s say comfortably around 50+. All assets being Truck models containing x200 parts minimum. Nothing unbearable, but a ton to load in … which is my worry

I suggest try the preload of all assets on server start making sure you handle it with pcall and retries, check how long it takes.
And try the remotes approach too, with only one call per item to server and save the model once loaded for future uses of clients during session.

Thats what I think, and I hope anyone else can reply too, to check their ideas cause its a topic that matters to me