Giter Site home page Giter Site logo

configbuildtool's Introduction

Unity Config Build Tool

This unity plugin Automate project build for Android and IOS using pre-config propertites during pre-build, post-build and during gameplay.

Installation

via Package Manager (Add package from git url):

https://github.com/onedevapp/ConfigBuildTool.git

Why would I need this?

Ever wanted to take a production build either for Android or IOS without setting up additional work or check list to pre or post build with OneClick?, Yes OneClick thats possible with this config build tool. Not just production, one can take build of their choice with this tool.

How it works? This tool creates CustomBuildConfig.properties and Keystore.properties (Optional) in the ProjectSettings folder, where CustomBuildConfig properties file has all the production level settings and keystore properties file has production keystore properties where these properties will be used when "Release Build" Toggle is checked in the config build tool else options selected in the tool will be used. Available Options are

Pre-Build

  • Application.version - Customizable with "Major.Minor.Patch" version automate with incremental "PlayerSettings.Android.bundleVersionCode" for Android or "PlayerSettings.iOS.buildNumber" for IOS
  • Changes Log - Track whenever a version changes happened with mandatory changes log info about the build.
  • GameConfigSO - A ScriptableObject file configurator for Local/Production URLs, App version code etc., can be selectable/switchable. Read More
  • Addressable - Build Script and Profile can be selectable/ switchable
  • Android Specific :
    • This tool builds AAB / APK
    • When "Release Build" selected, Split Binary option can be configurable and KeyStore properties will be mandatory
  • Enable Logs - This tool also provide a way to remove and add logs easily with DebugX for Build. For Production this option will be disabled but for development/staging build, one can toggle it.
  • Show Build Folder Dialog - If selected then Build save location window will shown else creates a Build Folder outside the Project Root folder and save in new folder without a prompt.

Post-Build

For Android:

Its just a clean up, removes keystore values from PlayerSettings. Why so? For Security purpose, keystore values are not recommended to publish through github, thats why keystore values are saved explicitly in keystore.properties files which needs to ignore at .gitignore file.

# Add this at .gitignore (Optional)
keystore.properties

For IOS:

  • Firebase Deeplink - Deeplink URL be set automatically at ProjectCapabilityManager.AddAssociatedDomains and Info.plist where URL can be configurable at CustomBuildConfig.properties and firebase-dynamic-links-unity package was installed.
  • Firebase Messaging - Enable ProjectCapabilityManager.AddPushNotifications when firebase-messaging-unity package was installed

On GamePlay

GameConfigSO - An Editor level and Runtime Config SO with Base API Url, App Version Code where for Android its "PlayerSettings.Android.bundleVersionCode" and for IOS its "PlayerSettings.iOS.buildNumber" along with Additional Config Propertites with KeyValue Pair.

Note

Note that GameConfigSO uses singleton instance and will be added to PreloadedAssets automatically, so no need to load SO file manually or to read from resouce folder.

To read values at Runtime:

GameConfigSO.Instance.GetBaseApiUrl()           //Returns URL configured at SO
GameConfigSO.Instance.GetAppServerCode()        //Returns Server Code P -Prod, D -Development, S -Staging and T -Testing 
GameConfigSO.Instance.GetAppVersionCode()       //Returns App Version code
GameConfigSO.Instance.GetConfigProperty("Key")  //Returns Value based on key provided in Additional config properties

Debug Logs

Replace any calls to Debug. (or UnityEngine.Debug.) with "DebugX." Thats it! the arguments have been left as-is, with any additions being made as overloads, so nothing should need to change about your current project set up at all.

DebugX.Log("My Log");   //Not just Log, wrapper functions for all Unity's Debug logging calls

Note:

  • To make GameConfigSO works in Editor level for switchable, GameConfigSelector Script should attach to any GameObject.
  • All GameConfigSO should be available only in "Assets/_GameConfigs" folder.
  • KeyStore path can be Relative Path or Absolute path.
  • Game Config SO and Addressable BuildScript, Profiles are platform specific in CustomBuildConfig.properties
  • Other than Build, available options are
    • Build (With Addressables) - Uses either selected or config properties
    • Ignore and Build (With Addressables) - Ignores selected properties and tires to take build with Addressables
    • Ignore and Build Only - Ignores selected properties and tires to take build
    • Addressable Only - Takes only addressable

ScreenShots

EditConfigScreen DefaultScreen
ReleaseScreen GameConfigSelector Editor
--------------------------------------- ---------------------------------------
GameConfigSO EditConfigScreen

๐Ÿ‘ Contributions

Any contributions are welcome!

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create New Pull Request



configbuildtool's People

Contributors

onedevapp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.