Hi Brian
Thank you I believe that helped, I then got the below
NullReferenceException: Object reference not set to an instance of an object
RPG.Combat.Fighter.CaptureState () (at Assets/Script/Combat/Fighter.cs:133)
RPG.Saving.SaveableEntity.CaptureState () (at Assets/Script/Saving/SaveableEntity.cs:26)
RPG.Saving.SavingSystem.CaptureState (System.Collections.Generic.Dictionary`2[TKey,TValue] state) (at Assets/Script/Saving/SavingSystem.cs:72)
RPG.Saving.SavingSystem.Save (System.String saveFile) (at Assets/Script/Saving/SavingSystem.cs:29)
RPG.SceneManagment.SavingWrapper.Save () (at Assets/Script/SceneManagment/SavingWrapper.cs:37)
RPG.SceneManagment.Portal+d__8.MoveNext () (at Assets/Script/SceneManagment/Portal.cs:56)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <88f69663e9a64d00b2091dd8dfd4d38f>:0)
After rewatching some lectures and doublechecking the code I put the below in Awake() and that has resolved the issues now
if (currentWeapon == null)
{
EquipWeapon(defaultWeapon);
}
last error I’m getting after those fixes is related to the NavMesh, I’ll trace my steps back again to see if I missed something out
Failed to create agent because it is not close enough to the NavMesh
UnityEngine.StackTraceUtility:ExtractStackTrace ()
RPG.Movement.Mover:RestoreState (object) (at Assets/Script/Movement/Mover.cs:68)
RPG.Saving.SaveableEntity:RestoreState (object) (at Assets/Script/Saving/SaveableEntity.cs:39)
RPG.Saving.SavingSystem:RestoreState (System.Collections.Generic.Dictionary`2<string, object>) (at Assets/Script/Saving/SavingSystem.cs:85)
RPG.Saving.SavingSystem:Load (string) (at Assets/Script/Saving/SavingSystem.cs:35)
RPG.SceneManagment.SavingWrapper:Load () (at Assets/Script/SceneManagment/SavingWrapper.cs:42)
RPG.SceneManagment.Portal/d__8:MoveNext () (at Assets/Script/SceneManagment/Portal.cs:51)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)