public static debugPlane Pop(UnityEngine.Object template, MPDebugPlane plane) { debugPlane d = null; if (mqPool.Count > 0) { d = mqPool.Dequeue(); } if (d == null) { GameObject go = MonoBehaviour.Instantiate(template) as GameObject; go.hideFlags = HideFlags.HideInHierarchy; go.transform.rotation = Quaternion.Euler(90, 0, 0); d = new debugPlane(go); } d.Reset(plane); return(d); }
public void Reset(MPDebugPlane plane) { mGo.SetActive(true); mGo.transform.position = plane.center; mGo.transform.localScale = plane.size; }