void OnDestroy() { if (m_Inspector != null) { GameObject.Destroy(m_Inspector.gameObject); m_Inspector = null; } }
void Start() { m_Depth = s_RecentDepth; m_FeatherLength = s_RecentFeatherLength; m_PlaneFeather = s_RecentPlaneFeather; m_MaterialSelect = s_RecentMaterialSelect; m_Inspector = VCEUIBoxMethodInspector.Instantiate(m_Parent.m_BoxMethodInspectorRes) as VCEUIBoxMethodInspector; m_Inspector.gameObject.SetActive(false); m_Inspector.transform.parent = m_Parent.m_MainInspector.transform; m_Inspector.transform.localPosition = new Vector3(0, -66, 0); m_Inspector.transform.localScale = Vector3.one; m_Inspector.m_SelectMethod = this; m_Inspector.gameObject.SetActive(true); }