public static void Detach <T>(this IPresenter <T> self) where T : AttachableView { if (self.View == null) { return; } self.Destroy(); self.View = null; }
public static void Unload <T>(this IPresenter <T> self) where T : LoadableView { if (self.View == null) { return; } self.Destroy(); Object.Destroy(self.View.gameObject); self.View = null; }