Trivia Question System in Unity Tutorial

preview_player
Показать описание


Timestamps:

0:00 - Intro
0:27 - Setup
0:55 - QuestionData scriptable object class
2:27 - Where sciptable objects go and how to make them
3:23 - Answer Text explanation
4:00 - AnswerButton script
5:33 - Set up Answers Prefab
6:29 - QuestionSetup script
15:39 - QuestionSetup added to object
18:34 - Adding questions by CSV
19:45 - CSVtoSO script
26:34 - Where CSV files go
26:40 - Utilities menu - Generate Questions
26:58 - Sharing violation error
29:13 - Outro
Рекомендации по теме
Комментарии
Автор

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');

andreu
Автор

Such a great video!

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

vaxtrixradicalbro
Автор

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

fulgencejuniorlohore
Автор

Thanks a lot, this video was very helpful!

JoaoPortal
Автор

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

fred
Автор

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?

xSmap
Автор

Will this still work even if I build this on mobile app since there is a path?

RheaC-yn
Автор

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!

eunoah
Автор

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 ?

hemang.s
Автор

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!

esjytmp
Автор

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 =
private static string questionsPath =

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!

Jonesthecasey
Автор

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

felaniiqhwan
Автор

Hi, how long does it take to make a scoring system based on whether you answered correctly or incorrectly? Thanks

donpilo
Автор

Quick question when i want to generate my questions i get the following error
IndexOutOfRangeException: Index was outside the bounds of the array.
CVStoSO.GeneratePhrases () (at

This is the line its reffering to questionData.question = splitData[1];

How do i fix this error?

janickdragt
Автор

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

AgniKai-htbv
Автор

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?

karauhlinger
Автор

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

unexpectedpause
Автор

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

JessieA.I-cbuq
Автор

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

penguine
Автор

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 <3

AzaiKang
visit shbcf.ru