class
AssetType
public class AssetType Constructors
AssetType() Properties
| Name | Type | Description |
|---|---|---|
All static | IReadOnlyCollection<AssetType> | All currently registered asset types, including the base types such as models, etc. |
Model static | AssetType | Model (.vmdl) asset type. |
Animation static | AssetType | Animation (.vanim) asset type. |
AnimationGraph static | AssetType | Animation Graph (.vanmgrph) asset type. |
Texture static | AssetType | Texture (.vtex) asset type. |
Material static | AssetType | Material (.vmat) asset type. |
SoundFile static | AssetType | Sound (.wav, .ogg or .mp3) asset type. |
SoundEvent static | AssetType | A sound event |
Soundscape static | AssetType | A soundscape |
ImageFile static | AssetType | Image source (.png or .jpg) asset type. |
Shader static | AssetType | Shader (.shader) asset type. |
MapFile static | AssetType | A map (.vmap) asset type. |
FriendlyName | String | Name of the asset type for UI purposes. |
FileExtension | String | Primary file extension for this asset type. |
FileExtensions | IReadOnlyList<String> | All file extensions for this asset type. |
HiddenByDefault | Boolean | This asset type is hidden by default from asset browser, etc. |
IsSimpleAsset | Boolean | A simple asset is used by something else. It never exists in the game on its own. |
HasDependencies | Boolean | This asset type can have dependencies |
PrefersIconThumbnail | Boolean | Use asset type icon, over any preview image. |
Icon16 | Pixmap | 16x16 icon for this asset type. |
Icon64 | Pixmap | 64x64 icon for this asset type. |
Icon128 | Pixmap | 128x128 icon for this asset type. |
Icon256 | Pixmap | 256x256 icon for this asset type. |
IsGameResource | Boolean | Whether this asset type is a custom game resource or not. |
ResourceType | Type | Type that will be returned by LoadResource. |
Category | String | Category of this asset type, for grouping in UI. |
Color | Color | Color that represents this asset, for use in the asset browser. |
Flags | AssetTypeFlags | Flags for this asset type |
HasEditor | Boolean | Returns true if there is an editor available for this asset type. |
Methods
static AssetType Find(String name, Boolean allowPartials = False) Find an asset type by name or extension match.
name — Name or extension of an asset type to search for. allowPartials — Whether partial matches for the name are allowed. static AssetType FromType(Type t) For a type (ie Texture, Material, Surface) return the appropriate AssetType. Returns null if can't resolve.
static AssetType FromExtension(String extension)