Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
This question was closed Mar 09, 2015 at 07:58 PM by KnightRiderGuy for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by KnightRiderGuy · Mar 09, 2015 at 07:15 PM · uitextdebug.logprint

Render Debug.Log as UI Text

OK Seeing how I'm getting absolutely nowhere with my other question even though it's part ways there how do I go about rendering Debug.Log information as a UI text NOT OnGUI but UI Text?

 void PlayCurrent()
     {
         source.clip = clips[currentIndex];
         source.Play();
         Debug.Log (source.clip);
 
     }
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

2 Replies

  • Sort: 
avatar image
1
Best Answer

Answer by vintar · Mar 09, 2015 at 07:33 PM

MusicListText.text = clips[currentIndex].name; should work.

Comment
Add comment · Show 1 · 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 · Mar 09, 2015 at 07:58 PM 0
Share

Thanks vintar Now that was bloody BRILLIANT!! Works like a charm. :) if you like go over to my other post and post this same answer and get the credits for that one too :) link text

avatar image
1

Answer by Mmmpies · Mar 09, 2015 at 07:34 PM

Well I just added a test public Text onto my canvas, added an AudioClip "clip" as public and add an OnClick event trigger to call TestUI and output the Text to output the following:

 public Text MyText;
 public AudioClip clip;
 
 public void TestUI()
 {
     MyText.text = clip.ToString();
 }

Outputs whatever audioclip I drag onto the public slot for the script.

Comment
Add comment · Show 1 · 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 · Mar 09, 2015 at 08:06 PM 0
Share

Thanks $$anonymous$$mmpies, although I did not get a chance to try out your option I'm going to save it as it looks to be something very useful I could use in my project somewhere for sure. Vintar had what I was looking for but I gave your answer a big thumbs up :)

Follow this Question

Answers Answers and Comments

22 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

Related Questions

4.6 UI, dynamic layout/resizing text lists using the text class 1 Answer

Unity 5 UI GUI Text Canvas Screen Resolution Adaption Problem 2 Answers

How to manually submit a Unity UI input field through code? 1 Answer

Unity 5 UI Text Glitch (illegible characters) 0 Answers

Roll a Ball UI Text is massive and in wrong place 2 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