public class Sandbox.Metadata
A simple class for storing and retrieving metadata values.
Related Guides
Broader workflow and conceptual references connected to this API.
The Storage system provides a simple, unified way to manage user-generated content in your game. Whether you're saving game progress, storing player creations, or anything else, Storage handles everything from local file management to Steam Workshop integration.
You can implement the ISceneMetadata interface in any Component that has data you'd like saved to Metadata. Metadata is data that can be accessed without needing to load a Scene or clone a Prefab (accessed via either the SceneFile or PrefabFile)
Constructors
Showing 1 constructors
public Metadata()
No results match this filter.
Methods
Showing 3 methods
public T GetValueOrDefault(string key, T defaultValue = null)
Get the a value. If it's missing or the wrong type then use the default value.
Parameters
defaultValue: Default: null
public void SetValue(string key, object value)
Set a value with the specified key.
public bool TryGetValue(string key, T outValue)
Try to get a value of the specified type.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Metadata |