UE will not compile new code

Hi there, I wrote some bad code while trying to make the OpenDoor relative and i made UE crash.
so to reopen my project i needed to delete the binaries and rebuild.
since then when i try to compile my new code nothing changes in the editor
mycode:


UE:

keeps using the old code.
im stuck at this point

What is the old code and what are you expecting?

i used last lessons absolute lerp code and just changed the opdendoor.h


this crashed UE so i rewrote the code to exactly what is shown in this lesson, then i deleted the binaries and rebuild the project.
i was expecting both doors to open with the UE animation but after compiling when i press play only one door is just open without the animation

  1. That crashes because the component doesn’t have an owner yet. So dereferencing it would crash.
  2. It’s not working because it’s still using absolute rotation. In BeginPlay you have
    const float InitialYaw = /* ....*/
    
    Which is creating a new local variable and not modifying the member variable.

but since it crashed it wouldnt apply any of the code changes after compiling.
ps: thanks for the help any way bud :grinning:

What do you mean?

i mean that doesnt matter what code i wrote in the cpp file(even code that supposed to crash ) the engine would still show like its compiling and play the same old hot reload :man_shrugging:

Even after restarting the editor?

You could force a recompile by closing Unreal and then delete the Binaries and Intermediate folders.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms