AssetTypeAttributeclass

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

objectAttributeAssetTypeAttribute
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public class Sandbox.AssetTypeAttribute : System.Attribute

Constructors1

Showing 1 constructors

Methods1

Showing 1 methods

public static Sandbox.TypeDescription FindTypeByExtension(string extension)PUBLICSTATIC

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

ParameterTypeDescription
extensionstring
Returns:TypeDescription

Properties6

Showing 6 properties

public string Sandbox.AssetTypeAttribute.Category { get; set; }PUBLICGETSET

Category of this game resource, for grouping in UI.

Returns:string

public string Sandbox.AssetTypeAttribute.Extension { get; set; }PUBLICGETSET

File extension for this game resource.

Returns:string

public string Sandbox.AssetTypeAttribute.IconColor { get; set; }PUBLICGETSET

Color of the bottom line and background gradient for this resource's thumbnail.

Returns:string

public string Sandbox.AssetTypeAttribute.Name { get; set; }PUBLICGETSET

The title of this game resource.

Returns:string

public virtual sealed System.Type Sandbox.AssetTypeAttribute.TargetType { get; set; }PUBLICVIRTUALGETSET

This gets filled in by the TypeLibrary when the class is registered, it shouldn't be changed manually.

Returns:Type

On this page