Class HammerEntityVisuals
Namespace: ValveResourceFormat.Renderer.Editor.Entities
Assembly: Renderer.dll
Draws entities the way Hammer shows them, from what their Hammer classes declare: the model, sprite or coloured box an entity is placed as, the helper lines its class draws to the entities it names, and a line along each of its entity I/O connections. None of it is what the game shows.
public sealed class HammerEntityVisuals : IEntityToolVisualsInheritance
object ← HammerEntityVisuals
Implements
Fields
ConnectionsLayerName
Visibility layer of the lines along entity I/O connections.
public const string ConnectionsLayerName = "Entity Connections"Field Value
string
MarkerLayerName
Visibility layer of the stand-ins and helper lines, so they can be hidden apart from the world.
public const string MarkerLayerName = "Entities (editor only)"Field Value
string
Methods
AddEntityRelations(Scene, IReadOnlyList<BaseEntity>)
Adds nodes relating the entities a world spawned into a scene, once all of them have spawned.
public void AddEntityRelations(Scene scene, IReadOnlyList<BaseEntity> entities)Parameters
scene Scene
The scene they spawned into.
entities IReadOnlyList<BaseEntity>
The spawned entities.
CreateStandIn(BaseEntity, ObjectTypeFlags)
Builds the stand-in drawn for an entity that has nothing of its own to draw. It is not added to the scene: the entity owns and places it.
public SceneNode? CreateStandIn(BaseEntity entity, ObjectTypeFlags flags)Parameters
entity BaseEntity
The entity.
flags ObjectTypeFlags
Flags for the node.
Returns
The node, or null to draw nothing.
Exceptions
The Hammer class names an icon of a type not handled here.
GetResourcesToPreload(string)
Gets the resources the stand-in for an entity of a class loads, so a world can load them alongside its own.
public IEnumerable<string> GetResourcesToPreload(string classname)Parameters
classname string
The entity classname.
Returns
IEnumerable<string>
The resource names.

