Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Sahkan

Pages: 1 ... 4 5 [6]
76
NGUI 3 Support / Re: Getting current position in Slider?
« on: April 27, 2014, 10:23:09 AM »
Make a new script, put this code into it ( In this case the file named : MyTestScript_1 ) :

  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class MyTestScript_1 : MonoBehaviour {
  5.  
  6.  
  7.         public UISlider slider_1 ;
  8.  
  9.         void Update ()
  10.         {
  11.                 print (slider_1.sliderValue);
  12.         }
  13. }
  14.  

Drag that script into the Slider object .

Drag the slider object from the hierarchy tab to the slider_1 value which shows in the Inspector  (Because it declared as public ) .

Play the scene and it will print the value of it while you play in it every frame .

Pages: 1 ... 4 5 [6]