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 /
avatar image
0
Question by Brakespear · Jun 29, 2014 at 09:55 PM · textinterfacestrings

GUI Text manipulation - flexible enough for my project?

So, I'm hoping to develop a "professional" version of a prototype text adventure I've been writing so far in Javascript with jQuery (ignore the tile engine stuff for now):

https://dl.dropboxusercontent.com/u/7885274/TestArea/InterLithOLD/InterLithOLD.html

Essentially, I want to use Unity (in its 2D mode) to create a fancy, modern interface, maybe add some bells and whistles, and package the whole thing into something I can maybe (eventually) sell.

The question is: text manipulation is the crux of the whole thing. Running from a browser, I can add text to on-screen elements, combine things, insert things... do whatever I need to do.

Example:

 intercomAnswr3: function(){
         $('#NARRATIVE').append('<p class="selected">:: ...</p><p>"Er, ' + glb.pVars.playerName + '? Hello?"</p><p>There is a rather awkward silence.</p><p>"Look, whoever answered the damn intercom; tell my XO to get their arse up to the control room. We\'re almost at the refinery."</p><div class="selections" id="selectONE"><b>1</b>:: Continue</div>'); contentBox.scrollBOTTOM();
 }

I've been looking at the basic tutorials for GUI scripting in Unity, but before I dedicate the rest of my week to learning this stuff and leaping headfirst into Unity, I thought I'd make sure it's actually possible (without reinventing the wheel; I loved the shortcuts jquery offered me).

Can you append text and insert variables like this? Can you scroll text?

To put it simply: Is the prospect of porting this work to Unity possible with regards to text manipulation? I understand this is a bit of a vague question, but ironically calls for a simple yes/no answer >.<

Thanks.

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

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Owen-Reynolds · Jun 29, 2014 at 10:18 PM

Unity doesn't support much in the way of fancy text. You can program just about anything, but very little built-ins. Changing the color/font of a single word is a huge pain. Moving text is fine, like up/down scrolling. But Marquee-style scrolling, within a limited area, is a huge, huge pain.

Of course, you can use regular C# functions to build your strings. But I suspect it doesn't support the nice Perl-style substitutions you're used to (and Unity javascript, isn't, I'm told.) You can easily fade out text. Oddly, you can make "Star Wars credits" pretty easily, by tilting the camera on 3DText.

Its sort of a "use Unity for 3D features, imports anything, physics engine, easy iOS/Android/web builds. Tolerate the GUI support."

Comment
Add comment · 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
0

Answer by sschaem · Jun 30, 2014 at 06:00 PM

One thing you will also find with Unity is that there is a lot a 3rd party extensions https://www.assetstore.unity3d.com/en/#!/category/141/page/1/sortby/popularity

If Unity doesn't do what you need, you might be able to find it offered via an extension.

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 Brakespear · Jun 30, 2014 at 06:55 PM 0
Share

Ah, that's true... I hadn't really thought about plugins. Cheers! EDIT: In fact, looking at the top of the page I encountered "eDriven.Gui"... which, judging by the example screenshots, is the kind of thing I might need. Awesome.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to make disappear a GUI text after an amount of time? 5 Answers

String.Remove not working 1 Answer

Predict Text Width of String 0 Answers

Why is text ui cant be static ? 0 Answers

Text does not wrap properly 1 Answer


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