using System.Collections; using System.Collections.Generic; using UnityEngine; public class DELETE : MonoBehaviour { public static void Delete() { string Ostring=_G.SELECTED.Replace("clone","_"); int nO = int.Parse(Ostring.Split('_')[1]); if(_G.OBJs[nO] != null)_G.OBJs[nO][0] = "null"; print("_G.SELECTED======"+_G.SELECTED); DestroyImmediate(GameObject.Find(_G.SELECTED).gameObject); } }