Class JsonAsset
Generic type of Json-format asset. It provides the managed representation of this resource data so it can be accessed via C# API.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class JsonAsset : JsonAssetBase
Constructors
JsonAsset()
Properties
Instance
Gets the instance of the serialized object from the json asset data. Cached internally.
Declaration
public object Instance { get; }
Property Value
System.Object
|
Methods
CreateInstance()
Creates a new instance of the serialized object from the json asset data.
Declaration
public object CreateInstance()
Returns
System.Object
The new object or null if failed. |
Remarks
Use Instance to get cached object.
CreateInstance<T>()
Creates a new instance of the serialized object from the json asset data.
Declaration
public T CreateInstance<T>()
Returns
T
The new object or null if failed. |
Type Parameters
T
|
Remarks
Use Instance to get cached object.
GetInstance<T>()
Gets the instance of the serialized object from the json data. Cached internally.
Declaration
public T GetInstance<T>()
Returns
T
The asset instance object or null. |
Type Parameters
T
|
SetInstance(Object)
Sets the instance of the asset (for both C# and C++). Doesn't save asset to the file (runtime only).
Declaration
public void SetInstance(object instance)
Parameters
System.Object
instance
The new instance. |