Search Results for

    Show / Hide Table of Contents

    Class JsonAssetBase

    Base class for all Json-format assets.

    Inheritance
    System.Object
    Object
    Asset
    JsonAssetBase
    JsonAsset
    LocalizedStringTable
    Prefab
    Inherited Members
    Asset.Reload()
    Asset.WaitForLoaded(Double)
    Asset.GetReferences()
    Asset.Save(String)
    Asset.ToString()
    Asset.ReferencesCount
    Asset.Path
    Asset.IsLoaded
    Asset.LastLoadFailed
    Asset.IsVirtual
    Asset.ShouldDeleteFileOnUnload
    Asset.MemoryUsage
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public abstract class JsonAssetBase : Asset

    Constructors

    JsonAssetBase()

    Initializes a new instance of the JsonAssetBase.

    Declaration
    protected JsonAssetBase()

    Properties

    Data

    The Json data (as string).

    Declaration
    [Unmanaged]
    public string Data { get; set; }
    Property Value
    System.String

    DataEngineBuild

    The serialized data engine build number. Can be used to convert/upgrade data between different formats across different engine versions.

    Declaration
    [Unmanaged]
    public int DataEngineBuild { get; }
    Property Value
    System.Int32

    DataTypeName

    The data type name from the header. Allows to recognize the data type.

    Declaration
    [Unmanaged]
    public string DataTypeName { get; }
    Property Value
    System.String

    Methods

    GetReferences(String, out Guid[])

    Parses Json string to find any object references inside it. It can produce list of references to assets and/or scene objects. Supported only in Editor.

    Declaration
    [Unmanaged]
    public static void GetReferences(string json, out Guid[] assets)
    Parameters
    System.String json

    The Json string.

    System.Guid[] assets

    The output list of object IDs references by the asset (appended, not cleared).

    Init(String, String)

    Initializes the virtual Json asset with custom data.

    Declaration
    [Unmanaged]
    public bool Init(string dataTypeName, string dataJson)
    Parameters
    System.String dataTypeName

    The data type name from the header. Allows to recognize the data type.

    System.String dataJson

    The Json with serialized data.

    Returns
    System.Boolean

    True if failed, otherwise false.

    Remarks

    Can be used only for virtual assets created at runtime.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)

    See Also

    Asset
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat