Heya,
After a long time stuck in old versions of both Unity and AC, I'm finally trying to do a complete update of both. I'm running into some issues, however, that I hope are easily solvable.
My process so far has been as follows;
The main issue I'm having right now is being unable to create new objects/prefabs through the Scene Manager window. Whenever I try to create something new in a scene through the AC Game Editor, nothing happens. Pre-existing hotspots and In Scene actionlists work fine, but I can't create new ones. If I create an empty game object in the hierarchy and add an Interaction, I'm unable to assign it to anything in the Scene Manager, either.
I get two errors whenever I try to create a new object;
GUI Error: Invalid GUILayout state in AdventureCreator view. Verify that all layout Begin/End calls match
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
and
NullReferenceException: Object reference not set to an instance of an object
AC.SceneManager.ListPrefabs (UnityEngine.Rect windowRect) (at Assets/AdventureCreator/Scripts/Managers/SceneManager.cs:1006)
AC.SceneManager.ShowSettingsGUI (UnityEngine.Rect windowRect, System.Action1[T] showALEditor, System.Action
1[T] showALAEditor) (at Assets/AdventureCreator/Scripts/Managers/SceneManager.cs:139)
AC.SceneManager.ShowGUI (UnityEngine.Rect windowRect, System.Action1[T] showALEditor, System.Action
1[T] showALAEditor) (at Assets/AdventureCreator/Scripts/Managers/SceneManager.cs:83)
AC.AdventureCreator.OnGUI () (at Assets/AdventureCreator/Scripts/Managers/Editor/AdventureCreator.cs:144)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <5d5ebefe97114215928ac1d9cd096522>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <5d5ebefe97114215928ac1d9cd096522>:0)
UnityEditor.DockArea.OldOnGUI () (at <5d5ebefe97114215928ac1d9cd096522>: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 :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at :0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at :0)
UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at :0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at :0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at :0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at :0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at :0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at :0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at :0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at :0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at :0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at :0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at :0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at :0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at :0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <3787173144ff4a19b1a55d5938e19421>:0)
If I try to create a new actionlist, for example, from either the Inventory Items or the Menu Manager, that works just fine - the new actionlist is just added to my project files, with no issue.
I understand that there's a million things that could go wrong with how I've gone about the updates, and that this is most likely very difficult to troubleshoot, but if any particular red flags pop up I'd love to hear about them. I'll obviously provide you with as detailed information as possible about anything else you might need to know. Thanks for your help, and hopefully this isn't as difficult to solve as it seems at the moment.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I tried moving the prefabs folder back into the Adventure Creator folder in the project files, and that seems to have done the trick - I'm able to create any prefab object in the Scene Manager now.
I'll go ahead and leave this topic up, in case there's anything that comes to mind that I should make sure to edit or fix - so far, the game seems to be running with no issues, but if there's something important that might not be immediately noteworthy (regarding upgrading both AC and Unity in this highly unstable way) I'd love to know.
If things are working again, great - a few notes that come to my mind:
Yeah so far AC seems to be working without any problems, which I'm very happy about. I did actually update AC in the old project files before updating Unity, which definitely helped - I tried it before without updating AC and had no success.
When updating the Unity version I've always ended up with Unity not recognizing AC as part of the project and plugin files, however. If one updates AC before Unity, is there a way to re-initialize AC as part of the project without re-importing the assets through the package manager?
If AC fails to initialise, it's most likely due to a compilation error as noted above. Check the Console window for error messages if this occurs - if you share them here, I can help decipher them.