public void click() { if (GameObject.Find("Trash")) { if (!GameObject.Find("Trash").GetComponent <Trash>().trashOpen) { jaa = true; path2 = ThePath; Application.LoadLevel(2); } else { GameObject.Find("rlyController").GetComponent <openSomething>().open(); string[] splitString = ThePath.Split(new char[] { '/', '\\' }); GameObject.Find("rlyText").GetComponent <TextMeshProUGUI>().text = "are you sure that you want to delete " + splitString[splitString.Length - 1].Substring(0, splitString[splitString.Length - 1].Length - 4); delPlaceholder lol = GameObject.Find("yesDelete").GetComponent <delPlaceholder>(); lol.buttonLocal = this; lol.online = false; } } else { jaa = true; path2 = ThePath; Application.LoadLevel(2); } }
public void click() { string[] splitty = name.Split(';'); GameObject.Find("rlyController").GetComponent <openSomething>().open(); GameObject.Find("rlyText").GetComponent <TextMeshProUGUI>().text = "are you sure that you want to delete " + splitty[0] + "?"; delPlaceholder lol = GameObject.Find("yesDelete").GetComponent <delPlaceholder>(); lol.button = this; lol.online = true; }