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"

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++? ()

Product Version: UE 4.9
more ▼

asked Jan 19 '16 at 08:53 AM in C++ Programming

avatar image

6 1 5 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Jan 19 '16 at 10:49 AM

avatar image

2.6k 95 41 111

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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