Hi guys,
I use the plugin from OptiTrack in our VR game project, in this PlugIn, I need to use a BP to inherit the C++ file ClientOrigin.h and use event graph to change the values in “server address”, “client address”(Fstring type) and “HMD ID” int32 type, I add the quote BlueprintReadWrite function on the lines relate to it, save it and restart the editor but nothing happened I still can’t reach the variables in blueprint. here are the codes I changed
#pragma once
#include
#include "OptitrackClientOrigin.generated.h"
/**
* Represents a pose for a tracked rigid body.
*/
USTRUCT()
struct FOptitrackRigidBodyState
{
GENERATED_USTRUCT_BODY()
/**
* Populated with the value of FPlatformTime::Seconds() on frame delivery.
* Can be compared to determine the freshness of the associated pose data.
*/
UPROPERTY()
double DeliveryTimePlatformSeconds;
/** Position in tracking space. */
UPROPERTY()
FVector Position;
/** Orientation in tracking space. */
UPROPERTY()
FQuat Orientation;
};
UENUM()
enum class EOptitrackClientConnectionType : uint8
{
Multicast = 0,
Unicast,
};
/**
*
*/
UCLASS()
class OPTITRACKNATNET_API AOptitrackClientOrigin : public AActor
{
GENERATED_UCLASS_BODY()
public:
/** The network address of the NatNet server to connect to. */
UPROPERTY( EditAnywhere, BlueprintReadWrite,Category=Optitrack )
FString ServerAddress;
/** The address of the local network interface to use. */
UPROPERTY( EditAnywhere, BlueprintReadWrite,Category=Optitrack )
FString ClientAddress;
/** The NatNet client type to instantiate. Must match the setting of the NatNet server. */
UPROPERTY( EditAnywhere, BlueprintReadWrite,Category=Optitrack )
EOptitrackClientConnectionType ConnectionType;
/** If non-zero, the rigid body with the specified ID is used to provide input to compatible HMD implementations. */
UPROPERTY( EditAnywhere,BlueprintReadWrite, Category=Optitrack )
int32 HmdRigidBodyId;
On each “UPROPERTY” I add “BlueprintReadWrite,” and save the file, is there anything else I should do to let blueprint access the variable?
thank for everyone
Jace