Forum rules - please read before posting.

How to have AC off by default

Hello. I need to have some systems initialized before Adventure Creator is turned on. I tried using TurnOffAC() on Awake but that didn't seem to work. Can I remove the GameEngine gameObject and then add it on runtime? Or what is the best way to approach this? I was thinking having a Start screen where Adventure Creator is not doing anything at all. Then, after Pressing start or something, have it activate.

Comments

  • AC will start up when you begin a scene that has its GameEngine GameObject present. You don't want to add this at runtime, but you could start your game with a non-AC scene, and then switch to your first AC scene when you're ready.

    Alternatively, you could try running your separate system initialisation code via an AC event hook, e.g. OnInitialiseScene:

    void OnEnable () { AC.EventManager.OnInitialiseScene += OnInitialiseScene; }
    void OnDisable () { AC.EventManager.OnInitialiseScene -= OnInitialiseScene; }
    
    void OnInitialiseScene ()
    {
        // your code here
    }
    
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.