/// <summary> /// Find the original object from the temporary object /// </summary> /// <param name="tempObject"></param> /// <returns></returns> public static GameObject GetOriginalObject(GameObject tempObject) { TemporaryGraph temp = uNodeHelper.GetComponentInParent <TemporaryGraph>(tempObject); if (temp != null) { return(temp.prefab); } return(null); }
/// <summary> /// Find the original object from the temporary object /// </summary> /// <param name="tempObject"></param> /// <param name="root"></param> /// <returns></returns> public static GameObject GetOriginalObject(GameObject tempObject, out Transform root) { TemporaryGraph temp = uNodeHelper.GetComponentInParent <TemporaryGraph>(tempObject); if (temp != null) { root = temp.transform.GetChild(0); return(temp.prefab); } root = null; return(null); }