Created
March 15, 2020 19:31
-
-
Save beardordie/9961082851d04aa6b4ea214dfe716412 to your computer and use it in GitHub Desktop.
Add your own submenu in Unity's Preferences window with various boolean settings that other Editor scripts can make use of
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class TestCustomSettings : MonoBehaviour | |
{ | |
#if UNITY_EDITOR | |
[ContextMenu("Test")] | |
public void Test() | |
{ | |
var settings = CustomSettingsMenuNamespace.NewCustomSettingsHandler.GetEditorSettings(); | |
Debug.Log("Custom Bool 1: " + settings.customBool1.ToString()); | |
Debug.Log("Custom Bool 2: " + settings.customBool2.ToString()); | |
} | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment