Instantiating Network Ids

Simply put, instantiating game objects with Udon Behaviors will not be synced, any solutions I’m not aware of?

Kind of depends on what you’re looking for. I don’t have the most knowledge, so I can’t give you a definitive most efficient or best solution. But the 2 things I can think of are:

  • Create the objects you want, then set them to inactive in the inspector. Then have a script that sets them to active. This can be local or networked
  • Use an object pool. The VRC docs explain how to do it, but essentially you create a pool of the objects you want. then in scripting you handle spawning and returning. I can go into depth if needed.

Which ever one you do depends on your use case, and there are caveats for each method. But this is with a fixed amount of objects, so you may have to set up as many objects and you expect the max to be. In terms of a dynamic instantiation, I don’t think this is possible. An idea is maybe you can instantiate non network objects, and have a general manager UdonBehavior that is always in the scene and active, and when the non network objects instantiate. You can code it in the manager to handle the individual objects and syncing. But this is just an idea, I am unsure of if this would actually work.