How to adapt to different aspect ratios?

Basically, so many asked this but no one managed to give a proper answer.After searching for hours and hours,I am putting my hope on you guys.

I made a 2D game at resolution 2:3. I have everything finished and I want to publish it now ( Iphone, Android and maybe other platforms),but I can’t understand how this aspect ratio works.

I know it is the width / height, but this is not what I am interested in. The canvas scales automatically so that is good, but what about the sprites? How can I also scale the sprites?

I tried this on my Samsung S7 edge and I already have a problem with scaling and the position of the sprites.

So my question is, how do others do it? How should I handle this aspect ratio problem? Can somebody give some piece of code (that would be perfect) ? Is there a generic script one could use? Can it be done just by adjusting the camera size?(camera is orthographic) Why can unity scale the canvas according to screen size but not the gameObjects too?

I am an absolute beginner when it comes to this, so please leave consistent answers, otherwise it would be meaningless.

Hi! I’ve used the method described in [2SA Studio: Handling aspect ratio in Unity2D]. You just have to insert the script inside the Main Camera. It creates a public Inspector, where you’ll type the desired Aspect Ratio. Given that it only works for 2D Games, I feel like it could help!