x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Changes in C++ code in plugin does not show affect in the editor

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

Product Version: UE 4.13
Tags:
more ▼

asked Jan 18 '19 at 06:22 AM in C++ Programming

avatar image

Lancer89X
1 1

avatar image Shadowriver Jan 18 '19 at 06:25 AM

Did you compile the code?

avatar image Lancer89X Jan 19 '19 at 12:36 AM

I did compile it and use the rebuild, turns out for the plugins you may have to click " clean the build " then click "build" so it will affect the code.

avatar image Shadowriver Jan 19 '19 at 01:59 AM

Ok do you hot reload? But also you may be right, and it's not plugin specific, simply you needed to rerun UHT which rebuild cause

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question