Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    PackageLoadingAssetFile Class

    Namespace: Stride.Core.Assets
    Assembly: Stride.Core.Assets.dll

    Represents an asset before being loaded. Used mostly for asset upgrading.

    System.Object → PackageLoadingAssetFile
    Derived from PackageLoadingAssetFile:

    public class PackageLoadingAssetFile
    Name Description
    Constructors
    PackageLoadingAssetFile(Package, UFile, UDirectory)

    Initializes a new instance of the PackageLoadingAssetFile class.

    PackageLoadingAssetFile(UFile, UDirectory)

    Initializes a new instance of the PackageLoadingAssetFile class.

    Fields
    CachedFileSize
    Deleted
    SourceFolder
    Properties
    AssetContent
    AssetLocation
    FilePath
    Link
    OriginalFilePath
    Methods
    AsYamlAsset()
    OpenStream()
    ToReference()
    ToString()
    | Improve this Doc View Source

    Constructors


    PackageLoadingAssetFile(Package, UFile, UDirectory)

    Initializes a new instance of the PackageLoadingAssetFile class.

    public PackageLoadingAssetFile(Package package, UFile filePath, UDirectory sourceFolder)
    Parameters
    Type Name Description
    Package package

    The package this asset will be part of.

    Stride.Core.IO.UFile filePath

    The relative file path (from default asset folder).

    Stride.Core.IO.UDirectory sourceFolder

    The source folder (optional, can be null).

    Exceptions
    Type Condition
    System.ArgumentException

    filePath must be relative


    PackageLoadingAssetFile(UFile, UDirectory)

    Initializes a new instance of the PackageLoadingAssetFile class.

    public PackageLoadingAssetFile(UFile filePath, UDirectory sourceFolder)
    Parameters
    Type Name Description
    Stride.Core.IO.UFile filePath

    The file path.

    Stride.Core.IO.UDirectory sourceFolder

    The source folder.

    | Improve this Doc View Source

    Fields


    CachedFileSize

    public long CachedFileSize
    Field Value
    Type Description
    System.Int64

    Deleted

    public bool Deleted
    Field Value
    Type Description
    System.Boolean

    SourceFolder

    public readonly UDirectory SourceFolder
    Field Value
    Type Description
    Stride.Core.IO.UDirectory
    | Improve this Doc View Source

    Properties


    AssetContent

    public byte[] AssetContent { get; set; }
    Property Value
    Type Description
    System.Byte[]

    AssetLocation

    public UFile AssetLocation { get; }
    Property Value
    Type Description
    Stride.Core.IO.UFile

    FilePath

    public UFile FilePath { get; set; }
    Property Value
    Type Description
    Stride.Core.IO.UFile

    Link

    public UFile Link { get; set; }
    Property Value
    Type Description
    Stride.Core.IO.UFile

    OriginalFilePath

    public UFile OriginalFilePath { get; set; }
    Property Value
    Type Description
    Stride.Core.IO.UFile
    | Improve this Doc View Source

    Methods


    AsYamlAsset()

    public PackageLoadingAssetFile.YamlAsset AsYamlAsset()
    Returns
    Type Description
    PackageLoadingAssetFile.YamlAsset

    OpenStream()

    public Stream OpenStream()
    Returns
    Type Description
    System.IO.Stream

    ToReference()

    public IReference ToReference()
    Returns
    Type Description
    IReference

    ToString()

    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation