示例#1
0
        private static KS_Scriptable_Input FindGameConfig()
        {
            KS_Scriptable_Input gameConfig = AssetDatabase.LoadAssetAtPath(ConfigSaveFile, typeof(KS_Scriptable_Input)) as KS_Scriptable_Input;

            if (gameConfig)
            {
                return(gameConfig);
            }
            return(null);
        }
示例#2
0
 private void OnEnable()
 {
     inputConfig = FindGameConfig();
     if (inputConfig == null)
     {
         configFound = false;
     }
     else
     {
         configFound = true;
     }
 }
示例#3
0
        void OpenDatabase()
        {
            string absPath = EditorUtility.OpenFilePanel("Select Input Database", "", "");

            if (absPath.StartsWith(Application.dataPath))
            {
                string relPath = absPath.Substring(Application.dataPath.Length - "Assets".Length);
                inputConfig = AssetDatabase.LoadAssetAtPath(relPath, typeof(KS_Scriptable_Input)) as KS_Scriptable_Input;

                if (inputConfig)
                {
                    EditorPrefs.SetString("ObjectPath", relPath);
                }
            }

            selected = null;
        }