Keep list of GameObjects between scenes

Hey so i have been building an extremely complex system using lists infact there is like 15 lists all doing there job, here is two problems i have run in to.

  1. If the lists is a bunch of gameobjects for example equipment and i go list.add(equipment) then when a new scene is loaded all gameobjects from the list says missing, but it add’d the prefab object not the clone object i have also add’d the clone object and it also never worked.

  2. After #1 never worked i decided to hold the list’s on the same scenes and dontdestroyonload with them and again when the scene loaded in to another one every gameobject was missing from the lists.

So as you can see my problem with carrying over the gameobject is crucial, i could easily call dontdestroyonload on the equipment but then when a new scene loads the equipment will exist in the scene alway’s and i don’t want that to happen because the equipent will be instantiated from the list when needed.

I am a bit confused as to why the list would not continue to hold the information given to it from before.

Also i tried to add a gameobject to a list that was on another scene to try it that way and it still deletes the object on load.

I’m not sure I understand exactly what you need but I had something that I needed lists for in different scenes. The way I handled it was to create a parent c# class and declare/manipulate the lists there, then have the classes on the relevant scenes’ scripts inherit from that class. Hope that helps in some way.

I want to do the same thing but no luck. When the scene changes all the objects stored in the list dissapear.