logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AssetFileOnDisk

    Reads an asset the way a game project finds it after the editor is closed: from its file, never from the AssetDatabase's in-memory object. A test that only reads the loaded object cannot tell an edit that was saved from one that is still waiting for a save.

    Inheritance
    object
    AssetFileOnDisk
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Tests.Shared.Editor
    Assembly: Serenity.Tests.Shared.Editor.dll
    Syntax
    public static class AssetFileOnDisk

    Methods

    LoadFreshCopy<TAsset>(string)

    A standalone copy of the TAsset deserialized straight from its file, unrelated to the object the AssetDatabase holds for the same path.

    Declaration
    public static TAsset LoadFreshCopy<TAsset>(string assetPath) where TAsset : Object
    Parameters
    Type Name Description
    string assetPath
    Returns
    Type Description
    TAsset
    Type Parameters
    Name Description
    TAsset

    ReadText(string)

    The text of the serialized asset file at assetPath.

    Declaration
    public static string ReadText(string assetPath)
    Parameters
    Type Name Description
    string assetPath
    Returns
    Type Description
    string
    In this article
    © 2026 Serenity. All Rights Reserved