- Home /
Question by
mhuesing · Jun 26, 2020 at 03:49 PM ·
editorprefabeditor-scripting
Created Prefabs and added them into a List in Editor Mode, after PlayMode, these GameObject are not in the List anymore
I created a Grid Class that is only there to help me create levels faster. All these Tiles have a Tile-Class, which is kept in a 2D List in my Grid. I instantiated the Prefabs with:
PrefabUtility.InstantiatePrefab(tilePrefab) as GameObject;
When I enter Play Mode and leave it again, the List in my Grid Class is empty. I even tried holding them in a Scriptable-Object. Is there any way I can block that loss of the reference from play to edit mode?
Comment