Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 /
avatar image
0
Question by KnightRiderGuy · Jan 21, 2016 at 07:14 PM · c#textcanvaspaneluifont

Is It Possible to Render the same Data to 2 Different UI Text Objects?

Is it possible that lets say I have two different UI text objects on two different canvas panels. Can I render the same information to both UI text objects using only one method?

 if (sysHour >= 18 && sysHour <= 24) {
             MessageCentreText.text = "GOOD EVENING";
             //Debug.Log ("Good Evening!");
         } 
Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by SterlingSoftworks · Jan 21, 2016 at 07:20 PM

Yes, that is entirely possible.. Did you even try to do that before coming here..? ._.

Comment
Add comment · Show 5 · Share
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 KnightRiderGuy · Jan 21, 2016 at 07:24 PM 0
Share

@SterlingSoftworks, Yeah I tried experimenting with a few things, spent a good deal of time looking for any examples of how to do that, obviously I'm asking because I found a s$$anonymous$$$$anonymous$$g load of bubcas ;) Next silly question ;)

avatar image SterlingSoftworks KnightRiderGuy · Jan 21, 2016 at 07:30 PM 0
Share

Hey, some people come here for some questions that have been asked 20x so I'm just making sure you actually TRIED something before asking. Didn't want to come off as rude with that, but I'm sure it was xD

Why don't you just create an instance of the other UI text (by either a public text variable or a private and you find it via GameObject.Findblahblahblah) you're trying to change within that script and set it there too?

Another way would be to create a new script specific to the secondary UI text and create a public UI text variable called copyText.. Drag the UI you want it to copy to that in the inspector, and then in OnGUI (or whatever you'd like to use) just set the text element = to copyText.text. Those two ways should work. :D

avatar image KnightRiderGuy SterlingSoftworks · Jan 21, 2016 at 08:00 PM 1
Share

@SterlingSoftworks, Yup it works, a lot of my wasted time was trying to cram it into one line I tried && + || even something like: timeText2.text, timerText3 = hh + ":" + mm + ":" + ss; It seemed logical to me but all I got was errors and some quality time with the Headache tablets bottle lol

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

61 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

UI Elemets disapear after changing Parent Canvas. 0 Answers

How do you Instantiate Text as Child of Canvas c# 1 Answer

Canvas UI Priority layers 1 Answer

Quick Question on UI Text Alignment 1 Answer

How to display UI Text on GameObject in script? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges