title: Unity Interactable = False suddenly not working
body: <p>now i encountered a very very weird issue. below is the code. pardon the length. This class has multiple function that were working when there only 3 (upt to button C)buttons being reference, <strong>in fact the one installed on my phone has the already pressed button disabled after i go back to the initial scene.</strong> </p>
  
  <p>So me thinking all is good decided to do this for all the buttons that I have on my initial Screen. But for some reason it is not working, <strong>it is not disabling the buttons anymore.</strong> I have the GameLogic.cs where i have my variables declared and this script as well. 16 buttons = 16 Alphabets. So basically it just increments a value once button is pressed then once we go back to the initial screen On update, if the value is >= 1 then that particular button must be disabled. </p>
  
  <p>Again it is working when i first built it for the phone. it is there. this is so weird.  Maybe you can see some issue with the code here perhaps?</p>
  
  <p>Thanks.</p>
  
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  using UnityEngine.UI;
  
  
  public class forButtonDisabler : MonoBehaviour {
  
      public Button buttonA;
      public Button buttonB;
      public Button buttonC;
      public Button buttonD;
      public Button buttonE;
      public Button buttonF;
      public Button buttonG;
      public Button buttonH;
      public Button buttonI;
      public Button buttonJ;
      public Button buttonK;
      public Button buttonL;
      public Button buttonM;
      public Button buttonN;
      public Button buttonO;
      public Button buttonP;
  
  
      void OnEnable()
      {
          //Register Button Events
  
          buttonA = GameObject.Find("btn5ptsPP").GetComponent&lt;Button&gt;();
          buttonB = GameObject.Find("btn5ptsDP").GetComponent&lt;Button&gt;();
          buttonC = GameObject.Find("btn5ptsTE").GetComponent&lt;Button&gt;();
          buttonD = GameObject.Find("btn5ptsTA").GetComponent&lt;Button&gt;();
          buttonE= GameObject.Find("btn10ptsPP").GetComponent&lt;Button&gt;();
          buttonF = GameObject.Find("btn10ptsDP").GetComponent&lt;Button&gt;();
          buttonG = GameObject.Find("btn10ptsTE").GetComponent&lt;Button&gt;();
          buttonH = GameObject.Find("btn10ptsTA").GetComponent&lt;Button&gt;();
          buttonI = GameObject.Find("btn15ptsPP").GetComponent&lt;Button&gt;();
          buttonJ = GameObject.Find("btn15ptsDP").GetComponent&lt;Button&gt;();
          buttonK = GameObject.Find("btn15ptsTE").GetComponent&lt;Button&gt;();
          buttonL = GameObject.Find("btn15ptsTA").GetComponent&lt;Button&gt;();
          buttonM = GameObject.Find("btn20ptsPP").GetComponent&lt;Button&gt;();
          buttonN = GameObject.Find("btn20ptsDP").GetComponent&lt;Button&gt;();
          buttonO = GameObject.Find("btn20ptsTE").GetComponent&lt;Button&gt;();
          buttonP = GameObject.Find("btn20ptsTA").GetComponent&lt;Button&gt;();
  
          buttonA.onClick.AddListener(() =&gt; buttonCallBack(buttonA));
          buttonB.onClick.AddListener(() =&gt; buttonCallBack(buttonB));
          buttonC.onClick.AddListener(() =&gt; buttonCallBack(buttonC));
          buttonD.onClick.AddListener(() =&gt; buttonCallBack(buttonD));
          buttonE.onClick.AddListener(() =&gt; buttonCallBack(buttonE));
          buttonF.onClick.AddListener(() =&gt; buttonCallBack(buttonF));
          buttonG.onClick.AddListener(() =&gt; buttonCallBack(buttonG));
          buttonH.onClick.AddListener(() =&gt; buttonCallBack(buttonH));
          buttonI.onClick.AddListener(() =&gt; buttonCallBack(buttonI));
          buttonJ.onClick.AddListener(() =&gt; buttonCallBack(buttonJ));
          buttonK.onClick.AddListener(() =&gt; buttonCallBack(buttonK));
          buttonL.onClick.AddListener(() =&gt; buttonCallBack(buttonL));
          buttonM.onClick.AddListener(() =&gt; buttonCallBack(buttonM));
          buttonN.onClick.AddListener(() =&gt; buttonCallBack(buttonN));
          buttonO.onClick.AddListener(() =&gt; buttonCallBack(buttonO));
          buttonP.onClick.AddListener(() =&gt; buttonCallBack(buttonP));
  
  
      }
  
      private void buttonCallBack(Button buttonPressed)
      {
          if (buttonPressed == buttonA)
          {
  
              GameLogic.Cbtn1++;
  
          }
  
          if (buttonPressed == buttonB)
          {
  
              GameLogic.Cbtn2++;
  
          }
  
          if (buttonPressed == buttonC)
          {
  
  
              GameLogic.Cbtn3++;
  
  
          }
          if (buttonPressed == buttonD)
          {
  
  
              GameLogic.Cbtn4++;
  
  
          }
          if (buttonPressed == buttonE)
          {
  
              GameLogic.Cbtn5++;
  
  
          }
          if (buttonPressed == buttonF)
          {
  
              GameLogic.Cbtn6++;
  
  
          }
          if (buttonPressed == buttonG)
          {
  
              GameLogic.Cbtn7++;
  
  
          }
          if (buttonPressed == buttonH)
          {
  
              GameLogic.Cbtn8++;
  
  
          }
          if (buttonPressed == buttonI)
          {
  
  
              GameLogic.Cbtn9++;
  
  
          }
          if (buttonPressed == buttonJ)
          {
  
  
              GameLogic.Cbtn10++;
  
  
          }
          if (buttonPressed == buttonK)
          {
  
  
              GameLogic.Cbtn11++;
  
  
          }
          if (buttonPressed == buttonL)
          {
  
  
              GameLogic.Cbtn12++;
  
  
          }
          if (buttonPressed == buttonM)
          {
  
  
              GameLogic.Cbtn13++;
  
  
          }
          if (buttonPressed == buttonN)
          {
  
              GameLogic.Cbtn14++;
  
  
          }
          if (buttonPressed == buttonO)
          {
  
  
              GameLogic.Cbtn15++;
  
  
          }
          if (buttonPressed == buttonP)
          {
  
  
              GameLogic.Cbtn16++;
  
  
          }
  
      }
  
      void OnDisable()
      {
          //Un-Register Button Events
          buttonA.onClick.RemoveAllListeners();
          buttonB.onClick.RemoveAllListeners();
          buttonC.onClick.RemoveAllListeners();
          buttonD.onClick.RemoveAllListeners();
          buttonE.onClick.RemoveAllListeners();
          buttonF.onClick.RemoveAllListeners();
          buttonG.onClick.RemoveAllListeners();
          buttonH.onClick.RemoveAllListeners();
          buttonI.onClick.RemoveAllListeners();
          buttonJ.onClick.RemoveAllListeners();
          buttonK.onClick.RemoveAllListeners();
          buttonL.onClick.RemoveAllListeners();
          buttonM.onClick.RemoveAllListeners();
          buttonN.onClick.RemoveAllListeners();
          buttonO.onClick.RemoveAllListeners();
          buttonP.onClick.RemoveAllListeners();
  
      }
  
      // Update is called once per frame
      void Update()
      {
          if (GameLogic.Cbtn1 &gt;= 1)
          {
              buttonA.interactable = false;
  
  
          }
  
          if (GameLogic.Cbtn2 &gt;= 1)
          {
  
              buttonB.interactable = false;
  
          }
  
          if (GameLogic.Cbtn3 &gt;= 1)
          {
              buttonC.interactable = false;
  
  
          }
          if (GameLogic.Cbtn4 &gt;= 1)
          {
              buttonD.interactable = false;
  
  
          }
          if (GameLogic.Cbtn5 &gt;= 1)
          {
              buttonE.interactable = false;
  
  
          }
  
          if (GameLogic.Cbtn6 &gt;= 1)
          {
              buttonF.interactable = false;
  
  
          }
          if (GameLogic.Cbtn7 &gt;= 1)
          {
              buttonG.interactable = false;
  
  
          }
          if (GameLogic.Cbtn8 &gt;= 1)
          {
              buttonH.interactable = false;
  
  
          }
          if (GameLogic.Cbtn9 &gt;= 1)
          {
              buttonI.interactable = false;
  
  
          }
          if (GameLogic.Cbtn10 &gt;= 1)
          {
              buttonJ.interactable = false;
  
  
          }
  
          if (GameLogic.Cbtn11 &gt;= 1)
          {
              buttonK.interactable = false;
  
  
          }
  
          if (GameLogic.Cbtn12 &gt;= 1)
          {
              buttonL.interactable = false;
          }
          if (GameLogic.Cbtn13 &gt;= 1)
          {
              buttonM.interactable = false;
          }
          if (GameLogic.Cbtn14 &gt;= 1)
          {
              buttonN.interactable = false;
          }
          if (GameLogic.Cbtn15 &gt;= 1)
          {
              buttonO.interactable = false;
          }
          if (GameLogic.Cbtn16 &gt;= 1)
          {
              buttonP.interactable = false;
          }
      }
  }
  </code></pre>