API ReferenceSandbox
public class Sandbox.MapInstance : Sandbox.Component
Allows you to load a map into the Scene. This can be either a vpk or a scene map.
Constructors
Showing 1 constructors
public MapInstance()
No results match this filter.
Methods
Showing 5 methods
protected virtual void OnCreateObject(Sandbox.GameObject go, Sandbox.MapLoader.ObjectEntry kv)
Override this to add components to a map object. Only called for map objects that are not implemented.
protected virtual System.Threading.Tasks.Task OnLoad(Sandbox.LoadingContext context)
protected virtual void OnTagsChanged()
protected virtual void OnUpdate()
public void UnloadMap()
Unload the current map.
No results match this filter.
Properties
Showing 9 properties
public BBox Sandbox.MapInstance.Bounds { get; set; }
Get the world bounds of the map
public virtual int Sandbox.MapInstance.ComponentVersion { get; set; }
public bool Sandbox.MapInstance.EnableCollision { get; set; }
public bool Sandbox.MapInstance.IsLoaded { get; set; }
True if the map is loaded
public string Sandbox.MapInstance.MapName { get; set; }
public bool Sandbox.MapInstance.NoOrigin { get; set; }
public System.Action Sandbox.MapInstance.OnMapLoaded { get; set; }
Called when the map has successfully loaded
public System.Action Sandbox.MapInstance.OnMapUnloaded { get; set; }
Called when the map has been unloaded
public bool Sandbox.MapInstance.UseMapFromLaunch { get; set; }
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.MapInstance |