Dear Friends at Epic,
Hiiiiii!
I have a custom component on a custom actor that extends TargetPoint
The component is BP friendly, and if I add the component to a BP class like AStaticMeshActor and alt drag the BP class, then it works fine, the component is duplicated onto the new ALT dragged copy
So that works!
#Custom Actor Class
My custom CPP actor class derives from TargetPoint
I make a BP of this CPP actor class, which is just a wrapper for my custom component.
The original, dragged from the Browser into the world, DOES work! It has the component when I press F4 to look at, and I can even edit the values of the component directly from the F4 menu of the Actor.
But
When I click on the instance of the BP of my custom actor class
and ALT-Drag to make a copy
The copy of the original does NOT have the component on it!
It is listed as none.
So there is some difference in the code between ALT Dragging, and the initial drag of my BP Custom Actor class into the world
#Question
Any ideas how I can make my custom CPP actor with its custom Component copy correctly using ALT+ Drag ?
The core of all this is related to
meta=(ExposeFunctionCategories="SolusLookAtComponent")
This feature, to see the component properties from the F4 menu of the actor instance, is not working for ALT-Dragged copies of the custom Actor CPP class.
Hourences and the rest of the Solus team really need this to work !
#Pictures Of The Issue
#Custom Actor Class
/*
By Rama
*/
#pragma once
#include "SolusLookAtComp.h"
#include "SolusLookAtActor.generated.h"
UCLASS()
class ASolusLookAtActor : public ATargetPoint
{
GENERATED_UCLASS_BODY()
UPROPERTY(Category=SolusLookAtActor, VisibleAnywhere, BlueprintReadOnly, meta=(ExposeFunctionCategories="SolusLookAtComponent"))
TSubobjectPtr<USolusLookAtComp> SolusLookAtComp;
};
#Custom Component Class
/*
By Rama
*/
#pragma once
#include "SolusLookAtComp.generated.h"
UCLASS(ClassGroup=Solus, meta=(BlueprintSpawnableComponent))
class USolusLookAtComp : public UPrimitiveComponent
{
GENERATED_UCLASS_BODY()
/** This is the core data for this individual Look At Component! This String must be unique within the current level. This exact String is sent to the Level Blueprint via the event SolusLookAtEventOccurred. Copy and paste this value you put here into the SwitchOnString in the Level Blueprint to detect when this particular Look At Comp fires off its event. */
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category=SolusLookAtComponent)
FString LookAtName__UniqueToCurrentLevel;
/** Tick Frequency, how often the trace will be done */
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category=SolusLookAtComponent)
uint8 TraceTickFrequency;
/** If player is beyond this range, no Look At event will be registered / it is the length of the trace*/
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category=SolusLookAtComponent)
float TraceMaxRange;
/** How Exactly Perfectly must player be looking in direction of the Look At Component to Trigger the Event? This is the allowed degrees of variance from perfectly facing the component. */
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category=SolusLookAtComponent)
float AllowedAngleVarianceToStillTriggerEvent;
/** Disabled after Runs once, this value is saved as part of the Solus Save Game System */
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category=SolusLookAtComponent)
bool RunsOnce;
public:
void DoLookAtTrace();
//~~~~~~~~~~~~~~~~~~~
// Has Run At Least Once
//~~~~~~~~~~~~~~~~~~~
//THIS IS THE VALUE TO SAVE TO DISK AND LOAD, WHETHER IT IS FALSE OR TRUE
public:
bool HasRunAtLeastOnce;
//~~~~~~~~~~~~~~
// Staggered Timer
//~~~~~~~~~~~~~~
protected:
uint8 SolusTickTimer;
protected:
//Init
virtual void InitializeComponent() OVERRIDE;
//Tick
virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) OVERRIDE;
};