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 /
  • Help Room /
This question was closed Jan 26, 2016 at 06:03 PM by Andrew Robus for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by Andrew Robus · Jan 25, 2016 at 04:17 PM · scripting problemuiscripting beginner

Delaying The Execution Of A Method Until A Condition Is Met

I have a switch statement that will change the text of a UI text object depending on the value of a integer or string. As this is an attempt at a dialogue system, I'd like to be able to display some text to the user and then wait for them to press a button before displaying the next, preferably without using coroutines.

Comment
Add comment · Show 4
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 ShadyProductions · Jan 25, 2016 at 04:53 PM -1
Share

And what do you need our help with? We don't make scripts.

avatar image Andrew Robus ShadyProductions · Jan 25, 2016 at 07:25 PM 0
Share

Sorry for being so vague, I needed a way to accomplish this and couldn't think of anything myself, so I hoped you guys would have an answer.

avatar image NickWu · Jan 25, 2016 at 06:03 PM 0
Share

why not just use a button event to increment your dialogue index

avatar image Andrew Robus NickWu · Jan 25, 2016 at 07:26 PM 0
Share

I'll definitely try this next time I have Unity in front of me, thanks in advance.

1 Reply

  • Sort: 
avatar image
0

Answer by hexagonius · Jan 25, 2016 at 07:33 PM

I would create a dialogue class, with the text and references to what the next one will be depending on which choice the user has. then have a manager with a hold of the first one, which also has a reference too the dialogue UI and which receives the clicks of the button. it then can initialize the UI with a simple call to set up the text, which buttons to show etc. on a click response it just passes that to the class which returns the next dialogue, which can be set.

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 Andrew Robus · Jan 26, 2016 at 06:03 PM 0
Share

This sounds excellent, as of now I've done what NickWu suggested, but I'll definitely look into this. Thank you so much.

Follow this Question

Answers Answers and Comments

50 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

Related Questions

Image UI not enabling C# SOLVED 1 Answer

UI Text Not Updating 1 Answer

UI button issue with variable + inspector 0 Answers

How to write a script for an existing button 1 Answer

Showing a high score in the menu 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