unity对话插件教程 VISUAL NOVEL,RPG CONVERSATION SYSTEM(4)

2019-04-15 16:23

If(DialogManager.conversationComplete && DialogManager.GetCurrentPath().leadsToGameOver) { //DO GAME OVER STUFF. } Step 5 – Hit the new line button and make a new line.

Select a character from the dropdown box, if you followed the character tutorial you should notice your new character in the list. The text field next to the character selected is what they will say on that line. So fill it out with something simple like “Hello”. Add voice to the voice field if you have a voice file.

Step 6 – Add a few more lines to this path.

Step 7 – Create a new path and add some lines to it as you wish.

16

Step 8 – Now go back to your first path and press ‘Add Question to Path’. The question will automatically inherit the last line for the question that is asked and will generate at least one default response. Add one more response by clicking ‘Add Response’ once so your question looks something like mine…

Go ahead and fill out the text values to the responses while you are in there.

17

Step 9 – Pick where you want to make the path go to, you can go to ANY OTHER path in any scene.

I’m going to make my first response lead to Path 2, and my second response loop back round to the first path.

Step 10 – Press the save button at the top of the window and save into XMLScripts>User>name.xml Step 11- Close the window. Select the GUICamera, in the inspector (Dialog Manager) select the XML Script foldout and assign your newly created XML file to the field. Step 12 –Hit play and watch your script work! Remember to save!

18

TUTORIAL – CREATING A CUSTOM DIALOG BOX

So you want to change the look and feel of the conversation, follow this tutorial to see how. I’m not going to go into specifics on how to change fonts etc. There is plenty out there on Unity for that.

Step 1 – Open the scene you saved from the previous tutorial. Or open ‘SampleCutscene’ from the Samples. Step 2 – Drag in ‘DefaultDialog’ to the Hierarchy, this is obtained from Prefabs>Dialogs.

Step 3- Change the textures as you wish by dragging them onto each element in the Dialog box. You can also reposition elements as you see fit. See before and after.

19

Step 4 – Take a look in the inspector, you can assign different values to the various settings to meet your needs as you see fit.

Step 5 – You will also need to change the appearance of the save/load/answer prefabs and assign them as needed.

20


unity对话插件教程 VISUAL NOVEL,RPG CONVERSATION SYSTEM(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:七年级英语新目标下Unit 12测试题

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: