Merge branch 'GoaLitiuM-generic_asset_reference_attrib'

This commit is contained in:
Wojtek Figat
2023-07-31 16:59:54 +02:00

View File

@@ -53,4 +53,23 @@ namespace FlaxEngine
UseSmallPicker = useSmallPicker;
}
}
#if USE_NETCORE
/// <summary>
/// Specifies a options for an asset reference picker in the editor. Allows to customize view or provide custom value assign policy.
/// </summary>
/// <seealso cref="System.Attribute" />
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
public class AssetReferenceAttribute<T> : AssetReferenceAttribute
{
/// <summary>
/// Initializes a new instance of the <see cref="AssetReferenceAttribute"/> class for generic type T.
/// </summary>
/// <param name="useSmallPicker">True if use asset picker with a smaller height (single line), otherwise will use with full icon.</param>
public AssetReferenceAttribute(bool useSmallPicker = false)
: base(typeof(T), useSmallPicker)
{
}
}
#endif
}