Hot reload not working
Hello I have a problem that hot reload isnt working at all. I added a minimal test case which "works" for me with UE 4.18.2 . I just put the actor on the map and nothing more. When I change some code in the TankPawn.cpp for example the
to some other numbers, I compile and nothing happens in the editor... also when I click play. I added the following code:
to confirm that the object actually got reloaded... It gets called ( for me it also gets called 3 times or more, which is also strange because I have only one tankPawn in my map... but nevermind, this happened also in the standalone app, because the message box popped up 3 or more times. For me this is actually useless because I have to either shut down/reopen editor (which doesnt help), or delete, and add the pawn again into the map to make the code changes takes effect. I attached some code in the following link
EDIT1: It seems that the module is hot reloaded... but the params are NOT SET TO DEFAULT. When I open the properties editor I see my camera position and a small yellow arrow next to one of the params that I changed saying RESET TO DEFAULT. That is when I see the code I changed. Why this doesnt happen automatically? I didn't change the settings in editor
It might happen sometimes that Editor and Visual Studio fail to communicate with each other and hence the Editor will not get Hot Reloaded even if your code successfully compiles. Simply close the VS and open it again from inside the Editor and it should work fine (If they still fail to communicate, then simply close and reopen both of them.)
With regards to the Blueprint exposed variables not automatically resetting to their default - I believe this is the intended behavior of Blueprints. As a programmer, you create a base class, initialize its properties with some default values and expose them to Blueprints for your Designers to tweak them and build the rest of the gameplay. It would have been catastrophic if all these already changed and tuned variables reset to their defaults C++ set values once you recompile your code! So once you create a Blueprint based on a C++ class and change the value of a property, next time you compile, you have to manually link that property back to its default C++ value by clicking on that yellow arrow next to it.
Hope this answered your question.
Follow this question
Once you sign in you will be able to subscribe for any updates here