Api Sandbox GameResource
class

GameResource

public abstract class GameResource : Resource

Assets defined in C# and created through tools. You can define your own Custom Asset Types.

Properties

Name Type Description
HasUnsavedChanges virtual Boolean True if this resource has changed but the changes aren't written to disk
ResourceVersion virtual Int32 The version of the component. Used by JsonUpgrader.
IsValid virtual Boolean

Methods

virtual Void StateHasChanged()

Should be called after the resource has been edited by the inspector

IEnumerable<String> GetReferencedPackages()

Get a list of packages that are needed to load this asset

JsonObject Serialize()

Serialize the current state to a JsonObject

Void LoadFromJson(String json)
Void Deserialize(JsonObject jso)

Deserialize values from a JsonObject

Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.GameResource