Struct property can't be edited in level

(Copied from https://answers.unrealengine.com/questions/697408/struct-property-cant-be-edited-in-level.html)

I have a struct property, which contains instanced object property. After upgrading to UE4.17, it can’t be edited in level.

210248-capture.png

This struct contains a instanced object property. I think this is the cause.
A change in UActorComponent::DetermineUCSModifiedProperties() causes the problem.
In UE4.16, it’s like this:

     virtual bool ShouldSkipProperty(const UProperty* InProperty) const override
     {
         return (    InProperty->HasAnyPropertyFlags(CPF_Transient | CPF_ContainsInstancedReference | CPF_InstancedReference)
                 || !InProperty->HasAnyPropertyFlags(CPF_Edit | CPF_Interp));
     } 

But in UE4.17, it’s like this:

     virtual bool ShouldSkipProperty(const UProperty* InProperty) const override
     {
         return (    InProperty->HasAnyPropertyFlags(CPF_Transient)
                 || !InProperty->HasAnyPropertyFlags(CPF_Edit | CPF_Interp));
     }

You can see that CPF_ContainsInstancedReference | CPF_InstancedReference is removed in UE4.17. So my struct is always added into UCSModifiedProperties, and it’s treated as const. :frowning: