Forum rules - please read before posting.

Occasional error when loading a save

Hi,

I'm porting my game to a console platform and am getting an occasional error when loading a save. This happens about 30% of the time and it seems to halt the OnLoad cutscene since commands in there don't appear to execute, but other things outside of that cutscene do successfully load like music and other audio. Just curious if someone might have an idea what this might be referring to. See error below. Thanks!

NullReferenceException: Object reference not set to an instance of an object.
  at UnityEngine.Component.GetComponentFastPath (System.Type type, System.IntPtr oneFurtherThanResultValue) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.Component.GetComponent[T] () [0x00000] in <00000000000000000000000000000000>:0 
  at AC.ConstantID.GetComponents[T] (System.Int32 constantIDValue, UnityEngine.SceneManagement.Scene scene) [0x00000] in <00000000000000000000000000000000>:0 
  at AC.ConstantID.GetComponents[T] (System.Int32 constantIDValue, UnityEngine.SceneManagement.Scene scene) [0x00000] in <00000000000000000000000000000000>:0 
  at AC.ConstantID.GetComponent[T] (System.Int32 constantIDValue, UnityEngine.SceneManagement.Scene scene, System.Boolean sceneOnlyPrioritises) [0x00000] in <00000000000000000000000000000000>:0 
  at AC.LevelStorage.UnloadTransformData (System.Collections.Generic.List`1[T] allTransformData, UnityEngine.SceneManagement.Scene scene) [0x00000] in <00000000000000000000000000000000>:0 
  at AC.LevelStorage.LoadSceneData (AC.SingleLevelData levelData, AC.SubScene subScene) [0x00000] in <00000000000000000000000000000000>:0 
  at AC.LevelStorage.ReturnCurrentLevelData () [0x00000] in <00000000000000000000000000000000>:0 
  at AC.SaveSystem.InitAfterLoad () [0x00000] in <00000000000000000000000000000000>:0 
  at AC.MultiSceneChecker.Start () [0x00000] in <00000000000000000000000000000000>:0 

Comments

  • On which Console, specifically, and with which AC/Unity versions? Are you using a custom save file/format handler?

    The error itself is coming from Unity, but appears to relate to the loading of RememberTransform components associated with the scene.

    Try to find out which scene / component specifically is being affected. Are you using any such components with Save scene presence? checked? It may be that there's an issue with this particular option on your given platform.

  • Thanks, Chris. It looks like I solved the problem. I can't really say what console I'm developing for at the moment, but I had an object turned off with a Remember Moveable component on it and a few objects that had Remember Moveable components on them and the component was disabled. Getting rid of the disabled components and deleting the turned off object solved the problem. I don't know if this had to do with the Remember Moveable component having an Awake function since they still run even when disabled.

    I don't get this problem on the PC version of the game even though the setup is the same so it's probably just how the console or the custom save handler deals with things. If anyone else runs into a similar problem hopefully this is helpful.

    I'm on Unity 2020 1.13f1 and AC 1.71.1 just for reference.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.