• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Nov 20, 2014 at 06:57 AM by Landern for the following reason:

Duplicate Question

avatar image
0
Question by JusticetoAll · Nov 20, 2014 at 05:34 AM · 4.6flagged-for-delete

Setting Text.text with Slider number in New UI

I have this code so far but I'm not sure what I'm doing wrong.

 using UnityEngine;
 using System.Collections;
 using UnityEngine.UI;
 
 public class SliderUITextUpdate : MonoBehaviour {
     string sliderTextString;
     Text sliderText;
 
 
     void start(){
         sliderText = GetComponent<Text> ();
         }
 
     public void textUpdate (float textUpdateNumber){
         textUpdateNumber.ToString (sliderTextString);
         sliderText.text = sliderTextString;
     }
     // Update is called once per frame
     void Update () {
     
     }
 }

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Uldeim · Nov 20, 2014 at 05:51 AM 0
Share

Unless 'start' is capitalized to 'Start', you'll have to call it manually. I assume you've set textUpdate as a triggered function in the slider Inspector?

avatar image Uldeim · Nov 20, 2014 at 06:52 AM 0
Share

I don't have closer authority, but this question was basically reposted (and answered) here: http://answers.unity3d.com/questions/836488/how-to-send-on-value-changed-in-ui-slider-to-text.html#answer-836612 and should now be closed.

0 Replies

  • Sort: 

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How to handle multiple touch with new Unity 4.6 UI System 2 Answers

Unity v4.6 Joystick? 2 Answers

Remove Focus From InputField 2 Answers

EventTriggers kill ScrollRect ? 0 Answers

IL2CPP Problem with DLL 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges