- Home /
Sync reference to ScriptableObject over UNET?
Hi,
I make use of ScriptableObjects in my scene. Some of my Networked GameObjects get assigned a ScriptableObject at runtime (Which exists in the Assets folder), which I want to sync the Clients.
As expected, I can't just [SyncVar] the ScriptableObject... Is there a way I can send some 'reference' which tells the Client which SO to load?
The only solution that comes to mind is moving the SO inside Resources folder and send the filepath over the network.
It feels like there might be another way, as spawning Prefabs over UNET doesn't require them in the Resources folder...
Thanks.
It would if they were not referenced by any gameobject in the scene. The same with scriptable objects. If you have a scriptable object manager with all the SOs in e.g. a list, it would suffice to send the index to know with which one you want to do things.
Your answer
![](https://koobas.hobune.stream/wayback/20220612133726im_/https://answers.unity.com/themes/thub/images/avi.jpg)