Is it possible (and/or advisable) to make use of the existing Navigation marker system, but, instead of using it with the built-in navigation hud I want to display the navigation markers in my own map system?
I would also like to allow the player to set up their own custom navigation markers at runtime and have the position of these markers saved when the game is saved.
List<NavigationMarker> list = Maki.Game.Scene.GetNavigationMarkers("type");
Also, each marker can have multiple positions, you can see how many via the marker's Count property and access them like this:
for(int i = 0; i < marker.Count; i++)
{
Vector3 position = marker[i];
}
And you can set a navigation marker like this:
Maki.Game.Scene.SetNavigationMarker("markerName", marker);
marker being a NavigationMarker instance, which you can just create and set it's data.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
1. You don't necessarily need a navigation marker component to set up a marker. This means you can either use the navigation marker component to manually place a marker in the scene. Or you can do it via script through the API mentioned above.
2. Once a marker has been set does ORK manage the serialization of its position or do you need to reset the position every time the game is booted up?
3. So when creating a marker instance you can assign several positions to a marker?
4. I could probably verify this myself, but when you bind a marker to a quest do you still need to setup up the maker manually either by placing navigation marker components or via script? Also when a Quest is activated/deactivated are the markers toggled on and off? Or they don't react at all and you have to toggle related quest markers manually?
Markers can be added or removed via scripting as explaind above.
2) Navigation markers are saved with save games. So save/load will take care of the markers for you.
3) Yes - there's the AddPosition function for that.
Or, if the marker searches for game objects in the scene (e.g. by name) it'll also be able to use multiple game objects.
4) The quest/task automatically takes care of the markers you set up for it. Only an active quest will do that, so an inactive quest's markers are off.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!