D'Dialogue System by DoublSB, MIT LICENCE.
한글로 문서를 보고 싶은 경우, 이 링크로 이동하세요. 링크
- Import D’Dialogue System.
- Find the ‘DialogAsset’ prefab which in Asseet/DialogAsset/Prefab folder.
- Move the ‘DialogAsset’ prefab to the scene which you want.
- Move the ‘Character’ prefab to the DialogAsset/Characters.
- Set the sprite you want to display to Emotion -> Normal.
- Change gameobject name to your character name.
- The basic setup is complete! Get DialogManager and call method ‘Show’!
- Using Doublsb.Dialog namespace.
- Create new dialogData. Input two parameters, text, character name.
- Call Show method with created DialogData.
You can use various commands just by editing the text.
All commands begin and end with slash character. ( / )
Adjusting text speed.
command | description |
---|---|
/speed:up/ | Reducing text delay by 0.25 seconds. |
/speed:down/ | Increasing text delay by 0.25 seconds. |
/speed:init/ | Changing text delay to initial value. |
/speed:(float)/ | Changing text delay to float value. |
Adjusting size within the text.
command | description |
---|---|
/size:up/ | Increasing text size by 10. |
/size:down/ | Decreasing text size by 10. |
/size:init/ | Changing text size to initial value. |
/size:(int)/ | Changing text size to int value. |
Pause the printing until the window is clicked.
command | description |
---|---|
/click/ | Pause the printing until the window is clicked. |
Forces the window to close without interaction.
command | description |
---|---|
/close/ | Forces the window to close without interaction. |
Pause the printing for amount of time.
command | description |
---|---|
/wait:(float)/ | Pause the printing for amount of time. |
Change color within the text.
command | description |
---|---|
/color:(Color Name)/ | Change color with supported color names. Check out ‘Supported colors’ in Unity’s official documentation. link |
/color:(Hex Code)/ | Change color with hex code. Ex) /color:#1fcbfc/ |
Change the character’s sprite while printing text.
command | description |
---|---|
/emote:(emote name)/ | Change the character sprite with emote name. |
If you want to add new emotions to your character, follow the steps.
- Open the inspector of character which you want to add emotions.
- Enter the emotion’s name and click create.
- Change new emotion’s sprite.
- Use emote command to display new emotion.
Play the sound while printing text.
command | description |
---|---|
/emote:(sound name)/ | Play the sound with sound name. |
If you want to play sound, you need to set Call SE. Follow the steps.
- Open the inspector of character and add sound object.
- Now we can use sound command with sound object’s name.
You can display choice items in the dialogue.
Add a choice item to the SelectList
of the DialogData
class.
Use callbacks to make the dialogue react differently depending on the result.
If you add Chat SE, sound will be play for each delay. This feature allows you to make different chat sounds for each character. If you set multiple ‘Chat Se’, one of the sounds will be play randomly for each delay.
You can set callback when the window is hidden. When the message is over and the window is clicked, the window is hidden. After that, the callback is invoked.
If you set ‘isSkippable’ to false, users cannot skip text even if you click on the window.
Set DialogData.Format.DefaultSize to change default text size.
Set default delay time at Dialog Manager inspector.