skip to Main Content

Adding your art

  • You can add your own graphics for compass bar and icons.

  • Make sure you import them as Sprites and set the correct Pixels Per Unit setting in the import options.

  • The Compass Bar is expected to be 32 pixels height, but you can add higher resolution sprites, so they will look better with different screen resolutions (HDPI or retina displays) for example.

  • For instance, if your compass bar sprite is 128 pixels height, then set Pixels Per Unit to 400 (as 128 is 4×32). Just divide the height of your sprite by 32 and multiply by 100.

  • This trick is used with Bar3-Black and Bar3-White sprites (the Celtic style bars):

  • As per the icons, the asset expects 128×128 icons. If you supply bigger resolution icons, then adjust the Pixels Per Unit accordingly (for a 256×256 icon, set Pixel Per Unit to 200).
  • Don’t forget to edit the compass bar sprite and select the middle area that will be enlarged to fill the horizontal area of the compass while keeping the ends cap undistorted:

Replacing the Compass Bar elements

  • The asset includes 4 styles plus a “Custom” option. To use your own compass bar background sprite, make sure you select “Custom” as Style in the Compass Pro inspector. Then you can replace the sprite used in the “CompassBack” gameobject of the CompassNavigatorPro prefab or in your scene directly if you already added the compass to the scene:

  • Then you can edit the elements of the CompassNavigatorPro prefab and replace the sprites with your own (check previous section for hints about sprite resolutions):
  • For example, the “CompassBack” holds the compass bar background sprite. Feel free to replace that sprite with your own (as long as you have set “Custom” as the style in the inspector first).
  • You can also customize the rest of the compass elements like CardinalN, CardinalW, CardinalS, interCardinalNW, TickNNE, etc.
  • Important: do not change the order or names of the different elements in the prefab. That can break the asset!
Back To Top