API ReferenceSandbox
MapInstanceclass
Allows you to load a map into the Scene. This can be either a vpk or a scene map.
Constructors1
Showing 1 constructors
public MapInstance()
No results match this filter.
Methods5
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.
| Parameter | Type | Description |
|---|---|---|
| go | GameObject | — |
| kv | ObjectEntry | — |
Returns:
void—protected virtual System.Threading.Tasks.Task OnLoad(Sandbox.LoadingContext context)
| Parameter | Type | Description |
|---|---|---|
| context | LoadingContext | — |
Returns:
Task—protected virtual void OnTagsChanged()
Returns:
void—protected virtual void OnUpdate()
Returns:
void—public void UnloadMap()
Unload the current map.
Returns:
void—No results match this filter.
Properties9
Showing 9 properties
public virtual int Sandbox.MapInstance.ComponentVersion { get; set; }
Returns:
int—public bool Sandbox.MapInstance.EnableCollision { get; set; }
Returns:
bool—public bool Sandbox.MapInstance.IsLoaded { get; set; }
True if the map is loaded
Returns:
bool—public string Sandbox.MapInstance.MapName { get; set; }
Returns:
string—public bool Sandbox.MapInstance.NoOrigin { get; set; }
Returns:
bool—public System.Action Sandbox.MapInstance.OnMapLoaded { get; set; }
Called when the map has successfully loaded
Returns:
Action—public System.Action Sandbox.MapInstance.OnMapUnloaded { get; set; }
Called when the map has been unloaded
Returns:
Action—public bool Sandbox.MapInstance.UseMapFromLaunch { get; set; }
Returns:
bool—No results match this filter.