Download

Editor Preview only Blueprint Runtime Error while transferring variables between pawns

**[FONT=comic sans ms]DroneLakeGameThumbAlphaEd0.jpg

The “Game” premise:
**
Control a quadcopter from a player pawn (ideally VR).
To get the VR pawn to animate it should be possessed by the player.
To get the drone to fly correctly physics should not be simulated on the VR player pawn.


Hence ideally their should be two pawns:
1. the players “body” possessed by the player
2. the quadcopter pawn with physics simulated.

The idea was to pass variables from the quadcopter(Drone) pawn through the level blueprint to the player pawn.

The level blueprint is shown below:

The player pawn blueprint is:

The drone is a C++ class with the interactive variables declared as:

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “Control”)
float mI_RstickP;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “Control”)
float mI_RstickR;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “Control”)
float mI_LstickT;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “Control”)
float mI_LstickY;

The above works file when the game is played as “Standalone Game” however it fails when the game is played in “Selected viewport” or as VR.
The error messages are repeats on the same basic theme of:

PIE: Error: Blueprint Runtime Error: “Attempted to access missing property ‘mI_RstickR’. If this is a packaged/cooked build, are you attempting to use an editor-only property?”. Blueprint: PlanetLake_v3 Function: Execute Ubergraph Planet Lake V 3 Graph: EventGraph Node: Set mI_RstickR
PIE: Error: Blueprint Runtime Error: “Attempted to assign to None”. Blueprint: PlanetLake_v3 Function: Execute Ubergraph Planet Lake V 3 Graph: EventGraph Node: Set mI_RstickR

I’m not quite sure what you have going on here, but for sure, you can talk directly from the player to the drone. Just get a reference to the drone, and off you go.