s&box docs

public class Editor.AssetType

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

Methods

Showing 3 methods

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

Find an asset type by name or extension match.

Parameters

  • name: Name or extension of an asset type to search for.
  • allowPartials: Whether partial matches for the name are allowed. Default: False

public static Editor.AssetType FromExtension(string extension)

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

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

Properties

Showing 29 properties

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

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

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

Category of this asset type, for grouping in UI.

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

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

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

Primary file extension for this asset type.

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

All file extensions for this asset type.

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

Name of the asset type for UI purposes.

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

This asset type can have dependencies

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

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

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

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

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

128x128 icon for this asset type.

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

16x16 icon for this asset type.

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

256x256 icon for this asset type.

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

64x64 icon for this asset type.

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

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

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

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

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

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

public static Editor.AssetType Editor.AssetType.MapFile { get; set; }

A map (.vmap) asset type.

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

Use asset type icon, over any preview image.

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

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

Metadata

FieldValue
NamespaceEditor
Typeclass
AssemblySandbox.Tools
Doc IDT:Editor.AssetType

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