Accessing blueprint variables through C++
Hey, I've gotten fairly far in prototyping my game through blueprints. Now I've started rewriting some of the math heavy areas in custom C++ blueprint nodes. This is going well but I haven't been able to find a way to access variables made in blueprints through C++. Is there a way to get access to the blueprint created variables?
Also, is it a decent idea to make the heavier parts of the blueprints into C++ nodes? Rather than rewriting all blueprints in C++(I'm new to C++, so that's why I ask). Or will it not help much?
Thanks, sorry for the kind of confusing questions.
asked Jan 21 '15 at 01:28 AM in C++ Programming
You can access your blueprint variables from C++... but it's tedious. I would instead suggest that you move these variables to native instead. The you won't accidentally rename a variable that C++ code use.
It totally makes sense that you rewrite your calculation heavy stuff to C++, and just expose that functionality as nodes, so that you keep your overall logic in blueprint. It's really easy to do in C++. Also, it helps you keep your blueprints more clean, so it's more logic (where blueprints excel), and less math.
answered Jan 21 '15 at 07:53 AM
you might want to check out https://www.youtube.com/watch?v=ubVpYz_x_Ig it's a tutorial about creating a blueprint for a weapon and creating variables from C++ to the blueprint for real time use. I'm creating classes and them plugging them to a blueprint for easy orientation of the objects ect. I then make the action/gameplay stuff via C++
answered Jan 23 '15 at 01:23 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here