- Home /
PrefabUtility android
Hello, I was developing my game, and at time, i use PrefabUtility, on it to create an empty prefab, but since this is an android game, when I went to build, I can't, it says Unknow Identifier, so, is there some to replace PrefabUtility to use on android, or I misunderstood the use of this
Thanks in advance =]
Are you trying to call PrefabUtility in a built game? PrefabUtility is part of the UnityEditor namespace, which is only available in the editor. It's recommended you put any script referencing UnityEditor into a folder at Assets/Editor
, as that folder won't be included in the final build.
hmmmmm, i see, but, is there some way to create prefabs like PrefabUtility.CreateEmptyPrefab on built games?
Answer by Bunny83 · Aug 10, 2017 at 01:50 PM
Prefabs are an editor only feature. That's why the PrefabUtility is an editor class. Prefabs are just serialized standalone assets. At runtime you can only use assets which you have created in the editor. The only point of prefabs is that they provide a prepared / serialized object that can be used as instantiate source.
You can't create new assets at runtime. You can create objects from scratch or create instances of prefabs that are part of the project.
The question is not clear what you actually want to do. The project files are read-only once the project is built.
Your answer
Follow this Question
Related Questions
Unity 5.5.1f1 Android "Error Building Player" 0 Answers
Android SDK does not include error 1 Answer
Android build problem! 1 Answer
Android Build Errors 0 Answers