-
Notifications
You must be signed in to change notification settings - Fork 134
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
Rename Methods in Scene Files #32
Comments
I don't know Unity well enough here. Do you have a sample that can show the |
I think all you need to worry about is m_MethodName: OnClick Where OnClick is the string that gets changed if the method is renamed by Attached are two files. One with no action attached to the button click and Please let me know if you need more information. PS. A .unity file is a Scene File. You would need to grep every .unity file On Thu, Apr 14, 2016 at 7:18 AM, Matt Ellis [email protected]
|
Not always a good idea as half of the times scenes are serialized to binary and you won't be able to modify it. Also you will have to do yaml parsing and I am not sure its a good idea for ReSharper to touch non-C# files (if something goes wrong it can mess up the scene). |
This could be an interesting extension. It would require teaching ReSharper a new file format, which is a non-trivial task (but could be fun 😄), and it does look as though it would require Unity to only save in text format, rather than the default binary. It also looks like the I'm trying to clean up the issues list, so I've moved this to a "Someday" milestone, as something to think about for a later time. |
due to the possibility of hosing a whole scene doing this, the best use of it i could see, would be having resharper let you know what scenes and prefabs your Component is referenced in. |
it really would be useful |
Would also like to have this feature. It's really tedious to re-map those broken links every single time after refactoring a method's name. |
Fryi, Serialization doesn't just happen for scene assets, but any serialized asset like a prefab, scriptable object, or even inspector files where the serialized object needs to get a reference |
Fixed in #1140 |
When you have things like events tied to button clicks, they are embedded in the .unity (scene) file as strings. (see m_MethodName: in a text (not binary) scene file).
When Resharper suggests changing the method name in the .cs file, it should take into account any matches in scene files. If the method name is changed, R# should also change it in the scene file to keep them linked.
The text was updated successfully, but these errors were encountered: