Trivia Question System in Unity Tutorial

Поділитися
Вставка
  • Опубліковано 1 лис 2024
  • Ігри

КОМЕНТАРІ • 79

  • @andreu8541
    @andreu8541 5 місяців тому +8

    quick tip: you can also use a tsv (tab-separated values) file instead of the csv. this will be useful in case any of your answers/questions have commas in them, otherwise it will generate more splits than needed or expected. you only need to do this changes on the CSVtoSO.cs: (line 13) private static string questionsCSVPath = "/Editor/CSVs/Questions.tsv"; and (line 25) string[] splitData = s.Split('\t');

    • @jayometric
      @jayometric  5 місяців тому +1

      Good idea! I didn't have any questions that had commas but that's a great solution! Thanks for sharing.

    • @Jonesthecasey
      @Jonesthecasey 3 місяці тому

      Hello, I am getting error at implementing tsv file to my project. I am getting an error of:
      UnityException: Creating asset at path Assets/Resources/Questions//"This feature displays the tabs, indents and margins that give users a visual guide for allignment.asset failed.
      CVStoSO.GeneratePhrases () (at Assets/Editor/CSVtoSO.cs:70)
      The "this feature displays the tabs," part has the comma. The syntax at Line 70 is:
      // Save this in the questionsPathfolder to load them later by script
      AssetDatabase.CreateAsset(questionData, $"{questionsPath}/{questionData.name}.asset");

    • @andreu8541
      @andreu8541 3 місяці тому

      @@Jonesthecasey judging by what you sent i think it has something to do with the asset generation. On the error you send it says that the path is [...]/Questions// and i assume that those to slashes at the end shouldnt be there like that, there's something missing in between. Make sure its generating properlly the file's name for each question, otherwise ive got no clue, sry.

  • @fulgencejuniorlohore854
    @fulgencejuniorlohore854 7 місяців тому

    Thanks buddy for this nice and useful tutorial! 2024 and still relevant!

  • @vaxtrixradicalbro4295
    @vaxtrixradicalbro4295 5 місяців тому

    Such a great video!
    If it wasn't for this video, my whole internship project would've failed.. TYSM!

  • @fred1541
    @fred1541 6 місяців тому

    Yes, As a student, I really want to learn how to make this kind of game for turning in my homework, thanks~

  • @JoaoPortal14
    @JoaoPortal14 Рік тому +2

    Thanks a lot, this video was very helpful!

  • @hemang.s8670
    @hemang.s8670 Місяць тому +1

    Hi i am having an issue with the csv file i placed a folder titles CSVs however its keep on saying their there is error it cannot find the file for some reason. Possibly know why ?

    • @jayometric
      @jayometric  Місяць тому +1

      Offhand, I'm not sure. I'd check a few things first.
      ● check the questionsCSVPath string in the CSVtoSO script. In case you have a different file name.
      ● double check that there's not a space in the file name before or after the name before the .csv part.
      ● make sure that file is in a file named Editor, then in a folder named CSVs. The CSV folder is more for organization. But this needs to be in a folder named Editor.
      ● make sure the file (from wherever you saved it) is a csv. A few times, I accidentally just saved my Excel file and tried. This example is just for csv files.
      If it's not one of those, I'm not quite sure. I hope one of those helps you.

  • @eunoah
    @eunoah 6 місяців тому +1

    My question now is. How do i call the events "SelectNewQuestion, SetQuestionValues and SetAnswerValues" from QuestionSetup, from "if (isCorrect)" to load a new question instead of debuging...
    Ps: I learned so much from this one "simple" video. Thank you a lot!

    • @jayometric
      @jayometric  6 місяців тому +2

      Glad you learned a lot! The basic idea was these methods could be used from these or another class. Instead of debugging text in if (isCorrect), you could put a score, an animation, whatever you would like it to do when you get the answer correct. Since the next question will likely be loaded after checking if the answer was correct or not, that's why it's after that section under if (questionSetup.questions.Count > 0), which checks if there are still more questions to choose from before generating a new question with questionSetup.Start();
      If you only wanted it to load a new question after getting the answer right put questionSetup.Start() inside of if (isCorrect) and only there.
      Then it will only get another question after getting the answer.

    • @eunoah
      @eunoah 5 місяців тому +1

      @@jayometric I keep getting two errors: Once at the beggining with null reference exception about questionText.text = currentQuestion.question; from QuestionSetup.cs
      And the other when i click a button also null reference exception about the if statement at the end of the AnswerButtons.cs

  • @user-es9jy9tm6p
    @user-es9jy9tm6p 6 місяців тому +1

    Hello, this has been very helpful for a school project, so thank you! I wanted to ask tho, if there is any way that the amount of buttons that appear on the screen could change depending on the amount of answers set on the SO of every question. Im working with different types of questions that don't necessarily need four answer buttons, so how could I add this? Hopefully I explained it correctly.... Im a beginner so I would really appreciate your help!

    • @jayometric
      @jayometric  6 місяців тому

      I don't have my computer with me currently but there's a lot of ways that could solve this problem. My thoughts are to have buttons ready for the maximum number of answers and assign them in the inspector on the QuestionSetup script. Then you could adjust the QuestionData scriptable object to include a public int numberOfAnswers. Then in the QuestionSetup when we fill in the answer buttons with text, we could also turn on or off the extra / missing buttons. Inside the SetupAnswerValues we could do something like,
      if(i > currentQuestion.numberOfAnswers)
      {
      answerButton[i].SetActive(false);
      }
      This way we would turn off the buttons that are not needed since the question has less answers. Because we'd be turning off buttons we'd want to make sure we're doing the opposite as well, just in case the next question has more answers than the previous. Something like this,
      if(i

  • @Wynsol
    @Wynsol 6 місяців тому

    Very Nice tutorial
    Thank you 😊

  • @h2fortnuttv409
    @h2fortnuttv409 8 місяців тому +2

    Hello, first of all nice tutorial, i do have a question, when i click on an answer even if its bad or wrong, i don't go to the next question, how do i fix that?

    • @jayometric
      @jayometric  7 місяців тому +1

      Hi thank you!
      I left it open as it can change depending on the way it's added to different games but the simplest way is to:
      1. Change the void Start() function in QuestionSetup to be public
      2. In AnswerButton, inside of the OnClick() function we can add
      if (questionSetup.questions.Count > 0)
      {
      // Generate a new question
      questionSetup.Start();
      }
      By calling the questionSetup.Start() it will select another question, set the values and set the answers again.
      If you're just using the UI to click buttons that should be all you need.
      You can find these in the Github link as well.
      Hope that helps!

    • @h2fortnuttv409
      @h2fortnuttv409 7 місяців тому +1

      @@jayometric thanks i’ll try this

  • @Jonesthecasey
    @Jonesthecasey 4 місяці тому

    I got a question, and its a good one. I want to have a Multiple different Scenes of Categories with a set of question. (Example: Scene 1 Math, Scene 2 English, Scene 3 Science). So this syntax must be changed at CStoSO.
    public class CVStoSO
    {
    private static string questionsCSVPath = "/Editor/CSVs/Questions.csv";
    private static string questionsPath = "Assets/Resources/Questions/";
    I want to change the questionsCSVPath and questionsPATH for multiple separate categories for different scenes. Is it possible to manually change the string by setting it to public? Thank you!

    • @jayometric
      @jayometric  4 місяці тому +1

      As it is currently the path for the questions isn't shown anywhere on the editor. The Utilities menu adds the button to generate the questions but there is no other UI. For that you would have to make something more custom, I'm not sure how to do that off hand. You can change the question path in the script for easier changes even if it's not ideal.
      If you wanted multiple categories for questions and for them to load in you could leave the import path the same and adjust the CSV file to include a column for "Category". You'd need to add this to the QuestionData as well.
      Then when you import the questions you could do anything you'd want. My initial thoughts are, when loading the questions, to start with removing all of the categories you don't want. Then that scene will only have the questions for that category. Setting up some boolean values or maybe an enums. If you wanted multiple categories together booleans might be easier to set up, since they would act as toggles.
      Just for example,
      Add 3 booleans, 1 for each category.
      public bool useMathCategory, useEnglishCategory, useScienceCategory;
      Add a new function, I'll just name it RemoveUnusedCategories.
      // Removes categories passed in as properties.
      private void RemoveUnusedCategories(bool usingCategory, string categoryName)
      {
      // Loop through all of the questions
      foreach (QuestionData question in questions)
      {
      // If not using the this category's questions, remove them
      if (!usingCategory)
      {
      if (question.category == categoryName)
      {
      questions.Remove(question);
      }
      }
      }
      }
      Then we use that function before we SelectNewQuestion in Start. Such as,
      // Remove question categories that won't be used
      RemoveUnusedCategories(useMathCategory, "Math");
      RemoveUnusedCategories(useEnglishCategory, "English");
      RemoveUnusedCategories(useScienceCategory, "Science");
      I didn't get a chance to test it yet but something like that should get you started in the right direction. The basic idea is by adding a category column to the CSV, you can separate them in almost any way you like.
      The way I suggested keeps them all imported the same way, but changes how the questions are picked (by removing categories based on the name in the CSV). ?
      Just as a side note, I avoided using an enum for the category, that was so I could mix and match what categories could be paired (or all 3). And enum would make it so you are only allowed to choose 1.
      You would set those values on the scene itself so changing the scene would also change the selections.
      I hope that helps!

    • @Jonesthecasey
      @Jonesthecasey 4 місяці тому

      @@jayometric I see, boolean would make it more easier. I will try to experiment on this. Thank you so much for the help! I have subscribed :D

    • @Jonesthecasey
      @Jonesthecasey 3 місяці тому

      @@jayometric Hello, I got an update. I got your syntax working just today, sorry for the late reply. There was an error at the RemoveUnusedCategories function. So I have fixed it right about now and it's finally 100%. What I did what added a ToList at the foreach string. It looks like this.
      private void RemoveUnusedCategories(bool usingCategory, string categoryName)
      {
      // Loop through all of the questions
      foreach (QuestionData question in questions.ToList())
      {
      Also I used the boolean values and integrated it to the main menu with a saving function via Playerprefs since the project doesn't need a complicating save/load system.
      The code is perfect, I already made 10 different subjects with it. Only problem is now how I convert CSV file to TSV instead since I can't use commas in Question.csv file.
      I'll post this as future reference in case anyone needs a fix to the issue. Thank you!

  • @AgniKai-ht2bv
    @AgniKai-ht2bv Місяць тому

    Why does it now fetch the other questions on my CSV file? please help me to fix this

    • @jayometric
      @jayometric  Місяць тому

      I'm not sure what you mean by the other questions.
      The scripts will bring in all of the questions on the csv file. If you want multiple csv files you'll need to update the questionsCSVPath and potentially the questionsPath to have it bring in csv files with a different name and put them into a different folder.
      Otherwise you might need to adjust the logic for what it adds as a question, depending on your exact needs. You'd adjust the GeneratePhrases method in the CSVtoSO script.
      I hope that helps.

  • @unexpectedpause9359
    @unexpectedpause9359 9 місяців тому +1

    How can i add a points every time i got an answer correct? thank you for the insight

    • @jayometric
      @jayometric  9 місяців тому

      The easiest way is to either add a score variable, like int score; to the QuestionSetup script or another object with a score script. Then in the AnswerButton script add a reference to the QuestionSetup (or the score script) and add to the score by accessing the variable directly (if it's public) or by making a function to increase the score like this:
      public void AddScore(int scoreToAdd)
      {
      score += scoreToAdd;
      }
      You would need to set the QuestionSetup (or score script) in every button but there are only 4 in this example so it won't take long. If there were a lot more answers to choose from I would set it up differently.
      I hope that helps!

  • @karauhlinger1774
    @karauhlinger1774 Рік тому

    Hi a question for you. It seems that I can't get a new scriptable object to save in my assets/resources/questions folder and my csv file wont save in the csvs folder. any tips on why that wouldn't be working?

    • @karauhlinger1774
      @karauhlinger1774 Рік тому

      update i manually uploaded the csv file but it still wont save as a new object in the questions folder

    • @jayometric
      @jayometric  Рік тому

      Hi, I just took some looking through to see what it could be.
      The way I had it set up required the folders to already exist and be set up exactly like this:
      The CSV files go in Assets → Editor → CSVs (easiest to save by dragging an existing CSV file from somewhere else into the folder, you can right click and Show in Explorer on PC, probably Finder for Mac)
      Then the folders where I have the Questions generated also needs to be:
      Assets → Resources → Questions.
      If you wanted to use a different folder structure you can,
      1. Edit the questionsCSVPath in the CSVtoSO file on line 13 to change where the csv file is located.
      2. Edit the AssetDatabase.CreateAsset path on line 53 of the same file to change where questions are generated.
      Remember, these were placed in the resources folder to make the QuestionSetup file able to access them easily (using Resources.LoadAll) so I wouldn't change the output directory personally.
      I edited the github file to make the path where the questions are generated to be a variable at the top to make changes easier (new line 14) and also to include a check if the file directory exists for generating questions, if it does not it will create the folder for you. It does not make a folder for the CSV as it needs to be in the project to be used anyway.
      I hope that helps!

  • @felaniiqhwan4769
    @felaniiqhwan4769 10 місяців тому +1

    Hey man, I need some help. How do I generate a new question after player click the answer? I try to create a new function, no red marks but the game doesnt generate a new question

    • @jayometric
      @jayometric  10 місяців тому

      Hey sorry for the delay, I saw this late and had to recreate this project to test.
      To generate a new question after answering the question would be to add to the AnswerButton script's OnClick function.
      The if statement is already checking if the button pressed was correct, we just need to add a way for us to reference the QuestionSetup and call Start again (though you could make what is inside of start it's own function).
      At the top of AnswerButton add a reference to QuestionSetup, I did public QuestionSetup questionSetup;
      Then inside OnClick, after the if else statement I added: questionSetup.Start();
      Then go back to QuestionSetup and add public before void Start() since it is not public by default.
      You could do it differently but this is way changes very little with the code and how it's shown on github.
      I hope this helps!

    • @jayometric
      @jayometric  10 місяців тому

      And as a side note, this also will break when you run out of questions! Set the questions list to public in the QuestionSetup, then you can use:
      if (questionSetup.questions.Count > 0) {
      questionSetup.Start();
      }
      That will stop it from generating a question when the list runs out. Since every time we choose a question we remove it from the list.

    • @aliyylmn
      @aliyylmn 9 місяців тому

      Di saya belum berhasil sir, please , I need some help..@@jayometric

    • @aliyylmn
      @aliyylmn 9 місяців тому

      I haven't succeeded sir, please, I need some help..@@jayometric

    • @aliyylmn
      @aliyylmn 9 місяців тому

      I haven't succeeded sir, please, I need some help..@@jayometric

  • @JessieA.I-cb2uq
    @JessieA.I-cb2uq 7 місяців тому

    If we want to add lot question ex. 10,000 then how to do. Manually typing is time consuming right any other way?

    • @jayometric
      @jayometric  7 місяців тому

      As it is in the video the spreadsheet part makes importing them to Unity faster, the only way to write them faster I can think of right now is copy and pasting them from another source. But they would need to be entered manually if they aren't being taken from somewhere else. You might be able to import them a different way but offhand I'm not sure how.

  • @Wynsol
    @Wynsol 6 місяців тому

    Thank you 😊

  • @penguine9111
    @penguine9111 9 місяців тому

    How can I change the code so that the questions changes , every time my game object interacts with my trigger it will show the new questions the code u gave will only change question once the game restarts , I need help its for my school work

    • @jayometric
      @jayometric  9 місяців тому +2

      It does depend on what is causing the trigger, but this only set up the structure.
      To make a new question when you interact with a trigger you would need to call the start function on the questionSetup since that selects a new question and sets the values.
      This could go on your trigger when interacting with it, or if you want the questions to only change when picking an answer it can be added to the AnswerButton OnClick function.
      I've edited the github file to reflect this on the AnswerButton.
      Ultimately wherever you want a new question will only need to reference the QuestionSetup and then call the Start() function again.
      Hope that helps!

    • @penguine9111
      @penguine9111 9 місяців тому

      @@jayometric why does it say questionSetup.questions is inaccessible due to its protection level

    • @jayometric
      @jayometric  7 місяців тому

      UA-cam does a great job not sending notfications sorry.
      I seem to have left out you need to make the Start function public. I hope you've found the answer but now but I wanted to leave an answer here in case others read this too.

  • @miguelcarrizo3825
    @miguelcarrizo3825 4 місяці тому

    Hi! how can i get a new question after pulse any of the buttoms?
    Really thanks for the video, it is amazing!

    • @jayometric
      @jayometric  4 місяці тому +1

      Thank you I'm glad you like the video!
      The basic idea is QuestionSetup controls almost anything about picking questions, but the AnswerButtons script has the button functionality.
      That's where the last section, OnClick() for the buttons comes in.
      // Get the next question if there are more in the list
      if (questionSetup.questions.Count > 0)
      {
      // Generate a new question
      questionSetup.Start();
      }
      Calling questionSetup.Start(); does the following
      //Get a new question
      SelectNewQuestion();
      // Set all text and values on screen
      SetQuestionValues();
      // Set all of the answer buttons text and correct answer values
      SetAnswerValues();
      Depending on your setup, you can just use Start or call them individually if you needed them somewhere else for some reason.
      This setup also implies there are more questions to pick from. If you have 0 left in the list (it removes the question it picks in SelectNewQuestion()
      I hope that helps!

    • @miguelcarrizo3825
      @miguelcarrizo3825 4 місяці тому

      @@jayometric i dont know why is not working :,c i have 20 questions but just first is showing in the ui, in the panel and QuestionSetup gameboject the questions are showing too

    • @miguelcarrizo3825
      @miguelcarrizo3825 4 місяці тому

      @@jayometric i'm doing some test and in questionSetup i made serializedField this variable currentQuestion to see it in the question box and it still being the same after i click on any buttom

  • @AzaiKang
    @AzaiKang 5 місяців тому

    How can I loop the list? sorry for asking a basic question. I'm more of a story writer than a programmer, thank you in advance

    • @jayometric
      @jayometric  5 місяців тому +1

      No worries, it might seem basic but it can change a lot depending on what you're looking for.
      In the SelectNewQuestion method in the QuestionSetup.cs script we have the questions choosing a random value, then setting that to the current question. The last part removes that question from the list so it doesn't accidentally repeat a question.
      If you wanted to loop through them randomly without caring about repeats you can remove the questions.RemoveAt(randomQuestionIndex) line. Then it will repeat randomly until you close the program.
      If you wanted the list to repeat in order, you can replace the int randomQuestionIndex with a value we declare outside the method probably called currentQuestionIndex. Then set currentQuestion = questions[currentQuestionIndex] After that line we need to increase the currentQuestionIndex (so the next question becomes 1, 2, so on). For that we can add currentQuestionIndex++; We also need to stop removing them but also know when to repeat. For that we just need to add an if statement to check when our index >= questions.Count (how many questions in the list). That would make it follow the same order. To simplify:
      *somewhere at the top, around the other variables like private int correctAnswerChoice;
      Add: private int currentQuestionIndex;
      Change the SelectNewQuestion method like this:
      private void SelectNewQuestion()
      {
      // Set the question to the current question index
      currentQuestion = questions[randomQuestionIndex];
      // Increase the question index so the next time this is used the value matches the next question
      currentQuestionIndex++;
      // Check if the questions should loop back to the beginning (0) (>= Count means we have hit or gone over, checking over just in case)
      if(currentQuestionIndex >= questions.Count)
      {
      currentQuestionIndex = 0;
      }
      }
      I hope that helps or at least get's you started in the right direction! I might be a little off with some syntax, I don't have Unity in front of me at the moment.

    • @AzaiKang
      @AzaiKang 4 місяці тому

      @@jayometric thank you! that helps very much!

    • @miguelcarrizo3825
      @miguelcarrizo3825 4 місяці тому

      @@AzaiKang did you get it? it doesnt work for me :c

  • @Distriks
    @Distriks 7 місяців тому

    such a good tutorial, you shou´ve gotten way morw views, i belive you didnt because of how long the video is and the thumbnail could be better

  • @brahmantioputraumar3044
    @brahmantioputraumar3044 10 місяців тому

    how can i change the option with image? is that possible with this method?

    • @jayometric
      @jayometric  10 місяців тому

      Depending on which image you're trying to change (the background, the question boxes etc) you would just need to add which image you want it to be changed to in the set question values function. If you wanted a unique picture for each question you'd probably want to edit the QuestionData scriptable object to include a picture, though you'd have to set this for every question. Not a big deal but if you try to access this without setting one it will have an error when the game plays.
      At the top of the QuestionData script add
      public Image questionImage; (this could be any name you want, depending on what you're changing you could make it backgroundImage or anything really)
      Then inside QuestionSetup we can add a new Image variable, say it was for the background:
      private Image backgroundImage;
      Then, in the QuestionSetup you can add to the SetQuestionValues method to include
      backgroundImage = currentQuestion.questionImage; (make sure it's the same name as before if you named it something else)
      Then you'd have a new image for every question, whichever part you replace could use that. If you want it to change the background you'd reference the image and then change the Image with something like:
      background.image = backgroundImage.image;
      As long as the background is set as an image this would swap them when the question is set up.
      I hope that helps!

    • @brahmantioputraumar3044
      @brahmantioputraumar3044 10 місяців тому

      @@jayometric tysm thats helping me alot. but i have more question. how can i limit the count question to show up? example i have 50 question but i just want 10 random question to show every program run?

    • @jayometric
      @jayometric  9 місяців тому

      Sorry for the delay, I don't know why it didn't notify me of this weeks ago.
      You could either make it randomly pick 10 out of the 50 in a new list and then use that list for the questions to pick from there, or you could have it remove 40 randomly from the list on start. Every time the scene restarts it will have the original 50 again.
      Hope that helps.

  • @raimz2374
    @raimz2374 6 місяців тому

    Can I put an image for the question?

    • @jayometric
      @jayometric  6 місяців тому

      Yes. Instead of using a string, use an image. Then between questions instead of changing the text, you can swap the Image.sprite to a different one.
      You should be able to change the scriptable object to have a picture instead of a string for the question, but you might have to set them manually since they won't be part of the excel spreadsheet if you were importing them from csv. Hope that helps!

    • @raimz2374
      @raimz2374 6 місяців тому

      @@jayometric Sorry I'm still new here, is it still possible if I only want some of the questions have image and the other don't?

  • @jenelynvilando3493
    @jenelynvilando3493 7 місяців тому

    Is it possible to make this system into an application?

    • @jayometric
      @jayometric  7 місяців тому

      I don't see that being a problem. It will also work on touchscreens as it's just buttons and touch input works with those!
      The video sets up the framework so it can have things added around it (title and other scenes).

  • @Distriks
    @Distriks 7 місяців тому

    how can i show all the answers of the user at the end? to show him what he failed or got right?

    • @jayometric
      @jayometric  7 місяців тому +1

      We would need to make a way for the questions and answers to be stored. I would make a new script on a new GameObject, maybe named AnswerTracker. In this I would have a list of Questions, a list of Questions and a list of if those answers were correct.
      Something like this:
      [SerializeField] private List userQuestions;
      [SerializeField] private List userAnswers;
      [SerializeField] private List userIsCorrect;
      I would make a public method to add questions, answers and if the answer was correct to these lists,
      public void AddToTracker(string question, string answer, bool isCorrect)
      {
      userQuestions.add(question);
      userAnswers.add(answer);
      userIsCorrect.add(isCorrect);
      }
      Next, we need a way to get the question itself, right now it is private. You can just change it to public but I suggest making a Get method for this.
      Add a method to QuestionSetup such as:
      public string GetCurrentQuestion()
      {
      return currentQuestion.question;
      }
      Then we can add to the AnswerButton script, add a variable for the AnswerTracker such as:
      [SerializeField] private AnswerTracker answerTracker;
      Next, we need to call the method we made to fill in the questions and answers. We can use this in the OnClick() method.
      This can be anywhere in this method outside of an if or else statement.
      answerTracker.add(questionSetup.GetCurrentQuestion(), answerText.text, isCorrect);
      This will add the current question, the answer on the button selected and if the answer selected is correct to the AnswerTracker list.
      Then set these all individually on the 4 buttons by dragging the game object in the inspector.
      The last part is making UI that shows the questions and answers that were picked along with if it as correct.
      Just to make sure it works before making the UI I would add a debug to see all the info is working. Since it should display after all of the qustions are done we can add this to the OnClick method checking the questionSetup questions count.
      Inside the AnswerButton script OnClick method, add a section for
      if(questionSetup.questions.count == 0)
      {
      for (int i = 0; i < userQuestions.count; i++)
      {
      Debug.Log($“Question {i}: {userQuestions[i]}, answer: {userAnswers[i]}, correct answer: {userIsCorrect[i]}“);
      }
      }
      This is just one example of what can be done, there's plenty of ways to do it as long as you have the information stored to reference. I don’t have my computer available to try what I wrote out as it’s being repaired but I hope this is helpful! I may have some things the wrong capitalization but intellisense should hopefully fix those when you try it.

    • @Distriks
      @Distriks 7 місяців тому +1

      @@jayometric thank you so much, i will try all that tomorrow on what i am working on in my internship, and let you know how it went, thank you again for the fast response.

    • @Distriks
      @Distriks 7 місяців тому +1

      @@jayometric it worked very well, thanks

    • @Distriks
      @Distriks 7 місяців тому +1

      @@jayometric but to show the results in the UI I will need to make another code, correct? maybe named ResultsScreen. I'm thinking of making a counter to know how many questions i responded to, use the number to make a X amount of prefabs of my UI and then put all the information i got from your code into the prefabs, then get everything inside a scroll so i can see all the answers, what do you think? am i thinking correctly? and sorry if my English is bad.

    • @jayometric
      @jayometric  7 місяців тому +1

      I'm glad that worked so far! That should be okay, that can be done so many ways that it's probably best to try out the ways that make sense to you. If it ends up not working then you can see why it didn't and adjust the solution to the problem.
      With all of the data ready it's just figuring out what way you want to use it.
      Good luck with it!

  • @Hoetech_ltd
    @Hoetech_ltd 4 місяці тому

    What if i what to get the question from ai

    • @jayometric
      @jayometric  4 місяці тому

      Offhand I'm not exactly sure, you might need to find an AI to integrate, it might be a bit weird to get it to make correct and wrong answers. This setup worked under the assumption questions were already entered in a CSV. If you asked AI to generate questions then input them to CSV it would work. Not sure how well the AI will do making up wrong answers, check them if you try it.