Hot reloading not working in Godot.

Hi all, 

I just updated rider to check out the hot reloading feature but I cant seem to get it to work? 

I'm using this basic script -

public override void _Process(double delta)
{
    this.Scale = Vector3.One * 2;
}

I just change the scale multiplier, save and go back to Godot but nothing updates in the game view.

I'm on JetBrains Rider 2024.3, macOS 15.0.1 (24A348), dotnet 8.0.401 & 6.0.414 and Godot Engine v4.3.stable.mono.official [77dcf97d8].

I think the settings are okay, is there an add on I need to get for rider or Godot maybe? 

Thanks, 

Pete

1
9 comments

Same issue on Godot 4.4-dev5. Creating a launchoptions and adding start properties to the csproj do not help. 

Trying to edit a file right after startup pops up a warning about hot-reloading booting up, but if you wait, no ability to trigger a hot-reload ever comes up.

0

Hey I got some help from the Godot community. 

I hadn't realised but you need to run the game by pressing debug in Rider. So when I do that, it does pick up on the changes but it also hangs the Godot game session. :P 

0

Hello,

There is a corresponding issue on our tracker: RIDER-118351 Simplify C# Hot Reload for Godot on *nix

There are two available options to use Hot Reload in Godot: see this Ivan's comment.

Hope that helps. Have a nice day!

0

Hey I haven't got that working, are there some parts in particular I should add when modifying my csprroject file? 

It got a mention on the update page but no mention of the work arounds you need to do to actually have a chance of getting it working. It's a bit frustrating.

0

Me , I verified the hot reload and found it works on MacOS under Debug. For me it works while a project targets net8.0. Please try the following steps:

  • Remove the LaunchSettings.json file if you added it earlier;
  • Add this to .csproj:
<PropertyGroup>
<StartAction>Program</StartAction>
  <StartProgram>/YourPathTo/Godot_mono.app/Contents/MacOS/Godot</StartProgram>
  <!--    <StartArguments>optional</StartArguments>-->
  <StartWorkingDirectory>./</StartWorkingDirectory>
</PropertyGroup>
  • Edit the <TargetFramework>net8.0</TargetFramework> . Ensure you have .net 8 sdk installed. I found it doesn't work with net6.0 for some reason (I'll check it with team), and once I set net8.0, it starts working fine.
  • Close Rider and delete the .idea folder from your Godot project directory;
  • Open a project in Rider again;
  • You should get such a run configuration named the same as your project:
     

  • Launch it via the Debug button;
  • Edit some C# code. It should bring such a popup:

  • Click “Apply changes”;

Please let me know whether it helps.

 

Xentripetal , please, also try this approach I described above. Are you on MacOS also?

Have a nice day!

0

Hey that's working for me! Looks like it will be a real time saver for testing things out. :) 

Thanks so much for looking into it.

Pete

 

0

I am glad to know it started working. I clarified with the team and confirmed the net8.0 is a requirement for MacOS/Linux for the hot reload to work in Godot.

As for the approach with LaunchSettings.json, ensure to run via the “Debug” button, not via “Run”: (cc Xentripetal )

Have a nice day!

0

Thanks Dmitry Kazantsev! yeah my issue was I wasn't running it in debug mode.

0
Glad to hear that a solution was found. Have a nice day!
0

Please sign in to leave a comment.