Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Tutorial] Create a compass and objectives with uGUI

Discussion in 'UGUI & TextMesh Pro' started by Yecats, Nov 13, 2021.

  1. Yecats

    Yecats

    Joined:
    Jul 13, 2014
    Posts:
    69
    TUTORIAL | GITHUB REPO

    Create a compass and objectives with uGUI
    Keeping players engaged in your game can be a challenging task. For some games, guiding the player towards key objectives is incredibly important and can make or break engagement. A popular approach is to provide a compass that has icons overlay the direction that they should move.

    In this tutorial, you will create a general compass that has an overlay of gathering objectives for the player to complete. When the player reaches an objective, a UnityEvent is raised which will equip the new equipment and destroy the ‘dummy’ world objective.



    Learning Outcomes
    1. Work with uGUI components, such as canvas, image, and masking.​
    2. Rotate a repeating texture based on the user input.​
    3. Create a prefab.​
    4. Use UnityEvent to call a custom method to handle when an objective is completed.​

     
    Last edited: Oct 13, 2023
  2. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    383
    No image of the compass on the screen?
     
  3. Yecats

    Yecats

    Joined:
    Jul 13, 2014
    Posts:
    69
    Hi there! The finished compass is at the top of the intro video. Here's a screenshot for reference though: