Hello!
I’m currently developing my android game, and some time, i need to use this code:
var prefab : Object = PrefabUtility.CreateEmptyPrefab("Assets/Scenes/Levels/MyLevels/"+name+".prefab");
var Map : GameObject = new GameObject();
for(var a = 0; a < mapTileSaved.length; a++){
var go : GameObject = mapTileSaved[a] as GameObject;
go.transform.parent = Map.transform;
}
PrefabUtility.ReplacePrefab(Map, prefab, ReplacePrefabOptions.ConnectToPrefab);
so i use PrefabUtility to create a new prefab, but, when i go to build the project, it doesn’t reconize PrefabUtility, and i can’t compile, so, the question is, is there some way to use PrefabUtility on android, or i misunderstood this functions
Thanks in advance
o/
EDIT
Now i know, that since PrefabUtility is from UnityEditor, i can’t use it on some built game, so, there’s another question, is there a way to create a prefab at runtime (built game)?, because i create a map editor, that instantiate prefabs so you can drop they at certain position, and at the end, you can save them as a child of an empty root GameObject, that is later create as a prefab, and so, you can play your map simply by creating a instance of that prefab, if it’s not possible to do that, can you guys give me some tips by create that kind of system?
**
yea :/, but save on PlayerPrefs I think is out of question, its something around 100+ gameobjects, and I need to store the position aswell
so, if someone could give me some hints, on how can I store that game objects, i’ll realy appreciate