コード例 #1
0
        public static AMSettings UpdateAMSettings()
        {
            AMSettings amSettings = AddAMSettings();

            amSettings.IsBeginHotUpdate = !amSettings.IsBeginHotUpdate;
            AssetDatabase.SaveAssets();
            AssetDatabase.Refresh();
            Selection.activeObject = amSettings;
            return(amSettings);
        }
コード例 #2
0
        public static AMSettings AddAMSettings()
        {
            AMSettings amSettings = AssetDatabase.LoadAssetAtPath <AMSettings>("Assets/Resources/AMSettings.asset");

            if (amSettings == null)
            {
                amSettings = ScriptableObject.CreateInstance <AMSettings>();
                AssetDatabase.CreateAsset(amSettings, "Assets/Resources/AMSettings.asset");
                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();
            }
            Selection.activeObject = amSettings;
            return(amSettings);
        }