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"

Can't expose member variables to Blueprint

Hello, I'm trying to expose some class member variables from C++ to Blueprint without any success so far.

 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Power)
 class USphereComponent* CollectionSphere;
 
 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Power)
 float PowerLevel;

This is an example property declaration from the class, inheriting from ACharacter. The project is created from Third Person C++ Template. I build the code, close/open blueprint editor, close/open UE Editor - nothing. I tried removing/changing the categories of the default properties again no change. Tried different build schemes and configurations also with no result.

My setup -

  • OS X Yosemite v10.10.1 (14B25)

  • UE4 4.6.0-2369412

  • XCode 6 Version 6.1.1 (6A2008a)

Any help is greatly appreciated, thanks.

Product Version: Not Selected
Tags:
more ▼

asked Dec 14 '14 at 05:44 PM in C++ Programming

avatar image

Georgi_Ivanov
1 1 1 3

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

2 answers: sort voted first

Development_Editor x64

Make sure you are using only Development_Editor x64 as your build configuration in Visual Studio

That should do the trick

VisibleAnywhere -> EditAnywhere

Also make sure you use EditAnywhere

like

 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SolusObjectiveSystem)
 int32 SolusObjectiveSystem_PrimaryObjective;


Rama

more ▼

answered Dec 14 '14 at 06:21 PM

avatar image

Rama
10.6k 445 343 1083

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

It turned out the build configuration was correct, but it was compiling with the wrong scheme. alt text

The one selected on the image is the right one. Previously I was trying to compile with the first two. Thanks for the help, this was turning me mental. :)

more ▼

answered Dec 14 '14 at 06:40 PM

avatar image

Georgi_Ivanov
1 1 1 3

(comments are locked)
10|2000 characters needed characters left
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