public class Editor.MetaData
A class to CRUD json files. This should probably be a generic class since it seems like we might want to do this with stuff other than meta files. But there's no need for that right now, so lets leave it simple.
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)
Methods
Showing 7 methods
public T Get(string keyName, T defaultValue = null)
Parameters
defaultValue: Default: null
public bool GetBool(string keyName, bool defaultValue = False)
Parameters
defaultValue: Default: False
public System.Nullable`1<System.Text.Json.JsonElement> GetElement(string keyName)
public float GetFloat(string keyName, float defaultValue = 0)
Parameters
defaultValue: Default: 0
public int GetInt(string keyName, int defaultValue = 0)
Parameters
defaultValue: Default: 0
public string GetString(string keyName, string defaultValue = null)
Parameters
defaultValue: Default: null
public void Set(string name, T value)
Set a value in the metadata file. If the value is null, the key will be removed.
No results match this filter.
Properties
Showing 1 properties
public string Editor.MetaData.FilePath { get; set; }
File path to the metadata file.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Editor |
| Type | class |
| Assembly | Sandbox.Tools |
| Doc ID | T:Editor.MetaData |