UCL-VR / ubiq

Other
98 stars 34 forks source link

NetworkSpawner Catalogues #41

Open sebjf opened 9 months ago

sebjf commented 9 months ago

This is the counterpart to #40, which is the less minor thing that keeps coming up.

The NetworkSpawner Catalogue is included with the Samples. I.e. its maintained upstream. However users need to add their own Prefabs to it. The NetworkSpawner should be modified so users don't have to change any Sample files to make their project work.

One way to do this is to make the NetworkSpawner take a List of Catalogues. Users can create a Catalogue for their project, and add it to the Spawner, where that association will be saved with the Scene.

The downside of this is that they will need the same configuration between all Scenes for the indexing to work. So, the referencing also needs to be changed so that the identity is taken from property of the Prefab that is project-wide (where possible).

Additionally, when spawning at the Room level, there should be an API that supports co-routines or callbacks, so users can reference the instance after it is created in one function.