I set up an actor to add procedurally add instances to an InstancedStaticMeshComponent in BeginPlay, hoping to just use the Keep Simulation Changes option so we can just have them saved in the level instead of regenerating them each time the level is loaded (they’re always going to be the same). When I select the actor with the InstancedStaticMesh and press ‘K’ while simulating I just get a message saying “No properties were copied”. I’m not sure if this is related but I tried to copy/paste the array instead and that also didn’t work.
Hi ,
- Does this occur in a clean, blank project with no additional content or is it limited to one project?
- What steps can I take to reproduce this error on my end?
- Are you using blueprints or c++?
I was able to repro this in a new project, which I’ve attached. If you simulate TestMap in that project there is an actor called “InstancedStaticMeshSpawner” that looks for TargetPoints in the level and adds an instance to an InstancedStaticMeshComponent at the location of each one.
What changes are you making to the blueprint asset in simulation that aren’t saving? I received the error warning at times that I did not update the asset, but if I made changes then pressed K the changes were saved accordingly.
It’s the Instances array that isn’t saving. Changing other properties on it works fine, but it won’t save any instances that were added after the simulation started.
I do not see an array of instances in your spawnermanager. It creates the assets but does not save them. Where is this array and what steps are you taking to update it?
I’m talking about the array in the Instanced Static Mesh Component itself. Since I can change the transform or static mesh and save them by pressing ‘K’/“Keep Simulation Changes” when they’re selected while simulating, I expect to also be able to save any instances that were added over the course of simulation as well.
After looking I believe this is acting as intended. The transforms you set are being overridden by your blueprint nodes, which specifically spawn the actors and set them at the spawn point locations. If you remove this then change where the array elements are located, do you see the same behavior?
I tried that but for whatever reason the blueprint class I have in the project doesn’t let me edit the instance array on the actor in the scene at all (This also seems like a bug, I can add instances from the blueprint editor but can’t add or edit any instances once it’s placed in the level. Should I open another question about this?).
I was, however, able to test it by dropping an empty actor into the scene and adding an InstancedStaticMeshComponent into that one. If I change or add an instance on that actor (using the details panel, not a blueprint) during simulation and try to save its changed properties it still says no properties were changed.
Hi ,
I managed to get an error with instanced mesh arrays, though not exactly what you are experiencing I believe they may be linked. UE-30479 is currently in to be assessed by the development staff, as I noticed that in most cases the instance array simply does not add elements when pressed during simulation.