Forum rules - please read before posting.

Actions disappearing from Action Scripts

I have Actions disappearing from Action Scripts.

I get the following

NullReferenceException: Object reference not set to an instance of an object
AC.ActionListEditorWindow.PerformEmptyCallBack (System.String objString) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditorWindow.cs:2746)
AC.ActionListEditorWindow.EmptyCallback (System.Object obj) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditorWindow.cs:2508)
UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at <8f44d91b549e47c9883e180579f26ef6>:0)


UnityEditor.Undo:RecordObjects(Object[], String)
AC.ActionListEditorWindow:PerformEmptyCallBack(String) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditorWindow.cs:2539)
AC.ActionListEditorWindow:TopToolbarGUI(Boolean) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditorWindow.cs:1057)
AC.ActionListEditorWindow:OnGUI() (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditorWindow.cs:208)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

I am using the latest version of Adventure Creator and Unity 2020.1.13f1.

I notice it is with an Action script I have for Wait Random, I use this all the time (I forget if this script is included in AC or Custom now.)

I tried to move it from the AC Actions folder to a Custom Action folder where I have other new actions.
I have my custom actions folder set in my settings also. I can’t set the original Action folder to be a Custom Action folder too to find the original action.

So my Wait Random action boxes disappear in all my scripts, the won’t display, they don't run, and I cannot edit the action scripts to swap. New action scripts let me add the Wait Random function.

I can’t copy or delete in the action script editor and the list of actions in script has stopped showing in the unity Inspector tab.

What can I do? My entire project is broken.


  • edited November 2020

    Sorry for the trouble.

    Is the second message complete? It looks like it's missing the actual error - it's only a list of line endings.

    When exactly do such messages show, and what is the state of a typical ActionList that has such an Action? Do they display fully, do no Actions display, or does only the "broken" Action not show? Please share as much detail as you can - it will help diagnose the issue.

    Wait Random is not an official AC Action, no. Custom Actions should be placed in a separate folder to the rest of AC's Actions. Is it listed correctly in the Actions Manager?

    As you mention that you have this Action present in many ActionLists, what change occured that caused you to get such an issue? Was this a result of moving the Action script, or did you do that because of this issue?

    It may be that the instances of this Action have become corrupted somehow, but the other Actions in such lists should be recoverable. Start with opening ActionListEditorWindow, and replace line 2646:

    if (action.isMarked)


    if (action != null && action.isMarked)

    There may be more tweaks to make after this, so give that a try and report any new messages that may appear afterwards.

    One other thing: be sure to take a backup of your project first. Though the bulk of things should be recoverable, it's still prudent to keep a copy of everything beforehand.

  • I shall backup and experiment / investigate more and report back.

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.