If a user makes an enumerator in C++ and sets one of the variables to Hidden and doesn't make it the last variable of the enum, it will cause issues with the numbering of the enum when using the Select node in blueprints.
1. Create a new project
2. Create a new C++ class of the type Actor
3. Add the following code to the .h file for the new class on line 7
UENUM(BlueprintType) enum class TestEnum { One UMETA(DisplayName=ThisIsTheSecond), Two UMETA(DisplayName=ThisIsTheThird), Invalid UMETA(Hidden) };
4. Compile and save
5. Make a new blueprint based off your new C++ class
6. Add 2 string variables and a variable of the enum you created (TestEnum), set the default values to "Hello", "Goodbye" and "ThisIsTheSecond" respectively.
7. Make a 'get' of the first string and drag off it to make a Select node
8. Connect a Get TestEnum node to the Index pin of the new Select node
9. Connect a get for both of the strings you created to the pins "ThisIsTheSecond" and "ThisIsTheThird" in order
10. Pull off the Return Value pin and make a Print string and connect BeginPlay's execute pin to the Print String.
11. Compile and save
12. Add a new instance of your new blueprint to the level
13. Start PIE
14. Notice that even though the print string should print Hello, it prints Goodbye, as if the enum is referring to "ThisIsTheThird"
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
I am not able to find world outliner how to enable it?
Installer 4.10 failed with error code R-1603
Delay nodes occasionally don't fire the "Completed" output in a nativized build
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
When I open UE4 4.24.3 it appears that. Does anyone know how to solve?
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.7.6 |
Target Fix | 4.9 |
Fix Commit | 2576970 |
---|
Created | May 26, 2015 |
---|---|
Resolved | Jun 23, 2015 |
Updated | Apr 27, 2018 |