Ho do I find all scenes with a certain script on an GameObject

I want to find all scene that a particular MonoBehaviour on any GameObject. My first plan was to convert all scenes to text serialization and do text search, but That always crashes my Editor with a request for an addition 16GB of ram to convert a Texture2d. Any other methods maybe using AssetDatabase to search Scenes?

I am porting a project with limited support from original code.
500+ scenes.
C# but I don’t see why the language matters.
I am just trying to find them in the editor.

I change the serialization on a smaller project to Force text and looked a the *.unity files. In those I can see the GUID for each monobehaviour attached to an object. with AssetDatabase.GUIDToAssetPath or AssetDatabase.AssetPathToGUID depending which your going I could find out what Scripts are used in each scene. At worst I could do a quick text search from outside unity. I was hoping to get the information visible in a *.unity file when saved as text from AssetDatabase calls.

If you have .meta files turned on, you can open the script’s meta file in a text editor and see what the guid is for the script there. You can search for that guid in all your .unity and .prefab files in a text editor.

Hi Ryuuguu,

Sorry to say but there is no way that you can find certain script on GameObeject in any of the scenes in project. Except that you should remember it or check each object and some script may be instatiated.

If you got that then mark this as answer and close this.

Regards.