class GameResource : Resource

book_4_sparkGenerated
code_blocksInput

Description

The GameResource class in the Sandbox namespace represents assets defined in C# and created through tools. It allows for the definition of custom asset types, providing a framework for managing and manipulating game resources within the s&box environment.

Members

Properties

Member NameSummary
HasUnsavedChangesTrue if this resource has changed but the changes aren't written to disk.
ResourceVersionThe version of the component. Used by JsonUpgrader.
IsValidIndicates whether the resource is valid.

Methods

Member NameSummary
StateHasChangedShould be called after the resource has been edited by the inspector.
GetReferencedPackagesGet a list of packages that are needed to load this asset.
SerializeSerialize the current state to a JsonObject.
LoadFromJsonLoad the resource state from a JSON string.
DeserializeDeserialize the resource state from a JsonObject.