Class ImportContext¶
Namespace: Apogee.Content.Import
Assembly: Apogee.Content.dll
An asset being imported: its bytes, its settings, and the files it reads, which become the artifact's dependencies.
public sealed class ImportContext
Inheritance¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Properties¶
Bytes¶
public byte[] Bytes { get; }
Property Value¶
byte[]
PhysicalRoot¶
The folder on disk that res:// is; null when the project is not a plain folder.
public string? PhysicalRoot { get; }
Property Value¶
Settings¶
public ImportSettings Settings { get; }
Property Value¶
Source¶
The path of the asset relative to res://.
public string Source { get; }
Property Value¶
SourcePath¶
The path of the asset: res:// and
public string SourcePath { get; }
Property Value¶
Methods¶
Depend(string)¶
Says that the import depends on a file without reading it through
public void Depend(string path)
Parameters¶
path string
PhysicalPath(string)¶
The file on disk behind a virtual path, for tools that read files themselves; null when it is not a plain file (a zip, a pack).
public string? PhysicalPath(string path)
Parameters¶
path string
Returns¶
ReadFile(string)¶
Reads a file of the project (or of a mounted package); one under res:// other than the asset becomes a dependency.
public byte[] ReadFile(string path)
Parameters¶
path string
Returns¶
byte[]