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
How to delete some elements correctly when deleting an array loop?
Why does the REMOVE method of map container remove elements have memory leaks?
How does TextureRenderTarget2D get TArray<uint8> type data?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
How do I set a material as a post-processing material?
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 |