public InstantiateInspectObject Copy(Transform parent)
    {
        InstantiateInspectObject _obj = Instantiate(this, Vector3.zero, Quaternion.identity);

        _obj.transform.SetParent(parent);
        _obj.transform.localPosition    = new Vector3(0, 0, zOffset);
        _obj.transform.localEulerAngles = CustomEulerAngles;

        return(_obj);
    }
Ejemplo n.º 2
0
 void OnEnable()
 {
     if (InspectModeGameObject.Value != null)
     {
         spawnedObject = InspectModeGameObject.Value.GetComponent <InstantiateInspectObject>().Copy(this.transform);
     }
     else
     {
         Debug.Log(" iots null;");
     }
 }