Esempio n. 1
0
 private void OnEnable()
 {
     saveSettings = Resources.Load <SaveSettings>("SaveSettingsData");
     if (saveSettings == null)
     {
         CreateAdSettings();
         saveSettings = Resources.Load <SaveSettings>("SaveSettingsData");
     }
     selectedSaveMethod = saveSettings.saveMethod;
     buildTargetGroup   = saveSettings.buildTargetGroup;
 }
Esempio n. 2
0
        public static void CreateAdSettings()
        {
            SaveSettings asset = ScriptableObject.CreateInstance <SaveSettings>();

            if (!AssetDatabase.IsValidFolder("Assets/GleyPlugins/AllPlatformsSave/Resources"))
            {
                AssetDatabase.CreateFolder("Assets/GleyPlugins/AllPlatformsSave", "Resources");
                AssetDatabase.Refresh();
            }

            AssetDatabase.CreateAsset(asset, "Assets/GleyPlugins/AllPlatformsSave/Resources/SaveSettingsData.asset");
            AssetDatabase.SaveAssets();
            AssetDatabase.Refresh();
        }