AssetTypeclass

objectAssetType
Namespace
Editor
Assembly
Sandbox.Tools
Declaration
public class Editor.AssetType

Constructors1

Showing 1 constructors

Methods3

Showing 3 methods

public static Editor.AssetType Find(string name, bool allowPartials = False)PUBLICSTATIC

Find an asset type by name or extension match.

ParameterTypeDescription
namestringName or extension of an asset type to search for.
allowPartials = FalseboolWhether partial matches for the name are allowed.
Returns:AssetType

public static Editor.AssetType FromExtension(string extension)PUBLICSTATIC

ParameterTypeDescription
extensionstring
Returns:AssetType

public static Editor.AssetType FromType(System.Type t)PUBLICSTATIC

For a type (ie Texture, Material, Surface) return the appropriate AssetType. Returns null if can't resolve.

ParameterTypeDescription
tType
Returns:AssetType

Properties29

Showing 29 properties

public static System.Collections.Generic.IReadOnlyCollection`1<Editor.AssetType> Editor.AssetType.All { get; set; }PUBLICSTATICGETSET

All currently registered asset types, including the base types such as models, etc.

Returns:IReadOnlyCollection<AssetType>

public string Editor.AssetType.Category { get; set; }PUBLICGETSET

Category of this asset type, for grouping in UI.

Returns:string

public Color Editor.AssetType.Color { get; set; }PUBLICGETSET

Color that represents this asset, for use in the asset browser.

Returns:Color

public string Editor.AssetType.FileExtension { get; set; }PUBLICGETSET

Primary file extension for this asset type.

Returns:string

public System.Collections.Generic.IReadOnlyList`1<string> Editor.AssetType.FileExtensions { get; set; }PUBLICGETSET

All file extensions for this asset type.

Returns:IReadOnlyList<string>

public string Editor.AssetType.FriendlyName { get; set; }PUBLICGETSET

Name of the asset type for UI purposes.

Returns:string

public bool Editor.AssetType.HasDependencies { get; set; }PUBLICGETSET

This asset type can have dependencies

Returns:bool

public bool Editor.AssetType.HasEditor { get; set; }PUBLICGETSET

Returns true if there is an editor available for this asset type.

Returns:bool

public bool Editor.AssetType.HiddenByDefault { get; set; }PUBLICGETSET

This asset type is hidden by default from asset browser, etc.

Returns:bool

public Editor.Pixmap Editor.AssetType.Icon128 { get; set; }PUBLICGETSET

128x128 icon for this asset type.

Returns:Pixmap

public Editor.Pixmap Editor.AssetType.Icon16 { get; set; }PUBLICGETSET

16x16 icon for this asset type.

Returns:Pixmap

public Editor.Pixmap Editor.AssetType.Icon256 { get; set; }PUBLICGETSET

256x256 icon for this asset type.

Returns:Pixmap

public Editor.Pixmap Editor.AssetType.Icon64 { get; set; }PUBLICGETSET

64x64 icon for this asset type.

Returns:Pixmap

public static Editor.AssetType Editor.AssetType.ImageFile { get; set; }PUBLICSTATICGETSET

Image source (.png or .jpg) asset type.

Returns:AssetType

public bool Editor.AssetType.IsGameResource { get; set; }PUBLICGETSET

Whether this asset type is a custom game resource or not.

Returns:bool

public bool Editor.AssetType.IsSimpleAsset { get; set; }PUBLICGETSET

A simple asset is used by something else. It never exists in the game on its own.

Returns:bool

public bool Editor.AssetType.PrefersIconThumbnail { get; set; }PUBLICGETSET

Use asset type icon, over any preview image.

Returns:bool

public System.Type Editor.AssetType.ResourceType { get; set; }PUBLICGETSET

Type that will be returned by `Editor.Asset.LoadResource`.

Returns:Type

On this page

Constructorspublic AssetType()Methodspublic static Editor.AssetType Find(System.String name, System.Boolean allowPartials = False)public static Editor.AssetType FromExtension(System.String extension)public static Editor.AssetType FromType(System.Type t)Propertiespublic static System.Collections.Generic.IReadOnlyCollection`1<Editor.AssetType> Editor.AssetType.All { get; set; }public static Editor.AssetType Editor.AssetType.Animation { get; set; }public static Editor.AssetType Editor.AssetType.AnimationGraph { get; set; }public System.String Editor.AssetType.Category { get; set; }public Color Editor.AssetType.Color { get; set; }public System.String Editor.AssetType.FileExtension { get; set; }public System.Collections.Generic.IReadOnlyList`1<System.String> Editor.AssetType.FileExtensions { get; set; }public Sandbox.AssetTypeFlags Editor.AssetType.Flags { get; set; }public System.String Editor.AssetType.FriendlyName { get; set; }public System.Boolean Editor.AssetType.HasDependencies { get; set; }public System.Boolean Editor.AssetType.HasEditor { get; set; }public System.Boolean Editor.AssetType.HiddenByDefault { get; set; }public Editor.Pixmap Editor.AssetType.Icon128 { get; set; }public Editor.Pixmap Editor.AssetType.Icon16 { get; set; }public Editor.Pixmap Editor.AssetType.Icon256 { get; set; }public Editor.Pixmap Editor.AssetType.Icon64 { get; set; }public static Editor.AssetType Editor.AssetType.ImageFile { get; set; }public System.Boolean Editor.AssetType.IsGameResource { get; set; }public System.Boolean Editor.AssetType.IsSimpleAsset { get; set; }public static Editor.AssetType Editor.AssetType.MapFile { get; set; }public static Editor.AssetType Editor.AssetType.Material { get; set; }public static Editor.AssetType Editor.AssetType.Model { get; set; }public System.Boolean Editor.AssetType.PrefersIconThumbnail { get; set; }public System.Type Editor.AssetType.ResourceType { get; set; }public static Editor.AssetType Editor.AssetType.Shader { get; set; }public static Editor.AssetType Editor.AssetType.SoundEvent { get; set; }public static Editor.AssetType Editor.AssetType.SoundFile { get; set; }public static Editor.AssetType Editor.AssetType.Soundscape { get; set; }public static Editor.AssetType Editor.AssetType.Texture { get; set; }Metadata