Project Description

Concept

Scriptable Converter is a in development tool which converts .CSV and .XML file into Scriptable Objects in Unity.

This tool is very useful in a pipeline where non-coder people have to work on game data.

It allows them to define and tweak those datas on Microsoft Excel, for example, and then convert it as ScriptableObject in Unity.

How-to

– Download and put the unity package directly into your Unity project.

– Create a ScriptableObject script to store your data and generate an empty one.

– Use the tool to export the empty ScriptableObject to get a template of .CSV or .XML.

– Fill the .CSV or .XML with your data.

– Import the file and let the tool create instances of the Scriptable Object with you data.

Improvements and Issues

  •    Of course, .CSV format can’t manage generics such as List. No Unity types either as you can’t set, for example, a GameObject in an Excel…
  •    The .CSV method works perfectly ! You can easily make tons of lines in your .CSV and Unity will create as many instances as you need.
  •    The .XML format is less easy to work on actually. The .NET XML library doesn’t allow us to be flexible and currently creates issues:

– The .XML version works but only with one scriptable object per file for now.

– Moreover, the actual XML serialization forces us to specify the class name of the scriptable object we want to import.

To fix it, I will probably need to code a home made XML serializer which will include the class name and set the nodes to allow multiple objects in a single file.

  •    I will include JSON format in a forthcoming version.

More

Click here to download it

 

Project Details

Categories:

Tags: