Forum rules - please read before posting.

Multiple scene loading and manually starting the ac engine

edited May 2020 in Technical Q&A

Hello,

I divided some scenes into multiple parts and loading them additively. normally loading the main scene and that scene loading the second scene additively works.

the problem occurs when looking for preloading all of the required scenes async.
Due to the restriction on unity (as you have mentioned on previous posts) I am loading the main scene, then load the additives scenes one by one. (instead of preloading them all and load at the same time)

main scene has the ac logic
additive scene has the environment and ground, collider etc.

  • before starting the loading I disable AC using:
    AC.KickStarter.TurnOffAC();

  • then I async load the main ac scene

  • once it is complete I async load the remaining scene additively

  • once it is complete I enable AC using:
    AC.KickStarter.TurnOnAC();

the problem is, it instantiates the player before the additive scene is loaded

is there anything I need to do to start the ac initializing after the scenes are loaded?

note: this might be important? the loader scene is not ac, so the loaded main scene has the ac scene objects for the first time

thanks

Comments

  • edited May 2020

    What message do you get in the Console when calling TurnOffAC ()?

    If you have yet to load in the main AC scene (which is where you say AC's scene objects are placed for the first time), then doing so should have no effect - since AC is not yet loaded to be turned off.

    If this is the case, the Console should inform you of this.

    You could try placing an AC GameEngine in the prior scene, so that it can be turned off before the main scene is loaded.

    I'm not sure of the context for this, though. AC is able to handle scene-addition itself with the Scene: Add or remove Action. Using this - or using the provided AddSubScene function - is recommend, since AC makes its own internal record of what sub-scenes are open that it makes use of when e.g. recording save files.

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.