codeAPI Reference

s&box IDefinitionResource: Resource metadata interface

calendar_today May 12, 2026 schedule ~1 min read person PatrickJr verified 50

IDefinitionResource API Reference

IDefinitionResource is an interface for game resources that have display metadata (title and description).

Type Signature

CSHARP
public interface IDefinitionResource
{
    string Title { get; set; }
    string Description { get; set; }
}

Properties

Usage

Implement this interface on GameResource classes to provide metadata for UI display:

CSHARP
public class MyCustomResource : GameResource, IDefinitionResource
{
    [Property] public string Title { get; set; } = "My Resource";
    [Property] public string Description { get; set; } = "A custom game resource";
}

Notes

  • Used by the editor and UI to display resource information.
  • Properties are typically set via [Property] attributes in the inspector.
  • Title and Description are shown in resource pickers and inspectors.
  • Commonly used for custom asset types that need user-friendly names.
Was this helpful?