- Home /
FindObjectsOfType HideFlags.DontSave problem
Hi, I'm currently making a level editor in runtime and I want some instantiated items to remain after it has finished running. I currently do this by using HideFlags.DontSave and because of that they stay in the scene after returning to the editor, which is perfect.
However if I use FindObjectsOfType to collect the at the start of a new session, the script can't see them, returning null. If I just place the prefab I use in the hierarchy normally it works just fine. Does anyone know of this issue or has another approach on keeping instantiated gameobjects in the scene after runtime?
Is there a way to place a prefab at Runtime like you do in the editor? So you keep the prefab tab in the inspector as well.
Would Resources.FindObjectsOfTypeAll find your DontSave items?
Your answer
![](https://koobas.hobune.stream/wayback/20220613135543im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How does setting the hideFlags resolve leaking issues? (Texture 2D leaking) 2 Answers
Checking if object intersects? 1 Answer
Profiler has HideFlags.DontSave Assets taking up 86mb [What is this?] 1 Answer
Instantiating a prefab in the editor is orphaning the children of the prefabs 0 Answers
instantiated two characters, but they only appear in scene mode. 0 Answers