Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[RELEASED] HUD Waypoint

Discussion in 'Assets and Asset Store' started by TeaAndCode, Nov 3, 2013.

  1. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    HUD Waypoint is a complete ui navigation system that uses waypoints to indicate in world positions to the player. This is the same kind of system you see in first-person shooters (objectives POIs), real-time strategies (pings), role-playing games (quest markers), racing games (indicators of other cars), and more.

    [video=youtube_share;hBexH3_MOc4]http://youtu.be/hBexH3_MOc4


    The system comes with:
    • A waypoint editor for fast-iteration
    • Off-screen handling
    • Colorize the icons font
    • Pulse the waypoint for attention
    • Fade out smoothly over distance
    • Help documentation with tutorials and sample scenes
    • Range finders and timers
    • 35 waypoint icons included


    Purchase Here
     

    Attached Files:

    Last edited: Nov 21, 2013
  2. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    Added a video to showcase the features inside AngryBots.
     
  3. idrug

    idrug

    Joined:
    Sep 18, 2013
    Posts:
    2
    Looks really nice!. Any possibility to have the waypoints selectable/clickable ?
     
  4. Mcg

    Mcg

    Joined:
    Mar 28, 2012
    Posts:
    112
    looks good , is it ngui compatible?
     
  5. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    To make the waypoints selectable would require coding in C#. The entire source code for the Waypoint System is included, and not hidden in a DLL.

    As for NGUI, I don't have a copy of NGUI, so I am not sure how it behaves with a GUI system.
     
  6. Nitrohex

    Nitrohex

    Joined:
    Jan 16, 2013
    Posts:
    58
    Hi TeaAndCode,

    Is there a way to change the icon size and font size?
    I have searched though the scripts, but i can't figure it out.

    Thanks in advance.
     
    Last edited: Jan 3, 2014
  7. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    You can modify the icon size directly in each of the prefabs inside the /Widgets folder. Change the Pixel Inset properties of the GUITexture component of the prefab's Icon object. See http://docs.unity3d.com/Documentation/Components/class-GuiTexture.html for more details on GUITextures. This will change the icon size automatically for every single icon.

    If you wish to change an Icon's size dynicamlly, you can change m_Icon.pixelInset field inside OnScreenWidget.cs or OffScreenWidget.cs. You would need to change the access of m_Icon in WaypointWidget.cs from private to protected. It would look something like this:

    Code (csharp):
    1. protected override void Update()
    2. {
    3.     base.Update();
    4.  
    5.     Vector3 screenPos = GetScreenPos();
    6.     Enable(OnScreen(screenPos));
    7.     Position(screenPos);
    8.     Size();
    9. }
    10.  
    11. protected virtual void Size()
    12. {
    13.     m_Icon.pixelInset = new Rect(-16, -16, 32, 32);  // modify this line
    14. }
    15.  
    See http://docs.unity3d.com/Documentation/ScriptReference/GUITexture-pixelInset.html for more reference.


    Hope this helped,
    Tom
     
  8. Nitrohex

    Nitrohex

    Joined:
    Jan 16, 2013
    Posts:
    58
    Excellent!!!! Thanks a LOT Tom, it worked.
    Great asset, very professional i recommend it to everyone who needs a very pro HUD Waypoint System.

    Thanks again Tom.
     
  9. Ecocide

    Ecocide

    Joined:
    Aug 4, 2011
    Posts:
    293
    Nice asset, purchased yesterday and already partly integrated after one or two hours. I am using a script similar to the Checkpoint script where I use the OnEnable() / OnDisable() Events to activate and deactivate the waypoints just by using gameObject.SetActive(true/false). Because I already have a complete checkpoint system in my project I could just place it as a child of my existing checkpoints et voila, works great.

    I recommend this asset to anyone who needs this kind of HUD elements. It is a very solid and clean code base.
     
  10. Nitrohex

    Nitrohex

    Joined:
    Jan 16, 2013
    Posts:
    58
    Hey Tom,

    When i try to build a test apk, i get:

    Code (csharp):
    1. Assets/TeaAndCode/Waypoint/Scripts/WaypointSystem.cs(2,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?
    I tried putting the WaypointSystem.cs in the Editor folder, but it not working...

    Can you please help me fix this?

    Thanks
     
  11. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    Is

    Code (csharp):
    1. #if UNITY_EDITOR
    2. using UnityEditor;
    3. #endif
    at the top of your script? That is in there to prevent PC and web builds from failing since UnityEditor doesnt compile with release. Try removing the #if leaving only

    Code (csharp):
    1. using UnityEditor;
    This might get you what you want, but will break release builds.
     
  12. Deleted User

    Deleted User

    Guest

  13. Nitrohex

    Nitrohex

    Joined:
    Jan 16, 2013
    Posts:
    58
    At the top of the script i have:
    Code (csharp):
    1. using UnityEngine;
    2. using UnityEditor;
    3. using System.Collections;
    And i tried doing this;

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. #if UNITY_EDITOR
    4. using UnityEditor;
    5. #endif
    6. using System.Collections;
    But either way i get the error when i try to make a build for android...

    EDIT:

    When i do:

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. #if UNITY_EDITOR
    4. using UnityEditor;
    5. #endif
    6. using System.Collections;
    I get these errors:

    Code (csharp):
    1. Assets/TeaAndCode/Waypoint/Scripts/WaypointSystem.cs(254,9): error CS0103: The name `Undo' does not exist in the current context
    and
    Code (csharp):
    1. Assets/TeaAndCode/Waypoint/Scripts/WaypointSystem.cs(255,9): error CS0103: The name `EditorUtility' does not exist in the current context
    Any thoughts on this?

    Thanks
     
    Last edited: Jan 3, 2014
  14. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    Ahh. I don't think you have the latest version of HUD Waypoint. Try updating to 1.0.3. If it does not, I can provide you the updated code privately.
     
  15. Nitrohex

    Nitrohex

    Joined:
    Jan 16, 2013
    Posts:
    58
    I will update and to 1.0.3 and see if it works.

    Thanks Tom
     
  16. rileex

    rileex

    Joined:
    Jan 26, 2014
    Posts:
    1
    Version 1.0.3 Does not work on android/ The same errors

    error CS0103: The name `EditorUtility' does not exist in the current context
     
  17. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    Okay, I will look into why the preprocessor definitions are failing at compilation for Android. Thanks for the heads-up.
     
  18. Nitrohex

    Nitrohex

    Joined:
    Jan 16, 2013
    Posts:
    58
    Any news on fixing this issue?
     
  19. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    Could you PM me your WaypointSystem.cs file? I cannot reproduce this bug on any platform. I'm beginning to think that the 1.0.3 update did not properly take.
     
  20. Nitrohex

    Nitrohex

    Joined:
    Jan 16, 2013
    Posts:
    58
    You have PM's disabled :)
    Turn on PM's, so i can send you the file.
     
  21. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    Ahhh. I apologize. It's been enabled.
     
  22. Nitrohex

    Nitrohex

    Joined:
    Jan 16, 2013
    Posts:
    58
    Its sent. :)
     
  23. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    After reading your PM, it's clear that the 1.0.3 update for WaypointSystem.cs did not actually update the file. Everyone who has run into the compilation error, please PM me and I will send you the working version of that file, so that they won't have to wait for Unity to approve another update and potentially fail to update the file again.
     
  24. Nitrohex

    Nitrohex

    Joined:
    Jan 16, 2013
    Posts:
    58
    I have send you PM.
     
  25. Giggsy68

    Giggsy68

    Joined:
    Feb 17, 2014
    Posts:
    1
    Can you send me a PM as well

    Emailed you twice regarding the issue
     
  26. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    Please check your inbox. It should be there now. :)
     
  27. Conferno

    Conferno

    Joined:
    Feb 27, 2014
    Posts:
    49
    Can you pm me please too?.. i have same error..
     
  28. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    You need to enable private messaging.
     
  29. DynamiteHC

    DynamiteHC

    Joined:
    Mar 7, 2014
    Posts:
    2
    Can you PM me please?.. i have same error too.
     
  30. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    Hey everyone, it looks like the latest try on the update went through! Grabbing version 1.0.4 should have the proper preprocessor exclusions to fix the WaypointSystem.cs compilation.
     
  31. DynamiteHC

    DynamiteHC

    Joined:
    Mar 7, 2014
    Posts:
    2
    Thanks a lot. It works!
     
  32. nevermore

    nevermore

    Joined:
    Oct 17, 2012
    Posts:
    3
    Assets/TeaAndCode/Waypoint/Scripts/WaypointSystem.cs(2,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?
     
  33. DarkJoney

    DarkJoney

    Joined:
    Jan 31, 2013
    Posts:
    24
    Mhmhm, man, awesome asset, but this error pisses me off.. How I can fix it?
     
  34. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    Just grab the latest version. You have to open your asset store tab and go to your purchased and click update.
     
  35. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    It is possible, but it requires significant refactor and decent knowledge of gameplay programming. The WaypointSystem component currently registers itself as a singleton to a global static reference. All the waypoints point to that reference. The refactor requires either the WaypointSystem handle multiple players and camera sets (I would create a list to contain player references inside WaypointSystem, and have it target every player and its camera) OR the WaypointSystem be a singleton of each player camera, and have the waypoints report to all of the WaypointSystems. Either way its quite a bit of work, and better ton with previous gameplay programming experience.
     
  36. CapitalKing

    CapitalKing

    Joined:
    Sep 22, 2014
    Posts:
    3
    Hello im currently working on a space game and was implementing this. I have system set up for long distances in Unity so it may be the one that is causing this but every time i get about 1000 unity units away from 0, 0, 0 where the waypoint system is both it and the test waypoint I have set up deactivate in hierarchy. I was wondering if this is setup to happen or just a glitch. Thank you
     
    RealAspireGames likes this.
  37. CapitalKing

    CapitalKing

    Joined:
    Sep 22, 2014
    Posts:
    3
    Scratch that it dosen't disactivate the waypoint just disappears
     
    Last edited: Dec 16, 2014
  38. CapitalKing

    CapitalKing

    Joined:
    Sep 22, 2014
    Posts:
    3
    I found out it is something with my system ill see what I can do
    Edit: Ill explain my system basically once you get 1000 unity units away from 0,0,0 it pulls every game object in your direction moving you back to 0,0,0 so I realized once I get to that point it pulls your waypoint but gets rid of the icon. Everything is still active and will detect whether or not im looking at it. It just completely disappears from my camera
     
    Last edited: Dec 16, 2014
  39. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    The waypoint widget relies on the waypoint object to de-project onto the screen, so if the waypoint object is or is attached to an object that disappears, the waypoint widget does not render. Does this information help?
     
    RealAspireGames likes this.
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,555
    I hope no one minds me posting, but I forgot to mention earlier that the Dialogue System has built-in support for HUD Waypoint. It's pretty neat to accept a quest in a conversation and see a nice-looking quest waypoint HUD pop up. Very nice job on HUD Waypoint, @TeaAndCode!
     
    RealAspireGames likes this.
  41. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Hello!
    I recently bought this to use for the making of my RPG game I am using Dialog System and RFPSP. I am following the tutorial exactly as it says but my waypoint is not showing up on my screen when I test the game! Can someone please help! thank you!
     
  42. TeaAndCode

    TeaAndCode

    Joined:
    Nov 3, 2013
    Posts:
    18
    Be sure that the camera object from whatever kit you are using has the GUILayer component attached to it. Lots of kits remove this component that renders the Unity GUI components.
     
    RealAspireGames likes this.
  43. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Alright I made sure it has the GUILayer component and it does. But still not showing any of the waypoints.
     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,555
    Does the Dialogue System's HUD Waypoint example work for you? If so, you can compare the camera with RFPS's !!!FPS Camera. I'll look into this too when I get back to the office.
     
    RealAspireGames likes this.
  45. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Alright thank you guys for all your support this community is amazing!
     
  46. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Do you think It could be a problem with the level load fade script that RFPSP has?
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,555
    HUD Waypoint works fine with RFPS, but it's been a while since I used it. I had forgotten how to add waypoints so I had the same problem at first. Here are the steps that I used to get it working:

    1. Selected a SoldierNPC in the Scene view.
    2. In the WaypointEditor window, clicked New at selection.
    3. Clicked the new waypoint at the bottom of the list.
    4. Selected the On Screen Widget, Off Screen Widget, and customized the rest of the settings as shown below. The key was remembering to set the widgets, otherwise it won't show anything.


    I hope this helps!
     
    RealAspireGames likes this.
  48. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Ok so I just tested it in the demo scene that RFPSP provides and it works fine. It has to be something in the scene that I am using. But thank you for the quick setup. :D
     
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,555
    Give this a try: In play mode, pause the game. Then look for the Waypoint System GameObject. If you expand it, you'll find two child GameObjects for the thing that you've set a waypoint on. In my example above, I see a DistanceOnScreen and DistanceOffScreen, both associated with the SoldierNPC that I gave a waypoint to. When SoldierNPC is on screen, DistanceOnScreen's child GameObjects (Distance, Label, and Icon) are active. When SoldierNPC is off screen, DistanceOffScreen's child GameObjects are active. Make sure this is the case in your scene.

    Also inspect the Waypoint System GameObject itself. I set the Player and Camera to MainCamera, but it also works to set Player to !!!FPS Player. If Falloff is ticked, try unticking it. (If Falloff is ticked and the waypoint is too far, it will fade out to invisibility.)
     
    RealAspireGames likes this.
  50. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Ok, So I paused the scene to check if they are being enabled and they are when I look at them and when I turn away they disable. Just still cant see the marker or distance. I think it is an object or camera interference within my scene its self.