Join Harrison Ferrone for an in-depth discussion in this video Create the JsonFactory, part of Unity 5: Build a Character Dialogue System.
- [Narrator] Now that we have our images,…our JSON file, and our narrative event class all set up,…we can create a factory script that will read data…from our JSON file, and map it to a narrative event.…Back in Unity, I'm going to create a new C# script…by right-clicking, Create, C# Script.…I'm going to name this JSONFactory.…Go ahead and open this up in MonoDevelop,…and clear out everything except the using directives.…Save that off.…
We want to consider what we're going to be using…this class for and what architectural decisions…make the most sense.…So let's start with some constraints.…We need a list of our JSON files…and their file path extensions.…Only the Narrative Manager script…should be able to call the JSON factory class.…That script is something we'll be working on later.…Last, the class should act as a black box,…taking in a scene number, and returning…a narrative event object.…
Whatever script we initialize,…or call the factory class from, should have no idea…how or what is happening,…which is why we call the design a black box.…
- Fostering engagement and an emotional investment
- Starting a project from scratch
- Importing the LitJSON library
- Using TexturePacker
- Creating the narrative event class
- Creating and finishing the JsonFactory
- Building a GUI animation system
- Writing and finishing the Panel Manager
- Adding player input and finishing touches
Skill Level Beginner
Building Custom Tools to Extend the Unity IDEwith Jesse Freeman2h 11m Intermediate
Careers in the Game Industrywith Christian Bradley1h 19m Beginner
1. Narrative Game Design Primer
2. Project Setup
3. Import Assets from External Resources
4. Build a GUI Animation System
5. Assemble the Narrative System
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.