- Home /
Copied gameobject with list of scriptable objects is not unique
Hi all,
I have been looking for this for a while now and have seen simmular questions but none had the outcome i was looking for.
I have a gameobject with a script attached, this script has a list of scriptable objects, when i duplicate the gameobject in the editor the gameobject is correctly duplicated with the list of scriptableobjects. But when i change a setting of a scriptable object in a gameobjects list it is also changed in the other gameobject.
I would like this list to be unique and doesn't reference to the original list.
Thanks!
Maarten
Answer by Bunny83 · May 02, 2018 at 10:50 AM
ScriptableObjects are standalone objects / assets and they are just referenced by other objects. They have no "owning" relationship to any other object. If you want an object to have it's own set of scriptable objects you have to duplicate / instantiate them as well.
Your question doesn't contain much details. Where are your ScriptableObjects stored? Are they assets in the project? Are they stored in the scene?
Hi,
Thanks for the reply.
The explanation on the scriptable object made me thinking, so i did a test by populating the list with objects that do not inherit from ScriptableObject and this gives me the expected behaviour.
I think i have to figure out whether i really need the ScriptableObject functionality.
Thanks!