public void OnDestroy() { if (!ReferenceEquals(m_skyNode, null)) { m_skyNode.Cleanup(); Component.Destroy(m_skyNode); } if (!ReferenceEquals(m_oceanNode, null)) { m_oceanNode.Cleanup(); Component.Destroy(m_oceanNode); } }
public void OnDestroy() { m_skyNode.Cleanup(); Component.Destroy(m_skyNode); UnityEngine.Object.Destroy(m_skyNode); if (hasOcean && Core.Instance.useOceanShaders) { m_oceanNode.Cleanup(); UnityEngine.Object.Destroy(m_oceanNode); } }