Exemple #1
0
        public void Attach(T entity)
        {
            Entities.Add(entity);
            entitiesById.Add(entity.Id, entity);

            if (entity.AutoScoped)
            {
                entity.BoltEntity.SetScopeAll(true);
            }

            EntityAttached(entity);

            EventEntityAttached?.Invoke(entity);
        }
        public void Attach(T entity)
        {
            entity.transform.SetParent(container);
            Entities.Add(entity);
            entitiesById.Add(entity.Id, entity);

            if (entity.AutoScoped)
            {
                entity.BoltEntity.SetScopeAll(true);
            }

            EntityAttached(entity);

            EventEntityAttached?.Invoke(entity);
        }