API ReferenceSandbox
ResourceLibraryclass
Keeps a library of all available `Sandbox.Resource`.
object→ResourceLibrary
Methods7
Showing 7 methods
public static System.Threading.Tasks.Task`1<Sandbox.Bitmap> GetThumbnail(string path, int width = 256, int height = 256)
Render a thumbnail for this resource
| Parameter | Type | Description |
|---|---|---|
| path | string | — |
| width = 256 | int | — |
| height = 256 | int | — |
public static System.Threading.Tasks.Task`1<T> LoadAsync(string path)
Load a resource by its file path.
| Parameter | Type | Description |
|---|---|---|
| path | string | — |
Returns:
Task<T>—public static bool TryGet(string filepath, T resource)
Try to get a cached resource by its file path.
| Parameter | Type | Description |
|---|---|---|
| filepath | string | File path to the resource. |
| resource | T | The retrieved resource, if any. |
Returns:
boolTrue if resource was retrieved successfully.No results match this filter.