Quests not loading (they are saving though)
Posted: Sat Mar 07, 2020 3:17 pm
Hey Tony,
for some reason the load system wont work for me ( im using the Savesystem component, no auto save)
This is my save/load script
and i get this error on load of the game
How do i go about making sure the quest is registered ?
for some reason the load system wont work for me ( im using the Savesystem component, no auto save)
This is my save/load script
Code: Select all
using UnityEngine;
using System.Collections;
using MoreMountains.Tools;
using PixelCrushers;
namespace MoreMountains.InventoryEngine
{
/// <summary>
/// An example of a game manager, the only significant part being how we trigger in a single place the load of all inventories, in the Start method.
/// </summary>
public class InventoryDemoGameManager : Singleton<InventoryDemoGameManager>
{
public InventoryDemoCharacter Player { get; protected set; }
bool bad;
public SaveSystem saveobj;
protected override void Awake ()
{
base.Awake ();
if(bad){
Player = GameObject.FindGameObjectWithTag("Player").GetComponent<InventoryDemoCharacter>() ;
}
}
void OnApplicationQuit(){
MMGameEvent.Trigger("Save");
saveobj.SaveGameToSlot(0);
}
/// <summary>
/// On start, we trigger our load event, which will be caught by inventories so they try to load saved content
/// </summary>
protected virtual void Start()
{
MMGameEvent.Trigger("Load");
StartCoroutine(wait());
}
IEnumerator wait(){
yield return new WaitForSeconds(2f);
saveobj.LoadGameFromSlot(0);
}
}
}
Code: Select all
Quest Machine: Main Player Can't find quest HideandSeek. Is it registered with Quest Machine?
UnityEngine.Debug:LogError(Object, Object)
PixelCrushers.QuestMachine.QuestListContainer:ApplyData(String) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:379)
PixelCrushers.QuestMachine.QuestJournal:ApplyData(String) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:182)
PixelCrushers.SaveSystem:ApplySavedGameData(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:597)
PixelCrushers.SaveSystem:LoadGame(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:663)
PixelCrushers.SaveSystem:LoadFromSlotNow(Int32) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:520)
PixelCrushers.SaveSystem:LoadFromSlot(Int32) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:497)
PixelCrushers.SaveSystem:LoadGameFromSlot(Int32) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:418)
MoreMountains.InventoryEngine.<wait>d__9:MoveNext() (at Assets/InventoryEngine/Demos/PixelRogue/Scripts/InventoryDemoGameManager.cs:48)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at C:/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)