Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Error CS0535?

$
0
0
using System.Collections; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class Slider : MonoBehaviour, IPointerClickHandler { public UnityEngine.UI.Slider barvalue ; private float maxslidervalue = 100; public int jump; //this makes the progress bar load in 1second intervals with a value of "jump" IEnumerator IncreaseSliderValue() { //Instead of incrementing value in start function. Put your code into a coroutine. for (int val = 0; val <= maxslidervalue; val+=jump) { barvalue.value = val; print (barvalue.value); yield return new WaitForSeconds (1); } } //Creat a new method which will call above coroutine when the Button is clicked. public void StartSLider(){ StartCoroutine(IncreaseSliderValue()); } } Error: Assets/Slider.cs(7,14): error CS0535: `Slider' does not implement interface member `UnityEngine.EventSystems.IPointerClickHandler.OnPointerClick(UnityEngine.EventSystems.PointerEventData)'

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>