s&box docs

public static abstract sealed class Sandbox.ResourceLibrary

Keeps a library of all available `Sandbox.Resource`.

Broader workflow and conceptual references connected to this API.

Methods

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

Parameters

  • width: Default: 256
  • height: Default: 256

public static System.Threading.Tasks.Task`1<T> LoadAsync(string path)

Load a resource by its file path.

public static bool TryGet(string filepath, T resource)

Try to get a cached resource by its file path.

Parameters

  • filepath: File path to the resource.
  • resource: The retrieved resource, if any.

Returns

True if resource was retrieved successfully.

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.ResourceLibrary

On this page