Thursday, October 11, 2012

Database Tools

Databases and Unity present some unique problems.  First, most databases require a static definition to consistently access the database.  Unity dynamically generates data structures.  If you create a class consisting of just a couple of variables, it varies somewhat as a structure at each new instance.  The easiest solution is to create the database access routines in C# and build it as a .dll file.  Unfortunately, the database I chose can only be used in Unity due to certain security features.  This is slowing down the development of each mission.  I have two options, neither of which is completely ideal.

The first option is to create another program to manage databases.  This will require me to create another database in another database, like MySQL or Access.  At this point, I will need to create a .dll file for Unity access.  Originally, this was due to the need to transfer the "other" database into the current database.  However, creating a .dll file would make the original database irrelavent.  I would just scrap it and use the new database. 

The second option is to create a trigger generator within Unity.  I would create a mission without the trigger manager.  Instead, the trigger generator would cycle through each object and save it the database.  This would work for time zero instantiations.  However, I still haven't figured out how to create the other triggers.  I might have to go with option #1 to augment this system. 

In either case, I need to explore implementing a different database...

No comments:

Post a Comment