A Blueprint derived from a custom Actor class resets its variables to their default values when the Actor is duplicated, even if the actor being duplicated has a different value for that variable. This only occurs on the first tick; after that, the variable remembers what it should be and switches back to it.
The user has included a test project with a MyActor class that prints the variable's value in the log.
Note
This does not appear to happen when creating a BP from Actor and creating the variable inside the BP. A duplicated actor in that case retains the variable's value as expected.
1. Load the attached project
2. Create a new MyActor Blueprint
3. Place the BP in the level
4. Change the value of the Value variable in the Details panel
5. Alt-Drag to duplicate the actor
Results:
In the output log, you'll notice the variable output 0 first, then whatever value it was given in the Details panel. This will happen with every duplication.
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.6.1, 4.7 |
Target Fix | 0 |
Created | Dec 18, 2014 |
---|---|
Resolved | Oct 6, 2015 |
Updated | Apr 27, 2018 |