The script adds a mode switcher for designers and for developers in a panel at the top of the Unity window called Design Mode
.
Through the DesignMode.ON
property, you can get the bool value of whether design mode is enabled.
And also adds 2 attributes to customize the display of types in the inspector::
public class SomeMonoBehaviour : MonoBehaviour
{
// The field is visible only in Design Mode.
[DesignOnly] public int someField1;
// Hides the field in Design Mode.
[DevelopmentOnly] public int someField2;
}
To get the current value of DesignMode.ON
without depending on this script, you can get it like this:
bool isDesignMode = PlayerPrefs.GetInt("DCFApixels_DesignMode_IsOn") == 0 ? false : true;