I have a few questions about Pixels to Units. I know that, for the default value (100), Unity considers 100 pixels to be 1 unit.
Let’s say my sprites are all 128x128. Should I set Pixels to Units to 128 ? Are there optimal values that should be set for different types of projects ? As in, would you set a different value for a 2D side scroller than for a 3D action game ?
One meter is one unit (by default). So however many pixels per meter your images are is what determines your pixel-to-unit ratio. If you have 100 pixels per meter then you should use 100 pixels per unit.
This is only if you’re using Unity’s physics. You can change your physics settings and pixel ratio appropriately and get the same results (for example if you’re dealing with planetary scales you may want one unit to equal 100 meters instead).
If you’re using your own physics then you can use whatever ratio you want, it has no bearing on anything. The only guideline in that case is to keep it reasonable enough that your world will fit inside smallish world units (don’t go a million units out from origin).