private void DestroyMB(MonoBehaviour mb, IRemoteObjectsHash objectsHash) { objectsHash.Remove(mb.gameObject); var ct = mb as IDIClosedContext; if (ct != null) { ct.BeforeFactoryDestruction(); } GameObject.Destroy(mb.gameObject); }
private void DestroyDefault(UnityEngine.Object obj, IRemoteObjectsHash objectsHash) { objectsHash.Remove(obj); UnityEngine.Object.Destroy(obj); }