Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support script global resource name in EditorFileSystem #71687

Merged

Conversation

reduz
Copy link
Member

@reduz reduz commented Jan 19, 2023

  • Works for binary and text files.
  • Makes EditorQuickOpen work with custom resources again.
  • Information is cached and easily accessible.

Properly fixes #66179. Supersedes #66215 and supersedes #62417

WARNING: This required breaking backwards binary compatibility (.res and .scn files). Files saved after this PR is merged will no longer open in any earlier versions of Godot.

@reduz reduz requested review from a team as code owners January 19, 2023 18:17
@@ -1117,6 +1122,57 @@ String ResourceLoaderBinary::recognize(Ref<FileAccess> p_f) {
return get_unicode_string();
}

String ResourceLoaderBinary::recognize_script_class(Ref<FileAccess> p_f) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KoBeWi Sorry 🙏

Copy link
Member

@KoBeWi KoBeWi Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>:(

@KoBeWi
Copy link
Member

KoBeWi commented Jan 19, 2023

I tested the performance and it's fine. (i.e. there is no significant Quick Open slowdown)

@reduz reduz force-pushed the support-script-class-name-in-efs branch 2 times, most recently from 8b48b11 to ce3ca63 Compare January 20, 2023 09:44
@reduz reduz requested a review from a team as a code owner January 20, 2023 09:44
Comment on lines 655 to 661
<member name="dotnet/project/assembly_name" type="String" setter="" getter="" default="&quot;&quot;">
Name of the .NET assembly. This name is used as the name of the [code].csproj[/code] and [code].sln[/code] files. By default, it's set to the name of the project ([member application/config/name]) allowing to change it in the future without affecting the .NET assembly.
</member>
<member name="dotnet/project/solution_directory" type="String" setter="" getter="" default="&quot;&quot;">
Directory that contains the [code].sln[/code] file. By default, the [code].sln[/code] files is in the root of the project directory, next to the [code]project.godot[/code] and [code].csproj[/code] files.
Changing this value allows setting up a multi-project scenario where there are multiple [code].csproj[/code]. Keep in mind that the Godot project is considered one of the C# projects in the workspace and it's root directory should contain the [code]project.godot[/code] and [code].csproj[/code] next to each other.
</member>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure your PR doesn't remove these lines (even though doctool does remove them for you).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm adding a hack to keep those like we used to have with the old Mono: #71728.

But indeed until it's merged / this PR rebased on top, you need to make sure to keep them when committing (and restore them for now).

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but needs resetting the ProjectSettings.xml change indeed.

@reduz reduz force-pushed the support-script-class-name-in-efs branch from ce3ca63 to ca5688e Compare January 21, 2023 12:11
@reduz reduz force-pushed the support-script-class-name-in-efs branch from ca5688e to 464ec04 Compare January 21, 2023 13:09
* Works for binary and text files.
* Makes EditorQuickOpen work with custom resources again.
* Information is cached and easily accessible.

Properly fixes godotengine#66179. Supersedes godotengine#66215 and supersedes godotengine#62417

**WARNING**: This required breaking backwards binary compatibility (.res and .scn files). Files saved after this PR is merged will no longer open in any earlier versions of Godot.
@reduz reduz force-pushed the support-script-class-name-in-efs branch from 464ec04 to dddd8d4 Compare January 21, 2023 13:19
@akien-mga akien-mga merged commit ebd0b40 into godotengine:master Jan 21, 2023
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quick Open dialog is impossibly slow in big projects
4 participants