GameResourceclass
Assets defined in C# and created through tools. You can define your own Custom Asset Types.
Constructors1
Showing 1 constructors
protected GameResource()
No results match this filter.
Methods9
Showing 9 methods
public void Deserialize(System.Text.Json.Nodes.JsonObject jso)
Deserialize values from a JsonObject
| Parameter | Type | Description |
|---|---|---|
| jso | JsonObject | — |
void—public System.Collections.Generic.IEnumerable`1<string> GetReferencedPackages()
Get a list of packages that are needed to load this asset
IEnumerable<string>—public void LoadFromJson(string json)
| Parameter | Type | Description |
|---|---|---|
| json | string | — |
void—protected virtual void OnDestroy()
Called when this resource is being unloaded. Clean up any resources owned by this instance here.
void—protected virtual void OnJsonSerialize(System.Text.Json.Nodes.JsonObject node)
Called after we serialize, allowing you to store any extra or modify the output.
| Parameter | Type | Description |
|---|---|---|
| node | JsonObject | — |
void—protected virtual void PostLoad()
Called when the asset is first loaded from disk.
void—protected virtual void PostReload()
Called when the asset is recompiled/reloaded from disk.
void—public System.Text.Json.Nodes.JsonObject Serialize()
Serialize the current state to a JsonObject
JsonObject—public virtual sealed void StateHasChanged()
Should be called after the resource has been edited by the inspector
void—No results match this filter.
Properties5
Showing 5 properties
protected virtual object Sandbox.GameResource.ActionGraphTarget { get; set; }
Target instance used for any action graphs contained in this resource. Defaults to this resource itself.
object—protected virtual System.Type Sandbox.GameResource.ActionGraphTargetType { get; set; }
Target type used for any action graphs contained in this resource. Defaults to this resource's type.
public virtual sealed bool Sandbox.GameResource.HasUnsavedChanges { get; set; }
True if this resource has changed but the changes aren't written to disk
bool—public virtual sealed bool Sandbox.GameResource.IsValid { get; set; }
bool—public virtual int Sandbox.GameResource.ResourceVersion { get; set; }
The version of the component. Used by `Sandbox.JsonUpgrader`.
int—No results match this filter.