private static ResourceManagerSettings Instance ()
    {
        if (instance == null)
        {
            instance = Resources.Load (SettingsAssetName) as ResourceManagerSettings;
            if (instance == null)
            {
                instance = CreateInstance<ResourceManagerSettings> ();
#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 ResourceManagerSettings Instance()
    {
        if (instance == null)
        {
            instance = Resources.Load(SettingsAssetName) as ResourceManagerSettings;
            if (instance == null)
            {
                instance = CreateInstance <ResourceManagerSettings> ();
#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);
    }
Example #3
0
 public ResourceManager(ResourceManagerSettings settings)
 {
     _settings = settings;
 }