All Projects → LotteMakesStuff → LMS.Version

LotteMakesStuff / LMS.Version

Licence: MIT license
Super simple auto build version tool

Programming Languages

ShaderLab
938 projects
C#
18002 projects
HLSL
714 projects

Projects that are alternatives of or similar to LMS.Version

ScriptableObjectMultiSelectDropdown
Multi Select Dropdown for ScriptableObjects
Stars: ✭ 18 (-55%)
Mutual labels:  unity-editor, unity3d-plugin
Unity Script Collection
A maintained collection of useful & free unity scripts / library's / plugins and extensions
Stars: ✭ 3,640 (+9000%)
Mutual labels:  unity-editor, unity3d-plugin
CategoryTool
Unity Editor tool to create Categories in the Hierarchy. The Categories work as dividers between GameObjects.
Stars: ✭ 47 (+17.5%)
Mutual labels:  unity-editor, unity3d-plugin
TsukiSuite
A toolsuite created to make Unity development easier
Stars: ✭ 23 (-42.5%)
Mutual labels:  unity-editor, unity3d-plugin
Extosc
extOSC is a tool dedicated to simplify creation of applications in Unity with OSC protocol usage.
Stars: ✭ 69 (+72.5%)
Mutual labels:  unity-editor, unity3d-plugin
t4-templates-unity3d
T4 Text Template Processor for Unity3D
Stars: ✭ 75 (+87.5%)
Mutual labels:  unity-editor, unity3d-plugin
ar-simulation
AR Simulation for Unity • Right in the Editor • Minimally Invasive
Stars: ✭ 101 (+152.5%)
Mutual labels:  unity-editor, unity3d-plugin
Unity-IMGUI-TreeView
Simple Tree View implementation for IMGUI (Editor GUI) in Unity. Includes a special type for working with asset paths, but base data structure and view can be easily extended to support anything.
Stars: ✭ 73 (+82.5%)
Mutual labels:  unity-editor, unity3d-plugin
Awesome Unity Open Source On Github
A categorized collection of awesome Unity open source on GitHub (800+)
Stars: ✭ 1,124 (+2710%)
Mutual labels:  unity-editor, unity3d-plugin
Unity Quicksheet
Unity-QuickSheet enables you to use spreadsheet file data within Unity editor.
Stars: ✭ 742 (+1755%)
Mutual labels:  unity-editor, unity3d-plugin
UnityGlobalTextSystem
Allow the user to 'change' the default font in Unity from "Arial" to a font of their liking.
Stars: ✭ 21 (-47.5%)
Mutual labels:  unity-editor, unity3d-plugin
Unity Bitmapfontimporter
An unity editor extension for bitmap font.
Stars: ✭ 139 (+247.5%)
Mutual labels:  unity-editor, unity3d-plugin
awesome-unity
A curated list of awesome Unity games! 🎮
Stars: ✭ 346 (+765%)
Mutual labels:  unity-editor, unity3d-plugin
PrefabEditor
You can edit Prefab which could not be edited much unless you place it on Scene.
Stars: ✭ 23 (-42.5%)
Mutual labels:  unity-editor, unity3d-plugin
UnityNativeTool
Allows to unload native plugins in Unity3d editor
Stars: ✭ 147 (+267.5%)
Mutual labels:  unity-editor, unity3d-plugin
UnityDebug
A wrapper script for Unity debug calls to use conditional attributes in order to avoid debug code being compiled into release builds.
Stars: ✭ 29 (-27.5%)
Mutual labels:  unity-editor, unity3d-plugin
Ugui Editor
Unity UGUI editor tools,improve the efficiency of ui development.
Stars: ✭ 479 (+1097.5%)
Mutual labels:  unity-editor, unity3d-plugin
Ma textureatlasser
Texture atlas creator for Unity
Stars: ✭ 116 (+190%)
Mutual labels:  unity-editor, unity3d-plugin
download.unity.com
Unity Download http://unity3d.com/unity/download/archive
Stars: ✭ 90 (+125%)
Mutual labels:  unity-editor, unity3d-plugin
unity-customizable-toolbar
Customizable toolbar available in the Unity editor.
Stars: ✭ 32 (-20%)
Mutual labels:  unity-editor

LMS.Version Buy Me a Coffee at ko-fi.com Become a Patron!

Maintenance GitHub license openupm Twitter Follow UnityVersion

A SUPER simple auto build version tool

Managing a videogames version information can be a MASSIVE pain in the butt - especially in the final days close to release when you are juggling release candidates and bug fixes. Sometimes the most helpful thing in the world is just knowing exactly which version of a game you have running on a devkit. This package helps you solve a lot of these common versioning problems and is pretty much ripped right out of the codebase we used to ship Gunsport @ Necrosoft.

What does it do?

  • Keep your games version information in one central, easy to edit asset
  • Automatically increments the games build number each time you run a build
  • Stores a timestamp for each build
  • If your project uses Git for version control, it captures the most recent commit hash during a build too
  • Prints all this info right at the top of a games log file making it much easier to match bug reports to game versions
  • And provides easy ways to expose the game version in game - super handy for displaying the version in your UI or more feeding into multiplayer APIs for server filtering

Example showing version infomation embeded into Gunsports main menu

How do i install it?

Install

Installation is hyper simple! Open up Unity's Package Manager view (Window → Package Manager) and then select the Add Package icon in the top left of the window to add a git package.

The current git install URL is https://github.com/LotteMakesStuff/LMS.Version.git#1.1.2

Version information is kept in a Version asset, which needs to be created in your project after installing the package. Theres two simple ways to make the asset

1. Just build your game!

the easiest way is to just hit build in Unity. If no version asset is found in your project at build time a new one is created for you.

2. Open your project settings.

You can also manually trigger creating the asset in the Project Settings window (Edit → Project Settings → Version). If no Version asset is found in your project, youll see a button here for creating one. As soon as the asset is created you may edit version information from this screen.

Creating a new Version Asset via the project settings screen

Both methods of creating the asset will try and set the initial version number to whatever the value of the version field in Player Settings.

What if i dont want to install it via a Git URL, for REASONS?

Ahhh heck. Its also avaible via OpenUPM.

How does it work?

At its core, this package implements a Unity build preprocessor, a script that is executed before Unity builds your game. Every time you build your game, this script opens the version asset and does the following modifications

  • Increments the Build number. For example version 1.5.2 will become version 1.5.3
  • Calls into Git to fetch the hash of the last commit
  • Update the versions Timestamp field

The version asset is also added to the project Preloaded asset list. This ensures it is one of the first objects to be loaded by your game. This is important because it needs an opportunity to write into the player log as early as possible. When the version information is loaded in at runtime it is immediately written into your games log file, which is SUPER useful when taking bug reports with logs as you can tell what version of the game the log is from within the first few lines of the log.

Example showing version infomation embeded into a player log file

Version information can be edited directly on the version asset itself or via the Version page in the Project Settings window (Edit → Project Settings → Version). As well as being able to directly set the games Major & Minor version number, you can specify Extra Versions. Sometimes it's useful to specify versions for subsystems within your game. Some more common use cases might save data format version or netcode version. We used this extensively in Gunsport on Google Stadia to filter multiplayer lobbies based on netcode version, rather than game version.

Editing version information

Whats the API?

API Usage
Version.GetGameVersion() Returns the version of the game as a string
Version.GetGameVersion(VersionDeliniator delineator) Returns the version of the game as a string. Allows you to specify if you want the numbers separated with dots or underscores
Version.GetExtraVersion(string name) Returns an extra version as a string. Name is case insensite.
Version.Instance Singleton access to the Version Assets data

How can i show my games version information in my UI?

LMS.Versions ships with two UI components, VersionDisplay and VersionDisplayTextMeshPro that help with displaying version information on a uGUI canvas. These components let you specify a format string that automatically binds data from the version asset and give you a lot of flexibility over how it's displayed. The version string in this example shows how Gunsports version was displayed on the games main menu.

VersionDisplay inspector

Wheres the code?

Version.cs - this class implements the actual Version asset as a Unity ScriptableObject It provides a bunch of static accessors that make grabbing version information easy at runtime. Its OnEnable() and Initialize() methods are responsible for printing version information into a Player.log file

VersionDisplay.cs & VersionDisplayTextMeshPro.cs - these components can be used to display version information in a Unity GUI, using either the inbult text renderer or Textmesh Pro. The most interesting feature here is the version format string, which can be used to customize how the version text is rendered without changing the underlying code.

BuildNumberTool.cs - Manages all the pre-build magic, including creating a version asset if one does not exist, incrementing the version number and saving changes to the asset as well as calling into git to find the most recent commit hash.

As shipped in

Gunsport

Coffee

I hope you find this as useful in your projects as i have in mine! If you find this at all useful, please consider sending me a coffee <3

Buy Me a Coffee at ko-fi.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].