UnityResourcesFS
Namespace: Shadop.Archmage.Sdk
Implements the IFS interface to load files via Unity Resources. Paths are resolved relative to any Resources folder; file extensions are stripped automatically. Loading must be started from the main thread.
public class UnityResourcesFS : IFSInheritance Object → UnityResourcesFS
Implements IFS
Properties
Section titled “Properties”MainThreadOnly
Section titled “MainThreadOnly”public bool MainThreadOnly { get; }Property Value
Section titled “Property Value”Constructors
Section titled “Constructors”UnityResourcesFS()
Section titled “UnityResourcesFS()”public UnityResourcesFS()Methods
Section titled “Methods”ReadAllBytes(String)
Section titled “ReadAllBytes(String)”public Byte[] ReadAllBytes(string path)Parameters
Section titled “Parameters”path String
Returns
Section titled “Returns”ReadAllBytesAsync(String, CancellationToken)
Section titled “ReadAllBytesAsync(String, CancellationToken)”public Task<Byte[]> ReadAllBytesAsync(string path, CancellationToken cancellationToken)Parameters
Section titled “Parameters”path String
cancellationToken CancellationToken
Returns
Section titled “Returns”FileExists(String)
Section titled “FileExists(String)”Always returns true. Resources can only check existence by loading the asset, so a missing file is reported by the read instead.
public bool FileExists(string path)Parameters
Section titled “Parameters”path String
Returns
Section titled “Returns”DirectoryExists(String)
Section titled “DirectoryExists(String)”Always returns true. Resources has no directory concept.
public bool DirectoryExists(string path)Parameters
Section titled “Parameters”path String