The MBS Core kit currently contains:

  • CML

    ► CML is a custom data storage and retrieval system. To best describe it, think of it as XML, only easier, faster and better.
    ► CML contains a built in save and load system that utilises PlayerPrefs, Resources folders and file paths.
    ► CML allows you to generate typed variables dynamically at runtime
    ► CML is even smart enough to provide default values when you use a variable that doesn’t exist
    ► This both prevents runtime errors and allows you to save less data to disk
    ► Native support for int, long, float, bool, string, Vector2, Vector3, Quaternion, Color & Rect
    ► Includes a large selection of search, filter and navigation functions

  • Encoder

    ► Add MD5 and BASE64 en/decoding to your project
    ► 1 line of code to encode or decode a string

  • Entities

    ► A replacement system for Unity’s new Hybrid ECS system.
    ► Doesn’t require you to first define a struct of components that define an entity
    ► Simply replace MonoBehaviour with MBSEntity and your entity is defined
    ► Unity requires you to do a FindEntities() call during OnUpdate. MBSEntity does not!
    ►Example use: Create this class and drop it on a number of GameObjects or add it to a prefab

  • Events

  • ► Contains a custom event based on EventArgs
    ► The event passes both a generic Object and a CML object
    ► The CML object can contain an infinite number of nodes
    ► Each node contains a Dictionary, a List and a generic Object reference
    ► Can easily be the only event you ever need
    ► Creates a way for you to assign many events or Actions to a single variable
    ► This makes for much less coding and no need to remember many event variable names
    ► This automates null checks when triggering events and also simplifies event cleanup
    ► Alternatively, simply use absolutely any GameObject to trigger or respond to events
    ► Identify events using int, string, enum or absolutely anything you want !

  • mbsStateMachine

    ► Super simple to use!
    ► Now also includes mbsStatemachineLeech which allows you to run multiple state machines off of a single state

  • MBSSingleton

    ► Simply replace MonoBehaviour with MBSSingleton to turn your class into a singleton!

  • mbsSlider

    Inspector configurable system to define areas to place GUI elements into. Slide content into and out of this area complete with fading in and out.

  • PleaseWait

    Display a rotating spinner in the center of the screen. 0 configuration, 1 line of code

  • StatusMessage

    ► Show messages on screen at runtime. 0 configuration, 1 line of code
    ► Shows for 3 seconds then vanishes

  • Notifications

    ► Ever needed to show an achievement or something being unlocked? This is for you!
    ► Animated panel slides in and out of the screen
    ► Slide from anywhere to anywhere and then back again
    ► Supports (optional) image along with the message and notification header
    ► Uses Unity UI
    ► Supports notification queuing.

  • Utilities

    ► Includes various utility functions to simplify your development
    ► Unity classes now have a FromString() method to go with it’s ToString() function
    ► Convert Color to hex values for use with Text Mesh Pro
    ► Update a Transform’s position or rotation directly without using temp variables
    ► Update an Image’s alpha value without using temp variables
    ► Strings now have a “bool IsValidEmailFormat()” function
    ► Strings now have a “Texture2D DownloadTextureTask()” function
    ► Strings now have a “Texture2D GetGravatarTask()” function
    ► Convert a Texture2D to a Sprite using Texture2D’s new ToSprite() function

1 review for MBS Core

  1. Rated 5 out of 5

    obstudio on 2018-06-26 20:18:10

    Modular and fantactic - 100% you are a gamedev 90% you have your website or you are planning to 80% that this website will be on wordpress 100% you got to use this asset as the base of your wordpress integration Using wordpress in your games gives so much possibilities. Just look for dev eloper-s other assets so you'll be sure that you need implement them in your games. Main pros are - simplicity of use, modularity and asset support. You don't need all plugins at start so you can only buy the basic ones. If you are not sure or you're in trouble just talk to developer - who is REALLY helpful. Cons - none.


Please check back in soon...


Creating your in-memory database

CML savegame = new CML();


savegame.Load("SaveGameName"); // (from PlayerPrefs) //or savegame.LoadFile(Application.DataPath+"/myfile.txt"); //by path //or savegame.Open("myfile"); //from Resources folder

Adding multiple fields to a node using shorthand form

savegame.AddNode("Settings", "volume=0.7; audio=MidnightMoon_3");

Adding fields using normal form

savegame.AddNode("player"); savegame.Last.Set("Male", true); savegame.Last.Set("character", "Human13"); savegame.Last.Set("position", player.transform.position); savegame.Last.Set("rotation", player.transform.rotation);

Fetch nodes and add fields to them directly

savegame.AddNode("inventory"); CMLData inventory = saveGame.Last; CMLData player = savegame.FirstNodeOfType("player"); player.Seti("age", 18); inventory.Seti("sword", 50); inventory.Seti("crossbow", 90); inventory.Set("equipped_doublehanded", false); inventory.Set("equipped", "sword");

Save all data in one go

savegame.Save("SaveGameName"); //or savegame.SaveFile(Application.dataPath + "/SaveGameName.txt");

Apply the values to in-game objects

the_player.transform.position = player.Vector3("position"); the_player.transform.rotation = player.Quaternion("rotation");

more ways to find data

//Assuming your CML variable is called "Library"... //Assuming you have a header node (say "Library" or "Index" or whatever) followed by numerous nodes called "Section" //Assuming only Section nodes have a field called "SectionName" //Assuming each section contains a number of nodes called "Book" List<CMLData> categories = Library.Children(0); List<CMLData> categories = Library.AllNodesOfType("Section"); List<CMLData> categories = Library.NodesWithField("SectionName"); //or if you want the History section specifically... CMLData HistorySection = Library.NodeWithField("SectionName", "History"); Fetch all History books List<CMLData> HistoryBooks = Library.Children( HistorySection.ID );


    text = "Hallo world",
    md5 = Encoder.MD5(text),
    encoded = Encoder.Base64Encode(text),
    decoded = Encoder.Base64Decode(encoded);


//Place this on a prefab with multiple instances in the scene
public MyClass : MBSEntity<MyClass> {}

//Place this on any single object in the scene
public class MyClassController: MonoBehaviour{
    void Update() {
        foreach(MyClass entity in MyClass.Entities)
            entity.transform.Translate( new Vector3(0f,0f,1f) * Time.deltaTime);


public class Foo : MonoBehaviour {
   void Start()
     CML data = new CML(); 
     //Add whatever variables and Objects you want to "data"
     //Trigger Events or Notifications using strings, numbers, enums, GameObjects or anything else as an identifier!
     this.TriggerEvent(1, new MBSEvent(data) );

public class Bar : MonoBehaviour {
   void Start()
      //any script(s) you want to respond to an event, just tell it what function to call
      this.AddEventListener(1, MyEventResponder);
      this.AddNotificationListener("AllDone", DoSomething);

   void MyEventResponder(object source, MBSEvent data){}
   void DoSomething() {}


public enum EStates { Opening, Open, Closing, Closed } 
public MBSStateMachine<EStates> state;
public RectTransform panel;

void Start()
    state = new MBSStateMachine<EStates>();
    state.AddState(EStates.Opening, DoOpening);
    state.AddState(EStates.Closing, DoClosing);

    this.AddNotificationListener("OnShowShop", OpenShop);

float position = 0f;
float target = 100f;
float speed = 30f;

void OpenShop()
   if (state.CompareState(EStates.Closed))

void DoOpening()
   position += Time.deltaTime * speed;
   if (position >= target) {
      position = target;
   panel.position = panel.position.SetX(position);

void DoClosing()
   position -= Time.deltaTime * speed;
   if (position < 0) {
      position = 0;
   panel.position = panel.position.SetX(position);

public void OnCloseButtonClicked() {
    if (state.CompareState(EStates.Open))

void Update() => state.PerformAction(); 


async void AssignAvatarToImage(Image icon, string email = "")
   if (!email.IsValidEmailFormat())
      email = "";
   Texture2D tex = await email.GetGravatarTask();
   icon.sprite = tex.ToSprite();

void Update() => transform.position = transform.position.SetX( transform.position.x + (Time.deltTime * speed) );
void GetHairColor(ref Color hair) => hair = hair.FromString( PlayerPrefs.GetString("HairColor") );

v4.2 – 2019.1 patch – 24/4/2019
– Updated DownloadTextureTask() to use UnityWebRequest instead of WWW
– This removes the warning message in 2019.1 and future proofs the asset
– Deleted the prefab used in the Entities demo
– Now generate the sphere procedurally, thus removing the need for the unused material

– Fixed a bug with the Quaternion string parser always returning Quaternion.identit
– Fixed a bug with the Color string parser always returning black
– Added DownloadTextureTask to the string class: Example Workflow

	async Sprite FetchSprite( string image = "") {
		Texture2D tex = await image.DownloadTextureTask();
		return tex.ToSprite(); 

– Added the following overloads for CMLData.Set( string name, string data):
Set( string name, Rect data )
Set( string name, Color data )
Set( string name, Vector2 data )
Set( string name, Vector3 data )
Set( string name, Quaternion data )
Set( string name, bool data )
– Added a virtual OnDestroy() function to the MBSEntity class to avoid having NULLs in the Entities lists
– Added MBSCORE scriptable define symbol. MBSCore now contains so many additional features that moving
forward it may be necessary to distinguish between the full MBSCore and the subsets

– Added the MBSEntity class. A simplified alternative to Unity’s Hybrid ECS system

– Added 2 new class extensions
– Fetch a player’s icon as a Texture2D using string.GetGravatarTask()
– Convert a Texture2D to a Sprite by using Texture2D.ToSprite()

– Reverted to 2017.3 as the minimum required version
– Marked mbsStateMachine as deprecated in favor of MBSStateMachine
– Marked mbsEvent and mbsEventHandler as deprecated in favor of MBSEvent and MBSEventHandler, respectively
– Marked mbsNotification as deprecated in favor of MBSNotification
– Marked mbsSlider as deprecated in favor of MBSSlider

– Removed GUIX from the asset since it lost all purpose after UGUI was releaed
– Added MBSSingleton. Simply replace MonoBehaviour with MBSSingleton and you are done.

– Unity 2018.1 is minumum supported version
– CML: CML is now upgraded to v4.0
– Upgraded the code to C#6 syntax.
– Added support for Long and Color data types
– Changed cmlData and cmlDataBase classes to CMLData and CMLDataBase respectively
– Added support to do addition and subtraction in the CMLData class
– Added “public object obj” member to the CMLData class
– Marked the following as obsolete: Vector, Vect2, Rect4, Quat
– Added the following replacements: Vector3, Vector2, Rect, Quaternion respectively

– UPDATE: Added MBSEvents and MBSNotices classes to automate the use of events in your project

– UPDATE: Most types can convert ToString but not the other way around. I now added a FromString method to a bunch of common types

– CML: CML is now upgraded to v3.0 and is now a generic class.
– CML is now compatible with non-Unity .NET applicatios
– CML data type is now an a Unity-only alias for UnityCML
– CML has been renamed to CMLBase and contains no Unity-specific functions
– CMLData has been renamed to CMLDataBase and contains no Unity-specific functions
– CMLData is now a subclass of CMLDataBase and contains only the Unity-specific functions
– UnityCML is a subclass of CMLBase that contains Unity-specific functions
– CML: Removed the various “Data” deprecated and duplicate functions, and retaining only the “Node” variants

– CML: Deprecated the following functions: ParseFile, DataWithField, AllDataOfType, AllDataOfTypei
– CML: Now supports Closer nodes. Example can now have a corresponding node
– CML: Reduction of duplicated code
– Encoder: Print invalid text if invalid text was passed to Base64Decode
– Added new MBSUtilities section


Please check back in soon...