public static ArchitectureSettings GetSettings()
        {
            ArchitectureSettings settings = AssetDatabase.LoadAssetAtPath <ArchitectureSettings>(settingsPath);

            if (settings == null)
            {
                settings = ScriptableObject.CreateInstance <ArchitectureSettings>();
                string dir = Path.Combine(Application.dataPath, Path.GetDirectoryName(settingsPath).Replace("Assets/", ""));
                if (!Directory.Exists(dir))
                {
                    Directory.CreateDirectory(dir);
                }
                AssetDatabase.CreateAsset(settings, settingsPath);
            }
            return(settings);
        }
Ejemplo n.º 2
0
        public static void Generate()
        {
            settings = ArchitectureSettings.GetSettings();
            GenerateNewVariables();
            GenerateNewReferences();
//            GenerateReferenceDrawers();
//            GenerateVariableDrawers();
            GenerateRuntimeSets();
            GenerateStaticSets();
            GenerateSingleComponentReferences();
            GenerateEvents();
            GenerateGameEventListeners();
            GenerateGameEvents();
            GenerateEventDrawers();
            GenerateGameEventDrawers();
        }
        public static void SelectSettings()
        {
            ArchitectureSettings settings = ArchitectureSettings.GetSettings();

            Selection.activeObject = settings;
        }