title: How to end the process of my simply application quiz?
body: <p>Please help me, I'm newbie with c# language. I've try to make simply application quiz, but I get problem that I can't end the process after the last question of quiz.
  The script that I have below:</p>
  
  <pre><code>using UnityEngine; 
  using System.Collections;
  using UnityEngine.UI;
  public class Quiz : MonoBehaviour { 
      [System.Serializable] 
      public class Question{ 
          public string NoSoal; 
          public string TextSoal; 
          public string Pilihan1; 
          public string Pilihan2; 
          public string Pilihan3; 
          public string Pilihan4; 
          public int qKeyAnswer; 
          public int qUserAnswer;
  
      } 
  
      public int BanyakPilihan; 
      public GUISkin mySkin; 
      private float Score; 
      public Question[] pertanyaan; 
      private GameObject coba;
      private Text nil;
  
      private GameObject Canvas;
  
      // Use this for initialization 
      void Start () { 
          BanyakPilihan = 0; 
          Score = 0; 
          Canvas=GameObject.Find("Canvas");
      } 
      // Update is called once per frame 
      void Update () { 
              } 
  
      void OnGUI () { 
              GUI.skin = mySkin; 
          GUILayout.BeginArea(new Rect((Screen.width/2)-200, 100 ,400, 450)); 
          GUILayout.Box(Score.ToString("F1")); 
          GUILayout.Label(pertanyaan[BanyakPilihan].TextSoal);
          if (GUILayout.Button(pertanyaan[BanyakPilihan].Pilihan1,mySkin.button)){ 
              pertanyaan[BanyakPilihan].qUserAnswer = 1; 
              CalculateResult(); 
              GoNextQuestion();
  
          } 
          if (GUILayout.Button(pertanyaan[BanyakPilihan].Pilihan2)){ 
              pertanyaan[BanyakPilihan].qUserAnswer = 2; 
              CalculateResult(); 
              GoNextQuestion(); 
  
          } 
          if (GUILayout.Button(pertanyaan[BanyakPilihan].Pilihan3)){ 
              pertanyaan[BanyakPilihan].qUserAnswer = 3; 
              CalculateResult(); 
              GoNextQuestion();
  
          } 
  
          if (GUILayout.Button(pertanyaan[BanyakPilihan].Pilihan4)){ 
              pertanyaan[BanyakPilihan].qUserAnswer = 4; 
              CalculateResult(); 
              GoNextQuestion();
  
          }
          GUILayout.EndArea(); 
      }
  
      void GoNextQuestion(){ 
  
          if (BanyakPilihan &lt; pertanyaan.Length-1){ 
              BanyakPilihan++;
  
          }
      }       
  
      void CalculateResult(){ 
          float Total = 0; 
          for (int i=0; i&lt; pertanyaan.Length; i++){ 
              if (pertanyaan[i].qKeyAnswer == pertanyaan[i].qUserAnswer){ 
                  Total = Total + 1;  
              } 
          } 
          Total = Total / pertanyaan.Length * 100; 
          Score = Total; 
      } 
  }
  </code></pre>
  
  <p>Please help me to solve this problem.</p>