using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class TurnOn : MonoBehaviour { Animator aniSwitch; // Use this for initialization void Start () { aniSwitch = this.GetComponent (); } // Update is called once per frame void Update () { } public void SetOn() { aniSwitch.SetInteger("iOnOff",1); } public void NextScene(int no) { SceneManager.LoadScene (no); } }