I’m trying to have a few items that are spawned and also networked, but I’m not really sure how to properly use the object pool. For example, arrows in a quiver. I want the owning player to be able to pull an arrow, fire it, and eventually have the arrow return to the pool.
I would’ve hoped that to use an object pool, you assign a prefab to the pool, and it instantiates copies as necessary, but I guess not?
I read one source that said I need to add all instances into the scene, set them inactive, and then drag them into the VRCObjectPool script wherever it is in the scene. I’d like to at least instantiate them through a script, but it seems like I might not be able to do that either?
Does anyone know for sure if there’s a “correct” way or ways to populate a pool? Also, I’m still stuck figuring out how objects get their networkID. It seems like the only way is to have it exist in the scene and run the network tool. i.e. nothing with a networkID can ever be dynamically instantiated. Is that right? (Would also explain why you have to make the pools in the scene hierarchy)