HI ,
I’m struggling with a blueprint , it’s an actor that has a static mesh. In my app, i want ( in editor, not in runtime) right click on a mesh, and replace it with that actor. Instead adding the mesh to the actor manually , i made something in the CONSTRUCTION SCRIPT of the actor, to assign the mesh and even apply a material, and it works
The problem is, whenever i make any change to that actor (if i move it, or change material …) the mesh disappears instantly !! I know that in Construction Script it’s special … whenever you make a change, the whole script is executed again, but i can’t figure out how to solve that, i tried with some variables , but it’s still the same problem.
And before the mesh disappears, there is also something i don’t understand ! If i add an empty actor to the level, and then add manually a mesh to the actor, well … there is absolutely no problem ! It doesn’t disappears if i make a change, and it looks like this :
But, if i replace a mesh with an actor and assign automatically the mesh to it (and it works), the parameter will looks like this in the editor:
IT’S GREYED !!! i really don’t get it !
Well maybe i know what’s happening here … the first time the construction script is executed, it founds the mesh in the level and use it in SET STATIC MESH , but the next time the script is executed, the mesh is no longer available as it has been replaced by the acotr !!! The problem is that i don’t know how to get the mesh from the content browser , the only way i found is to list all the meshes of the level … but that’s not what i need …
any help please?