private void OnEnable() { if (Configure == null) { Configure = AssetDatabase.LoadAssetAtPath <NavSystemConfigure>(GameManagerWindow.ConfigurePath + "NavSystemConfigure.asset"); } }
public override void OnInspectorGUI() { NavSystem system = target as NavSystem; if (Configure == null) { Configure = AssetDatabase.LoadAssetAtPath <NavSystemConfigure>(GameManagerWindow.ConfigurePath + "NavSystemConfigure.asset"); } if (Configure == null) { Configure = ScriptableObject.CreateInstance <NavSystemConfigure>(); AssetDatabase.CreateAsset(Configure, "Assets/Resources/ScriptableObjects/NavSystemConfigure.asset"); } Configure.OnGUI(); if (GUILayout.Button("Bake")) { Bake(); } base.OnInspectorGUI(); }