How to make a Quiz Game with Multiple Choices in Unity

Поделиться
HTML-код
  • Опубликовано: 19 июн 2024
  • Consider donating to help me keep this channel and website alive : paypal.me/supportTheGameGuy 💖
    In this video im gonna show you how to create a quiz with multiple choices from scratch and special thanks to ‪@Brackeys‬ because i'll be mainly extending and improving his quiz video tutorial to include multiple choices instead of true and false.
    The quiz manager is completely dynamic, you could include as many questions as you want and also there is no limit to the options. So it all depends on how you want your game to be like.
    And I will be uploading the part of this quiz game soon. so stay tuned!
    Some more unity tutorials which might be useful :
    How to throw knife in UNITY :
    • How to throw knife usi...
    How to make an AWESOME game Menu :
    • How to make an AWESOME...
    How to make level saving System :
    • How to make a simple L...
    Remote Configuration by BRACKEYS :
    • CHANGE YOUR GAME ANYWH...
    Game difficulty by Brackeys :
    • Difficulty in Video Ga...
    How to make first person game in UNITY by BRACKEYS :
    • MAKING YOUR FIRST FPS ...
    Some interesting and fun Unity videos by DANI
    I made an evil bot my friend :
    • I Accidentally Made an...
    I turned RUclips into giant battle royal game :
    • I Turned RUclips into ...
    I made a game in 30 Minutes :
    • Making a Game in 30 Mi...
    Music: www.bensound.com 🎵

Комментарии • 217

  • @leofrancisamador2658
    @leofrancisamador2658 Год назад +25

    Some of you might encounter some error with
    public Text QuestionTxt; instead of using this, Use this " public UnityEngine.UI.Text QuestionTxt; "
    also with this one: options[i].transform.GetChild(0).GetComponent().text= QnA[currentQuestion].Answer[i];
    instead of using those statement, use this instead:
    options[i].transform.GetChild(0).GetComponent().text= QnA[currentQuestion].Answer[i];

    • @creativekatty8762
      @creativekatty8762 Год назад

      Thank you

    • @stuck4uk714
      @stuck4uk714 Год назад

      omg thanks mate. I keep scratching my head what's wrong

    • @zahrahaziz5821
      @zahrahaziz5821 Год назад

      thanks bud!!

    • @tank1175
      @tank1175 11 месяцев назад

      Just use "using UnityEngine.UI;"

    • @maftplays
      @maftplays 8 месяцев назад

      May both sides of your pillow be cold every night

  • @simonabunker
    @simonabunker Год назад +2

    Thank you for this really great tutorial! As a few others have said - it is really good for school homework.

  • @faizanhussain7634
    @faizanhussain7634 2 года назад +2

    Great Man! Really Appreciate your effort and skills, You helped me a lot, Thanks.

  • @deheane
    @deheane Год назад +1

    Thank you so much, I have to make a game for a school history project and your videos are saving me! #brazilhere🇧🇷🇧🇷🇧🇷

  • @denis.d3117
    @denis.d3117 2 года назад

    Thank you! Very good tutorial!

  • @Sillymonkeies
    @Sillymonkeies 2 года назад

    Blessed video man! Thank you

  • @cozettedyer6178
    @cozettedyer6178 Год назад +13

    If you're using buttons and Unity can't find your options text, try using in the options[i].transform.GetChild(0).GetComponent().text = QnA[currentQuestion].Answers[i]; line.

    • @rmak2597
      @rmak2597 Год назад

      I tried this but it still didn't work, what should I do?

    • @annamai4680
      @annamai4680 Год назад +1

      @@rmak2597 Did you make sure to put "using TMPro;" on top?

    • @lu-zer
      @lu-zer Год назад +1

      life saver

    • @user-vv9gx3gk8x
      @user-vv9gx3gk8x 9 месяцев назад

      Thank you!

    • @superfat9242
      @superfat9242 8 месяцев назад

      you save my life :)

  • @ericsantiagorodriguez6140
    @ericsantiagorodriguez6140 3 года назад +3

    Discula esto tambien se puede realizar en RA con unity vuforia, en un groud plane o un target?

  • @sexypotato
    @sexypotato 3 года назад +1

    Really cool!

  • @ovna
    @ovna 2 года назад

    ty very well explained

  • @g2rodriguez-iwnl-458
    @g2rodriguez-iwnl-458 2 года назад +7

    Why the generateQuestion() is showing this error.Index was out of Range. Must be non-negative and less than the size of colllection.

  • @jean0828
    @jean0828 2 года назад +3

    thanks for the tutorial, it was so useful for me. if I want to add an image per question to ask about the image, how should it be the code?

    • @sebkie6934
      @sebkie6934 2 года назад

      hi! did this tutorial work for you? are your choices showing up on the placeholder?

  • @sebkie6934
    @sebkie6934 2 года назад +6

    yeyyyy it worked!!!! Take noteee don't use text mesh pro, just use a normal text in ui

  • @arunmuthu3654
    @arunmuthu3654 Год назад

    Hello,I was correctly implementing the code but there was a problem during the on run time index and the out of range error showed what I do to solve that error

  • @KevinOjaks-pp7go
    @KevinOjaks-pp7go 7 месяцев назад

    Please how did you create the other screen which shows your 2d scene panel? Mine is not showing

  • @austinwinkler5329
    @austinwinkler5329 3 года назад +7

    What if I wanted to add all the questions via code inside of the script (instead of via the editor), would that be fairly easy to do?
    (reasoning: I'm planning on adding a way to import questions/answers via a JSON script later)

    • @austinwinkler5329
      @austinwinkler5329 3 года назад +3

      Also, a suggestion. Would you either get a clearer mic, or turn off the background music? There are parts of this that are very difficult to make out what you're saying!

  • @edelfrefloresmamani4562
    @edelfrefloresmamani4562 2 года назад

    thanks veryhelpful

  • @sparkestic1238
    @sparkestic1238 2 года назад

    Hi, i am facing an issue. When i click a button it displays both the texts “current answer “ and “wrong and” at the same time. Please help

  • @luisdiezortizdemendivil613
    @luisdiezortizdemendivil613 2 года назад +8

    Hi, thanks for the tutorial, I'm programming a game for some class practices. I've been looking for how to add your tutorial within a category system like science, food, geography... But I can't implement it. I am new to programming. If you could help me I would appreciate it. Thanks for the tutorial again.

    • @yasasvitennety4885
      @yasasvitennety4885 Год назад

      Look up scriptable objects. THey can act as data containers where you can add different sets of data and call them based on user input.

  • @lucky_beauty
    @lucky_beauty Год назад

    Thank you~^^

  • @estanonsense
    @estanonsense 2 года назад +6

    Hello! When i select all buttons and then drag and drop the answer script to all of them, Unity doesnt show me the same "Answer Script" window like yours. There is no "Is Correct" or "Quiz Manager" fields and i cannot set the reference to QuizManager like you did because there is no option for that. There is only "Script: AnswerScript".... whats wrong?

  • @KevinOjaks-pp7go
    @KevinOjaks-pp7go 7 месяцев назад

    Which Unity version did you use to create the game??

  • @jaymarkvergara4864
    @jaymarkvergara4864 Год назад

    Why element 0 question 1 doesn't not show the question and the answer buttons?

  • @joshuarosales1687
    @joshuarosales1687 Год назад

    why it states to my unity that the "Text" word in line 11 of quizmanager that it cant be found??

  • @ayns__
    @ayns__ 6 месяцев назад

    All of my Script and Scene options are either not listed or greyed out, so i could not follow this tutorial to completion. For example there was no option to change the reference for quizmanager, just a greyed out bar. Similarly there is no options tab in the "QuizManager" file, just a greyed out script with nothing below.

  • @firstnamelastname2971
    @firstnamelastname2971 Год назад

    cannot drop anything into the questiontxt thing in the quizmanager gameobject

  • @StandwithPalestinian
    @StandwithPalestinian Год назад

    I have check everything but cannot slove issue ,my button text isnot changing when i play what could be the issue can someone help

  • @sebkie6934
    @sebkie6934 2 года назад +2

    hellppp i have this error:
    NullReferenceException: Object reference not set to an instance of an object
    QuizManager.SetAnswers () (at Assets/Script/QuizManager.cs:30)
    QuizManager.generateQuestion () (at Assets/Script/QuizManager.cs:44)
    QuizManager.Start () (at Assets/Script/QuizManager.cs:16)

  • @grumbernbier9591
    @grumbernbier9591 Год назад +1

    Unity wants me to add MonoBehaviour to the QuestionsAndAnswers script.
    When I do so, i can't manualy write the Questions and Answers into the QuizManager.
    But if i dont do it, it says "'QuestionsAndAnswers' is missing the class attribute 'ExtensionOfNativeClass'". When testing one Question+Answers are shown onscreen, but nothing happens when clicking the buttons.
    I did everyhitng according to the video, except of e.g. the 'public Text QuestionTxt', where i had to use 'public TextMeshProUGUI QuestionText' as i can't add Test, but only TMP.
    Is this the reason of my problems? Or is it something else?

    • @sara18004
      @sara18004 Месяц назад

      i'm not sure if you'll see this, but if you have to add monobehaviour (no idea why!) you can create new objects, add the qna script to those objects and write the questions and answers into them, then add them into the question manager object, if this makes any sense, that works

  • @Beyza-ec8cx
    @Beyza-ec8cx 28 дней назад

    u are my fav guy

  • @muhammadabubakkar6319
    @muhammadabubakkar6319 Год назад

    Can you help me in adding Progress bar to this game?

  • @DCVocabulary
    @DCVocabulary 2 года назад +1

    How to add audio to a quiz question?

  • @interestingconsiderations31
    @interestingconsiderations31 Год назад +1

    help! i get only thr "wrong answer" message from debug log

  • @blackbars4625
    @blackbars4625 11 дней назад

    Can someone help me? I make like author, but I can't to set questions and answers in QuizManager, I have only field where text "QuestionAndAnswers". What I make wrong?

  • @KONFUS3D
    @KONFUS3D Год назад

    Hi I'd like to ask will there be any difference if instead of using just "Button" I use "Button-TextMeshPro"
    1:48
    Will there be any difference in the coding and if so, what is it?

    • @arjunm1246
      @arjunm1246 Год назад

      You just need to improt the tmpro to the script. If u have any doubts related,just drop a reply comment below.I will try to help u

    • @mazukai6525
      @mazukai6525 7 месяцев назад

      @@SwampowlStudios-td8bk Legend thanks for the help i was looking for the text mesh pro command in the code

    • @mazukai6525
      @mazukai6525 7 месяцев назад

      @@SwampowlStudios-td8bk The only thing is i dont know why the size tab is not appearing in the Quiz Manager inspector window in the options tab like it is in the video?

    • @soulbatguy9621
      @soulbatguy9621 5 месяцев назад

      ​@@mazukai6525same problem here

  • @bablugaonkar666
    @bablugaonkar666 Месяц назад

    nice vedio by i didnot understand tthis code Scoretxt.text = score "/" total question there is another paramenter but i didnot understand is it ! or : parameter plz clarify me

  • @SIMDRiVE-ku6gi
    @SIMDRiVE-ku6gi Год назад +2

    why does it say to me "Can't add script component 'AnswerScript' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match" when I drag the sricpt in 14:37

  • @jokubasbanaitis3222
    @jokubasbanaitis3222 3 года назад +2

    error CS0246: The type or namespace name 'MonoBehaviour' could not be found (are you missing a using directive or an assembly reference?)

    • @hamidkhalid8150
      @hamidkhalid8150 3 года назад

      check you script name and check you in code script name

    • @hamidkhalid8150
      @hamidkhalid8150 3 года назад

      they should be same

    • @user-pc5ef7cq5f
      @user-pc5ef7cq5f Год назад

      In the QuestionsAndAnswers script add "using UnityEngine;" above [System.Serializable]

  • @travissloan9411
    @travissloan9411 3 года назад +1

    I don't know if you check comments from videos this old as of late, but I could really use some help. I did everything according to the tutorial and it appears the game is working, but I can't press any of the quiz buttons to progress. I've double checked and the everything looks to be the same as the video, I even downloaded the assets directly from your homepage just to be sure. Any ideas?

    • @TheGameGuy
      @TheGameGuy  3 года назад

      So the buttons are like uninteractable at the start of the game?

    • @travissloan9411
      @travissloan9411 3 года назад

      @@TheGameGuy Pretty much. When I try to test the game out, clicking on the buttons does nothing. I made a few test projects with buttons and they're not working either, so now I think it's a problem with my version of unity or my laptop.

    • @TheGameGuy
      @TheGameGuy  3 года назад

      Try using a different version of unity and if you are not already, use the unity HUB to download the new version.

    • @pvlcity7439
      @pvlcity7439 Год назад

      @@travissloan9411 у вас получилось?у меня такая же проблема

  • @xcxcxc1203
    @xcxcxc1203 2 года назад +2

    Help me pls, I'm gettin this error :
    NullReferenceException: Object reference not set to an instance of an object
    QuizManager.generateQuestion () (at Assets/QuizManager.cs:43)
    QuizManager.Start () (at Assets/QuizManager.cs:16)

  • @reginadominique4357
    @reginadominique4357 3 года назад

    GameObject[]' does not contain a definition for 'length' and no accessible extension method 'length' accepting a first argument of type 'GameObject[]' could be found (are you missing a using directive or an assembly reference?)

    • @reginadominique4357
      @reginadominique4357 3 года назад

      Im using Sublime Text 3 for coding

    • @reginadominique4357
      @reginadominique4357 3 года назад

      please answer when i hit play no questions appear until i click 1 button is this supposed to work like this?

    • @GordoMantecoso
      @GordoMantecoso 2 года назад +1

      @@reginadominique4357 Did u try with "Length"?

  • @Edo4rdo.g
    @Edo4rdo.g 2 года назад

    thanks for the tutorial, only to me sometimes it tells me it's wrong but i know is right?

  • @ignpewnie
    @ignpewnie 3 года назад

    WOW

  • @srinivasmarriyavula8225
    @srinivasmarriyavula8225 Год назад

    For this app how to write code for previous button

  • @viennaz3522
    @viennaz3522 Год назад

    Hi, why cant i drag and drop the Text to the Quizmanager's QuestionTxt? On your video on 14:50 whenever i drop it, it doesnt work it has the no symbol

    • @viennaz3522
      @viennaz3522 Год назад +1

      Nevermind I figured it out. Since only TextMesh is available and there are not Text only option, I changed " public Text QuestionTxt; " into " public TextMeshProUGUI QuestionTxt; " and I also added using TMPro

    • @jaymarkvergara4864
      @jaymarkvergara4864 Год назад

      Do you have problem with element 0, mine is in question 1 which is element 0 the question and answer doesn't not shownup

    • @vladimirsleptsov8844
      @vladimirsleptsov8844 3 месяца назад

      ​@@jaymarkvergara4864 Hello! Have you already solve the problem?

  • @charikleiakk98
    @charikleiakk98 11 месяцев назад

    I can not add the script into the buttons. It said the script class cannot be found. I do not have compile errors and the file name match the class. What should I do ? (I have both script and scene in a different file of my other game)

  • @phone6974
    @phone6974 3 года назад +1

    May I know how to add questions and answers using scripts? I am planning to use firebase to store questions and answers.

    • @nerochan4094
      @nerochan4094 2 года назад

      hello. were you able to find the answer? i am also planning on doing the same thing (and also using firebase)

  • @glitchplayz7671
    @glitchplayz7671 3 года назад

    how do select all of the stuff

  • @joshuacamara5638
    @joshuacamara5638 2 года назад

    can you add some life or chances stuff?

  • @013_syafii6
    @013_syafii6 6 месяцев назад

    Thanks Bro.. But i following every step. but the button and the question do not change

  • @lukagaming341
    @lukagaming341 Год назад +1

    guys help me please i cant drag the Text in Question Txt IDK why maybe its for there are Text (TMP) is that problem pls hrelp me

  • @adriangarciasaez914
    @adriangarciasaez914 3 года назад

    👌👌👌

  • @queenofpein7111
    @queenofpein7111 Год назад

    Why couldn't not drag my quiz manager to my answer script?

  • @OpheliaNearl
    @OpheliaNearl 9 месяцев назад +1

    I don't know why but it doesn't work... The Debug.Log always displays "Wrong Answer" even I answer it correctly...

  • @darrylvillanueva5233
    @darrylvillanueva5233 3 года назад

    hello how can i change the question to be image as well pls help

    • @TheGameGuy
      @TheGameGuy  3 года назад +1

      ruclips.net/video/mtBWaXA96r8/видео.html Check this out

  • @majkoden
    @majkoden 3 года назад +1

    It shows:
    error CS1061: 'TextAlignment' does not contain a definition for 'text' and no accessible extension method 'text' accepting a first argument of type 'TextAlignment' could be found (are you missing a using directive or an assembly reference?)
    Can someone help me with it please? I did on this many hours and it doesnt work :(

    • @pooh_jary
      @pooh_jary 3 года назад +2

      make sure to put "using UnityEngine.UI" at the top of the script

    • @ZOMBIEFISHERCHIC
      @ZOMBIEFISHERCHIC 3 года назад +2

      im having the same issue and im trying to see the replies for your post but its taking for ever lol
      thanks for asking this question tho im glad that im not the only one thats got this issue

    • @heamorhoid
      @heamorhoid Год назад +1

      I had same problem. You have to put "using TMPro;" and if it doesn' t recognize "Text", write "public TextMeshProUGUI QuestionTxt;" or "GetComponent().text = QnA[currentQuestion].Answers[i];" Hope it helps.

  • @jessanatividad8730
    @jessanatividad8730 3 года назад

    Hello can you hep me with thi error? "The referenced script on this Behaviour (Game Object 'QuizManager1') is missing!"

    • @Abab-kx1nk
      @Abab-kx1nk 3 года назад +1

      i think you just have to drag the script in

    • @jessanatividad8730
      @jessanatividad8730 3 года назад

      @@Abab-kx1nk Thanks! But sadly i got another error it says "Null reference Exception: Object reference not set to an instance of an object"

  • @TheGameGuy
    @TheGameGuy  3 года назад +15

    For the *Copy/Paste gang* 😜
    Grab the assets from : thegameguy.net/resources.html
    Grab the Complete Project from my Patreon Page : www.patreon.com/posts/46461491

  • @gustavo7834
    @gustavo7834 Год назад +1

    Here I got the following error: "Assets\QuizManager.cs(11,12): error CS0246: The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?)" , so I had to write in the beginning of the Script. I hope it helps someone.

    • @reenah_zpt157
      @reenah_zpt157 7 месяцев назад

      I did get this error but i have no idea how to fix it

  • @lp7161
    @lp7161 2 года назад

    Can you teach me one to one?. I am a children's book author and creating many interactive AR quiz on body safety rules

  • @Knee_Boy64
    @Knee_Boy64 3 года назад

    I got everything to work, but if I answer correctly it will ask the same question again later on. How do I stop that?

    • @TheGameGuy
      @TheGameGuy  3 года назад

      That is wierd, it shouldnt be happening as we are getting rid the questions that we have already answered.. leaving only the unanswered ones

  • @Minoterrae
    @Minoterrae 3 года назад +2

    So, what if you wanted a question that had more than 1 correct answer? How would you do that?

    • @edmondeyeemceeezekiels9158
      @edmondeyeemceeezekiels9158 3 года назад +1

      This is a good question. I was wondering about that too...

    • @TheGameGuy
      @TheGameGuy  3 года назад +4

      that's actually a good question and now that think about it, probably we would have to make an array of correct answers that hold the indexes of the correct answers and each time we answer a question instead of just checking for a single value we would have to check for all the correct answers

    • @edmondeyeemceeezekiels9158
      @edmondeyeemceeezekiels9158 3 года назад +1

      @@TheGameGuy you are too too good!!!

    • @ShonkV
      @ShonkV 2 года назад

      @@TheGameGuy instead of the script reading the text from the button , cant we just assign script to the correct button that would just increment value of score when u press?

    • @genos1345
      @genos1345 2 года назад

      @@TheGameGuy Hello! I'm new to this and i really need this because i'm making a quiz with multiple correct answers, i would really like to see this in code if you wouldn't mind helping

  • @James-k1416
    @James-k1416 3 года назад +2

    Its is not working for me :-( i tried it twice

  • @sebkie6934
    @sebkie6934 2 года назад +7

    choices aren't showingggg, helpp

    • @soulbatguy9621
      @soulbatguy9621 6 месяцев назад

      Maybe i can help someone with this problem even though this comment already 2yrs old, if you're using newer unity, make sure you use text and not text meshpro, you can find text in the legacy option

  • @emanuelltl
    @emanuelltl Год назад

    Hi someone can help me to improve my game I need it for a school project and I need that when the answer is wrong the correct answer button goes green also if somebody know how to randomize the answers so the answers never repeats positions after replaying the game I will appreciate it too much. Pd: sorry for my English

  • @farishjasri
    @farishjasri 6 месяцев назад +1

    I trusted you

  • @pevinderkaur4477
    @pevinderkaur4477 3 года назад +3

    Hello thanks for the tutorial
    I have a doubt if my question is in the form of audio how can I implemented this script?

    • @lp7161
      @lp7161 2 года назад

      Did you figure out?

  • @luana_karlla
    @luana_karlla 2 года назад +1

    I've already reviewed the code and so far I don't understand why the answers worked the first time, but on the other attempts, they always come back incorrect and only one is true. I've already looked at Inspector and the code and found no difference. What can it be?

    • @TheGameGuy
      @TheGameGuy  2 года назад

      Umm, that's super unusual. Are you repeating the same questions multiple times? Are there any errors related to the questions array? have you tried running the same project on a different unity version?

    • @reyesjohnvincent3469
      @reyesjohnvincent3469 2 года назад

      same thing for me. only one is correct idk what to do

    • @VamshiRao
      @VamshiRao Год назад +3

      Here you should not apply Answerscript->Anwer() method to all buttons at once. In Video he has done correct.

    • @shamenzie
      @shamenzie Год назад

      I am encountering the same problem, is there a fix for this?

    • @romanokeser
      @romanokeser Год назад

      @@VamshiRao Bro wtf...why is it like that? I was debugging the code and was wondering why the answers are always incorrect. I'm confused lol

  • @kaloshabuthapa3284
    @kaloshabuthapa3284 Год назад +3

    Got an error ArgumentOutOfRangeException. Help!!!

  • @haesslicherhuan
    @haesslicherhuan Год назад +1

    How could i make this Work with Multiplayer?

  • @roelasuncion
    @roelasuncion 2 года назад

    how to check if the answer is correct ?
    if(QnA[currentQuestion].CorrectAnswer == i+1) ?

  • @rafliyanuar6430
    @rafliyanuar6430 3 года назад +1

    i have a problem at 9:56 it say "cannot implicitly convert type 'char' to ;string"
    can you please help ?

    • @silemayfly4463
      @silemayfly4463 2 года назад +1

      Add .text to this line
      QuestionText.text = QnA[currentQuestion].Question;

  • @worksmart27
    @worksmart27 2 года назад

    Why my code isn't working?I copy all the text and code.

  • @humayrabakar4207
    @humayrabakar4207 2 года назад

    I pressed play and it would say correct answer but wont move on to the next question? How do I fix this?

    • @TheGameGuy
      @TheGameGuy  2 года назад

      Can you see any error in the console?

    • @humayrabakar4207
      @humayrabakar4207 2 года назад +1

      @@TheGameGuy I fixed that issue thks as I forgot to add Debug.Log. However the error "ArgumentOutOfRange" keeps popping up even though I added the extra bit of code from part 2 to fix the issue??

  • @animehima3758
    @animehima3758 3 года назад

    Where is the next video ?

  • @lamiahafidi5416
    @lamiahafidi5416 2 года назад

    what if I want a 5 shuffeled questions from 10 pleeaaase help I am a 0 in coding Thank you so so much

    • @faidurrohman9631
      @faidurrohman9631 2 года назад

      hey. did you found the answer? I also want to shuffle 3 questions from 10 questions

  • @umminabihah7532
    @umminabihah7532 Год назад

    why all the result is wrong answer? even though it was the correct answer

  • @TheMarnoch21
    @TheMarnoch21 2 года назад +6

    I don't have the option to add text in the UI list only text(TMP), and I can't drag that into the question text option in the quiz manager, did anyone else have this problem?

    • @fei6383
      @fei6383 2 года назад

      I also have this problem. Did you find a solution to this? Thanks.

    • @TheMarnoch21
      @TheMarnoch21 2 года назад +1

      @@fei6383 hey, I cant go on my computer atm however there was a drop down in the same bit as text tmp that text in it, also this is only part 1 of two, so it might be solved in part 2

    • @fei6383
      @fei6383 2 года назад

      @@TheMarnoch21 alright, thank uuu!!

    • @volkovaAgnese
      @volkovaAgnese 2 года назад +3

      Use public TextMeshProUGUI QuestionTxt; in QuizManagerScript

    • @kachamsatwika4284
      @kachamsatwika4284 Год назад

      @@volkovaAgnese hey is there any other solution even i am stuck with that!!

  • @TWITexe
    @TWITexe 2 года назад

    I did everything as in the video, but for some reason, sometimes, the number of the correct answer I chose in "QnA" in the game is shown as "wrong answer", but as soon as I change the number in the correct answer in "QnA", it will immediately work.
    At the moments when it shows "wrong answer" all the buttons that I press give me "wrong answer". Help me pls... :((

    • @LegitSpartaN118
      @LegitSpartaN118 2 года назад

      did you find a fix for this?

    • @zudla9959
      @zudla9959 2 года назад

      just ignore the 0 in elements starts with 1 hope it helps

    • @sparksy1394
      @sparksy1394 2 года назад

      Same issue, any idea on how to fix?

    • @LegitSpartaN118
      @LegitSpartaN118 2 года назад +1

      Found a fix, my quiz manger was using just 1 answer button for all 4 answer buttons, make sure your quiz manager has all 4 set

    • @jaymarkvergara4864
      @jaymarkvergara4864 Год назад

      @@zudla9959 how to fix the 0elements doesn't not show the question and answer

  • @lacrimosa5610
    @lacrimosa5610 2 года назад +2

    My answers always get wrong. Can you help me?

    • @annisara_ma
      @annisara_ma Год назад

      did you solve it already? please reply I have same problem here

  • @primoscarab5771
    @primoscarab5771 3 года назад

    QnA does not appear in quizmanager in unity
    How can this be?

    • @aqualix4662
      @aqualix4662 3 года назад

      i have the same

    • @rueditobler1827
      @rueditobler1827 3 года назад

      @@aqualix4662 May be you forgot tis in the QuestionAndAnswer-Script: [System.Serializable ] (at the beginning of the script)

  • @idrissolmaz2608
    @idrissolmaz2608 2 года назад

    hi, i'm trying to make the video exactly, but at 8:58 void SetAnswers()
    {
    for (int i=0;i

  • @ahmedmo429
    @ahmedmo429 3 года назад

    how can i make "multiplayer" quiz game for android and upload it on google play
    i want steps recommended video to watch and program to use

  • @D-And-A221
    @D-And-A221 Год назад

    So u don't know any SOLID princeple? ( class name QuestionAndAnswer?, mabe better do class question and another class answer and the override ??)

  • @zabluestacks3700
    @zabluestacks3700 2 года назад +2

    Hey, you made a mistake. You get only 3 questions instead of 4. You need to add:
    public int trigger_counter = 0;
    and
    private void Start ()
    {
    trigger_counter++;
    if (trigger_counter != 1)
    {
    QnA.RemoveAt(currentQuestion);
    }
    generateQuestion();
    }
    in the QuizManager script.

    • @ilhamhafiez5511
      @ilhamhafiez5511 Год назад

      Hey bro how about this error ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
      Parameter name: index

    • @syahmiasyraaf9965
      @syahmiasyraaf9965 Год назад

      @@ilhamhafiez5511 anjai jumpa kat sini HAHAHAHHAHA

    • @ilhamhafiez5511
      @ilhamhafiez5511 Год назад

      @@syahmiasyraaf9965 CARI MASALAH ERROR BANG HHAHAHAHA

    • @littlemisswai
      @littlemisswai Год назад

      It is 5 months later but I just want to thank you so much for this fix!

  • @lygier
    @lygier 3 года назад +2

    Didn’t work

    • @TheGameGuy
      @TheGameGuy  3 года назад

      Could you be more specific?

  • @bero58TR
    @bero58TR Год назад

    12:44

  • @treacky3398
    @treacky3398 3 года назад +1

    When I launch the game, the initial text remains but the first question does not appear. Can you help me please.

    • @thehustler2861
      @thehustler2861 3 года назад

      check the functions. U might made an error on syntax

  • @ajlam7098
    @ajlam7098 2 года назад

    Not sure if this will work for everyone but in the setAnswers() function i wrote ==i not ==i+1 like this:
    if (QnA[currentQuestion].CorrectAnswer == i)
    {
    options[i].GetComponent().isCorrect = true;
    }
    I kept getting wrong answer until I wrote it like this.

    • @bental3066
      @bental3066 Год назад

      Maybe you started the loop from i=1, then you dont need to add 1 to the question index. in the video he started the counting from i=0 but the question index starts from one, then you need to add 1 to get the right answer

  • @StandwithPalestinian
    @StandwithPalestinian 3 года назад

    It is same as brackeys tutorial, even you copy his sentence

    • @TheGameGuy
      @TheGameGuy  3 года назад +4

      Actually, i did mention that this is an expansion to Brackeys tutorial as many developers wanted to have multiple choices instead of 2 and also be able to use images as answers instead of text.

    • @StandwithPalestinian
      @StandwithPalestinian 3 года назад +2

      @@TheGameGuy oh that's right

  • @poonamagarwal136
    @poonamagarwal136 Год назад

    Hhj

  • @hamidkhalid8150
    @hamidkhalid8150 3 года назад +1

    not working

  • @balqisothman2400
    @balqisothman2400 3 года назад +2

    hi somebody help me for my collage final project I got this error T,T
    NullReferenceException: Object reference not set to an instance of an object
    QuizManager.generateQuestion () (at Assets/Scripts/QuizManager.cs:46)
    QuizManager.Start () (at Assets/Scripts/QuizManager.cs:16)
    my answer didn't come out also question too help me pleaseee

    • @nurfartinah4534
      @nurfartinah4534 3 года назад +1

      Oh maybe your object name on unity didnt same as you declare on script. Recheck back QuizManager did you rename it with capital letter or not

    • @johnianiiespejo3826
      @johnianiiespejo3826 2 года назад

      Me too this is my problem, I triple check all my file name and it's the same, the letterings and uppercase or lowercase still it's null. Do I need to reinstall my unity and visual code?

    • @azzamrashid3726
      @azzamrashid3726 8 месяцев назад

      SAME AS ME, I ALSO PROCEED ON MY FYP, IS THERE ANY SOLUTION? I ALSO CANT IMPORT QUIZ MANAGER ON ANSWER SCRIPT

  • @brianfuerte9613
    @brianfuerte9613 3 года назад +2

    error CS0246: The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?)

    • @TheGameGuy
      @TheGameGuy  3 года назад +4

      make sure to put "using UnityEngine.UI" at the top of the script

    • @brianfuerte9613
      @brianfuerte9613 3 года назад +2

      @@TheGameGuy I follow your code in the first part.

    • @renieldizon5313
      @renieldizon5313 2 года назад +1

      @@TheGameGuy using the "using UnityEngine.UI" still not works for me. It only gave me a lot of errors sir

    • @firstnamelastname2971
      @firstnamelastname2971 Год назад

      if ur using tmp then do TextMeshProUGUI instead of Text