It will be backend request but for now i just created 3 buttons to change the urls for testing if this use case even possible.
Take a look at this example: Needle Engine: SyncField Example with Multiple URLs - StackBlitz
Thanks marcel. Amazing example, it gives a bit more clarity now. Just one question. Why do the sets replace the previous one? Why not just are an addition with the ones already instantiated?
Because I’m replacing the whole “set” of URLs and remove previously loaded models in the script (see line 51). And line 29 with “SetNewState” overrides all the model URLs that should be displayed.
You can change this and to also be able to add new urls to the state object, then you just need to remove the previously loaded models that aren’t part of the list anymore (assuming you ever want to remove loaded models again)
Okay, I’ll try with my integration and will update you how it goes
Thanks a lot
It works Great! I did some tests keeping only 3 urls instead of sets of two and removed clearPreviousState function.
it’s synced with the everyone in the room and stays in place. Only problem occurs when third object is spawned. It seems to be able to tracks only two spawned objects at a time.
NOTE: third object spawned and appears for everyone in the room. but after the third object is instantiated. and a user enters the room again. It won’t see the second object. just the first and the last are visible.
first is always there probably because its called in the start. otherwise it won’t be there either.
Did you modify set state to keep all urls instead of removing them? Make sure to keep all in the list that you want to sync and save in your room state. There is no limit whatsoever of how many models to load
This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.