GameObject backgroundManager; // This is the object which the background is attached to // This loads the background in the portal void DoLoadPortal() { // We check that the current background isn't currently doing an action if (gameMaster.doTimeAction < Time.time) { backgroundManager.GetComponent <background_manager>().LoadBackground(loadBackground, new Vector3(0.0f, 0.0f, -10.0f)); // We load the background attached to this script gameMaster.OnEnterArea(loadBackground.name); // We tell the game master which area we have loaded } }