private static SceneManagerSettings Instance () { if (instance == null) { instance = Resources.Load (SettingsAssetName) as SceneManagerSettings; if (instance == null) { instance = CreateInstance<SceneManagerSettings> (); #if UNITY_EDITOR string properPath = Path.Combine (Application.dataPath, SettingsAssetPath); if (Directory.Exists (properPath) == false) AssetDatabase.CreateFolder ("Assets", SettingsAssetPath); string fullPath = Path.Combine (Path.Combine("Assets", SettingsAssetPath), SettingsAssetName + SettingsAssetExtension ); AssetDatabase.CreateAsset (instance, fullPath); #endif } } return instance; }
private static SceneManagerSettings Instance() { if (instance == null) { instance = Resources.Load(SettingsAssetName) as SceneManagerSettings; if (instance == null) { instance = CreateInstance <SceneManagerSettings> (); #if UNITY_EDITOR string properPath = Path.Combine(Application.dataPath, SettingsAssetPath); if (Directory.Exists(properPath) == false) { AssetDatabase.CreateFolder("Assets", SettingsAssetPath); } string fullPath = Path.Combine(Path.Combine("Assets", SettingsAssetPath), SettingsAssetName + SettingsAssetExtension ); AssetDatabase.CreateAsset(instance, fullPath); #endif } } return(instance); }