Esempio n. 1
0
        static void TestLoadMenu()
        {
            CoreSettings core = CreateInstance <CoreSettings>();

            AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);
            AssetDatabase.ImportAsset(Constants.API.Core.DataLocation);


            // Create the coreSettings asset.
            core = AssetDatabase.LoadAssetAtPath(Constants.API.Core.DataLocation, typeof(CoreSettings)) as CoreSettings;

            if (core == null)
            {
                Debug.Log("Test Load: Failed.");
            }
            else
            {
                Debug.Log("Test load:" + core.LaserLenght + "\n");
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Save changes to disk.
 /// </summary>
 public void Save(CoreSettings core)
 {
     Debug.Log("Core Saved");
     EditorUtility.SetDirty(core);
 }