Current Version: 2.0 This is a fairly simple .ini file reader/writer. This greatly simplifies the reading and editing of config files. It includes parsers for most of Unity's DataTypes and some basic Mono DataTypes. It includes the ability to have default values if the system can not find the specified value. It also supports [Sections]. Name: INISystem Source Code: C# Price: $ 10 Unity Version: 3.4.1 Works with Unity Free Asset Store Link. Issue Tracker - For bugs and features requests. Change Log: Version 2.0 Major breaking changes in this version. The INISystem and INIHelper classes are gone. A new static INIFile class is available for reading and writing INI files. A new parent class INIContent that contains most standard DataTypes and a sub-class INIUnity that contains most of Unity's DataTypes. Version 1.11 Small bug fixes Namespace has changed to CorruptedSmileStudio.INI Base class is now compiled in a DLL Version 1.1 Added some basic data-type parsers to the base class Floats Ints Bools Added some parsers of Unity's data-types Color Vector2 Vector3 Quaternion Version 1.0 Reads ini files Edits ini files Creates ini files Option for separate thread for file parsing Regards, Garth (Corrupted Smile Studio)
INISystem has been approved, head on over to the asset store to get file based settings enabled in your game. http://u3d.as/content/corrupted-smile-studio/inisystem
I need this.But, can we read strings only? or did you already implement some float, vector, color...etc parsers? How does it work?
There are currently no parsers. In order to try keep the system as easy to use as possible it will only read strings, so all parsing will have to be done by you. However, I might implement some basic parsing of ints, floats and so on in the future if there is demand for it. For loading the usage is as simple as: Code (csharp): INISystem ini = new INISystem(); // Returns true if file loaded successfully. if(ini.LoadFile(pathToIniFile)) Debug.Log("File Loaded"); else Debug.Log("File not Loaded"); // Default value is optional. string exampleText = ini.Get("exampleText", "SectionName", "Default value if no value is found"); int someValue = int.Parse(ini.Get("someValue", "AnotherSection", "10"); The for making changes, creating and so on: Code (csharp): INISystem ini = new INISystem(); ini.Change("exampleText", "New Text", "SectionName"); ini.Change("someValue", newValue.ToString(), "AnotherSection"); if(ini.Save(pathToFile)) Debug.Log("Save successful"); else Debug.Log("Save unsuccessful"); Regards, Garth
I did some work on various parsers for some of Unity's main data-types (Color, Vector2, Vector3, Quaternion). I put these into a static INIHelper class. When you call the methods GetVector2 for example, you will need to pass in a reference to the INISystem class that you have created. I also added some basic data-types parsers for floats, ints and bools to the base class. I've uploaded the new version to Unity's Asset Store, hopefully it will be available sometime this week. Regards, Garth
I just pushed a bug fix release to the Asset Store. This version will bring with it one or two breaking changes. The most important one being that all classes for INISystem are now under CorruptedSmileStudio.INI namespace. So you will need to include using CorruptedSmileStudio.INI; At the top of files creating a INISystem class or using the new INIHelper class. In this version the INISystem class is compiled into a DLL to try and ensure that any bugs arising from the system are not caused by other programmers chopping the code. The INIHelper class is not included in the DLL, which makes it possible for you to add your own parsers to the class. Regards, Garth
I was hoping that those who have purchased this and used it, wouldn't mind writing a review on the Asset Store for it. Or in fact just posting some feedback here. Regards, Garth
I have made some breaking changes to the system in a version 2.0 release that is currently awaiting Unity's Approval on the Asset Store. Change Log: B]Version 2.0[/B] The INISystem and INIHelper classes are gone. A new static INIFile class is available for reading and writing INI files. A new parent class INIContent that contains most standard DataTypes and a sub-class INIUnity that contains most of Unity's DataTypes. Still at the low price of $10. Regards, Garth
Thanks, hope you put it to good use, if you come across any issues or feature requests just let me know. Regards, Garth