When changing values for a blueprint in the editor the constructor is called once per frame while the value is being adjusted. I’m creating a BP for procedural meshes which is somewhat complex so having the constructor called so often is causing the editor to hang while adjusting variables. Is there any way to prevent this behavior other that adding a toggle and calling the constructor manually as needed? I had considered adding a delay but there doesn’t seem to be a way to access system time from blueprints.
You could add simple boolean and branch right after construction script node.
name that var for eg “stop refreshing” and execute further part of construction script only if that var is false.
I am doing this a lot for blueprint that should snap, to [0,0,0] or only to some Z value, or to grid (like nearest point that is on the grid).
I also kind of remember that there was something similar in properties of blueprint.
I was able to use now->Get TimeofDay to get the system time and use a new timespan variable (named nextIterationTime) to create a timer of sorts to prevent the constructor from building the procedural mesh every frame. Now the problem is that since the constructor is being called by modifying the values in the editor it’s completely wiping out the mesh that it built the last time it passed the time check switch. A stop refreshing switch produces the same issue.