[VRChat]How to set up object etc. display ON/OFF by quiz

VRChat
スポンサーリンク

Introduction

In this article, show you how to turn on/off a specific object with a quiz.
This is an SDK3 world gimmick.

I will proceed on the assumption that world exists.
(World SDK3, assuming Udon Sharp already implemented.)

※The writer is Japanese and translates using DeepL.
There may be some strange translations.

important point

About the object to be displayed
This example, use a portal.

This is only an example.
Cube and other object can also be used.

Quiz import

↓Access this pagee

https://booth.pm/ja/items/3050989

Select the language button in the upper right corner.
Translate Booth Web page into English.

Please Click [Free Download]

All Extract the DL Zip.

Drag and drop the .unitypackage inside to the world’s Project.

Make sure everything is checked.
Select Import.

Import the required features by selecting Import TMP Essentials → Import TMP Examples & Extras.

Open Project → Assets → ax-item → Quiz.
Make sure Quiz.prefab is there.
Drag and drop Quiz.prefab into the Hierarchy

Select Quiz in Hierarchy.
Check Inspector.
This translations are as follows.

Configure Inspector as follows

必須正解数 = 2
(Required number of correct answers)

許容誤答数 = 0
(Allowable number of wrong answers)

解説の表示 → Uncheck
(Show explanations)

最終成績の表示 → Uncheck
(Display final grades)

スコアの表示 → Uncheck
(Display score)

The required number of correct answers is 2 because 2 is the most common.
(in the Japanese world)
Feel free to change it if you want.

Right-click on Quiz in the Hierarchy.
Select Unpack Prefab.

Move『これを複製してQuizItemに入れる』into QuizItem.
(Translation:duplicate this and put in QuizItem)

Select 『これを複製してQuizItemに入れる』.
Set the question text and choices from Inspector.
Set Answer_index Size to 1 and Element 0 to 0.
Only the answer for Element 0 will be correct.

Select 『これを複製してQuizItemに入れる』In Hierarchy.
Press Ctrl+D to duplicate.

Set up a new question text and choices.
Repeat this for as many questions as you want.

Open Quiz.
Select failed.
Check the box to activate the display.

Open the “Failed” and select “result-text”.
From Inspector → TextMeshPro – Text, enter the text that will be displayed if a mistake is made.
(It can be something like “Please Rejoin if you Retry again”).

Uncheck failed and hide it.
Select success → check and display.

Open the “success” and select “result-text”.
Inspector → TextMeshPro – Enter the text that will be displayed if the answer is correct from Text.

Upload VRChat.

This completes the introduction of the quiz.

Displaying objects by Quiz success

The portal is displayed this time as an object.
Please click here introduction to the Portal.

If Don’t use Portal Right-click on Hierarchy.
Create → Cube to create a Cube.

Select Quiz in Hierarchy.
Open 『有効化オブジェクト』 in 『結果表示 – 合格』(Select ▶ at Left)

Set Size to 1.

Drag & drop portal in Hierarchy to Element 0.
(or any objects.)

Select the object assigned in the Hierarchy.
Uncheck and initially hide it.

VRChat Upload.
Select Correct.
When the quiz is answered correctly, portals and other objects will be displayed.

This completes Displaying objects by Quiz success

Hide objects by Quiz Failed

Create → Cube to create a Cube.

Select Quiz in Hierarchy.

Open 『無効化オブジェクト』 in 『結果表示 – 不合格』(Select ▶ at Left).
Set Size to 1.

Drag & drop Cube in Hierarchy to Element 0.
(or any objects.)

Move Cube.

Upload VRChat.
Select Incorrect.
If you answer the quiz incorrectly, the display of objects will disappear.

This completes Displaying objects by Quiz success

Ending

In this article, we showed you how to turn certain objects on and off in the quiz.
Other useful know-how for VRChat world production is also explained.

Please take a look at this page as well.

コメント

タイトルとURLをコピーしました