Skip to content

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 : IFS

Inheritance Object → UnityResourcesFS
Implements IFS

public bool MainThreadOnly { get; }

Boolean

public UnityResourcesFS()
public Byte[] ReadAllBytes(string path)

path String

Byte[]

ReadAllBytesAsync(String, CancellationToken)

Section titled “ReadAllBytesAsync(String, CancellationToken)”
public Task<Byte[]> ReadAllBytesAsync(string path, CancellationToken cancellationToken)

path String

cancellationToken CancellationToken

Task<Byte[]>

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)

path String

Boolean

Always returns true. Resources has no directory concept.

public bool DirectoryExists(string path)

path String

Boolean