We need to use some instanced properties in a actor but when we instantiate the actor the link between the property in the instance and the property in the default blueprint seems to be broken.
Example of an actor using an instanced property :
`UCLASS()
class MYPROJECT_API ATestActorInstance : public AActor
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, Instanced, Category = “My Category”)
TObjectPtr m_SomeInstance = nullptr;
};`If we create a blueprint from this actor and set to a certain value in the “m_SomeInstance” member in the blueprint, then we instantiate an actor from this blueprint in a level, the property “m_SomeInstance” is the same in both the actor in the level and the blueprint.
Now if we change the “m_SomeInstance” property in the default blueprint to another value, the property on the actor in the level would keep the reference to UActorComponent instead of automatically change to the USceneComponent.
The issue seems to come from the fact that the code checking the property’s archetype to do a diff doesn’t find the proper archetype, it seems to be a known issue if I refer to this post from 2020 :
[Content removed]
Is there any news or a way to make it work now?
I feel that the right way to do this would be modifying the GetArchetype code in case of an instanced property and refer to the same instance from the archetype of the container of the instance.
Any input on this matter would greatly help us. I am looking forward to read from you.
Steps to Reproduce
On a regular setup of UE 5.4.4 using a code based project, add an actor class as followed
`UCLASS()
class MYPROJECT_API ATestActorInstance : public AActor
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, Instanced, Category = “My Category”)
TObjectPtr m_SomeInstance = nullptr;
};`Create a blueprint inheriting this new actor and setup any UObject for the “m_SomeInstance” member.
Add an instance of the actor in a level then change the UObject in the “m_SomeInstance” member from the default blueprint.
As a result, the member is not updated in the instance of the actor in the level and stays the same as when it was instancied instead of the one in the default blueprint.
Thank you for the detailed repro steps. I am able to reproduce this UE 5.4 and 5.5 launcher versions of the engine.
Doing some research, it seems there is active work done in the engine to change how instanced properties are handled when BP defaults are modified in a future engine version. I’m consulting with the engine team to gather additional information and will get back to you as soon as possible.
Thanks once for reporting this issue. I’ve gone ahead and submitted a JIRA report to be included in the UE issue tracker. Please note that Epic will review the report and determine whether it will be made publicly accessible, and the whole process can take a few days.