Forum rules - please read before posting.

NullReferenceException in a scene

I've recently been getting some 'NullReferenceException' errors in one scene.

This error shows up as soon as I run the scene -

NullReferenceException: Object reference not set to an instance of an object
AC.ActionListManager.IsGameplayBlocked (AC.Action _actionToIgnore, System.Boolean showSaveDebug) (at Assets/AdventureCreator/Scripts/Managers/ActionListManager.cs:287)
AC.ActionListManager.OnEndActionList (AC.ActionList actionList, AC.ActionListAsset actionListAsset, System.Boolean isSkipping) (at Assets/AdventureCreator/Scripts/Managers/ActionListManager.cs:633)
AC.EventManager.Call_OnEndActionList (AC.ActionList actionList, AC.ActionListAsset actionListAsset, System.Boolean isSkipping) (at Assets/AdventureCreator/Scripts/Managers/EventManager.cs:1913)
AC.ActionList.Kill () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:664)
AC.ActionList+d__38.MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:596)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <3dc54541a2574ac7826a004a212a4332>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This error occurs when I click on a menu element button that turns on another menu -

NullReferenceException: Object reference not set to an instance of an object
AC.Menu.IsClickable () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:2268)
AC.MenuButton.ProcessClick (AC.Menu _menu, System.Int32 _slot, AC.MouseState _mouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuButton.cs:599)
AC.MenuElement.ProcessClickUI (AC.Menu _menu, System.Int32 _slot, AC.MouseState _mouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuElement.cs:249)
AC.MenuElement+<>c__DisplayClass38_0.b__0 () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuElement.cs:216)
UnityEngine.Events.InvokableCall.Invoke () (at <3dc54541a2574ac7826a004a212a4332>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <3dc54541a2574ac7826a004a212a4332>:0)

All the managers are linked. Is it possible that I can fix these error by editing the scripts? If so, where and what do I change? Thank you.

AC version - 1.71.4
Unity 2019.4.0f1

Comments

  • Welcome to the community, @roy97.

    Are these only occuring in a single scene?

    Both errors suggest that some of AC's necessary components are missing from both the GameEngine object in your scene, and the PersistentEngine prefab inside AC's Resources folder.

    The first error suggests that your PersistentEngine prefab has no ActionListAssetManager component attached to it. Is this the case?

    You should, however, be getting additional warnings from AC if it detects that its necessary components are missing. What other messages are appearing in the Console?

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.