- Home /
How To find all UnityEvent references for a method?
I have a situation where I'm about to delete a public method within a script that does not have any code references. Of course there could be references from UnityEvents to it, be it UnityEvent, UnityEvent... Is there a simple method to find them in the scene?
Did you find a solution @hexagonius ? If there's nothing available, I guess I will have to write my own plugin to do this ...
No, didn't. I guess there are assets that do this already but I did not look em up.
See my answer to this question: https://answers.unity.com/questions/1678916/how-to-check-if-a-public-method-is-referenced-in-i.html
It doesn't provide a way of actually locating them in the scene. But it does help with establishing whether there are any such references, which will at least help reduce the scariness when you come to delete the method.
For locating them within the scene, I guess you could load the scene file into a text editor, search for the function name, and then try to work it out from the context. Not"simple", though.
Answer by djexstas9 · Jun 06, 2020 at 11:29 AM
@hexagonus After waiting 3 years you can now know how) There's no solution for that out of the box but I wrote simple script to do that. Check my repo to get code UnityEvent Reference Viewer. You can find all references in scene by typing name in searchfield.