Not Recognizing UnityEditor.Handles

Completed

So this is really just annoying me, I have code that's utilizing UnityEditor.Handles to write text in the scene view just for visual purposes. The code works in Unity BUT Rider keeps saying, "Cannot resolve symbol for 'Handles' ", and it's just showing the red line under the text constantly. I think it's just doing it flat out for UnityEditor because it does the same thing for UnityEditor.SceneView. I've tried alt+enter and importing the references but it doesn't actually appear to do anything besides add the #using UnityEditor; at the top of the file.

If I like in my explorer under references it shows a reference to UnityEditor but it's just not working inside Rider, does anyone have and idea if there's something I can do to fix it?

0
5 comments

If anyone ever runs into this issue where Rider is saying something is missing when you know it's not, it's due to Unity viewing the script only in editor mode. In other words I applied #if UNITY_EDITOR before the code and ended it with #endif and it fixed the issue.

0

Hi Brandidiot

Glad to hear that the solution was found.

However, if you have any other questions or difficulties in future, do not hesitate to contact support. Have a great day! 

0

Alexandra Guk, Brandidiot
Another solution is to change from Assembly-CSharp.Player to Assembly-CSharp.

0

Pmarinhossm, how do you get to that menu to be able to change which project it's referring to? I can't find it anywhere.

0

Nic Foster, you can use breadcrumps, please take a look at the following Help section

0

Please sign in to leave a comment.