public void OpenLevel <T>(LevelName levelName) where T : LevelBase { if (m_LevelNow != null) { CloseLevel(); } GameObject Level = Mgr_AssetBundle.Instance.LoadAsset <GameObject>(ABTypes.prefab, levelName.ToString()); m_LevelNow = Instantiate(Level).GetComponent <T>() as LevelBase; m_LevelNow.transform.SetParent(GameManager.Instance.m_MainGame.m_Level, false); m_LevelNow.Init(); m_LevelNow.OnOpen(); }