public AssetTrackMgr(Transform rootTransform = null, InstantiateAction action = null) { rootTF = null == rootTransform ? new GameObject("AssetTrackRoot").transform : rootTransform; instantiateAction = null == action ? GameObject.Instantiate : action; containerPool = new ContainerPool(); GameObject.DontDestroyOnLoad(rootTF.gameObject); rootTF.gameObject.AddSingleComponent <ContainerMapChecker>().assetTrackMgr = this; }
private void OnEnable() { t = target as InstantiateAction; }