[RELEASED] HUD Waypoint

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.

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

1405466--73128--$WaypointsLogo.png

Added a video to showcase the features inside AngryBots.

Looks really nice!. Any possibility to have the waypoints selectable/clickable ?

looks good , is it ngui compatible?

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.

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.

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:

protected override void Update()
{
    base.Update();

    Vector3 screenPos = GetScreenPos();
    Enable(OnScreen(screenPos));
    Position(screenPos);
    Size();
}

protected virtual void Size()
{
    m_Icon.pixelInset = new Rect(-16, -16, 32, 32);  // modify this line
}

See http://docs.unity3d.com/Documentation/ScriptReference/GUITexture-pixelInset.html for more reference.

Hope this helped,
Tom

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.

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.

Hey Tom,

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

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

Is

#if UNITY_EDITOR
using UnityEditor;
#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

using UnityEditor;

This might get you what you want, but will break release builds.

congrats :sunglasses:

At the top of the script i have:

using UnityEngine;
using UnityEditor;
using System.Collections;

And i tried doing this;

using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
using System.Collections;

But either way i get the error when i try to make a build for android…

EDIT:

When i do:

using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
using System.Collections;

I get these errors:

Assets/TeaAndCode/Waypoint/Scripts/WaypointSystem.cs(254,9): error CS0103: The name `Undo' does not exist in the current context

and

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

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.

I will update and to 1.0.3 and see if it works.

Thanks Tom

Version 1.0.3 Does not work on android/ The same errors

error CS0103: The name `EditorUtility’ does not exist in the current context

Okay, I will look into why the preprocessor definitions are failing at compilation for Android. Thanks for the heads-up.

Any news on fixing this issue?

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.

You have PM’s disabled :slight_smile:
Turn on PM’s, so i can send you the file.