public class Sandbox.SceneObject
A model scene object that can be rendered within a `Sandbox.SceneWorld`.
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 4 constructors
No results match this filter.
Methods
Showing 9 methods
public void AddChild(string name, Sandbox.SceneObject child)
Add a named child scene object to this one. The child scene object will have its parent set.
Note
The name can be used to look up children by name, but it is not bound. (SceneObject_FindChild)
public void ClearMaterialOverride()
Clear all material replacements.
public void Delete()
Delete this scene object. You shouldn't access it anymore.
public Sandbox.GameObject GetGameObject()Obsolete
Obsolete: Use GameObject property
public void RemoveChild(Sandbox.SceneObject child)
Unlink given scene object as a child from this one. The child scene object will have its parent set to null. It will not be deleted.
public void SetComponentSource(Sandbox.Component c)Obsolete
Obsolete: Use Component property
public void SetMaterialGroup(string name)
Set material group to replace materials of the model as set up in ModelDoc.
No results match this filter.
Properties
Showing 16 properties
public Sandbox.RenderAttributes Sandbox.SceneObject.Attributes { get; set; }
public bool Sandbox.SceneObject.Batchable { get; set; }
This object is not batchable by material for some reason ( example: has dynamic attributes that affect rendering )
public BBox Sandbox.SceneObject.Bounds { get; set; }
Set or get the axis aligned bounding box for this object.
public Color Sandbox.SceneObject.ColorTint { get; set; }
Color tint of this scene object.
public Sandbox.SceneObject.SceneObjectFlagAccessor Sandbox.SceneObject.Flags { get; set; }
Access to various advanced scene object flags.
public BBox Sandbox.SceneObject.LocalBounds { get; set; }
Set the axis aligned bounding box by transforming by this objects transform.
public ulong Sandbox.SceneObject.MeshGroupMask { get; set; }
State of all bodygroups of this object's model. You might be looking for `Sandbox.SceneModel.SetBodyGroup(System.String,System.Int32)`.
public Sandbox.Model Sandbox.SceneObject.Model { get; set; }
The model this scene object will render.
public Sandbox.SceneObject Sandbox.SceneObject.Parent { get; set; }
Movement parent of this scene object, if any.
public Vector3 Sandbox.SceneObject.Position { get; set; }
Position of this scene object, relative to its `Sandbox.SceneObject.Parent`, or `Sandbox.SceneWorld` if parent is not set.
public bool Sandbox.SceneObject.RenderingEnabled { get; set; }
Whether this scene object should render or not.
public Sandbox.SceneRenderLayer Sandbox.SceneObject.RenderLayer { get; set; }
For a layer to draw this object, the target layer must match (or be unset) and the flags must match
public Rotation Sandbox.SceneObject.Rotation { get; set; }
Rotation of this scene object, relative to its `Sandbox.SceneObject.Parent`, or `Sandbox.SceneWorld` if parent is not set.
public Sandbox.ITagSet Sandbox.SceneObject.Tags { get; set; }
List of tags for this scene object.
public Transform Sandbox.SceneObject.Transform { get; set; }
Transform of this scene object, relative to its `Sandbox.SceneObject.Parent`, or `Sandbox.SceneWorld` if parent is not set.
public Sandbox.SceneWorld Sandbox.SceneObject.World { get; set; }
The scene world this object belongs to.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.SceneObject |