WordPress for Unity Features

Unity Bridge & Login Kit

Key features
  • Login using existing website credentials
  • Create an account on your website directly from within your game
  • Share login details across all your games
  • Automatically receive ANY user data stored in the usermeta table as soon as login succeeded
  • All functions and data are stored statically and can thus be accessed at any time from any script in any scene without having to link anything to anything else
  • Includes a fully functional and 100% skin-able UGUI prefab to get started ASAP
  • GUI and functionality are kept separate. This makes the kit 100% GUI agnostic. Create your own GUI using any system you wish. No need to modify the code to make it work with your chosen GUI system
  • Install the kit once and use it with all your current and future games
  • Supports the "Remember me" option and auto login if enabled
  • Temporarily kick or permanently ban users from specific games
  • Features password resetting in case you can't log in
  • Allows password changing for logged in users
  • Update basic personal info: real names, email, website details
  • Use your existing Gravatar image as your in-game avatar
  • Select Gravatar type to generate for users who don't have a Gravatar account
  • Fetch the appropriate age restricted Gravatar for your game
  • Auto detects installed expansion kits and provide settings for them in the inspector when present
  • Includes a security feature to prevent outside tampering with your site or games
  • Incredibly easy to add new, custom functionality to the kit. (See the FAQ tab for details)
  • Features a number of callbacks to hook into for any/all server responses
  • Every call to the server results in either a success or failure response, each time triggering an event. Access to these events allows you full control over what to do in each case, no matter the action you tried to perform and what result the server returned.

Implementation into your own games
  1. Install the wub_login plugin on your website (if you haven't done so already)
  2. In your dashBoard click on UnityBridge->All Games to create a new game just like you would make a normal WordPress post
  3. In Unity, give the login prefab your website url and the game ID generated in step 2
  4. Drag the login prefab into a scene
  5. Your game is now configured to run from your website's database. Just hit play to see it in action!

Website features The Unity Bridge plugin includes a full featured dashboard from which to configure everything related to this and all expansions plugins. The dashboard displays the configuration panels for all installed expansions in one convenient location giving you a one stop location to manage everything. The dashboard settings are restricted to admin access only!

Includes ShortCodes and widgets to help you in creating your website
  • Create a default game layout and have the plugin auto generate game pages for you.
    You already created the page content when you generated the game so now the plugin will generate pages for all your games using your skeleton layout
  • Create a page that automatically generates banners to point visitors to your game's pages
  • Generate vertical or horizontal animated banners
  • Generate a poster image with rounded corners and customizable styles
  • Display a logged in user's status for the current game (Good, kicked, banned)

Display WebGL games on your website Simply build the WebGL game in Unity, upload the folder to your website (optionally, delete everything except the "Data" folder) and then, wherever you want to display your game, assuming your game folder is called "MyGame", just use this shortcode
[wub_webgl game="MyGame" height="500px"]


Now you just need to decide between:

  • ► Displaying the placeholder graphic so games don't load automatically (Save user's bandwidth)
  • ► ...or load games automatically without placeholder images. (Games show faster)

Bridge: Data Extension

Store everything to the cloud
  • Store data globally for access within all games or
  • Save data for a specific game only
  • Sort data into categories and retrieve data by field, category or the entire game
  • Request all info you currently have about the player including all data from all games...
  • Request all non-game-specific data about the player. For instance his dog's name, custom avatar URL or phone number.
  • Upload images from your game to your website. Stored as a public URL, use it online and in-game
  • Retrieve stored data from any device. I.e. instantly and automatically make all your games cloud based!
  • Check which of your games player has and even update the player's settings in one game from within another! "Did you buy the Demo? Thank you. Here is 5000 extra Gold". Or the other way around... "Thank you for buying the Prequel Level. I see you already have the main game also. Excellent. You have now unlocked a secret character in the main game"

Beginner friendly

The Bridge : Data extension is built on CML meaning it already comes with many, many powerful search and filter functions but also includes a number of wrapper functions with game specific, easy to identify function names to help people who don't know CML to get started quickly. Once you have read the included CML documentation and are ready to access your data directly you will then have a plethora of extra functions to simplify your life even more

FREE BONUS - Pro mode Originally planned as a completely separate kit, Pro Mode has been added free of charge for all new and existing customers!
Enable Pro Mode by setting a single static boolean to true. As an added benefit of no longer needing the entry level wrapper functions, you are able to write much cleaner code and in most cases much less code. Enabling Pro Mode changes the format in which the data is delivered to allow you even more fine grained access over your data. Think of CML as XML on steroids and consider each step up as having more direct access to each node and having better search and filter functionality becoming available!

Data and data types

Because it runs on CML it means you can store any data you can turn into a string (for example by using their respective ToString() methods) online and when you fetch your data back from the server MBS Core's FromString() methods run in the background so you can use your saved data as typed variables, formatted back into (thus far) int, long, float, bool, Rect, Vector2, Vector3, Color, Quaternion and, of course, string along with List and Array variants thereof.

Store any value! Keep it online and out of the hands of the cheaters... Gold, score, health, experience, tower upgrade level... whatever values you want to store, now you can!

Some extra features to take note of
  • Install the plugin once and you are good to store data for all your current and future games
  • This extension requires zero configuration. Just install the plugin and start calling the static functions. That simple.
  • Includes comprehensive documentation explaining the available wrapper functions
  • Includes a dashboard interface which lets you see and modify all data of all users who is saving data on your server as well as generate new data for them
  • Save and retrieve data to your own account: Player data
  • Save and retrieve data shared by all players: Game settings
  • Update and fetch limited data from other people's accounts: Authoritative server access

Bridge: Money Extension

  • Sell in-game content directly on your website using WooCommerce
  • Sell items without having to pay royalties to third parties
  • Accept all forms of payment you can setup on your website including Crypto Currencies.
  • Includes native support to sell virtual currencies via WooCommerce
  • Includes native support to sell games via WooCommerce and (optionally) automatically register it to the buyers' account meaning there is no need for the buyer to first enter a serial to register the game (Requires The Bridge : Serials extension)
  • Tapjoy has a free plugin for Unity at http://www.tapjoy.com. The Bridge : Money extension offers Tapjoy support in the form of a self hosted server
    Pros and cons of self hosting versus managed hosting





    • They host the points on their servers for free
    • They make sure that the points go to who they belong
    • They take responsibility for player's points balances being accurate and up to date
    • They provide functions to fetch balances from their servers as well as manually awarding or spending those points
    • Receive live notifications of when points are awarded
    • The easiest and fastest way to get started monetizing a game


    • Hosting the points on your own servers give you absolutely and complete control over the points!


  • Points are allocated per device, not per user. I.e. if you have a shared device in the house (family iPad, etc) everybody uses the same points so if one person is saving up for the uber, pimped out, triple fortified mega tank but someone else comes along and wants a pink unicorn... Like I said, shared currency so the last person to play gets to decide what the currency is spent on.
  • If you own two mobile devices and want to play the game on both, each device will have it's own points balance. There is no option to continue play across devices and taking your points with you
  • CONS:

    • Tapjoy no longer takes any responsibility for what happens to the points once they have sent it to you
    • You have to create your own custom back end server system (per game) to handle interaction with Tapjoy
    • This means either needing the skill to create a server to communicate with theirs or having to find someone to do it for you, most likely at a premium
    • All responsibility for what happens after Tapjoy sent you the message is entirely on you
    • You loose the functions to fetch balances, spend and award points and need to implement this functionality yourself within your custom built web server
    • You no longer get any updates of when points are or were awarded. You need to create that functionality yourself

    Self Managed Server included The Bridge: Money extension offers a Self Managed server that automatically works for all games on the domain. It is installed by default and offers the following:




    • A fully functional Tapjoy self managed web server out of the box
    • Automatically send Tapjoy the relevant success / error response they require when they request it
    • Validate the security values Tapjoy sends with each message:
      • Authenticate the call came from them
      • Is it for your game?
      • Is it a currency you created?
    • Prevents unauthorized calls to the server script
    • Store points balances per user, not per device
    • Points are stored in the cloud and follow players across devices
    • Tapjoy supports only iOS or Android. The MBS SDK supports any device with an internet connection
    • Tapjoy requires that you create a separate currency for Android and iOS for each game. The MBS SDK currencies are interchangeable between devices since it is linked to an account, not to a device
    • Includes the functions to fetch balances, spend and give points
    • The function names are identical and work the same way as the Tapjoy functions, making it easier to follow along with Tapjoy's instructions on their website while making use of the MBS SDK to manage your points
    • Each game can have unlimited currencies
    • The MBS SDK currencies require 0 configuration: Just start using a currency and it takes care of the rest
    • Regain the ability to send a notification when the game starts to tell a player if any points were awarded to them while the game was closed
    • Automatically works with all current and future games
    • No configuration required apart from storing the currency keys received from the Tapjoy dashboard
    • No need for a custom server per game!
    • Tapjoy monetization is still limited to iOS and Android for earning new points from Tapjoy
    • When Tapjoy sends points to the MBS SDK server, games don't get live updates. Instead, whenever the game contacts the server for anything, any updated points will trigger an event in the game as well as sending the updated balance
    • Tapjoy automatically triggers the OnAppLaunched placement as soon as a connection is made to their servers. Now that points are stored per user, not per device, we have to wait for a user to login first and thus their OnAppLaunched placement can no longer be used. The MBS SDK uses the Logged_In placement instead to do exactly the same thing

    More info & disclaimer Tapjoy offers a whole host of additional events (i.e. notifications of when a video has started / ended, when a user cancelled performing an action, analytics etc). For exact details on what the Tapjoy SDK can do, please visit their website. Apart from fetching point balances, spending points and awarding points, developers still use the Tapjoy SDK directly for everything else so all those features are still available. As an added bonus, though, the Bridge : Money extension comes with a simplified method of calling placements. Tapjoy requires a whole bunch of events to be setup and prepared and for the developer to create delegate responders per variable that you create. The MBS SDK takes a different approach and comes with a very long list of possible placements that a developer might want to use. Simply drag the WUTJPlacement component onto the WUTapjoy prefab loaded at the start of the game, pick a placement from the drop down list, make sure to add a match it in the Tapjoy dashboard and that is that. All loading, showing and reloading of placements are taken care of after that.


    In order to make use of Tapjoy services developers need to install the Tapjoy asset for Unity, follow the setup instructions from the Tapjoy website for that asset and must still adhere to all the Tapjoy rules. The single most important rule being that TapJoy does not allow their virtual currencies to be used in the purchase of real world items or in any form of gambling. All matters relating to setting up TapJoy's plugin in Unity and getting it to work is all done and explained on their website

Bridge: Scoring Extension

  • Install once and use with all current and future titles
  • Display user's real Gravatar images (if available) with 0 setup
  • Decide how many results to return from the database
  • Any size Gravatar from 32 to 512 pixels
  • Apply age restrictions to user Gravatars
  • Only 2 functions to learn: FetchScores() and SubmitScore(amt)
  • With the GUI and functional code being separate from one another it is completely GUI agnostic
  • Have multiple leader boards per game

Bridge: Timers Extension

  • Server hosted timers mean non-cheatable timers
  • Add any number of stats (HP, Energy, Gold, etc)
  • Each stat has an independent timer
  • Each timer has its own duration
  • Can count down or count to
  • No configuration required on the server
  • Takes seconds to implement
  • Works on all platforms
  • Fully GUI agnostic
  • Features callbacks to attach custom behavior

Bridge: Serials Extension

The 60 second introduction

In contrast with the other WordPress For Unity Bridge extensions, the Bridge: Serials extension requires almost nothing for you to do in Unity at all and does most of what it does in the WordPress dashboard instead. To get started with the asset just install it into your project and (if you haven't already done so) upload and activate the wub_serials plugin on your WordPress website. (You only need to do this step once)

So what is the Bridge: Serials extension exactly? Simply put, it allows you to pre-generate any number of serials you want and then pair them up with user accounts. Every user on your website has a unique ID and when they register with a valid serial that ID becomes linked to that serial. This means 4 very important things:

  • Nobody else can use that serial any more because It is already allocated to someone

  • That serial is linked to that specific game for that specific person's account thus spanning all current and future devices, even temporary ones like an internet café or a friend's phone

  • A serial only needs to be entered once per user on any one device then never again. At this point it is safe for the user to forget the serial number as he will never need it ever again, not even when contacting customer support

  • Sharing the game or selling it second hand makes absolutely no sense. The game cannot be played with a serial and the serial is linked to a user's account. The player would have to give up his entire account in order to allow for piracy. This would give all pirates access to the account username/password/email and all pirates would share a high score/game progress/in-game currency/ in-game purchases... It makes no sense to pirate the game.

If a user ever decides to sell the game second hand they first have to contact you to ask you to remove the serial from their account. Now the person can give his serial to the person he is selling to or if he has forgotten it you can tell it to him before you remove it from his account. Once that serial is linked to a new account the original owner will now be unable to play. All his game data will still be stored on your servers but he will need to buy a new license before he can play again. At that time, as just mentioned, all previous scores/items/loot/whatever will be there, waiting.

Simplicity in Unity

From within Unity, Bridge : Serials only exposes 3 functions to you:

  • RegisterSerial
    If a customer owns a serial and has not yet registered the game then use this function to send the serial to the server. It will then be linked to the account of the player who sent it

  • ValidateRegistration
    If at any time you wish to check if a game is registered to the logged in player, call this. It takes no parameters and will either return a bool named "valid" with a value of true or it will trigger your error response callback. This is useful at the start of the game or if you just want to inject random checks to minimize any kind of game hacks

  • FetchSerialNumber
    Again, this takes no parameters, but be sure the user is logged in before you call this.
    NOTE:The serial is NOT needed for anything after registration so the results of this function are purely for you to use in some cosmetic fasion

Dashboard Control panelBridge:Serials comes with a complete dashboard interface for generating and removing serials. You can reserve serials for games being distributed in retail stores and if you have the Bridge: Money plugin installed you can also sell your games directly via your website which results in non-reserved serials being allocated and registered to the buyer automatically upon purchasing your game. This means your customers never have to enter the serial even once, nor even know that they were ever even issued one. Their game will be registered and ready for them to play from the moment your WooCommerce transaction completes.

Also on the dashboard, you can:

  • view all available serials
  • delete or add new / more serials
  • view all allocated serials per game
  • view all serials belonging to a specific user
  • assign or revoke a serial to/from a specific user with a single click

Automatic Bridge Login integration
WordPress For Unity Bridge

The demo login prefabs installed into your project when you installed the WordPress for Unity Bridge wil automatically detect once the Bridge: Serials expansion is installed into your project and expose a couple of new fields to you

Bool Check_for_serial
If true, the login process will check to see if that account has a registered serial linked to it and set the static value WULogin.HasSerial accordingly

Bool Fetch_serial
If true, the registered serial will be returned after login

Bool Require_serial_for_login
If true, it changes the behavior of the login prefab(s). Instead of closing the prefab so players can start to play, if no valid serial was found it now redirects to a panel where they have to either register with a serial they have in their possession or (optionally) go to your website to buy one.

The PostLoginMenu screen's "Continue playing" button now also does the same test

String Product_url
Used by the button on the registration panel in case you want to sell your game from your website.
Defaults to your website home screen if not set, otherwise it redirects users to this absolute URL (example use: link directly to your game's product page)

Automatic WooCommerce integration
WordPress For Unity Virtual Currency and Tapjoy integration

All WooCommerce integration for all Bridge extensions is enabled by installing the
Bridge : Money plugin on your website.

If you have that plugin installed and enabled then all you need to do to integrate Bridge : Serials into WooCommerce is to create a normal WooCommerce virtual, non-downloadable product and give it an SKU using the format WUSKU_GID_GAME (where GID is the actual Game ID of the game you are selling).
That is all. You are done!

By doing this anyone who buys the game from your website will automatically be allocated a serial and have that serial registered to their account as soon as the transaction state is set to completed. All they need to do is log in and start playing. That simple

Static properties at your disposal

  • Bool RequireSerialForLogin
    Maps to the private "Check for serial" bool set in the inspector. Poll this to determine if a serial is required to continue past a certain point. Currently in use by the login function and "Resume game" buttons to either enter the game or display the registration panel.

  • Bool HasSerial
    Returns whether or not a serial is linked to this account. Works with the "Check for Serial" bool

  • String SerialNumber
    This property holds the player's serial number if "Fetch serial" was set to true

  • Enable Require_serial_for_login to force people to pay for the game before they can play. This means you can make your game available for free download and not have to worry about it.

  • Disable Require_serial_for_login and enable Fetch_serial. This will fetch the registered serial (if any) during login. By doing this you can do your serial checks (WULogin.HasSerial) after a few free levels thus turning your complete game into a demo. To get the full game they just have to pay on your website or enter a serial. No extra downloading required.

  • Disable Require_serial_for_login and enable Fetch_serial. Use this to determine if a player has paid for your game and instead of locking the game after a few levels, unlock in-game bonus content only to paid up players. Extra characters, unlimited ammo, half price in-game purchases, turn of ads etc. Make the game free and earn your money via advertisements but provide an incentive for players to buy the game also or to disable ads.

Bridge: Postal Extension

Query your posts table with all the power WordPress has to offer and fetch anything or everything WordPress can deliver...

Search for posts by:

  • post type
  • tags
  • categories
  • attachments
  • published status
  • password protected or not
  • specifying it\'s password
  • specifying a specific posts or page by it\'s name or id
  • doing a search against a custom search term
  • specifying multiple and/or nested taxonomies
  • specifying specific author or authors you want to find
  • excluding specific author or authors from your search results
  • searching by comment count
  • searching media by their mime types (jpgs, gifs, zip, video...)

The list of options just keeps on going ! Mix and match these as you require... you have the full power of WordPress behind you!

Additional features

  • You can decide whether or not to make searches affect the server cache
  • Return only the post ID\'s of your selected query
  • Specify the return order of your search results
  • Search by date
  • Search by meta field
  • Write posts of any post type
  • Upload the feature image for the post

The Bridge : Postal extension includes many sample functions to show you how to use the asset but to learn how to use the search features of WordPress you will have to learn that from the WordPress website itself since there is a lot to learn and many examples to help you understand it all, not to mention it is forever being kept up to date. To learn how to use Bridge :Postal, consider this the official documentation: https://codex.wordpress.org/Class_Reference/WP_Query
As for some samples of how easy I have made it to use, have a look at some of the code from the demo script included in the project:
    void FindPostByID()
        WUPostalQuery query = new WUPostalQuery();
        query.PostBasics.SpecifyPostId( 7 );
        WUPostal.FetchPosts( query.QueryString, PrintResponse, OnError );

    void FindPostBySlug()
        WUPostalQuery query = new WUPostalQuery();
        query.PostBasics.SpecifyPostName( \"about-my-life\" );
        //or query.PostBasics.SpecifyPageName( \"about-my-life\" );
        WUPostal.FetchPosts( query.QueryString, PrintResponse, OnError );

    void OneAuthorByID(int id=123)
        WUPostalQuery query = new WUPostalQuery();
        query.Author.AddId( id );
        WUPostal.FetchPosts( query.QueryString, PrintResponse );

    void OneAuthorByNiceName( string name=\"rami\")
        WUPostalQuery query = new WUPostalQuery();
        query.Author.AddNiceName( name );
        WUPostal.FetchPosts( query.QueryString, PrintResponse, OnError );

    void MultipleSpecificAuthorsByID()
        WUPostalQuery query = new WUPostalQuery();
        query.Author.AddIds( new int [] { 2, 6, 17, 38 } );
        WUPostal.FetchPosts( query.QueryString, PrintResponse, OnError );

    void MultipleSpecificAuthorsByNiceName()
        WUPostalQuery query = new WUPostalQuery();
        query.Author.AddNiceName( \"laurel\" );
        query.Author.AddNiceName( \"hardy\" );
        WUPostal.FetchPosts( query.QueryString, PrintResponse, OnError );

    void AllExcludingOneAuthor()
        WUPostalQuery query = new WUPostalQuery();
        query.Author.Exclude( 12 );
        WUPostal.FetchPosts( query.QueryString, PrintResponse, OnError );

    void AllExcludingSpecificAuthors()
        WUPostalQuery query = new WUPostalQuery();
        query.Author.ExcludeMultiple( new int [] { 2, 6, 17, 38 } );
        WUPostal.FetchPosts( query.QueryString, PrintResponse, OnError );

Download the complete documentation now

See exactly what you get before you decide to get it. Note that because the WP_Query object is a beast of a class it stands to reason that the function list might make this asset seem daunting. Once you see the sample code, though, you will be blown away by how easy the Bridge : Postal makes it to build your custom queries and get just what you want from your website.


Bridge: Achievements Extension

  • Award players with badges either
    • Manually: Hardcode criteria in the game itself
    • Automatically: Define/modify criteria in the dashboard
  • Define achievements inside the dashboard using the familiar WordPress interface
  • Define any number of achievement requirements to be met before achievement is awarded
  • Requirements are defined as simply as saying (and using any combination of):
    • Must Have At Least X number of Y keys
    • Must Have Less Than X number of Y keys
    • Must Have exactly X number of Y keys
  • Supports locked and unlocked image variants
  • Show different text before and after an achievement is awarded (instructions before and brag rights after, for example)
  • Manually awarding an achievement in-game takes 1 line of code
  • Includes a ready-made prefab to display achievements
  • GUI front end is independent from the operational code. Mod or completely replace the interface
  • Uses local graphics if present or downloads them from online if not found locally
  • Change graphics online at any time and the changes are immediately live on all platforms