If two code components have the same TEXT("") name in the CreateDefaultSubobject call the code will compile correctly but the editor will freeze when adding an instance of the class or classBP to the level.
1. Open UE4Editor (any project)
2. Add Code to project based on Actor (MyActor)
3. In MyActor.h add the following:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) UShapeComponent* Box; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) UShapeComponent* Box2;
4. In MyActor.cpp Add the following to the constructor:
Box = CreateDefaultSubobject<UBoxComponent>(TEXT("Box")); Box2 = CreateDefaultSubobject<UBoxComponent>(TEXT("Box"));
5. Compile
6. Add class instance to the level
Result:
When the instance is added to the level and construction script runs the editor freezes
Expected:
Compile error referencing naming conflict
Why does the REMOVE method of map container remove elements have memory leaks?
How does TextureRenderTarget2D get TArray<uint8> type data?
How do I set a material as a post-processing material?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
UMG RichText not appear image when packaged
How to delete some elements correctly when deleting an array loop?
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.8 |
Target Fix | 4.9 |
Fix Commit | 2602004 |
---|
Created | Jun 24, 2015 |
---|---|
Resolved | Jun 26, 2015 |
Updated | Feb 5, 2017 |