Simple visual novel game sample for Unity. Can display a character and background images and text by ScriptableObject. I hope you can customize this sample easily!
The function for now.
- Create plots by ScriptableObject (Can set data on Unity inspecter).
- Display one character image on three position (left, center and right of screen).
- Display text by the four way (Title, conversation, quote, discription).
I may add other function such a select command for a branch story or a simple action game in novel, but at now this is just for displaying a text and picture.
Import this project or StoryData.cs and StoryManager.cs in Assets/Script/*.
Create stroy plot from Create/Story/Createplot of Project menu into Resources/StoryPlot/*. (Can change this path if fixing load path in StoryManager.cs)
Make asset’s name StoryN(int numbe) and then set story data. (Get this file from Resources by int number)
- Size: The length of this story
- Scene text: Displayed text
- Text role: Change the position and size of text
- Model: Displayed image (*1)
- Model Number: Change the picture of model (*2)
- Speaker: Displayed the name avobe conversation
- ModelPos: Change the model position
- Field: Displayed background image (*1)
- Field Number: Change the picture of field (*2)
*1 Need to set some name in StoryData.cs in after use this script.
*2 If a project need not change the image type (Ex. angry face, joy face), remove this part from StoryData.cs.
Import a image into Resource/StoryImage/*.
Attach to a object in hierarchy and set some ui.
Add event trriger to the field image and regsiter LoadNextPart of StoryManager.cs to PointerUP event.
Use http://www.yutorilife.com/ 's image in this project.