I am generating planets of various types and sizes for my levels. This dictates which sprite image will be used i.e. a water planet has a different image compared to that of a gas giant etc. Therefore some require a larger radius for the circle collider 2d. I need this to be dead on so that interaction stops immediately leaving the planets collision detection. I have seen other solutions for box colliders and sphere colliders (renderer.bounds.size matching the texture) but with this I need a float rather than a Vector3. I have seen somewhere a solution where they programmatically detected the transparent space around the planet(visible part of the image) , but I cannot find it. I am using the standard shader with the fade rendering mode. If anyone has a solution to this, or has seen the solution i mentioned, I would be very grateful, thanks!
I can post code if needed but I think this is more of a general enquiry.