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 buzzhead1994 · Jan 28, 2013 at 03:48 PM · java

Asking multiple choice question in unity from a file delimited file in excel?

I want to ask people in a trivia game a question from a file delimited file in excel and have multiple questions per room, and through out, no questions re-asked, then a door will open if the majority of them are answered correctly, if not majority correct, then the game boots to main menu. what would the code for this be and how would i implement it to my game. Any help ASAP would be greatly appreciated! thanks guys! :)

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 robertbu · Jan 28, 2013 at 05:02 PM

This is a wide open question that is difficult to answer with such a sketchy description. You might have better luck if you take your project a piece at a time and then ask specific questions on the list. Here are two suggestions on places to start.

1) For asking the questions, you'll likely use the GUI class. There are many questions daily that either use GUI methods in their source or ask about GUI. Create a simple project that just asks and answers questions using GUI. Don't worry about your Excel data to start, just put your questions in code or make a public array and fill them in in the inspector.

2) To get your information from Excel into Unity, save it as a .CSV file with .TXT extension. There are other formats you could use other than CSV, but CSV is probably the simplest. To Unity, anything with a .TXT extension is a TextAsset so you can use the methods of the TextAsset class to access the file. You will have to parse the file yourself and move it into a data structure you can use when asking the questions.

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

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

9 People are following this question.

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

Related Questions

As a beginner, How should I learn how to write java code relevant to the Unity Engine? 1 Answer

How do you script in Java? Anyone have some exaple codes I could use? 0 Answers

How do i fix this problem in my code? please help 2 Answers

How to put a GUI in a clickable Gameobject? (with or without using assest IGUI basic) 0 Answers

how to put the GUI into a gameobject so that when clicked, The GUI pops up, and heres a sample multiple Choice question using GUI, i need the code for it. 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