Comments on iniParser.cs

  • The iniParser class is derived from MonoBehaviour. This means it can be attached to game objects as a component.
  • The iniFileName public variable is a string representing the full name (minus the path and extension) of the INI file to be saved and loaded.
  • The load function opens an INI file, reads its contents, and parses those into an array of key-value pairs (Keys and Vals). This function is called once during Awake, as the level begins, to load the contents of a specified INI file.
  • The Get function lets you search for an extant key by name and then returns the associated value. This function should only be called after running load to open the contents of an INI file into the memory.
  • The Application.dataPath native ...

Get Mastering Unity 2017 Game Development with C# - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.