public class Editor.AssetType
Related Guides
Broader workflow and conceptual references connected to this API.
In the event that you find your JSON files growing too much due to too much data. You can store data as a binary blob. This will work with anything that serializes to JSON.
You can define your own custom asset types as GameResources. They give you a nice inspector window and they're hotloaded in-game, which means you can whip things up pretty quickly if you're using them.
Constructors
Showing 1 constructors
public AssetType()
No results match this filter.
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)
No results match this filter.
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 static Editor.AssetType Editor.AssetType.Animation { get; set; }
Animation (.vanim) asset type.
public static Editor.AssetType Editor.AssetType.AnimationGraph { get; set; }
Animation Graph (.vanmgrph) asset type.
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 Sandbox.AssetTypeFlags Editor.AssetType.Flags { get; set; }
Flags 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 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 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`.
public static Editor.AssetType Editor.AssetType.SoundFile { get; set; }
Sound (.wav, .ogg or .mp3) asset type.
public static Editor.AssetType Editor.AssetType.Soundscape { get; set; }
A soundscape
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Editor |
| Type | class |
| Assembly | Sandbox.Tools |
| Doc ID | T:Editor.AssetType |