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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

AActor variable with EditDefaultsOnly doesn't change value in Defaults

Hello, i created a class in c++ that derives from AActor and that has the following variable:

 UPROPERTY(EditAnywhere, Category = "Test")
 class AActor * Test;

I create a blueprint based of that class and when i go to the defaults section of the blueprint he has the Test variable with the value None. I click the drop down and when i pick an actor from the level and it doesn't change, it's always None. I'm using 4.6.1 from the latest commit of the release branch.

Product Version: Not Selected
Tags:
more ▼

asked Jan 26 '15 at 11:05 PM in Bug Reports

avatar image

xlar8or
6k 161 129 304

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

1 answer: sort voted first

Hey xlar8or-

I was able to reproduce the issue of the defaults tab not holding the assignment correctly and have reported the bug to our internal tracking database (UE-8522) for further investigation by an engineer. In the mean time you could add "BlueprintReadWrite" to the UPROPERTY field and then set the value in the blueprint's construction script as a workaround.

Cheers

Doug Wilson

more ▼

answered Jan 28 '15 at 06:05 PM

avatar image xlar8or Jan 28 '15 at 06:32 PM

Thank you :)

avatar image xlar8or Feb 26 '15 at 06:30 PM

I don't know if the issue was already fixed, but i'm still experiencing this issue in the 4.7 release from Git.

avatar image Doug E ♦♦ STAFF Feb 27 '15 at 09:55 PM

Hey xlar8or-

After speaking with one of our engineers I found out that this is actually by design. This is to avoid a situation where the game tries to create the actor from your blueprint (with the Actor variable) before the actor that the variable is set to is created. If that were to happen the blueprint would have no reference to what the variable is supposed to be set to and could cause other issues (including a crash). Using the method of adding BlueprintReadWrite to the UPROPERTY is likely going to be the simplest solution to the issue.

avatar image xlar8or Feb 28 '15 at 01:46 PM

Ok thank you for the feedback, gonna try to use the other method. I would suggest putting a comment on the field explaining that or something like that, because other people will probably also think it's a bug.

(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