Class InfoWorldLayer
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
info_world_layer. Shows or hides a world layer and spawns or destroys the entities in the layer's entity lump, by entity I/O. The entities spawn as their own spawn group, and destroying them unloads it.
public sealed class InfoWorldLayer : BaseEntityInheritance
object ← BaseEntity ← InfoWorldLayer
Inherited Members
BaseEntity.Scene, BaseEntity.RootNode, BaseEntity.Transform, BaseEntity.RigidTransform, BaseEntity.EntitySystem, BaseEntity.Data, BaseEntity.SpawnData, BaseEntity.NameFixup, BaseEntity.SpawnGroup, BaseEntity.Classname, BaseEntity.TargetName, BaseEntity.SpawnFlags, BaseEntity.SpawnTransform, BaseEntity.Owner, BaseEntity.MoveParent, BaseEntity.EntityScale, BaseEntity.ModelName, BaseEntity.Origin, BaseEntity.Angles, BaseEntity.WorldOrigin, BaseEntity.WorldAngles, BaseEntity.Velocity, BaseEntity.AngularVelocity, BaseEntity.NextThink, BaseEntity.MoveDoneTime, BaseEntity.IsRemoved, BaseEntity.Collider, BaseEntity.IsSolid, BaseEntity.IsTrigger, BaseEntity.IsDrawn, BaseEntity.IsShown, BaseEntity.IsCollidable, BaseEntity.TouchingEntities, BaseEntity.HasSpawnFlags<TSpawnFlags>(TSpawnFlags), BaseEntity.Spawn(), BaseEntity.Activate(), BaseEntity.Think(), BaseEntity.RoundStart(), BaseEntity.MoveDone(), BaseEntity.TryGetTouchBounds(out Vector3, out Vector3), BaseEntity.ObjectCaps, BaseEntity.Use(BaseEntity?), BaseEntity.Teleport(Vector3, Vector3?), BaseEntity.AcceptInput(string, EntityInputData), BaseEntity.SetNextThink(float), BaseEntity.SetMoveDoneTime(float), BaseEntity.GetSurfaceVelocity(Vector3), BaseEntity.AngleMod(float)
Remarks
The layer belongs to the loaded world named by InfoWorldLayer.WorldName in this entity's world group, which need not be the world this entity is in. The entities of the layer spawn there as a group, unplaced and without name fixups, so they stay where they were authored in that world.
Entities spawned by an input after load are not bound to the scene's cubemaps and light probes, which are only assigned when the scene is first initialized.
Constructors
InfoWorldLayer(EntitySystem, EntitySpawnInfo)
Initializes an info_world_layer from its keyvalues.
public InfoWorldLayer(EntitySystem system, EntitySpawnInfo spawnInfo)Parameters
system EntitySystem
spawnInfo EntitySpawnInfo
Properties
IsVisibleOnSpawn
Gets whether the controlled layer is shown when the map loads.
public bool IsVisibleOnSpawn { get; }Property Value
bool
Layer
Gets the world layer this entity controls, or null when it names none.
public WorldLayer? Layer { get; }Property Value
LayerSpawnGroup
Gets the spawn group of the layer's entities, or null when they are not spawned.
public SpawnGroup? LayerSpawnGroup { get; }Property Value
WorldLayerName
Gets the name of the world layer this entity controls, which also names its entity lump.
public string? WorldLayerName { get; }Property Value
string?
WorldName
Gets the name of the world the layer belongs to.
public string? WorldName { get; }Property Value
string?
Methods
DispatchInput(string, EntityInputData)
Runs the handler declared with EntityInputAttribute for an input.
protected override bool DispatchInput(string inputName, EntityInputData data)Parameters
inputName string
data EntityInputData
Returns
bool
true when a handler ran.
OnRemove()
Called as the entity leaves the world, before its nodes leave the scene. Release anything the entity started here, such as a playing sound.
protected override void OnRemove()SetLayerVisible(bool)
Shows or hides the controlled layer.
public void SetLayerVisible(bool visible)Parameters
visible bool
Spawn()
Sets up the entity (model, class keyvalues, first think). Called once the entity's spawn group has created all entities of the group, after the move parent has spawned.
public override void Spawn()Remarks
An override calls this first: it builds the node from BaseEntity.CreateRootNode() and snaps the entity onto its parent's attachment, which the rest of the override reads.

