I created a simple class to hold some data:
UCLASS(BlueprintType, Blueprintable, EditInlineNew)
class MYGAME_API UPlayerFeedbackComponent : public UObject
{
GENERATED_UCLASS_BODY()
/** Animation */
UPROPERTY(Category = "Player Feedback Component", EditDefaultsOnly)
class UAnimMontage* animation;
/** Effect */
UPROPERTY(Category = "Player Feedback Component", EditDefaultsOnly)
class UParticleSystem* effect;
/** Sound */
UPROPERTY(Category = "Player Feedback Component", EditDefaultsOnly)
class USoundBase* sound;
/** If ticked, camera shake will only trigger on player controller associated with attached actor */
UPROPERTY(Category = "Player Feedback Component", EditDefaultsOnly)
bool bAffectAttachedPlayerControllerOnly;
/** If not bAffectAttachedPlayerControllerOnly, this defines inner radius of shake and rumble */
UPROPERTY(Category = "Player Feedback Component", EditDefaultsOnly)
float innerRadius;
/** If not bAffectAttachedPlayerControllerOnly, this defines outer radius of shake and rumble */
UPROPERTY(Category = "Player Feedback Component", EditDefaultsOnly)
float outerRadius;
/** Rumble */
UPROPERTY(Category = "Player Feedback Component", EditDefaultsOnly)
class UForceFeedbackEffect* rumble;
/** Camera Shake */
UPROPERTY(Category = "Player Feedback Component", EditDefaultsOnly)
TSubclassOf<UCameraShake> cameraShake;
/** Anything else we may want to do via Blueprints */
UFUNCTION(Category = "Player Feedback Component", BlueprintNativeEvent, BlueprintCallable)
void AttachToActorBP(AActor* actor, const FName attachPoint = "");
void AttachToActor(AActor* actor, const FName attachPoint = "");
void PlayAtLocation(const FVector location);
void RumbleAndShakeAtLocation(const FVector location);
};
I added a variable of this new class type to my pawn.
/** Afterburn activation feedback component */
UPROPERTY(Category = "Flying Pawn", EditDefaultsOnly)
UPlayerFeedbackComponent* afterburnPFC;
I created a blueprint instance of this new class in the editor:
However, when I tried to edit the reference for the variable on my pawn, nothing shows up in the asset picker.
Any ideas on what I need to do to properly setup this reference?
Thanks in advance!