• 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 /
avatar image
Question by Wolfie5493 · Sep 12, 2015 at 05:49 PM · c#scripting beginnerscriptingbasics

Best way to store large quantities of information

What's the best way to store large quantities of data?

Not too sure if t$$anonymous$$s is beyond beginner skill but whatever...

My project consists of a A LOT of skills, and hard-coding each of them individually is getting a little frustrating. Basically, what i'm look for is a more efficient way to create, store and call the many variables that make up each individual skill. Somet$$anonymous$$ng like a xls file where I can just input the information onto a spreadsheet, have my project "Search" for the skills and populate or update the "list" or array in the scripts. Kinda like synchronizing between script and spreadsheet... anyway...

At the moment i'm just using enums and creating skills for each enum with the base variables, but the hard coding is tedious and is only going to get worse as the list of skills is potentially huge.

If you could recommend me to any tutorials as well that will cover the topic, I would appreciate that.

Thanks

Comment

People who like this

0 Show 1
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 getyour411 · Sep 12, 2015 at 07:38 PM 0
Share

have you searched for tuts on using a database? XML?

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by SarperS · Sep 12, 2015 at 07:40 PM

You can actually use xls files, here are some top results from a 2 seconds search

https://github.com/kimsama/Unity-QuickSheet https://www.assetstore.unity3d.com/en/#!/search/excel

Comment

People who like this

0 Show 1 · Share
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 Wolfie5493 · Sep 13, 2015 at 02:22 PM 0
Share

Looking into XML coding, it will be the best method, i think, for what I want to achieve.

What I want to do is to be able to add skills to the document, and have Unity automatically update the skill list to be accessed by the character/player with little hard coding of the actual variables that make up the skills. Naturally the skills will be an array of sorts, but what would the best method be to achieving this? Using dictionaries/lists, or what would your suggestion be?

avatar image

Answer by Serdan · Sep 13, 2015 at 06:44 PM

Use ScriptableObject. It's Unity's built-in method for handling that kind of data. You can easily make a custom editor in Unity to create and edit these objects and Unity will automatically save changes when you save the project.

https://unity3d.com/learn/tutorials/modules/beginner/live-training-arc$$anonymous$$ve/scriptable-objects

Comment

People who like this

0 Show 4 · Share
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 Wolfie5493 · Sep 13, 2015 at 08:15 PM 0
Share

Can scriptable objects be instanced? It isn't just the player that will be accessing this, NPC's will as well, so it's vital that the script can be instanced to multiple parties.

avatar image SarperS Wolfie5493 · Sep 13, 2015 at 08:18 PM 0
Share

You can actually save your own scriptable objects as asset files and reuse them, reference to them from any other class you have in your game. Take a look at this http://wiki.unity3d.com/index.php/CreateScriptableObjectAsset2

avatar image Wolfie5493 SarperS · Sep 13, 2015 at 08:22 PM 0
Share

Would I still use an XML file with it?

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Must I attach every script to a gameobject in order to work ? 2 Answers

Multiple Cars not working 1 Answer

Different language scripts - how to avoid trouble? 1 Answer

Distribute terrain in zones 3 Answers

How to get multiple string values from override ToString()? 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