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"

Blueprint variables reset to default

There is an issue after importing from 4.16 to 4.17 that causes an Actor's ActorComponents to reset instance variables to their defaults, when the actor is referencing a variable from the actor component.

To reproduce:

  1. In engine version 4.16 create a BP_ActorComponent blueprint (parent of ActorComponent). Give it a bool variable called bDefaultOn, make it instance editable. Compile and set its default value to be true. Also give BP_ActorComponent a vector called "SomeVector."

  2. Create a BP_Actor blueprint (parent of actor). Assign it a BP_ActorComponent created above. Create a function called SomeFunction, that takes in a vector, and just outputs it to a log or something

  3. In BP_Actor, override the Hit Event. Drag a pin from the Hit event and call SomeFunction. Get a reference to the actor's BP_ActorComponent, then from that get a reference to SomeVector. Use the reference of SomeVector as the input to SomeFunction.

  4. Drag an instance of BP_Actor to the map. In that instance, change the bDefaultOn bool var in that instances BP_ActorComponent to false.

  5. Compile, Save All, and close.

  6. Switch the project to engine version 4.17

  7. Open the project

  8. Observe that the instance actor on the map still has its BP_ActorComponent's DefaultOn var set to false.

  9. Compile the BP_ActorComponent blueprint. Observe that the instanced actor's BP_ActorComponent's bDefaultOn variable is now true/on.

Ive been able to repeat this also with variables stored in blueprint objects. Also, compiling the BP_Actor does not seem to cause this, just compiling the actor component.

Product Version: UE 4.17
Tags:
more ▼

asked Aug 09 '17 at 03:35 AM in Blueprint Scripting

avatar image

dingtech
21 1 5

avatar image CA99 5 days ago

I'm having this issue as well with my main project, though I haven't managed to follow all the steps here to reproduce it in a new and simpler project. My project has moved from 4.15 all the way up to now at 4.17 and involves multiple levels of BP inheritance. Looks like constantly keeping the engine up to date may not be ideal if little things like this happen.

My current workaround is to load up a different map, decline to save, and then load back the map I was in.

avatar image scha 1 hour ago

I have the same error. There is an easier way to reproduce, without 4.16, see : https://answers.unrealengine.com/questions/707103/compiling-bp-actor-component-resets-all-variablest.html

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

0 answers: sort voted first
Be the first one to answer this question
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