Api Sandbox AssetTypeAttribute
class

AssetTypeAttribute

public class AssetTypeAttribute : Attribute

Should be applied to a class that inherits from GameResource. Makes the class able to be stored as an asset on disk.

Constructors

AssetTypeAttribute()

Properties

Name Type Description
TargetType virtual Type This gets filled in by the TypeLibrary when the class is registered, it shouldn't be changed manually.
Name String The title of this game resource.
Extension String File extension for this game resource.
Category String Category of this game resource, for grouping in UI.
Flags AssetTypeFlags Flags for this asset type.

Methods

static TypeDescription FindTypeByExtension(String extension)

Find a resource type by its extension. The extension should have no period.

Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.AssetTypeAttribute