Ejemplo n.º 1
0
        protected GameObject CreateGameObject()
        {
            GameObject result = new GameObject(GetType().Name);

            monoBehaviourHelper         = result.AddComponent <DummyMonoBehaviour>();
            monoBehaviourHelper.Manager = this;
            result.transform.SetParent(ManagerUtils.GetOrCreateManagersParent());
            return(result);
        }
Ejemplo n.º 2
0
        static AssetBundleLoader()
        {
            assetBundleRefs = new Dictionary <string, AssetBundleRef>();
            GameObject go = new GameObject("AssetBundleLoader");

            go.hideFlags |= HideFlags.HideInHierarchy;
            GameObject.DontDestroyOnLoad(go);
            monoBehaviourHelper = go.AddComponent <DummyMonoBehaviour>();
        }
Ejemplo n.º 3
0
    private void AddManagerToScene()
    {
        GameObject managersObject = GameObject.Find(ManagersName);

        if (managersObject == null)
        {
            managersObject = new GameObject(ManagersName);
        }

        GameObject myGameObject = new GameObject(GetType().Name);

        monoBehaviourHelper = myGameObject.AddComponent <DummyMonoBehaviour>();
    }