Forge/Integration/BaseContainer.cs
/// <summary>
/// Creates a new container for the given entity.
/// </summary>
Creates a new container for the given entity.
Creates a new container for the given entity .
protected static TDerived CreateContainer(TEntity entity, int id, GameObject parent) {
            if (_containers.ContainsKey(id)) {
                Debug.LogError("Already created a EntityContainer for entity " + entity);
                return _containers[id];
            }
            GameObject gameObject = CreateGameObject(entity, parent);
            TDerived container = gameObject.AddComponent<TDerived>();
            _containers[id] = container;
            container.Initialize(entity);
            container._originalName = gameObject.name;
            container.UpdateName();
            InitializeRenderers(container.gameObject, entity);
            return container;
        }
protected static TDerived CreateContainer ( TEntity entity , int id , GameObject parent ) { if ( _containers . ContainsKey ( id ) ) { Debug . LogError ( " " + entity ) ; return _containers [ id ] ; } GameObject gameObject = CreateGameObject ( entity , parent ) ; TDerived container = gameObject . AddComponent < TDerived > ( ) ; _containers [ id ] = container ; container . Initialize ( entity ) ; container . _originalName = gameObject . name ; container . UpdateName ( ) ; InitializeRenderers ( container . gameObject , entity ) ; return container ; }
Creates a new container for the given entity.
Creates a new container for the given entity .
entity
TEntity
id
int
parent
GameObject