Hi all,
In my project I have code like that:
GameObject go;
#if UNITY_EDITOR
if (Application.isPlaying)
go = (GameObject) GameObject.Instantiate(prefab);
else
go = (GameObject) PrefabUtility.InstantiatePrefab(prefab);
#else
go = (GameObject) GameObject.Instantiate(prefab);
#endif
I want to compile it into a dll library.
How I can do this to provide the same functionality in the editor and runtime?
↧