If a C++ class based on Character has a default value for a variable and the value is overridden in blueprints, the default value will be shown in game rather than the BP value.
1. Open UE4 Editor (any project)
2. Add code to project based on Character (MyCharacter)
3. In the header file add the following:
UPROPERTY()
float CodeDefault;
4. In the source file add the following:
CodeDefault = 45.678;
5. Compile
6. Create blueprint based on MyCharacter (MyCharBP)
7. Change the default falue of CodeDefault in the blueprint
8. On Event Tick printout the value of CodeDefault
Result:
The value of 45.678 will be printed rather than the value set inside the blueprint
Head over to the existing Questions & Answers thread and let us know what's up.
2 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.7.3 |
Target Fix | 4.8 |
Created | Mar 23, 2015 |
---|---|
Resolved | Mar 26, 2015 |
Updated | Jun 19, 2018 |