So over the past two weeks, I’ve made some good progress on the Data Manager.

To start, the Data Manager is now able to create a DataType from a CSV. You can select any CSV in your asset folder and have it generate a DataType script based on the selected CSV as well as create all the instances of that DataType in the CSV.

The example CSV is on the top and it’s generated DataType script is on the bottom.

I haven’t tested this with all fields and I’m sure there will be issues when referencing some Unity specific types. At the moment, the system runs through a list of types a field can be when reading the CSV. When the system encounters a type it doesn’t have in its list, it creates an enumeration for that field and adds it to the list as an enum. This could work if the list contained more types but that is something I will address in the future.

The next thing I started working on is having both the CSV and the DataType Objects update each other when changes are made. The way I thought about it, I broke it down into six parts.

  • Allowing changes in values within the CSV to change the values in the DataType Objects.
  • Allowing changes in values within the DataType Objects to change the values in the CSV.
  • Allowing new fields in the CSV to be added to the DataType.
  • Allowing new fields in the DataType to be added to the CSVs.
  • Allowing new entries in the CSV to be generated as DataType Objects.
  • Allowing new DataType Objects to be added to the CSV as new entries.

In regards to these parts, I’ve already completed the first two. After one is updated, it will write to its data in the other file(s). Adding new files to the DataType files is going to be tricky but not impossible. As for the new entries/new DataType Objects, that shouldn’t be much of an issue.

I plan to make progress towards this list as well as a few other tasks in the coming weeks. If you’re interested in seeing more on what I do, be sure to keep an eye out for my future updates.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s