Exemplo n.º 1
0
 private void OnEnable()
 {
     if (Configure == null)
     {
         Configure = AssetDatabase.LoadAssetAtPath <NavSystemConfigure>(GameManagerWindow.ConfigurePath + "NavSystemConfigure.asset");
     }
 }
Exemplo n.º 2
0
        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();
        }