PackageLoadingAssetFile Class
Namespace: Stride.Core.AssetsAssembly: 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() | ||
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.  | 
                  
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 | 
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 | 
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()