Forum rules - please read before posting.


Hi Chris,

I am fiddeling with AC now for a few weeks and up to now I am very impressed and satisfied ;)

I noticed a small bug, nothing important, but a bit annoying, and maybe you like to fix it in future versions.

I am currently on newest AC 1.71.8, and I noticed the bug in Unity 2019.4.8 as well as 2019.4.9.

In the settings, I have checked "Take screenshot when saving?", and it works well.
However, I cannot manage save-game files while this option is ticked, so every time I want to look into a save game, I have to uncheck that option, otherwise I will get:

NullReferenceException: Object reference not set to an instance of an object
AC.SaveFileHandler_SystemFile.LoadScreenshot (System.String fileName) (at Assets/AdventureCreator/Scripts/Save system/FileHandling/SaveFileHandler_SystemFile.cs:247)
AC.SaveFileHandler_SystemFile.GatherSaveFiles (System.Int32 profileID, System.Boolean isImport, System.Int32 boolID, System.String separateProductName, System.String separateFilePrefix) (at Assets/AdventureCreator/Scripts/Save system/FileHandling/SaveFileHandler_SystemFile.cs:200)
AC.SaveFileHandler_SystemFile.GatherSaveFiles (System.Int32 profileID) (at Assets/AdventureCreator/Scripts/Save system/FileHandling/SaveFileHandler_SystemFile.cs:131)
AC.SaveFileManager.SaveFileGUI () (at Assets/AdventureCreator/Scripts/Managers/SaveFileManager.cs:220)
AC.SaveFileManager.OnGUI () (at Assets/AdventureCreator/Scripts/Managers/SaveFileManager.cs:52)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at :0)
UnityEditor.HostView.Invoke (System.String methodName) (at :0)
UnityEditor.HostView.OldOnGUI () (at :0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Boolean straightY, System.Single pixelsPerPoint, System.Exception& immediateException) (at
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection, UnityEngine.UIElements.PanelClearFlags clearFlags) (at
UnityEngine.UIElements.UIRRepaintUpdater.DrawChain (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection) (at
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at
UnityEngine.UIElements.Panel.UpdateForRepaint () (at
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <819de1aa368e45faa4f78e26c97c62b0>:0)


  • Welcome to the community, @Riffmaster.

    Thanks for the bug report. I will look into it, and will let you know here if I need any more details on how to reproduce this.

    Incidentally, this post got caught in the spam blocker for a while. Apologies - I'm not sure why that was - but I've now verified your account so it shouldn't happen again.

  • Thanks alot Chris, I think it was because it was my first opened discussion, the board stated that the post had to be verified. Or maybe because I forgot to complete the Topic and only stated BUG: :wink:

  • Recreated.

    To fix: open up SaveFileHandler_SystemFile.cs, and replace line 244:

    if (File.Exists (fileName))


    if (File.Exists (fileName) && Application.isPlaying && KickStarter.saveSystem)
  • Thanks, now it works like a charm :wink:

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.