Class PackageLoadingAssetFile
Represents an asset before being loaded. Used mostly for asset upgrading.
public class PackageLoadingAssetFile
- Inheritance
-
PackageLoadingAssetFile
Constructors
PackageLoadingAssetFile(Package, UFile, UDirectory)
Initializes a new instance of the PackageLoadingAssetFile class.
public PackageLoadingAssetFile(Package package, UFile filePath, UDirectory sourceFolder)
Parameters
package
PackageThe package this asset will be part of.
filePath
UFileThe relative file path (from default asset folder).
sourceFolder
UDirectoryThe source folder (optional, can be null).
Exceptions
- ArgumentException
filePath must be relative
PackageLoadingAssetFile(UFile, UDirectory)
Initializes a new instance of the PackageLoadingAssetFile class.
public PackageLoadingAssetFile(UFile filePath, UDirectory sourceFolder)
Parameters
filePath
UFileThe file path.
sourceFolder
UDirectoryThe source folder.
Fields
CachedFileSize
public long CachedFileSize
Field Value
Deleted
public bool Deleted
Field Value
SourceFolder
public readonly UDirectory SourceFolder
Field Value
- UDirectory
Properties
AssetContent
public byte[] AssetContent { get; set; }
Property Value
- byte[]
AssetLocation
public UFile AssetLocation { get; }
Property Value
- UFile
FilePath
public UFile FilePath { get; set; }
Property Value
- UFile
Link
public UFile Link { get; set; }
Property Value
- UFile
OriginalFilePath
public UFile OriginalFilePath { get; set; }
Property Value
- UFile
Methods
AsYamlAsset()
public PackageLoadingAssetFile.YamlAsset AsYamlAsset()
Returns
OpenStream()
public Stream OpenStream()
Returns
ToReference()
public IReference ToReference()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.