Forum rules - please read before posting.

Preload scene data then Switch Scene error

edited September 2019 in Technical Q&A

Unity 2018.3.6f1 Personal
AC v1.66.7

In my Splash Intro scene (0) I have a Scene:Switch Action with Don't change scene, just preload Data tickbox ticked. Later in the ActionList I have an another Scene:Switch Action to change to that preloaded scene and I get the error:

Cannot use preloaded scene '1' because the loading scene overrides it - discarding preloaded data.


 -> AC debug logger
UnityEngine.Debug:LogWarning(Object, Object)
AC.ACDebug:LogWarning(Object, Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:25)
AC.<LoadLoadingScreen>d__30:MoveNext() (at Assets/AdventureCreator/Scripts/Game engine/SceneChanger.cs:297)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
AC.SceneChanger:LoadLevel(SceneInfo, Boolean, Boolean, Boolean) (at Assets/AdventureCreator/Scripts/Game engine/SceneChanger.cs:277)
AC.SceneChanger:ChangeScene(SceneInfo, Boolean, Boolean, Int32, Boolean) (at Assets/AdventureCreator/Scripts/Game engine/SceneChanger.cs:179)
AC.ActionScene:ChangeScene() (at Assets/AdventureCreator/Scripts/Actions/ActionScene.cs:114)
AC.ActionScene:Run() (at Assets/AdventureCreator/Scripts/Actions/ActionScene.cs:61)
AC.<RunAction>d__33:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:364)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:314)
AC.ActionList:ProcessActionEnd(ActionEnd, Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:546)
AC.ActionList:EndAction(Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:464)
AC.<RunAction>d__33:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:433)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

How can I preload the scene then switch to the preloaded scene without it having to load it all again?

note: I have the tickbox Load scenes asynchronously ticked.

Comments

  • As the message describes, you can't preload another scene if you make use of loading scenes. It is only possible to preload the next scene opened - which will always be the loading scene in this case.

  • right, thanks for clearing that up. So is having Load scenes asynchronously ticked not useful if I have a loading scene enabled?

  • It's intended more for when loading scenes aren't used, sure, but it does allow for the Delay before and after (s) field, which I'd previously suggested for your earlier loading screen animation issue.

  • Ah yes, I've been using that and it was helpful.

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.