Get variable from Blueprint and use them in Script
How to get access to blueprint variables in script? (in C++ class) I need to execute some C++ code. I have variable in blueprint.
I tried to find variable by name in entire solution, but failed.
And similar question: how to get variable from C++ class in Blueprint?
========= in other words: I have object "soccer_ball", blueprint "soccer_ball_Blueprint(self)" and script "Ball_Actor1(inherited)" attached to 'movable' StaticMeshComponent
And I want to establish connection between soccer_ball_Blueprint and Ball_Actor1. Thanks. Is it possible? Or I should rewrite all blueprint in C++? ()
The general approach is to declare the variable in your C++ code and when creating a Blueprint from that class, you just set the variable via Blueprint. In this way, both C++ and Blueprints can access the object (i.e. you don't CREATE the variable in the Blueprint). To access your C++ variable in Blueprint you must use the Unreal decorators as explained in Omniscient and Omnipresent Rama's great tutorial.
answered Jan 19 '16 at 10:49 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here