Function won't appear in On Click Box.

I have the following code:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class NormalTime : MonoBehaviour {

    public bool NormalTimeIsSelected;
    public GameObject NormalTimeArrow;
    public GameObject NormalTimeArrowSelected;

    void NormalTimeFunct()
    {
        if (NormalTimeIsSelected == true)
        {
            NormalTimeArrow.SetActive(false);
            NormalTimeArrowSelected.SetActive(true);
        }
        else
        {
            NormalTimeArrow.SetActive(true);
            NormalTimeArrowSelected.SetActive(false);
        }
    }


        // Use this for initialization
        void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
        NormalTimeFunct();
        
	}
}

But when I try to load the NormalTimeFunct function is the On Click selector for my button, it dosen’t appear.

Anybody know how I fix this?

Thanks
DcoltGaming

Because it’s not public, only package protected.

Change “void NormalTimeFunct()” to “public void NormalTimeFunct()” and it should work

Try using this instead of if you’re not using Triggers (This code will work without Trigger, if it would’ve event system attached this code will not going to work) :

 using UnityEngine;
 using System.Collections;
 using UnityEngine.UI;
 
 public class NormalTime : MonoBehaviour {
 
     public bool NormalTimeIsSelected;
     public GameObject NormalTimeArrow;
     public GameObject NormalTimeArrowSelected;

     //This function will work independently with a collider attached (Must).  
     void  OnMouseDown()
     {
         if(NormalTimeIsSelected == false)
             NormalTimeIsSelected = true;
             NormalTimeFunct();
      }
    public void NormalTimeFunct()
     {
         if (NormalTimeIsSelected == true)
         {
             NormalTimeArrow.SetActive(false);
             NormalTimeArrowSelected.SetActive(true);
         }
         else
         {
             NormalTimeArrow.SetActive(true);
             NormalTimeArrowSelected.SetActive(false);
         }
     }
 
         void Start () {
         NormalTimeIsSelected = false;
     }
     
 }

For some reason the button was broken. I readded the button and all is now working.