Beispiel #1
0
        /// <summary>
        /// Sets the specified path as workspace.
        /// </summary>
        public static void SetWorkspace(string path)
        {
            WorkspacePath = path;
            PlayerPrefs.Save();

            MvcResources.Setup();
        }
Beispiel #2
0
        /// <summary>
        /// Loads the config file from resources and returns it.
        /// </summary>
        public static MvcConfig LoadFromResources()
        {
            TextAsset file = ResourceLoader.LoadTextAsset(
                MvcResources.GetConfigFilePath(false)
                );

            if (file == null)
            {
                RenLog.Log(LogLevel.Info, "MvcConfig.LoadFromResources - Text asset not found. Returning default configuration.");
                return(DefaultConfig);
            }
            return(new MvcConfig(file.text));
        }
Beispiel #3
0
 /// <summary>
 /// Returns the path to this view's prefab object.
 /// </summary>
 public string GetResourcePath(bool isFullPath, bool fromOriginal = false)
 {
     return(MvcResources.GetViewPrefabPath(this, GetViewName(fromOriginal), isFullPath));
 }
Beispiel #4
0
 /// <summary>
 /// Saves current instance to resources.
 /// </summary>
 public void Save()
 {
     MvcResources.SaveConfig(this);
 }