From 084db93ddae4fdeea7427630c725270eef411fd2 Mon Sep 17 00:00:00 2001 From: hatayama Date: Tue, 6 Oct 2026 23:34:18 +0900 Subject: [PATCH 1/2] Expect the unbound added-member reason to point generated names to a compile A name that is generated at compile time, for example by a source generator, exists only in the compiled assembly, so the hot-reload compilation can never bind it. The current reason only tells the user to pass a new file and to compile as a last resort, which leaves them retrying --files for a name no file declares. --- .../Tests/Editor/HotReload/HotReloadWorkerReasonTextTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/Tests/Editor/HotReload/HotReloadWorkerReasonTextTests.cs b/Assets/Tests/Editor/HotReload/HotReloadWorkerReasonTextTests.cs index 86b999354d..0a6cf830e5 100644 --- a/Assets/Tests/Editor/HotReload/HotReloadWorkerReasonTextTests.cs +++ b/Assets/Tests/Editor/HotReload/HotReloadWorkerReasonTextTests.cs @@ -336,7 +336,9 @@ private static IEnumerable RenderCases() "The added member's body could not be fully bound in the hot-reload compilation " + "(CS1503: Argument 1: cannot convert); hot reload cannot verify a member it cannot bind, " + "so it is skipped. If the name is declared in a new file, pass that file to --files too " - + "(new files are not selected automatically); run 'uloop compile' only if it still does not bind."); + + "(new files are not selected automatically). If the name is generated at compile time, " + + "for example by a source generator, hot reload cannot see it: run 'uloop compile'. " + + "Also run 'uloop compile' if it still does not bind."); yield return Case( HotReloadWorkerReasonCode.AddedMethodBodyBindsCompiledSignature, new[] { "CS1503: Argument 1: cannot convert", "'Example.Payload'", "'Example.Registry'", "'Assets/Registry.cs'" }, From 9b837ee75759993ae27852625f306301a817c45d Mon Sep 17 00:00:00 2001 From: hatayama Date: Tue, 6 Oct 2026 23:37:55 +0900 Subject: [PATCH 2/2] Point generated names to a compile in the unbound added-member reason The hot-reload compilation sees only source files, so a name generated at compile time, for example by a source generator, never binds there and passing more files cannot help. The reason now says so and names 'uloop compile' as the step for that case, while keeping the new-file hint and the compile fallback. --- .../Shared/HotReloadWorkerReasonText.AddedMemberTemplates.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Packages/src/Editor/FirstPartyTools/HotReload/Shared/HotReloadWorkerReasonText.AddedMemberTemplates.cs b/Packages/src/Editor/FirstPartyTools/HotReload/Shared/HotReloadWorkerReasonText.AddedMemberTemplates.cs index 88b855f56c..ba4a3a287a 100644 --- a/Packages/src/Editor/FirstPartyTools/HotReload/Shared/HotReloadWorkerReasonText.AddedMemberTemplates.cs +++ b/Packages/src/Editor/FirstPartyTools/HotReload/Shared/HotReloadWorkerReasonText.AddedMemberTemplates.cs @@ -110,7 +110,9 @@ private static void AddAddedMemberTemplates( "The added member's body could not be fully bound in the hot-reload compilation ({0}); " + "hot reload cannot verify a member it cannot bind, so it is skipped. If the name is " + "declared in a new file, pass that file to --files too (new files are not selected " - + "automatically); run 'uloop compile' only if it still does not bind.", + + "automatically). If the name is generated at compile time, for example by a source " + + "generator, hot reload cannot see it: run 'uloop compile'. Also run 'uloop compile' if " + + "it still does not bind.", 1)); // Why the next step is not worded here: which step works (pass the file, leave it // out, undo the edit and leave it out, or compile) depends on how the file entered the