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

Implement refactoring for C# scripts files from within Rider #84

Open
ghostbutter-games opened this issue Oct 4, 2022 · 1 comment
Open

Comments

@ghostbutter-games
Copy link

Currently, when a C# (or GDScript) file is renamed outside of the Godot Editor, for example from within Rider, the project breaks.
Godot has no concept of what was renamed and any nodes that had the renamed script file attached are now broken and need to be manually fixed.

In any reasonably large project, this can introduce tons of issues and bugs whenever something is renamed outside of the Godot Editor.

This also prevents taking full advantage of Rider's excellent refactoring possibilities and instead makes those "risky", because accidentally using them might break your project.

Scene files and other resources have recently had UIDs added to them, see this issue for reference: godotengine/godot#50786 (comment)

Unfortunately, the same is not yet true for script files, as this metadata would need to be inserted directly into the text of the script file. It has been discussed, but no solution has been realized yet and it is unclear if there will ever be a solution to this.

For that reason, I would really appreciate it if somehow the Godot Rider plugin could automatically fix all affected scene files whenever a C# script file is renamed.

E.g. when ExampleScript.cs is renamed to AnotherExampleScript.cs, the plugin could iterate through all scene files of the project and detect a match of the old name and replace it with the new one.
This is obviously a very naive solution and I'm not 100% sure if this would work in all cases, but it just might.

Any discussion on this would be much appreciated, as I am super looking foward to extensively working with both Rider and Godot/C# in the future and would like that experience to feel just as good as working with Rider and Unity feels today.

I feel, given that Godot 4 Beta is now under active development, now would be a great time to get started on exploring further options to improve this (already very helpful) plugin.

@Delsin-Yu
Copy link

Any update on this? Rename refactoring is a big thing throughout the development of iterations. Switching back to Godot Editor just for renaming is quite unfortunate and frustrating at the moment.

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

No branches or pull requests

2 participants