Description

Hi,

I tried to use for a scriptable tool the watch property node for a struct.

The objective for me was to offer to my user a view of a struct in the scriptable tool and have these modifications being reflected on the same type of struct on an actor selected.

Our Struct contains a property for an array of FInstancedStruct.

I wish to be able to detect when there's been a change on the FInstancedStruct property or when a property from one of the FInstancedStruct has been modified.

Sadly it doesn't work, only thing that works is only the modification of the array (I can see the property in my actor having an empty new line as I copy/paste the struct into the actor's struct property) : if I modify one of the inner instancedstruct, my logic is not called.

From what I can read in the code, the GetValue in CheckAndUpdate doesn't change if we change the inner instancedstruct property

It would then seem that the following code is not enough.

Any idea?

[this, ArrayIndex, StructProperty, PropertySet]()->uint32 {   
	const void* StructValuePtr = StructProperty->ContainerPtrToValuePtr<void>(PropertySet);  
	uint32 ValueHash = StructProperty->GetValueTypeHash(StructValuePtr);  
	return ValueHash;  
},  

Steps to Reproduce

Steps to Reproduce

1. Add a struct (containing at least one array of FInstancedStruct) property to a propertyset
2. Assign the propertyset in a scriptable tool
3. In the scriptable tool, on Script Setup, call "Watch Property" and set it up to watch your struct property
4. In the callback event, add a printf and setup a breakpoint
5. Open a map and start your scriptable tool
6. Add a line in the array of FInstancedStruct

1. Notice that you hit the breakpoint you previously setup : good
7. Now modify the FInstancedStruct to a struct type

1. Notice that you don't hit the breakpoint : bad
8. Now modify a property from the FInstancedStruct

1. Notice that you don't hit the breakpoint : bad

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-239951 in the post.

1
Login to Vote

Unresolved
CreatedJan 24, 2025
UpdatedJan 24, 2025
View Jira Issue