• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Apr 18, 2013 at 07:57 AM by AlucardJay for the following reason:

Too subjective and argumentative

avatar image
Question by CarbonBased · Apr 17, 2013 at 08:50 PM · javascriptdatabasexmlrpgdialogue

Dialogue strategy?

Hi All,

So I'm trying to plan out how I'd like to do dialogue in a game I'm working on. If people don't mind sharing, how have other people handled dialogue?

My initial thoughts were to use XML (I deal with web a lot, so when all you've got is a hammer...), figuring that I'd have a character's actual dialogue stored along with an ID number or something, which I use to pull the appropriate text. Thus, instead of a character saying "Hi, nice to meet you", it just pulls dialogue ID#3 (or whatever), keeping text separate from the code. Easy revisions / alterations, right? Too bad XML doesn't seem to be supported, or if it, I'm not skilled enough to jam it into Unity.

I've read up on another solution (sqlite). Without having actually done it, I like the database idea, and it could also work with some other aspects of this game (a db of items, for example) but that seems like it might be a bit much at this stage.

Right now, the easiest answer seems to be to have a bunch of text in a script somewhere. So I write a function GetDialogue(x), where x identifies which dialogue block to pull.

BUT dialogue seems to be a fairly popular topic, so I wanted to see if people had better ideas?

Comment

People who like this

0 Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image iwaldrop · Apr 18, 2013 at 04:54 AM 0
Share

It's a pretty wide ranging question. But you can totally use XML in Unity. Checkout System.Xml. There are a lot of methods for dealing with and traversing an XML tree.

avatar image AlucardJay · Apr 18, 2013 at 07:57 AM 0
Share

This question isn't related to Unity, and therefore is not suitable for Unity Answers.

  • Unity Answers is a place for questions that can be answered! Avoid asking questions here that are subjective, argumentative, or require extended discussion.

  • Unity Forums is a place for discussions, opinions, showing off your work, getting feedback, and general community chatter.

  • http://answers.unity3d.com/page/faq.html

Please post discussion questions on the forum; UnityAnswers is for specific development questions that have objective answers.

0 Replies

  • Sort: 

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Storing Inventory Item Properties 2 Answers

VR RPG like dialogue system 1 Answer

XML File - Step 1? 1 Answer

Database-like arrays 1 Answer

External mapping in Unity ? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges