# Sandbox.ResourceLibrary.TryGet

```csharp
static bool TryGet(string filepath, out T resource)
```

Try to get a cached resource by its file path.

### Parameters

- `filepath` (`string`): File path to the resource.
- `out resource` (`T`): The retrieved resource, if any.

### Returns

`bool`: True if resource was retrieved successfully.

Declared in [Sandbox.ResourceLibrary](/api/Sandbox.ResourceLibrary).
Assembly: `Sandbox.Engine`.
