I know EditorUtility.CollectDependencies. However, this method returns ALL depth of dependencies from the object. As example, if I give it a GameObject, it will return me the material, mesh, shader, texture and so on. Giving a scene to that method is simply a very bad idea as it will return EVERYTHING.
I would like to only get the first level of dependency. Obviously, textures are referenced by the material, not by the GameObject.
Does such method exist?