Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

NPC name viewer

Discussion in 'Scripting' started by Deleted User, Jul 12, 2019.

  1. Deleted User

    Deleted User

    Guest

    Hey, guys. Does anybody know how to script a feature like the randomly-generated soldier names in games such as the Call of Duty series? I am making a historical game and want people to know the real names of the NPCs (which represent real-life people). The feature looks something like this:



    It would be very helpful if someone could provide some advice on how to recreate this feature. I'd appreciate all the help I can get on this topic. Please and thank you!
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    Use a raycast to see what your mouse / camera is looking at. If it connects with a soldier, display the UI element with their name.

     
    DaemonicDreams and Deleted User like this.