Slider OnValueChanged not letting me chose a function to send it to
I'm trying to work with a slider allowing the player to set the Player Preferences for my game. I've been getting stuck because it keeps saying that there are no functions for the OnValueChanged event. Here is a picture of what I mean:
I'm pretty sure I'm setting up the code correctly but it just isn't allowing me to select my public method.
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Preference : MonoBehaviour {
public void OnDrag()
{
Debug.Log("Test");
}
}
weirdglitch.png
(7.7 kB)
Comment
Answer by Yword · Dec 09, 2015 at 03:10 AM
I think you should assign/drag the GameObject which the Preference script attached to.
untitled-1.png
(17.0 kB)