mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-04-22 15:28:46 -04:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
15 lines
326 B
C#
15 lines
326 B
C#
|
|
namespace Editor.Assets;
|
|
|
|
[AssetPreview( "clothing" )]
|
|
class PreviewClothing : PreviewImage
|
|
{
|
|
public PreviewClothing( Asset asset ) : base( asset )
|
|
{
|
|
if ( Asset.TryLoadResource<Clothing>( out var clothing ) && !string.IsNullOrEmpty( clothing.Icon.Path ) )
|
|
{
|
|
texture = Texture.Load( clothing.Icon.Path );
|
|
}
|
|
}
|
|
}
|