• 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 caglar123 · Mar 12, 2017 at 05:55 PM · buttontriggerif statementevent triggering

image click quiz button problem

Hi everyone, I'm quite new on c# and unity, had some experience on appinventor and it was relatively easy for me to manage buttons. I could make buttons act the way i wanted using "if and else statements" with the colorful interface of app inventor but i cannot do the very same thing in unity. The problem is:

I have a button which starts the quiz and plays a random question (mp3 file), then i have some answer buttons which i want to play random okay or alert sound files, one of these answer buttons is correct and the rest wrong. Since the question is random, the answer changes each and every turn. I want to write a script but i cannot. Should i write a script for the start button(start button is at the same time the first question button) or the answer button or the audiosource? I want to do it myself, but unfortunately i can't. I've referred to numerous resources on the internet, and scanned lots of forums but i couldn't find the way out. Can you please guide me, where to focus, what to do and how to do?

Any help is appreciated and thanks in advance.

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

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

What am i doing wrong? I want to make a raycast acces panel with lights 2 Answers

Can I set a specific Pointer for the EventTrigger on Buttons for example? 0 Answers

Trigger a Button Click 2 Answers

Please help in triggering an animation through another object. 1 Answer

Can't click gameobject when over another trigger? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges