I have an array of structs that, when edited in the details panel, always reset back to the values set in the blueprint object. The array has uproperty flags: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = SomewhereElse).
The array is visible and editable in the details panel, but any time one of the properties is edited on an instance of the object, the values get instantly reset back to the values set in the blueprint.
There is no construction script on my actor, and when I add one to print the value, it prints the value from the default, meaning that this is occurring before the construction script is called on the actor.
I have a blueprint with some values set. When I place the actor in the level and attempt to modify or add data in the details panel, it resets back to the values in the blueprint. Adding members of the array isn’t allowed. This is all in white text, not the grey of a uproperty disallowance.
Could you take a screenshot showing how you are handling the array in blueprints?
Making changes will cause the construction script to re-run, so if you are setting the default values there it will discard your changes and reload the script.
In addition to the screenshots mentioned, can you also provide how youre code class is setup? Are you using ArrayName.Add() to add any elements to the array in code? Please provide the code for the arrays as well as the screenshots of your blueprints
I copied the struct into a new project and did not see the same behavior shown in your video. Do you have the same issue with the values not holding with other struts? If you copy this struct to a new project, does it still show the same issue?
We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.
I am encountering this now in 5.3.2. Seems to be a problem.
In my case, with a Editor Widget Utility, I add a set of “sub” actors to an array within a “master” actor, and then change any other variables in the “master” actor, it clears the array of “sub” actors.