Encountered one more issue, this time an error: I am loading a subscene at some point in the game (a map scene). When I click on a hotspot on that scene to change to another scene, then the following error is produced:
ArgumentException: Scene to unload is invalid
Triggered by the call to the Close(); method from SceneChanger, from this logic that was added in 1.81 (line 1199):
foreach (var subScene in subScenes)
{
if (string.IsNullOrEmpty (subScene.SceneName)) continue;
SceneInfo subSceneInfo = GetSceneInfo (subScene.SceneName);
if (subSceneInfo != null)
subSceneInfo.Close ();
}
The subScene in my case is the map scene that has a buildIndex number equal to -1, thus triggering the Unity error.
OnVariableChange was removed due to both its broad usage compared with the Event Runner's ability to filter by variable, as well as its (relative) lack of use, where it was taking up prime space in the Game Editor.
The Event Runner's use of ActionList assets is something to work around, admittedly. Two ways around this:
1) Create a global event using the Events Editor, and have it run an ActionList: Run Action that references an in-scene Cutscene. For any additional scenes that require this, note the referenced Cutscene's Constant ID number, then attach and assign this ID to other such Cutscenes.
2) Attach the following script to your OnVarChange cutscenes:
using UnityEngine;
using AC;
public class NANTest : MonoBehaviour
{
void OnEnable () { EventManager.OnVariableChange += OnVariableChange; }
void OnDisable () { EventManager.OnVariableChange -= OnVariableChange; }
void OnVariableChange (GVar variable)
{
GetComponent<ActionList> ().Interact ();
}
}
I have also noticed the following warning whenever a scene loads, that was not being generated on prior versions.
I'll need more details to reproduce this reliably. Could you create a new thread with details of your Settings Manager, your Player and scene-loading?
Encountered one more issue, this time an error: I am loading a subscene at some point in the game (a map scene). When I click on a hotspot on that scene to change to another scene, then the following error is produced:
Are you referencing scenes by name or number, and/or Addressables, in the Settings Manager?
Regarding the OnVariableChange, I have already implemented something related to your suggestion (the NANTest script), thank you for providing more context!
As for the reported warning / error comments: Apologies for spamming the thread here, I thought it was an appropriate place but I will be creating new threads from now on.
Not really a huge deal for us, currently, as we are still in production, but I thought it might be worth notifying. Apologies if this is a known issue or not an issue at all.
Updating from v1.80.4 to v1.81.4 breaks loading saves, the following error appears once the game finishes loading:
NullReferenceException: Object reference not set to an instance of an object
AC.Player+d__52.MoveNext () (at Assets/AdventureCreator/Scripts/Character/Player.cs:1140)
AC.SaveSystem+d__87.MoveNext () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:1589)
AC.SaveSystem+d__51.MoveNext () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:784)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <583df70190f94511bd46f12943531dbc>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
AC.SaveSystem:InitAfterLoad(Int32) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:743)
AC.MultiSceneChecker:RunStartProcess() (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:122)
AC.MultiSceneChecker:Start() (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:54)
Hi there! The save incompatibility took my by surprise with 1.81.4 but I guess didn't read the forum, my fault, I thought the update was just to big of a difference (my last AC version was from 2021 in this project).
So I was surprised that that was an error. Nevertheless, I updated to 1.81.5 Tried using the old saves and I still get the same error (when clicking on them):
Oh, it was on another thread! Thanks. Looks like a good file to have, So I'll keep it. I already notified my players that saves will break for next version. Then I should leave Invariant culture checked on, right? (as I'm not worried about breaking old saves but this should guaranty better save compatibility in the future? (I didn't quite get the invariant culture stuff)
Thank you.
Hey Chris,
Just wanted to say this is an amazing release. I've updated AC after a gap of a few releases and the improvements are insanely good. For one thing, shifting to Unity UI for all ingame menus is an amazing upgrade, it's so much easier to have detailed customizations and menu animations,
A while ago, I had given feedback about Action Groups (similar to Unreal) and I see that it's now in. I'm not sure if it was due to my feedback, but just wanted to say it's an incredible QOL addition and will be super helpful to arrange actions into logic blocks.
Thanks again for the incredible work you're doing with these updates and improving this amazing addon.
Thanks @incommunicado, QOL improvements have definitely been a focus of recent releases. Certainly, you're feedback about groups helped where attention was made.
I tried searching but couldn't find an answer anywhere. I was thinking about upgrading to unity 6 when it drops in a few weeks, but I was wondering if that was going to be feasible with regards to AC. Should I stay on an older version...?
AC should work just fine Unity 6. You may get a couple of warnings in the Console, but these can be ignored and will be ironed out in the next update. If you encounter any issues, however, post details here and I can look into it.
Scrolling with the mouse wheel stopped working for me after I updated my project to Unity 6, is there any ETA for next update? Could this be an issue with the Input System Integration?
Comments
I have also noticed the following warning whenever a scene loads, that was not being generated on prior versions.
The scene named '' was not found in the Build settings.
Is it maybe due to the fact that the default player has a
previousSceneName
equal to an empty string?Encountered one more issue, this time an error: I am loading a subscene at some point in the game (a map scene). When I click on a hotspot on that scene to change to another scene, then the following error is produced:
ArgumentException: Scene to unload is invalid
Triggered by the call to the
Close();
method fromSceneChanger
, from this logic that was added in 1.81 (line 1199):The
subScene
in my case is the map scene that has abuildIndex
number equal to-1
, thus triggering the Unity error.Thanks for the feedback, @stelabouras.
OnVariableChange was removed due to both its broad usage compared with the Event Runner's ability to filter by variable, as well as its (relative) lack of use, where it was taking up prime space in the Game Editor.
The Event Runner's use of ActionList assets is something to work around, admittedly. Two ways around this:
1) Create a global event using the Events Editor, and have it run an ActionList: Run Action that references an in-scene Cutscene. For any additional scenes that require this, note the referenced Cutscene's Constant ID number, then attach and assign this ID to other such Cutscenes.
2) Attach the following script to your OnVarChange cutscenes:
I'll need more details to reproduce this reliably. Could you create a new thread with details of your Settings Manager, your Player and scene-loading?
Are you referencing scenes by name or number, and/or Addressables, in the Settings Manager?
Thanks Chris.
Regarding the
OnVariableChange
, I have already implemented something related to your suggestion (theNANTest
script), thank you for providing more context!As for the reported warning / error comments: Apologies for spamming the thread here, I thought it was an appropriate place but I will be creating new threads from now on.
Regarding the warning: Scene named '' not found warning generated in AC 1.81.4
Regarding the error: I have configured the scenes to be referenced by Number in the AC Game Editor > Settings pane. No Addressables are involved.
[Unity 2021.3.38f1]
Not really a huge deal for us, currently, as we are still in production, but I thought it might be worth notifying. Apologies if this is a known issue or not an issue at all.
Updating from v1.80.4 to v1.81.4 breaks loading saves, the following error appears once the game finishes loading:
NullReferenceException: Object reference not set to an instance of an object
AC.Player+d__52.MoveNext () (at Assets/AdventureCreator/Scripts/Character/Player.cs:1140)
AC.SaveSystem+d__87.MoveNext () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:1589)
AC.SaveSystem+d__51.MoveNext () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:784)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <583df70190f94511bd46f12943531dbc>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
AC.SaveSystem:InitAfterLoad(Int32) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:743)
AC.MultiSceneChecker:RunStartProcess() (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:122)
AC.MultiSceneChecker:Start() (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:54)
@LostTrainDude Thanks for this - I'll implement a fix in the next update.
Version 1.81.5:
Hi there! The save incompatibility took my by surprise with 1.81.4 but I guess didn't read the forum, my fault, I thought the update was just to big of a difference (my last AC version was from 2021 in this project).
So I was surprised that that was an error. Nevertheless, I updated to 1.81.5 Tried using the old saves and I still get the same error (when clicking on them):
SerializationException: The ObjectManager found an invalid number of fixups. This usually indicates a problem in the Formatter.
System.Runtime.Serialization.ObjectManager.DoFixups () (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize (System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Serialization.Formatters.Binary.__BinaryParser serParser, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream) (at <787acc3c9a4c471ba7d971300105af24>:0)
AC.FileFormatHandler_Binary.DeserializeObject[T] (System.String dataString) (at Assets/AdventureCreator/Scripts/Save system/FileFormat/FileFormatHandler_Binary.cs:50)
AC.Serializer.DeserializeObject[T] (System.String dataString, AC.iFileFormatHandler fileFormatHandler) (at Assets/AdventureCreator/Scripts/Save system/Serializer.cs:191)
AC.SaveSystem.ExtractMainData (System.String saveFileContents) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:483)
AC.SaveSystem+d__48.MoveNext () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:596)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <10871f9e312b442cb78b9b97db88fdcb>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
AC.SaveSystem:ReceiveDataToLoad(SaveFile, String) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:564)
AC.SaveFileHandler_SystemFile:Load(SaveFile, Boolean, Action`2) (at Assets/AdventureCreator/Scripts/Save system/FileHandling/SaveFileHandler_SystemFile.cs:127)
AC.SaveSystem:LoadSaveGame(SaveFile) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:461)
AC.SaveSystem:LoadGame(Int32, Int32, Boolean) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:374)
AC.MenuSavesList:ProcessClick(Menu, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:894)
AC.MenuElement:ProcessClickUI(Menu, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuElement.cs:267)
AC.<>c__DisplayClass32_1:b__0() (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:202)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent()
AC.OptionalMouseInputModule:Process() (at Assets/AdventureCreator/Scripts/Menu/OptionalMouseInputModule.cs:193)
UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:530)
Also this warning about save screenshots:
Texture '' has dimensions (974 x 548) which are not multiples of 4. Compress will not work.
Are you referring to this note from the v1.80 Changelog?
This isn't a bug - the behaviour in v1.81.5 and beyond will be the same, it's not limited to v1.81.4. Have you tried removing the AC.asmdef file?
Oh, it was on another thread! Thanks. Looks like a good file to have, So I'll keep it. I already notified my players that saves will break for next version. Then I should leave Invariant culture checked on, right? (as I'm not worried about breaking old saves but this should guaranty better save compatibility in the future? (I didn't quite get the invariant culture stuff)
Thank you.
I'd recommend keeping it checked if possible, yes - it's intent is indeed to improve save compatibility.
Hey Chris,
Just wanted to say this is an amazing release. I've updated AC after a gap of a few releases and the improvements are insanely good. For one thing, shifting to Unity UI for all ingame menus is an amazing upgrade, it's so much easier to have detailed customizations and menu animations,
A while ago, I had given feedback about Action Groups (similar to Unreal) and I see that it's now in. I'm not sure if it was due to my feedback, but just wanted to say it's an incredible QOL addition and will be super helpful to arrange actions into logic blocks.
Thanks again for the incredible work you're doing with these updates and improving this amazing addon.
Thanks @incommunicado, QOL improvements have definitely been a focus of recent releases. Certainly, you're feedback about groups helped where attention was made.
Version 1.81.6:
Version 1.81.7:
Updating from v1.80.4 to v1.81.4 breaks loading saves, the following error appears once the game finishes loading.
Welcome to the community, @georgiabrok.
Open up AC's Player script and look for the following around line 1141:
Replace this with:
Does that resolve it?
I tried searching but couldn't find an answer anywhere. I was thinking about upgrading to unity 6 when it drops in a few weeks, but I was wondering if that was going to be feasible with regards to AC. Should I stay on an older version...?
Welcome to the community, @yonderworks.
AC should work just fine Unity 6. You may get a couple of warnings in the Console, but these can be ignored and will be ironed out in the next update. If you encounter any issues, however, post details here and I can look into it.
Scrolling with the mouse wheel stopped working for me after I updated my project to Unity 6, is there any ETA for next update? Could this be an issue with the Input System Integration?