Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using TMPro;
- public class StructureManager : MonoBehaviour
- {
- public GameObject WorldHolder;
- public PlayerScript PS;
- public CityManager CityMan;
- public Devmode Dev;
- public UIManager UMan;
- public IslandGenerator IG;
- public Animator NoteAnim; //notification bar
- public TextMeshProUGUI NoteText;
- [HideInInspector]
- public List<List<GameObject>> Templates = new List<List<GameObject>>();
- [Header("Defense")]
- public List<GameObject> Defense = new List<GameObject>();
- public List<GameObject> TemplateDefense = new List<GameObject>();
- [Header("Weapons")]
- public List<GameObject> Weapons = new List<GameObject>();
- public List<GameObject> TemplateWeapons = new List<GameObject>();
- [Header("Factories")]
- public List<GameObject> Factories = new List<GameObject>();
- public List<GameObject> TemplateFactories = new List<GameObject>();
- [Header("Houses")]
- public List<GameObject> Houses = new List<GameObject>();
- public List<GameObject> TemplateHouses = new List<GameObject>();
- [Header("Decoration")]
- public List<GameObject> Decoration = new List<GameObject>();
- public List<GameObject> TemplateDecoration = new List<GameObject>();
- [Header("Transport")]
- public List<GameObject> Transport = new List<GameObject>();
- public List<GameObject> TemplateTransport = new List<GameObject>();
- [Space(10)]
- [HideInInspector]
- public List<List<GameObject>> Builds = new List<List<GameObject>>();
- [Header("InScene")]
- public List<GameObject> _Defense = new List<GameObject>();
- public List<GameObject> _Weapons = new List<GameObject>();
- public List<GameObject> _Factories = new List<GameObject>();
- public List<GameObject> _Houses = new List<GameObject>();
- public List<GameObject> _Decoration = new List<GameObject>();
- public List<GameObject> _Transport = new List<GameObject>();
- [Space(10)]
- [Header("Floors")]
- public GameObject EmptyFoor;
- public List<GameObject> Floors = new List<GameObject>();
- public List<GameObject> _Floors = new List<GameObject>();
- public List<GameObject> FloorsTemplates = new List<GameObject>();
- [Space(10)]
- [Header("Island Stuff")]
- public GameObject myTotem;
- public List<GameObject> Totems = new List<GameObject>();
- public List<GameObject> Islands = new List<GameObject>();
- public List<GameObject> genIslands = new List<GameObject>();
- [Space(10)]
- [Header("Other Stuff")]
- public List<GameObject> Mines = new List<GameObject>();
- private void Start()
- {
- Builds.Add(_Defense);
- Builds.Add(_Weapons);
- Builds.Add(_Factories);
- Builds.Add(_Houses);
- Builds.Add(_Decoration);
- Builds.Add(_Transport);
- Builds.Add(_Floors);
- Dev.Log("Custom Obj Array set");
- Templates.Add(Defense);
- Templates.Add(Weapons);
- Templates.Add(Factories);
- Templates.Add(Houses);
- Templates.Add(Decoration);
- Templates.Add(Transport);
- Templates.Add(Floors);
- Dev.Log("Template Array Set");
- for (int i = 0; i < 12; i++)
- {
- string SaveName = PlayerPrefs.GetString(i + ":" + "SaveName");
- if (SaveName != "")
- {
- UMan.SaveSlots[i].transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = SaveName;
- UMan.SaveSlots[i].transform.GetChild(1).GetComponent<TextMeshProUGUI>().text = PlayerPrefs.GetString(SaveName + ":" + "DateTime");
- UMan.SaveSlots[i].transform.GetChild(2).GetComponent<TextMeshProUGUI>().text = (PlayerPrefs.GetInt(SaveName + ":" + "UniqueID")+PlayerPrefs.GetInt(SaveName + ":" + "IleTotal")).ToString();
- }
- }
- }
- public void ReciveObj(GameObject obj)
- {
- string Class = obj.GetComponent<SDH>().Class;
- if(Class == "Defense")
- {
- _Defense.Add(obj);
- }
- if (Class == "Weapons")
- {
- _Weapons.Add(obj);
- }
- if (Class == "Factories")
- {
- _Factories.Add(obj);
- }
- if (Class == "Houses")
- {
- _Houses.Add(obj);
- }
- if (Class == "Decoration")
- {
- _Decoration.Add(obj);
- }
- if (Class == "Transport")
- {
- _Transport.Add(obj);
- }
- Dev.Log("Structure Manager recived " + obj.name + " from class " + Class);
- }
- public void ClearSave(string SaveName, int menuIndex)
- {
- StartCoroutine(DataCorDelete(SaveName, menuIndex));
- }
- public void SaveData(string SaveName, int MenuIndex)
- {
- StartCoroutine(DataCorSave(SaveName, MenuIndex));
- }
- public void ClearCurrentPlate()
- {
- Dev.Log("Clearing plate");
- foreach (List<GameObject> array in Builds)
- {
- foreach (GameObject obj in array)
- {
- SDH data = obj.GetComponent<SDH>();
- data.isDestroyed = 1;
- Destroy(obj);
- }
- }
- foreach (List<GameObject> array in Builds)
- {
- array.Clear();
- Dev.Log("Objs Cleared");
- }
- CityMan.Population = 0;
- CityMan.Money = 0;
- for (int i = 0; i < CityMan.Resource.Count; i++)
- {
- CityMan.Resource[i] = 0;
- }
- Dev.Log("Clearing Resources");
- foreach(GameObject ile in genIslands)
- {
- Destroy(ile);
- }
- Destroy(myTotem);
- genIslands.Clear();
- Dev.Log("Islands Cleared");
- Dev.Log("Totem Reset");
- Dev.Log("Plate Cleared");
- }
- public void LoadData(string SaveName)
- {
- StartCoroutine(DataCorLoad(SaveName));
- }
- private void Update()
- {
- if (PlayerPrefs.GetInt("UniqueID") > PlayerPrefs.GetInt("MostObjs"))
- {
- PlayerPrefs.SetInt("MostObjs", PlayerPrefs.GetInt("UniqueID"));
- }
- }
- IEnumerator DataCorSave(string SaveName, int MenuIndex)
- {
- yield return null;
- Dev.Log("Saving Data of " + SaveName);
- NoteText.text = "Saving";
- NoteAnim.SetTrigger("Note");
- string Time = System.DateTime.Now.ToShortDateString() + " " + System.DateTime.Now.ToShortTimeString();
- PlayerPrefs.SetInt(SaveName + ":" + "Population", CityMan.Population);
- PlayerPrefs.SetInt(SaveName + ":" + "Money", CityMan.Money);
- PlayerPrefs.SetInt(SaveName + ":" + "UniqueID", PS.nextUniqueID);
- PlayerPrefs.SetInt(SaveName + ":" + "SaveSlot", MenuIndex);
- PlayerPrefs.SetString(SaveName + ":" + "DateTime", Time);
- PlayerPrefs.SetString(MenuIndex + ":" + "SaveName", SaveName);
- PlayerPrefs.SetFloat(SaveName + ":" + "PlayerxPos", PS.PlayerModel.transform.position.x);
- PlayerPrefs.SetFloat(SaveName + ":" + "PlayeryPos", PS.PlayerModel.transform.position.y);
- PlayerPrefs.SetFloat(SaveName + ":" + "PlayerzPos", PS.PlayerModel.transform.position.z);
- Dev.Log("Player Data saved");
- Dev.Log("UI Prefs saved");
- foreach (string res in CityMan.Names)
- {
- PlayerPrefs.SetInt(SaveName + ":" + res, CityMan.Resource[CityMan.Names.IndexOf(res)]);
- Dev.Log("Saving " + CityMan.Resource[CityMan.Names.IndexOf(res)] + " " + SaveName + ":" + res);
- yield return null;
- }
- foreach (List<GameObject> array in Builds)
- {
- yield return null;
- foreach (GameObject obj in array)
- {
- SDH _sdh = obj.GetComponent<SDH>();
- int ID = _sdh.uniqueID;
- Debug.Log(ID);
- PlayerPrefs.SetInt(SaveName + ":" + ID.ToString() + "ID", ID);
- PlayerPrefs.SetString(SaveName + ":" + ID.ToString() + "Type", _sdh.type);
- PlayerPrefs.SetString(SaveName + ":" + ID.ToString() + "Class", _sdh.Class);
- PlayerPrefs.SetFloat(SaveName + ":" + ID.ToString() + "xPos", _sdh.xPos);
- PlayerPrefs.SetFloat(SaveName + ":" + ID.ToString() + "yPos", _sdh.yPos);
- PlayerPrefs.SetFloat(SaveName + ":" + ID.ToString() + "zPos", _sdh.zPos);
- PlayerPrefs.SetFloat(SaveName + ":" + ID.ToString() + "Rot", _sdh.Rot);
- PlayerPrefs.SetInt(SaveName + ":" + ID.ToString() + "isDestroyed", _sdh.isDestroyed);
- PlayerPrefs.SetFloat(SaveName + ":" + ID.ToString() + "Durab", _sdh.durability);
- PlayerPrefs.SetFloat(SaveName + ":" + ID.ToString() + "Health", _sdh.health);
- Dev.Log("Saving " + SaveName + ":" + ID + " : " + _sdh.type + " : " + " : " + _sdh.Class);
- //Debug.Log(PS.nextUniqueID);
- //Debug.Log("ID = " + ID + " Type = " + _sdh.type + " Class = " + _sdh.Class + " Pos = " + new Vector3(_sdh.xPos,_sdh.yPos,_sdh.zPos) + " Rot = " + _sdh.Rot + " IsD = " + _sdh.isDestroyed);
- }
- }
- foreach (GameObject ile in genIslands)
- {
- yield return null;
- IslandData IleData = ile.GetComponent<IslandData>();
- PlayerPrefs.SetInt(SaveName + ":" + IleData.islandID.ToString() + "IleID", IleData.islandID);
- PlayerPrefs.SetInt(SaveName + ":" + IleData.islandID.ToString() + "IleType", IleData.ileType);
- PlayerPrefs.SetFloat(SaveName + ":" + IleData.islandID.ToString() + "IleRot", IleData.Rot);
- PlayerPrefs.SetFloat(SaveName + ":" + IleData.islandID.ToString() + "IlexPos", IleData.xPos);
- PlayerPrefs.SetFloat(SaveName + ":" + IleData.islandID.ToString() + "IleyPos", IleData.yPos);
- PlayerPrefs.SetFloat(SaveName + ":" + IleData.islandID.ToString() + "IlezPos", IleData.zPos);
- Dev.Log("Saving Island " + SaveName + ":" + IleData.islandID + " : " + IleData.ileType);
- PlayerPrefs.SetInt(SaveName + ":" + "IleTotal", IG.islandID);
- PlayerPrefs.SetFloat(SaveName + ":" + "TimeElapsed", IG.elapsetTimeInGame);
- PlayerPrefs.SetFloat(SaveName + ":" + "TimeOfDay", IG.todayTime);
- }
- PlayerPrefs.SetInt(SaveName + ":" + "TotemID", myTotem.GetComponent<TotemData>().totemID);
- PlayerPrefs.SetInt(SaveName + ":" + "TotemBuffScale", myTotem.GetComponent<TotemData>().buffScale);
- UMan.SaveSlots[MenuIndex].transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = SaveName;
- UMan.SaveSlots[MenuIndex].transform.GetChild(1).GetComponent<TextMeshProUGUI>().text = PlayerPrefs.GetString(SaveName + ":" + "DateTime");
- UMan.SaveSlots[MenuIndex].transform.GetChild(2).GetComponent<TextMeshProUGUI>().text = (PlayerPrefs.GetInt(SaveName + ":" + "UniqueID") + PlayerPrefs.GetInt(SaveName + ":" + "IleTotal")).ToString();
- NoteText.text = "Saved";
- NoteAnim.SetTrigger("Note");
- Dev.Log("Saved");
- UMan.SaveEditUI.SetActive(false);
- }
- IEnumerator DataCorLoad(string SaveName)
- {
- yield return null;
- Dev.Log("Loading Data of " + SaveName);
- NoteText.text = "Loading Save";
- NoteAnim.SetTrigger("Note");
- ClearCurrentPlate();
- PS.nextUniqueID = PlayerPrefs.GetInt(SaveName + ":" + "UniqueID");
- CityMan.Money = PlayerPrefs.GetInt(SaveName + ":" + "Money");
- CityMan.Population = PlayerPrefs.GetInt(SaveName + ":" + "Population");
- int Menuindex = PlayerPrefs.GetInt(SaveName + ":" + "SaveSlot");
- float plrXPos = PlayerPrefs.GetFloat(SaveName + ":" + "PlayerxPos");
- float plrYPos = PlayerPrefs.GetFloat(SaveName + ":" + "PlayeryPos");
- float plrZPos = PlayerPrefs.GetFloat(SaveName + ":" + "PlayerzPos");
- Dev.Log("Loading Player Data");
- foreach (string res in CityMan.Names)
- {
- CityMan.Resource[CityMan.Names.IndexOf(res)] = PlayerPrefs.GetInt(SaveName + ":" + res);
- Dev.Log("Loading Resource " + CityMan.Resource[CityMan.Names.IndexOf(res)] + " " + res);
- yield return null;
- }
- PS.FilledFloors.Clear(); //ref to down below
- for (int i = 0; i < PS.nextUniqueID; i++)
- {
- yield return null;
- //Debug.Log("Loop " +i+"/"+PS.nextUniqueID);
- if (PlayerPrefs.GetInt(SaveName + ":" + i.ToString() + "isDestroyed") == 0)
- {
- int ID = i;
- string Type = PlayerPrefs.GetString(SaveName + ":" + ID.ToString() + "Type");
- string Class = PlayerPrefs.GetString(SaveName + ":" + ID.ToString() + "Class");
- float xPos = PlayerPrefs.GetFloat(SaveName + ":" + ID.ToString() + "xPos");
- float yPos = PlayerPrefs.GetFloat(SaveName + ":" + ID.ToString() + "yPos");
- float zPos = PlayerPrefs.GetFloat(SaveName + ":" + ID.ToString() + "zPos");
- float Rot = PlayerPrefs.GetFloat(SaveName + ":" + ID.ToString() + "Rot");
- int isDestroyed = PlayerPrefs.GetInt(SaveName + ":" + ID.ToString() + "isDestroyed");
- float Durab = PlayerPrefs.GetFloat(SaveName + ":" + ID.ToString() + "Durab");
- float Health = PlayerPrefs.GetFloat(SaveName + ":" + ID.ToString() + "Health");
- Vector3 Position = new Vector3(xPos, yPos, zPos);
- Dev.Log("Data of object " + ID + " accessed, class = " + Class + ", type = " + Type);
- //Debug.Log("ID = " +ID+" Type = " + Type+" Class = "+Class+" Pos = "+Position+ " Rot = "+Rot+" IsD = " +isDestroyed);
- GameObject inst = null;
- if (Class == "Defense")
- {
- for (int R = 0; R < Defense.Count; R++)
- {
- if (Defense[R].name + "(Clone)" == Type)
- {
- inst = Instantiate(Defense[R], Position, new Quaternion(0, 0, 0, 0), WorldHolder.transform);
- _Defense.Add(inst);
- }
- }
- }
- else if (Class == "Weapons")
- {
- for (int R = 0; R < Weapons.Count; R++)
- {
- if (Weapons[R].name + "(Clone)" == Type)
- {
- inst = Instantiate(Weapons[R], Position, new Quaternion(0, 0, 0, 0), WorldHolder.transform);
- _Weapons.Add(inst);
- }
- }
- }
- else if (Class == "Factories")
- {
- for (int R = 0; R < Factories.Count; R++)
- {
- if (Factories[R].name + "(Clone)" == Type)
- {
- inst = Instantiate(Factories[R], Position, new Quaternion(0, 0, 0, 0), WorldHolder.transform);
- _Factories.Add(inst);
- }
- }
- }
- else if (Class == "Houses")
- {
- for (int R = 0; R < Houses.Count; R++)
- {
- if (Houses[R].name + "(Clone)" == Type)
- {
- inst = Instantiate(Houses[R], Position, new Quaternion(0, 0, 0, 0), WorldHolder.transform);
- _Houses.Add(inst);
- }
- }
- }
- else if (Class == "Decoration")
- {
- for (int R = 0; R < Decoration.Count; R++)
- {
- if (Decoration[R].name + "(Clone)" == Type)
- {
- inst = Instantiate(Decoration[R], Position, new Quaternion(0, 0, 0, 0), WorldHolder.transform);
- _Decoration.Add(inst);
- }
- }
- }
- else if (Class == "Transport")
- {
- for (int R = 0; R < Transport.Count; R++)
- {
- if (Transport[R].name + "(Clone)" == Type)
- {
- inst = Instantiate(Transport[R], Position, new Quaternion(0, 0, 0, 0), WorldHolder.transform);
- _Transport.Add(inst);
- }
- }
- }
- else if (Class == "Floor")
- {
- for (int R = 0; R < Floors.Count; R++)
- {
- if (Floors[R].name + "(Clone)" == Type)
- {
- inst = Instantiate(Floors[R], Position, new Quaternion(0, 0, 0, 0), WorldHolder.transform);
- _Floors.Add(inst);
- PS.FilledFloors.Add(Position);
- if (!PS.FilledFloors.Contains(new Vector3(Position.x + 5, 0, Position.z)))
- {
- Instantiate(EmptyFoor, new Vector3(Position.x + 5, 0, Position.z), Quaternion.identity, inst.transform);
- }
- if (!PS.FilledFloors.Contains(new Vector3(Position.x - 5, 0, Position.z)))
- {
- Instantiate(EmptyFoor, new Vector3(Position.x - 5, 0, Position.z), Quaternion.identity, inst.transform);
- }
- if (!PS.FilledFloors.Contains(new Vector3(Position.x, 0, Position.z + 5)))
- {
- Instantiate(EmptyFoor, new Vector3(Position.x, 0, Position.z + 5), Quaternion.identity, inst.transform);
- }
- if (!PS.FilledFloors.Contains(new Vector3(Position.x, 0, Position.z - 5)))
- {
- Instantiate(EmptyFoor, new Vector3(Position.x, 0, Position.z - 5), Quaternion.identity, inst.transform);
- }
- }
- }
- }
- else
- {
- inst = null;
- Dev.Log("Item not found");
- }
- if (inst != null)
- {
- inst.transform.localEulerAngles = new Vector3(0, Rot, 0);
- SDH sdh = inst.GetComponent<SDH>();
- sdh.uniqueID = ID;
- sdh.type = Type;
- sdh.Class = Class;
- sdh.xPos = xPos;
- sdh.yPos = yPos;
- sdh.zPos = zPos;
- sdh.Rot = Rot;
- sdh.isDestroyed = isDestroyed;
- sdh.durability = Durab;
- sdh.health = Health;
- Dev.Log("Loaded " + Type + " at " + xPos + "," + yPos + "," + zPos + " with health " + Durab + "/" + Health);
- }
- UMan.SaveEditUI.SetActive(false);
- }
- }
- for (int i = 0; i < PlayerPrefs.GetInt(SaveName + ":" + "IleTotal"); i++)
- {
- yield return null;
- int IleID = PlayerPrefs.GetInt(SaveName + ":" + i.ToString() + "IleID");
- int IleType = PlayerPrefs.GetInt(SaveName + ":" + i.ToString() + "IleType");
- float IleRot = PlayerPrefs.GetFloat(SaveName + ":" + i.ToString() + "IleRot");
- float IlexPos = PlayerPrefs.GetFloat(SaveName + ":" + i.ToString() + "IlexPos");
- float IleyPos = PlayerPrefs.GetFloat(SaveName + ":" + i.ToString() + "IleyPos");
- float IlezPos = PlayerPrefs.GetFloat(SaveName + ":" + i.ToString() + "IlezPos");
- Dev.Log("Loading Island " + SaveName + ":" + i.ToString() + " : " + IleType);
- GameObject newIle = Instantiate(Islands[IleType], new Vector3(IlexPos, IleyPos, IlezPos), Quaternion.identity, WorldHolder.transform);
- newIle.transform.localEulerAngles = new Vector3(0, IleRot, 0);
- IslandData IleData = newIle.GetComponent<IslandData>();
- IleData.islandID = IleID;
- IleData.ileType = IleType;
- IleData.Rot = IleRot;
- IleData.xPos = IlexPos;
- IleData.yPos = IleyPos;
- IleData.zPos = IlezPos;
- genIslands.Add(newIle);
- }
- IG.todayTime = PlayerPrefs.GetFloat(SaveName + ":" + "TimeOfDay");
- IG.elapsetTimeInGame = PlayerPrefs.GetFloat(SaveName + ":" + "TimeElapsed");
- GameObject first = genIslands[0];
- genIslands.Remove(first);
- Debug.Log(first.transform.position);
- Destroy(first);
- myTotem = Instantiate(Totems[PlayerPrefs.GetInt(SaveName + ":" + "TotemID")],IG.TotemSpawn,Quaternion.identity,WorldHolder.transform);
- myTotem.GetComponent<TotemData>().buffScale = PlayerPrefs.GetInt(SaveName + ":" + "TotemBuffScale");
- PS.PlayerModel.transform.position = new Vector3(plrXPos, plrYPos, plrZPos);
- CityMan.UpdateResDisp();
- NoteText.text = "Loaded";
- NoteAnim.SetTrigger("Note");
- Dev.Log("Loaded");
- }
- IEnumerator DataCorDelete(string SaveName, int menuIndex)
- {
- yield return null;
- NoteText.text = "Clearing Save";
- NoteAnim.SetTrigger("Note");
- Dev.Log("clearing Save of " + SaveName);
- ClearCurrentPlate();
- int HS = PlayerPrefs.GetInt("MostObjs");
- for (int i = 0; i < HS; i++)
- {
- yield return null;
- if (PlayerPrefs.HasKey(SaveName + ":" + i.ToString() + "ID"))
- {
- Dev.Log("Deleting item " + SaveName + ":" + i);
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "ID");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "Type");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "Class");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "xPos");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "yPos");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "zPos");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "Rot");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "isDestroyed");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "Duraby");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "Health");
- }
- }
- PlayerPrefs.DeleteKey(SaveName + ":" + "UniqueID");
- PlayerPrefs.DeleteKey(SaveName + ":" + "Money");
- PlayerPrefs.DeleteKey(SaveName + ":" + "Population");
- PlayerPrefs.DeleteKey(menuIndex + ":" + "SaveName");
- PlayerPrefs.DeleteKey(SaveName + ":" + "SaveSlot");
- PlayerPrefs.DeleteKey(SaveName + ":" + "DateTime");
- for (int i = 0; i < PlayerPrefs.GetInt(SaveName + ":" + "IleTotal"); i++)
- {
- yield return null;
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "IleID");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "IleType");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "IleRot");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "IlexPos");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "IleyPos");
- PlayerPrefs.DeleteKey(SaveName + ":" + i.ToString() + "IlezPos");
- }
- PlayerPrefs.DeleteKey(SaveName + ":" + "IleTotal");
- PlayerPrefs.DeleteKey(SaveName + ":" + "TimeElapsed");
- PlayerPrefs.DeleteKey(SaveName + ":" + "TimeOfDay");
- Dev.Log("Player Data Deleted");
- foreach (string res in CityMan.Names)
- {
- yield return null;
- PlayerPrefs.DeleteKey(SaveName + ":" + res);
- Dev.Log("Deleting resource " + (SaveName + ":" + res));
- }
- UMan.SaveSlots[menuIndex].transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "New Save";
- UMan.SaveSlots[menuIndex].transform.GetChild(1).GetComponent<TextMeshProUGUI>().text = "MM/DD/YYYY";
- UMan.SaveSlots[menuIndex].transform.GetChild(2).GetComponent<TextMeshProUGUI>().text = "00.0Mb";
- NoteText.text = "Save Cleared";
- NoteAnim.SetTrigger("Note");
- Dev.Log("All Data from " + SaveName + " Deleted");
- UMan.SaveEditUI.SetActive(false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement