Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The ModSdk is the development kit that allow developers build mods to Buildron.
You can download the latest ModSdk from our releases page.
This is the interface that every mod should implements.
A facade to Buildron events and proxies.
IModContext has also some properties that allow access some features of Buildron, those properties work like proxies and in most of case isolated to each mod.
- Builds (IBuild): the builds active on CI server.
- Users (IUser): the users with active builds on CI server.
- CIServer (ICIServer): informations about the CI (Continuous Integration) server.
- Log (ISHLogStrategy): allow mod to log to Unity default log. Every log registered by mod will be identified on console/file log.
- Assets (IAssetsProxy): mod should use this proxy to load his assets from mod asset bundle.
- GameObjects (IGameObjectsProxy): mod should use this proxy to create GameObjects and add components.
- GameObjectsPool (IGameObjectsPoolProxy): this proxy has a built-in GameObject pool manager. Mods that create a lot of GameObjects can be benefit using this proxy.
- UI (IUIProxy): mod can interact with some limited Buildron HUD objects.
- FileSystem (IFileSystemProxy): to locate files related to the mods folder, just use this proxy.
- Data (IDataProxy): if the mod needs to save key/value data, this proxy will be useful.
- BuildGameObjects (IBuildGameObjectsProxy): if your mod need to know about GameObjects of other mods that implement GameObjects representing builds, use this proxy to get a list of them.
- UserGameObjects (IUserGameObjectsProxy): if your mod need to know about GameObjects of other mods that implement GameObjects representing users, use this proxy to get a list of them.
- Camera (ICameraProxy): the main responsibility of this interface is to control access of the various mods to the Buildron's main camera and avoid more than one mod tries to change exclusive values, like camera position, in the same time.
- Preferences: allow mod register preferences.
- RemoteControl (IRemoteControlProxy): allow mod know about connected RC.
There two special tags used on Buildron and mods: "Build" and "User". If you use them on your mod you should define the both as the first tags on your tag manager. The first should be "Build" and the second should be "User". This is necessary because Unity use the tags index on tag manager to search the game objects.
If you want expose some preferences to let Buildron's user select about your mod, you can use ModContext.Preferences property. You can register a preferences with the RegisterPreferences methods. It's recommended that you register your mod preferences as first things on Initialize method.
You can read your preferences usen ReadValue method on same ModContext.Preferences property. In most of case you should only read preferences after the CIServerConnected event be raised.