using System.Collections; using System.Collections.Generic; using UnityEngine; using Raumgleiter.BaseRGDK.JSON; using Raumgleiter.BaseRGDK.Development; public class MediasManager { //Connections //[Header("Connections")] //Resources //[Header("Resources")] //Attributes //[Header("Attributes")] private JSONNode LoadedJSON = JSONNode.Empty(); public string Title = ""; public string Path = ""; public string Checksum = ""; public List Textures = new List(); //Stats //[Header("Stats")] //Getter //Delegates //------------------------------------------------------------------------------------------------------------------ //awake protected void Awake() { } //------------------------------------------------------------------------------------------------------------------ //start protected void Start() { } //------------------------------------------------------------------------------------------------------------------ //setup public void SetUp(JSONNode loadedJSON) { LoadedJSON = loadedJSON; Title = LoadedJSON["title"]; Path = LoadedJSON["path"]; Checksum = LoadedJSON["checksum"]; //Repair Path Path = Path.Replace(" > ", " _ "); Path = Path.Replace(" | ", " _ "); //Debug DBug.Log( "Title: " + Title, "MediasManager::SetUp", VerbosityLevel._30_Informative, DBug.DontForce); DBug.Log( "Title: " + Path, "MediasManager::SetUp", VerbosityLevel._30_Informative, DBug.DontForce); DBug.Log( "Title: " + Checksum, "MediasManager::SetUp", VerbosityLevel._30_Informative, DBug.DontForce); } //------------------------------------------------------------------------------------------------------------------ //destroy //*********************************************************************************************************************** //update //*********************************************************************************************************************** //refresh //------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------ //*********************************************************************************************************************** //events //------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------ //*********************************************************************************************************************** //private, protected //------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------ //*********************************************************************************************************************** //internal //------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------ //*********************************************************************************************************************** //public static //------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------ //*********************************************************************************************************************** //public public JSONNode GetJSON() { //Get JSON of Medias LoadedJSON["textures"] = new JSONArray(); for (int i = 0; i < Textures.Count; i++) { LoadedJSON["textures"].Add(Textures[i].GetJSON()); } return LoadedJSON; } //------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------ //*********************************************************************************************************************** //getter, setter //------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------ }