2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Customizes a string asset reference to look like a UObject property
|
|
|
|
|
*/
|
2014-06-04 10:16:14 -04:00
|
|
|
class FStringAssetReferenceCustomization : public IPropertyTypeCustomization
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
public:
|
2014-06-04 10:16:14 -04:00
|
|
|
static TSharedRef<IPropertyTypeCustomization> MakeInstance()
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
return MakeShareable( new FStringAssetReferenceCustomization );
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-04 10:16:14 -04:00
|
|
|
/** IPropertyTypeCustomization interface */
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void CustomizeHeader( TSharedRef<class IPropertyHandle> InStructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override;
|
|
|
|
|
virtual void CustomizeChildren( TSharedRef<class IPropertyHandle> InStructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
bool OnShouldFilterAsset( const class FAssetData& InAssetData ) const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/** Handle to the struct property being customized */
|
|
|
|
|
TSharedPtr<IPropertyHandle> StructPropertyHandle;
|
|
|
|
|
/** Classes that can be used with this property */
|
|
|
|
|
TArray<UClass*> CustomClassFilters;
|
|
|
|
|
/** Whether the classes in the above array must be an exact match, or whether they can also be a derived type; default is false */
|
|
|
|
|
bool bExactClass;
|
|
|
|
|
};
|