• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
7 views

Problem :

Unable to find solution for bellow error
the type or namespace name `unityeditor' could not be found. are you missing an assembly reference?
by (6.9k points)  

1 Answer

0 votes

Solution :

I had faced a similar problem with one of my scriptable objects in the past. My scriptable object was not an editor script but it had OnInspectorGUI code in it was used so that I only need to write the inspector gui for the scriptable object once.

I fixed the problem by putting #if UNITY_EDITOR before using UnityEditor directive and #endif after it. You will also need to surround your GUI code with these same tags.

Further Readings:

https://github.com/microsoft/RoomAliveToolkit/issues/75

by (20.3k points)  
...