Question by
Q.win · Mar 04, 2016 at 06:08 AM ·
scripting problemeditor-scriptingplugindlldefine
Using #if UNITY_DEBUG in DLLs
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?
Comment