I think the issue is that in GetInstancedSubobject() (CoreNative.cpp), the following bit of code is not considering that the instanced subobject might be outered to another instanced subobject within a chain that's rooted at a Blueprint class instance (e.g. a nested subobject instance owned by a component subobject instance that's owned by a Blueprint Actor instance):
// Don't seach for the existing subobjects on Blueprint-generated classes. What we'll find is a subobject // created by the constructor which may not have all of its fields initialized to the correct value (which // should be coming from a blueprint). // NOTE: Since this function is called ONLY for Blueprint-generated classes, we may as well delete this 'if'. if (!SubobjectOuter->GetClass()->HasAnyClassFlags(CLASS_CompiledFromBlueprint)) { InstancedSubobject = StaticFindObjectFast(NULL, SubobjectOuter, SubobjectName); }
I think what happens then is that it finds the original instance that was created by CreateDefaultSubobject(), but that one does not include defaults from the generated Blueprint CDO.
1. Start with the project attached to [Link Removed]
2. Add a C++ class based on Actor (MyActor)
3. Add the following to the class declaration in MyActor.h:
UPROPERTY(EditAnywhere, BlueprintReadWrite) UMySceneComponent* MyNativeScene;
4. Add the following to the MyActor constructor in MyActor.cpp:
MyNativeScene = CreateDefaultSubobject<UMySceneComponent>(TEXT("MyNativeScene"));
5. Compile in Visual C++ and relaunch the editor.
6. Create a new Blueprint class based on MyActor (MyActorBP).
7. Open MyActorBP, select the 'MyNativeScene' component and edit the 'Shape' property on the 'ArmCollider' subobject so that the BoxExtent is 32,32,400.
8. Compile and save the Blueprint.
9. Drag an instance of MyActorBP into the level. Note that the box collision shape doesn't match the new default value entered in Step 7. Also note that in the Details view the "Reset to Default" arrow is visible on the BoxExtent property, even though it wasn't modified on the instance.
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
I am not able to find world outliner how to enable it?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Delay nodes occasionally don't fire the "Completed" output in a nativized build
How does UMG set overlapping layouts?
How can i modify the param name in EQS node
Why doesn't the collision diminish when the collision radius decreases?
How to achieve HLSL Multiple Render Target in Material blueprints?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-40878 in the post.
7 |
Component | UE - Gameplay - Components |
---|
Created | Jan 19, 2017 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |