I have noticed that there are always two types of runtime assemblies generated by Unity, one of which has the suffix .Player. However, the IDE cannot recognize the UNITY_EDITOR
symbol in the assembly with the .Player suffix.
For example, Visual Studio can recognize the UNITY_EDITOR
symbol in Assembly-CSharp, but cannot recognize the UNITY_EDITOR
symbol in Assembly-CSharp.Player (the code is displayed in gray):
This issue is particularly severe for Rider. Because Rider displays the Unity resource structure by default instead of the Solution resource structure, the code wrapped in the UNITY_EDITOR symbol is always gray: