Right now with the way I’m working, I’m using both Unreal Editor and Visual Studio and hopping between the two. However, I’ve noticed when I write some code and compile in Visual Studio, I have to restart Unreal Editor for the code to take effect.
Is there some way I could have Visual Studio notify Unreal that the code has changed and it should update itself?
I’m using Microsoft Visual Studio Community 2013 and Unreal Engine 4.7.5.
Well it depends on what you are referring to by “take effect”. The unreal engine has a “hot reload” functionality that causes it to hot swap any newly compiled libraries you have created when you compile the code in visual studio.
However I have noticed that if you add new functions or properties that are meant to become blueprint nodes (and you have already opened that blueprint in the editor) the new nodes do do not appear. I’ve tried performing a “Refresh Nodes” operation in blueprints with no luck. However if you haven’t opened the blueprint then the new nodes will appear, unfortunately you are usually adding new nodes to be used by the blueprint you are currently looking at… so kind of a catch 22.
In this specific case, I’m using the FPS Example, and I’m changing the .cpp of the parent class to my player pawn. For my character, the muzzle of the gun is in a different position than the default gun. So I have to change the GunOffset variable to be in a different position. When I build my solution, the gun offset doesn’t change in Unreal Editor until I restart the whole program. The editor even shows the “Hot Reload Complete!” notification, but nothing changes.
My mistake - in my original post, I meant build, not compile. So yes, I’m doing CTRL+SHIFT+B.