public Entity AddBlueprints(Entitas.Unity.Serialization.Blueprints.Blueprints newInstance)
        {
            var component = CreateComponent <BlueprintsComponent>(BlueprintsComponentIds.Blueprints);

            component.instance = newInstance;
            return(AddComponent(BlueprintsComponentIds.Blueprints, component));
        }
        public Entity ReplaceBlueprints(Entitas.Unity.Serialization.Blueprints.Blueprints newInstance)
        {
            var component = CreateComponent <BlueprintsComponent>(BlueprintsComponentIds.Blueprints);

            component.instance = newInstance;
            ReplaceComponent(BlueprintsComponentIds.Blueprints, component);
            return(this);
        }
        public Entity SetBlueprints(Entitas.Unity.Serialization.Blueprints.Blueprints newInstance)
        {
            if (hasBlueprints)
            {
                throw new EntitasException("Could not set blueprints!\n" + this + " already has an entity with BlueprintsComponent!",
                                           "You should check if the pool already has a blueprintsEntity before setting it or use pool.ReplaceBlueprints().");
            }
            var entity = CreateEntity();

            entity.AddBlueprints(newInstance);
            return(entity);
        }
        public Entity ReplaceBlueprints(Entitas.Unity.Serialization.Blueprints.Blueprints newInstance)
        {
            var entity = blueprintsEntity;

            if (entity == null)
            {
                entity = SetBlueprints(newInstance);
            }
            else
            {
                entity.ReplaceBlueprints(newInstance);
            }

            return(entity);
        }