Directly change serialized field name LevelId to levelId in all scenes.
Requires Unity Force Text serialization.
Requires GNU tools. Tested on OSX. Note Windows @code users can run WSL Linux directly in the editor terminal!
| // Take up to 10 screenshots per session, then start overwriting | |
| private IEnumerator Capture(string path=null, string filename=null) { | |
| Log.Debug(string.Format("ScreenCapture.Capture(path: {0}, filename: {1}) Settings.DataPath={0}", path, filename, Settings.DataPath)); | |
| screenShotCount += 1; | |
| if (screenShotCount > 10) { | |
| screenShotCount = 1; | |
| } | |
| if (filename == null) { |
| /// <summary> | |
| /// The root data folder. Used by the entire application to read and write | |
| /// data, not just used by the Settings class. This is an absolute path. | |
| /// </summary> | |
| #if UNITY_EDITOR | |
| // Each product has its own folder in tmp when running in the editor. | |
| // This allows audio and other debug settings to be separate from | |
| // standalone builds on the same development machine. | |
| // NOTE: The hard-coded forward slash should work on Windows, Linux, and OSX. | |
| public static string DataPath = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), "tmp/settings/" + Application.productName); |
| /// <summary> | |
| /// Collider cache for non allocating physics calls. Lazy loaded. | |
| /// </summary> | |
| /// <example> | |
| /// Usage | |
| /// <code> | |
| /// float radius = 0.2f; | |
| /// int colliderCount = Physics.OverlapSphereNonAlloc(transform.position, radius: radius, results: ColliderCache); | |
| /// for (int i = 0; i<colliderCount; i++) { | |
| /// ... |
| desc "osx", "create distribution package for Mac OS X" | |
| method_option :dmg, :type => :boolean, :desc => "Create a DMG container instead of a zip file" | |
| def osx | |
| set_instance_variables | |
| # clean staging folder | |
| clean | |
| osx_copy_to_staging(@product) |