Hello,
Your post about the HUD Navigation System was intriguing enough that I am now using that in my project. I am wanting to save the mini map icons and their current state. I've tried having the HUD Navigation System Saver on the HNS object in the scene and then the HNS Element Saver on an element, but it's not saving the state. I'm sure at this point I'm missing something, so wanted to ask if there is somewhere specific these components need to be other than where I have them in order for this to work?
I have set unique keys, and can see the data in the save string. The thing I'm wondering is, when I look at the canvas for the HNS, there are containers for each type of prefab for the icons. Is this container being saved? I don't see that in the data at all.
Thanks!
HUD Navigation System
Re: HUD Navigation System
Hi,
Here are some things to check:
1. Add a HUD Navigation System Saver to the HUD Navigation System GameObject.
2. Add HUD Navigation Element Savers to all HUD Navigation Element GameObjects.
3. Assign unique keys to all savers. An easy way to do this is to select menu item Tools > Pixel Crushers > Common > Save System > Assign Unique Keys...
4. Savers will only save or load their states if their GameObjects are active.
5. You can temporarily tick the Debug checkboxes on the SaveSystem and [PlayerPrefs]SavedGameDataStorer components to get info in the Console. When you save, make sure the keys for your savers are present in the save data that's logged to the Console.
Here are some things to check:
1. Add a HUD Navigation System Saver to the HUD Navigation System GameObject.
2. Add HUD Navigation Element Savers to all HUD Navigation Element GameObjects.
3. Assign unique keys to all savers. An easy way to do this is to select menu item Tools > Pixel Crushers > Common > Save System > Assign Unique Keys...
4. Savers will only save or load their states if their GameObjects are active.
5. You can temporarily tick the Debug checkboxes on the SaveSystem and [PlayerPrefs]SavedGameDataStorer components to get info in the Console. When you save, make sure the keys for your savers are present in the save data that's logged to the Console.
-
- Posts: 86
- Joined: Mon May 02, 2022 12:16 am
Re: HUD Navigation System
Ok, so I have all that set up and I can see the saver key in the data in the console. I think the problem I am having is these map elements are under a main game object that I control the active state from within the quest. So I can say show markers, and it shows them all instead of doing each one at a time. How can I save the state of this parent game object? When this game object is enabled, the markers are shown, opposite when it is disabled.
I've tried a Game Object Saver on the parent game object with the Save Active State option ticked and still no luck. But that is exactly what I need to do, is save the state of this object.
I've tried a Game Object Saver on the parent game object with the Save Active State option ticked and still no luck. But that is exactly what I need to do, is save the state of this object.
Re: HUD Navigation System
Hi,
In that case, instead of the HUD Navigation Element Savers on the individual children, use an Active Saver. Put it on a GameObject that starts active in the scene. It can be a new, empty GameObject. Assign the navigation elements' parent to the Active Saver's Target field.
In that case, instead of the HUD Navigation Element Savers on the individual children, use an Active Saver. Put it on a GameObject that starts active in the scene. It can be a new, empty GameObject. Assign the navigation elements' parent to the Active Saver's Target field.
-
- Posts: 86
- Joined: Mon May 02, 2022 12:16 am
Re: HUD Navigation System
Looks like that worked. Thanks again!