JetBrains / JetBrains/resharper-unity

Alert the user when using UnityEditor.dll in non editor scripts

Open
#89 13 comments 8 reactions 1 assignee Claimed by @citizenmatt View on GitHub
enhancement
Dominant language
C#
Stars
1.2k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

If you use UnityEditor.dll types, in non editor code, everything will compile and run while you are in the editor, but the moment you try to build a player it will play because UnityEditor.dll is not available.

It would be great to get some warning or even error when using UnityEditor.dll types without wrapping those in ifdef UNITY_EDITOR in the regular solution.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.