Hello,
Whenever I use button element with actionlist - Save > Save or Load > Overwrite existing > Set Save ID: 1, I get the following error: UnityException: get_isPlaying can only be called from the main thread
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I have a savelist Element with (Fixed saved ID only?) checked and ID to display is set to 1
Can you share the error message in full, stacktrace included?
Also: what are your AC/Unity versions?
AC Version : 1.81.6
Unity Version : 2023.2.21f
Error full message:
UnityException: get_isPlaying can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
AC.GVar.set_BooleanValue (System.Boolean value) (at Assets/AdventureCreator/Scripts/Variables/GVar.cs:780)
AC.GVar.Download (AC.VariableLocation _location, AC.Variables _variables) (at Assets/AdventureCreator/Scripts/Variables/GVar.cs:217)
AC.GlobalVariables.DownloadAll () (at Assets/AdventureCreator/Scripts/Static/GlobalVariables.cs:79)
AC.RuntimeVariables.SaveMainData (AC.MainData mainData) (at Assets/AdventureCreator/Scripts/Variables/RuntimeVariables.cs:210)
AC.SaveOperation.SendSaveToFile () (at Assets/AdventureCreator/Scripts/Save system/SaveOperation.cs:146)
System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at :0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at :0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at :0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at :0)
System.Threading.ThreadHelper.ThreadStart () (at :0)
UnityEngine.Application:get_isPlaying()
AC.GVar:set_BooleanValue(Boolean) (at Assets/AdventureCreator/Scripts/Variables/GVar.cs:780)
AC.GVar:Download(VariableLocation, Variables) (at Assets/AdventureCreator/Scripts/Variables/GVar.cs:217)
AC.GlobalVariables:DownloadAll() (at Assets/AdventureCreator/Scripts/Static/GlobalVariables.cs:79)
AC.RuntimeVariables:SaveMainData(MainData) (at Assets/AdventureCreator/Scripts/Variables/RuntimeVariables.cs:210)
AC.SaveOperation:SendSaveToFile() (at Assets/AdventureCreator/Scripts/Save system/SaveOperation.cs:146)
System.Threading.ThreadHelper:ThreadStart()
Recreated, thanks.
Temporary fix: open up GVar.780 and remove
&& Application.isPlaying
.