I have a custom Volume named CycloneDomain. I want to add a Procedural Mesh Component to this actor as soon as it is placed in the editor, but UE4 crashes every time the first line in the OnConstrustion function runs. I already added in procedural mesh dependencies in the .build.cs and .uproject files, and it compiles just fine as well.
I did what you said and it works. The editor doesn’t crash anymore, but now I can’t move, scale, or rotate the actor.
What I mean by that is the gimbal inside of the level editor moves and looks like it’s rotating/scaling/translating, but the volume no longer follows the gimbal around. Although, once the level is played, the volume transforms to its desired location/rotation/scale.
Do you know what’s happening or how to fix it?
(Sorry, I’m a bit of a newb when it comes to ue4)
You should declare components like that in constructor so engine will be aware of by default. If you don’t do that those component won’t be visible in blueprint component list.
Other that that if you get crash first thing you need to do is check logs in Saved/Logs directory of your project. Every crash, or else it uncontrolled one (like calling on null or invalid pointer where OS suddenly stops the UE4) prints out information about in logs, is most cases those are assertions fails which engine meet unexpected condition and to prevent instability it crash it self and it prints failed condition, which require some figureing out what happened:
But is some cases there are full descriptive error that can cause crash and they are printed in logs, specially once related to component initiation, so checking the logs alone can solve many issues