WordPress Login

Let your players use their existing website login details to sign into your games or create a website account from within the game if they don’t have one yet! Includes account and password management features, a dashboard to control all the WUSS kits and numerous website shortcodes and widgets to name but a few of it’s features

Key features

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 additional installed assets and provide settings for them in the inspector also for a one stop location to edit all settings for all installed kits

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 all server responses

Every call to the server results in either a success or failure response, offering you full control over what to do after contacting the server for any reason…

Implementation into your own games

Install the plugin on your website if you haven’t done so already

In your DashBoard click on All Games to create a new game just like a normal WordPress post. This will generated the Game ID

In Unity, give the prefab your website url and the game ID

Drag the prefab into a scene

Hit play, your game is now configured to run from your site!

Website features

WULogin includes a full featured dashboard from which to configure everything related to this and other kits in the series. The dashboard displays all additional installed plugins and their respective settings in one convenient location giving you a one stop location to manage everything related to all WUSS plugins. Dashboard settings restricted to admin access only

Includes ShortCodes and widgets to help you in creating your website

Create a default game layout and have the kit auto generate game pages for you. You create the page content when you generate the game and WordPress Login will generate pages for all your games using your shared layout and custom page content

Create a page that automatically generates banners to point to your game’s pages

Display WebGL games on your website

Include a placeholder graphic so games don’t load automatically (Save user’s bandwidth)

…or load games automatically without placeholder images. Your choice.

16 reviews for WordPress Login

Rated 5 out of 5

whizbang101 on 2018-08-15 07:55:58

Great Solution For Authentication/Login into your game via a WordPress Website - This plugin is easy to install into unity and also is easy to install the plugin into WordPress, the plugin php is nicely formatted and easy editable for any php scripters out there and the c# is coded into namespaces stopping those annoying conflicts in names so it all goes into your existing game or new project alike without any hassle and does exactly what is says, great five star asset in my opinion and a essential to anyone looking to do any type of online game that requires users to login in. I have purchased a couple of this authors assets and only for one ( not this one ) one of his other assets I had to contact him and support was fast reply back within hours with a proper fix that works and a explanation into the issue I experienced, fast professional and at a great price defo worth the price. p.s I would also Recommend if you go for this get his WordPress UserData asset to so storing high scores and lives, current player level whatever you like becomes easy to implement too.

Rated 5 out of 5

ditttt on 2018-06-11 08:53:28

Much better than I thought. - Package is well constructed and easy to use. And if you can read some codes you can modify functions as you wish without headache. The developer tends to be total helpful to solve your problem when you have it. Just amazing. If you need WordPress Login, this is it. 100% satisfied.

Rated 5 out of 5

Mr_DarkShot on 2018-05-08 21:32:56

Top notch plugin with top notch support - It's a rare enough thing to find a plugin that is as "easy" as the developer claims it to be. Add quick and detailed support to that, and you have a winning tool.

Rated 5 out of 5

ibps13 on 2018-05-03 18:47:01

Best login system for wordpress and only one ! - Work perfectly and WUSS plugin suit are amazing, Top noch support too ! MrDude always give solution with detailed explanation and more ! Five star, buy it if you need to use wordpress backend.

Rated 5 out of 5

TripleMotionMedia on 2018-03-20 05:51:51

Easy to use, works right away and Awesome support - This plug-in in great! We are Still in the testing stage but we allready love this plug-in and the support. Our goal is to sell serials on woocommerce for different levels. The developer instantly gave us a detailed explanation on How to do this and even took the time to develop a PHP script for us to handle our request! If you are Looking for an easy way to let you website users create one account for your website and your game. Then this is the plug-in with the support you need! Developer goes the extra mile Which shows his passion for his project!

Rated 5 out of 5

thedorfer on 2018-03-13 01:28:59

Very great idea - After quickly and thoroughly answering my questions, the developer of this asset filled in the gaps in my understanding of not only how to use the asset, but in some of my coding in general. This app works well and is easy to use once I came to better understand it. Highly recommended!

Rated 5 out of 5

gamer2300 on 2018-03-06 10:20:25

Very good asset! buy it without any problems! - package really well done and working really in an exceptional way. The creator is really very patient and generous in giving information. Buy it without thinking nothing if you need something like that! The documentation could be more detailed for those who are beginners with php, but the developer (and the code you buy) tells you anything you need to make sure you use this package correctly.

Rated 5 out of 5

ThermodynamicsMakesMeHot on 2018-02-24 17:22:43

Best tool for super easy login controller packed with features TOP NOTCH DEVELOPER!! - Personally I love this tool for the fact it works with wordpress. It is super easy to use even for non-coders but you get the sourcecode so you can easily extend this both in unity and wordpress side. Saves so much because here is a login tool that's works and does not require hours to figure out. When you buy this, do yourself a favor and get the WordPress Data asset by the save dev. It's a perfect companion tool that will give you the ability to save data for your users just as easy. Another one of those tools that is just so good it makes your life so much easier. You will be using for all your games since, yes it does that to. Thank you for for creating such an awesome tool and providing just as equally awesome support and upgrades for the tool for so many years...your truely a TOP NOTCH DEVELOPER!!

Rated 5 out of 5

StevenGarberg on 2018-02-12 14:22:37

Fantastic plugin! - Wordpress login works pretty much out of the box, with only about 2 - 5 minutes of setup time between your Unity project and Wordpress site. Should be noted it works like a charm in multisite as well!

Rated 5 out of 5

thomasbrunel on 2018-02-01 04:52:14

A must have - - First of all, i have to thank the developer of this Asset for the help he provide me. I'm a beginer in Unity and i was able to use this amazing Asset. To have a Wordpress Login give the easy possibility to sell and host our Game, with hight security and efficiency. - I realy love the other complement Asset, like Money Wordpress or Data. You can sell to your players content with microtransaction like 1$, by making them add minimum 5$ transforme in virtual game money for exemple... - Love the avatar function and game name. Easy to use and install.

Rated 5 out of 5

Mikelmania on 2018-01-04 14:29:38

Great asset - amazing support - Besides the easy to use asset I was really impressed by the support ! Looks like Ryunosuke is never sleeping just to provide the best support possible. Many thanks again for solving all my problems (and the ones caused by the new Unity version) in a single day !

Rated 5 out of 5

spootymilk on 2017-09-05 07:55:00

Easy to use and good support - Great plugin, very easy to use, if you have a question, the dev repond very quickly. You can customise the ui and you don't have to modifie the code to make it working in your project

Rated 5 out of 5

rgarrett7 on 2017-08-28 19:27:37

Elegant asset - This asset provides a great connection between your Unity game and a WordPress server. It saved me many hours of work and is much better than what I would have done. Connecting your Unity work to a webserver, especially one with as much support as WordPress, dramatically expands what you can do in either environment (Unity or WordPress) by itself. I had a question about how the software worked. The developer responded with a terrific answer in 20 minutes. Amazing! The documentation is good, and the software works, just as claimed. I plan to purchase several of the author's additional Unity-to-WordPress assets.

Rated 5 out of 5

virtualbob on 2017-06-20 15:18:36

Perfect! - Very happy I grabbed this.

Rated 5 out of 5

MisterAlwin on 2017-01-25 13:30:00

Works fine - It just works out of the box. Really, after a few minutes or so, I connected my project to my wordpress website where i am able to manage everything. These are the kind of tools that independent developers need.

Rated 5 out of 5

good06 on 2017-01-21 00:46:22

Effective and easy to use - In 30 seconds to make the game and my WP website links up, quick profile, as the effect of the video at the same time can edit a lot of information to update the game, greatly saving my time, the function is perfect, just one login Automatically store account information.

THE TUTORIALS SECTION FOR THIS ITEM IS STILL UNDER CONSTRUCTION

Please check back in soon...

v5.2.2
– You can still fetch the games list from your website like normal or you can now manually enter the Game ID into WPServer

v5.2.1
– Added a new login function to WULogin called AttemptTrustedLogin
– Added a sample function to the prefab to show how it can be used
– Updated the wuss_login plugin to enable this new functionality
– This function allows a person to sign in on your website using only an email and no password
The intended use is to log a person in on your site AFTER you have verified their
identity via Facebook or Twitter or some other means via a 3rd party asset
WARNING: POSSIBLE SECURITY LEAK FOR YOUR WEBSITE!
If you do not intend to use Facebook or Twitter or sites like those to log into your
website from within Unity then you might want to delete or comment out the loginTrustedLogin
function. Alternatively, be sure to set a security string via the Dashboard and in the Unity
prefab. Since all data is protected by an MD5 key and token you should be safe after setting this

v5.2
– Converted WULogin into a static class so you no longer need to derive your classes from it
– All the login preferences that you used to set in the inspector is now placed inside WULoginPrefs.cs
– Updated the documentation to make note of a missing step during setup

v5.1.2
– Updated the wuss_login plugin to accomodate the new search functions in the dashboard. Update your plugin to this version
– Added yet documentation to help new people get started with the kit and hopefully answer more of the commonly asked question

v5.1.1
– Added a new demo scene demonstrating how to use the WULogin kit across different scene loads
– Created a new login prefab from WULoginCanvas which does not contain the WPServer component
– Use this when you are using WPServer as a standalone singleton loaded during bootstrap

v5.1
– Added a new demo scene to demonstrate loggin in and out of an account with absolutely no GUI at all. 100% code based.
– Added a new panel to the existing sample login prefab to be used with WordPress Serials
– Added native support for WordPress Serials meaning:
– new settings will appear in the login prefab if WordPress Serials is installed which
1. Validates whether ornot a product is registered
2. Fetches the registered serial if it exists
3. Determines if a serial is required to exit the login prefab or if the serial is optional
– new static properties
1. HasSerial
2. SerialNumber
3. RequireSerialForLogin
– Updated WordPress Login localisation to include support for WordPress Serials
– Added do_not_destroy_this to WPServer
– Added a prefab that contains ONLY WPServer
– Use this during bootstrap scenes to load only the server access component so that all kits will always have access to the server
even after their respective prefabs were destroyed during scene changes.
NOTE: if you use that prefab, make sure your login prefab does not have an instance of WPServer on it also
– Updated WPServer to remove duplicate instances if detected
NOTE: when in the same scene there is no guarantee which one will remain. Make sure to only have one instance at all times

v5
– Converted the code to use C#6
– Simplified / shortened the code in the demo scene, GUI and WULogin using C#6 syntax
– Greatly simplified the personal details tab system making it easier to customise
– Fixed a bug which prevented you from creating new games from the multisite admin dashboard screen
– Added support for up to 25 languages per game
– Now ships with localisation for English, Afrikaans, German* and Chinese*
* Special thanks to Michael Borgers for the translations
– Created the WPServerErrorException custom exception
– WPServer.cs now throws exceptions rather than using Goto statements and labels
– Contacting the server now sends data only via GET or POST, no longer duplicating the data “just in case”
– Removed data structure checks when calling the server for platforms that have been removed from Unity’s Build Settings screen
– Broke up the long and confusing CallServer function into smaller functions to clarify what each part does
– Added a ContactServer overload that takes an enum as the action. You are no longer forced to convert the enum to a string first
– Renamed the server state enum from WULServerState to WPServerState
– Added Automatic Reference Counting to WPServer
– WPServer’s state now only changes from Contacting to Done when ALL active server requests have completed
– WPServer now triggers an event upon server state changes
– Game IDs are now set by choosing the game from a drop down list. No need to manually enter the Game ID found in the dashboard any more
– Game IDs are now selected from a dropdown box which means support for manually selecting random values have been removed
– Modified the WULogin functions to use enums, not strings
– Made a number of previously public variables into private variables that cannot be changed at runtime, only set via the inspector
– Examples: the urls to your website, which url to use, the game id, meta data to fetch, the size of your Gravatar etc.
– If WordPress Money is installed:
– The names of the currencies you use are now accessed at runtime using the public CurrencyNames property
– Added a static CurrencyString( string currency_name ) function to format the currency name as used in the usermeta table
– Added a public CurrencyString( int index ) overload to call CurrencyString via the currency’s array index instead
– Added public Cash( int index ) and Cash(string currency_name) functions to fetch the current balance of specific currencies
– Changed previous readonly strings into const strings instead
– WUUGLoginGUI now derives from WUUGLoginLocalisation but your own custom GUIs can still derive directly from WULogin as always
– Added a bunch of new panels to the demo prefab
– A high scores panel. Optionally trigger the WUScoring.FetchScores if the scoring kit is installed
– A panel to show a store in or, alternatively, use this panel’s display function to load a shop scene instead
– A general purpose panel… just in case you have need for one more…
* NOTE: Localisation is not supported in optional panels. You will have to add that yourself if needed
– Removed a bunch of “using” includes in files that didn’t use them
– Force the static data to be set after login before your custom responses are called instead of potentially later that same frame
– Force the static data to be cleared on logout before calling your custom actions
– Removed the need to call InitLoginSystem in the GUI’s Start function
– Automatic fetching of your Gravatar image on login is now an optional toggle
– Prefab updated to now show a spinning graphic and “Please wait” text while busy contacting the server
– WULogin now allows you to fetch game names and their associated id’s at runtime
– WULogin now allows you to create new games on your website directly from within the Unity editor (logged in site admins only)
– Updated the demo scene
– Scans the local list of game definitions for a game called Demo Game
– If required it will fetch the list of games you created on your website
– If “Demo Game” is not found it will create the game on your website
– Fixed a bug on Multisites that prevented you from seeing the WUSS sub menus

v4
– Unity broke the WWW class in 2017.3 meaning this asset stopped working in 2017.3
– V4 replaces the old version that relied on WWW and now uses UnityWebRequest instead
– Since this means some versions of U5 will not be supported:
– I am leaving the WWW version for use by anyone NOT using 2017.3
– Anyone using 2017.3 or later will receive v4 when they download the asset
– Thus, 2017.3 is the new minimum version of Unity to use to receive updates
– The previous version has now reached it’s end of life and will still work just fine, but won’t get further updates
– v4 now includes a callback when you click on the “Return to game” button in the post login menu: onResumeGame
– Removed the IsValidEmailFormat function from WUUGLoginGUI.cs and now use the string extension function instead

v3.3.3
– FIXED: Register account email field was referencing the password reset email field to test if the field was empty

v3.3.2
– FIXED: Remember me was not working before. Replaced the bool with a property linking to the Toggle component
– UPDATE: Encapsulated the masses of public fields that never need changing. This just tidies up the inspector quite a lot

v3.3.1
– UPDATE: Added a new struct called Int2D. An int version of Vector2D
– UPDATE: Most types can convert ToString but not the other way around. I now added a FromString method to a bunch of common types
– FIX: Unity2017 seems to have introduced a breaking change to how I store and use cookies. I have updated teh cookie class to compensate
– FIX: Unity2017 changed how the WWW class’s error value works. This broke the fetching of images from Gravatar. That is now fixed

v3.3
– UPDATE: Server response is now enclosed within and braces to indicate the portion of the server response that is
the actual server response. This cuts out any preceding text and any text sent after the data and thus prevents invalid data errors
– Prevent an error when incorrectly calling ContactServer without an instance thereof existing
– Updated CML to version 3 (WordPress Login Standalone version)
– Added a warning when a web browser rejects the data you send it via a WWWForm (i.e. when using the POST method)
– Fixed a warning in settings.php about accessing the security token if it was not sent
– Updated unity_functions to remove the warnings about the deprecated functions since WordPress 4.5
– modified the flow of the WPServer.CallServer function and moved all error reporting to the end of the function

v3.2.1.2
– Fixed compatibility issue with Unity2017
– Allow for automatic fetching of player’s high score during login if the WordPress Scoring asset is imported
– Added a new static variable through which to access the player’s high score if the Scoring asset is imported: WULogin.highscore
– Added a new prefab that adds WordPress Login to it’s own Canvas instead of you having to make it a child of an existing canvas
– Added an option to WPServer to make the Canvas WPServer is on persist between scenes. Ideal use would be during a bootstrap scene

v3.2.1.1
– Fixed a bug in the wuss_login plugin where it sent back sample data for my use during development only
Please update your plugin with the included version to avoid any errors this bug causes

v3.2.1
– Fixed WordPress Money support by supporting new currency name format
– Added the option to set the size of the Gravatar that is returned
– Now store Gravatar as both Texture2D and Sprite
– Added events to notify you when the Gravatar image has been fetched
– Register to either onGravatarTextureFetched or onGravatarSpriteFetched
– Apple plans to remove all support for HTTP. This causes a warning when fetching the Gravatar
Gravatar is now fetched via HTTPS to avoid this warning and to future proof WULogin
– Updated demo scene from OnGUI to UGUI and use the Gravatar Sprite as the new button to open the PostLogin menu

v3.2
– Added support for the official WUSS virtual currency system
– Checks to see if it is installed or else support is removed
– Fetch currency balance(s) during login so you don’t have to fetch them individually afterwards
– Triggers an event if currency was received outside of the game or while the app was closed
– Added a new shortcode to show WebGL builds on your webpage
– Add gid to the shortcode to show the game’s poster as a link to load the game
– Add “autoload=true” to the shortcode to load the game without the placeholder image
– You can also specify a default placeholder graphic in the WUSS Portal to be used by all players without gid specified
– Should you not specify a default image, one will be provided for you
– Added a new ZIP file called WebGL_BUILDS_Folder. Extract this in the root of your domain and upload all your WebGL builds to there
– Alternatively, specify an alternate designated folder in the Portal where your builds will be uploaded to

v3.1.1
– WPServer now trims the provided URL to remove unwanted spaces in the URL
– (Standalone version) Encoder class trims the returned base64 string before decoding it in case of extra spaces at the end
– Updated outdated documentation
– Added catalogue and discount coupon for renderer.site

v3.1
– Added a new, optional, security field to WPServer, per game.
– If used a corresponding value must be set in WordPress
– If used it will add an MD5 field to all server calls to authenticate the origin as your game
– Introduced the WUSS Portal into the plugin. Plugin now needs to be activated where before it was optional
– All other packages that include settings will register as sub menus of wuss_login in the dashboard
– User account status (Good standing, suspended and banned) are now handled by wuss_login
– The WUSS portal includes numerous WordPress ShortCodes and widgets to display on your web pages
– Future kits will most likely introduce more but will be inside their respective packages
– A number of settings can be set on this page
– Added a new POST type to WordPress called wuss_games.
– Games are now defined in WordPress using the WordPress editor
– Defining a game this way will assign your game a Game Id.
It is highly recommended that you use this and not pick values at random any more
– Since the ShortCodes and widgets are going to increase in number over time, they will be kept up to
date on my website, rather than in the kit: http://mybadstudios.com/wordpress-systems/wuss-portal/
– Introduces a new capability to WordPress: manage_wuss.
– Only administrators are given this capability
– This capability is required to see the WUSS portal in the dashboard
– Multisites: All kits are now updated to work only at the network level.
– Please deactivate all WUSS kits on a per-site level, if any, before installing this new plugin
– This will not affect how the kits function or break any existing projects
All kits were always usable across all sites so per-site activation was unnecessary
– To generate the security table, please be sure to activate this plugin at least once after updating

*** NOTE ***
Use of the ShortCodes and widgets are entirely optional
How to use ShortCodes and widgets and how to edit CSS fall outside the scope of my support

v3.0.2
– Added the option to make the server no longer show on screen error messages at runtime
– Hid the “Attempt to auto login” boolean that was left public by mistake and caused lots of confusion as a result
– Rearranged the WPServer fields in the Inspector. Should be even easier to understand now
– Removed used classes from MBSCore (Standalone version only)
– Removed some outdated code left over from the OnGUI version

v3.0.1
– Added a font for the GUI since the built in Unity font was coming up as empty

v3.0
– Removed the StreamReader and StreamWriter functions along with System.IO from CML.cs when building for WinRT
– Removed the OnGUI Login prefab and related Skin and Textures

v2.1.1
-Fixed a bug that prevented you from sending “About me” info that contained spaces

v2.1
– Removed WULoginProfileImage script as it’s become completely redundant
– User profile image is automatically fetched if the email is fetched during login
– User profile image is now available under WULogin.user_gravatar if fetched or will be null otherwise
– Moved gravatar type seection to WULogin base class
– Added UGUI support and a new prefab to use in place of the OnGUI version (Leaving the OnGUI version as legacy)

v2.03
– Fixed a bug with the WPServer that causes issue with the WUData kit

v2.0
– This update requires that the wuss_login plugin on the website be replaced with this version
– Introduced an extra step before you can use the login kit. In Start, call InitLoginSystem as early as possible
– Replaced the meta data request CSV string field with a string array for simplicity
– Extracted the server contact routines into a generic, standalone class (WPServer) to be shared by all other WUSS kits
– Removed the functions that trigger the delegate actions and call them from the new WPServer class directly
– Also removed the website URL and online/offline checks from WULogin to WPServer.
– The WULogin prefab is updated to hold the WUServer component by default but WUServer can be placed on another object if desired
– Calling the server now requires a lot more params due to it’s generic nature. All functions updated to include them for you
– Delegate functions now receive server responses as “CML” objects, not as the generic “object” class
– This saves you the initial explicit casting before you can use it
– but also means you need to fetch the data from within the response using response[0] or response.GetFirstNodeOfType(LOGINConstant) as appropriate
– You now also get access to the entire server response, including error messages and debug info, if any
– Added two new constants: login_filepath and LOGINConstant.
– Login_filepath is for internal use only. LOGINConstant matches the return type from the server
– Added a WULActions enum that I use to call the server, instead of using the WULStates enum used for the GUI state machine
– WPServer now sends actions as strings instead of ints
– Sorted the compatibility issue that prevented the kit from working on PS Vita and Firefox browser
– It should now work with everything! Testing continues
– Moved ShowPleaseWait function into WPServer so all kits can fetch it from there instead of creating duplicate code

On the server
– Updated the WordPress plugin to make the login kit’s code more easily readable in existing and future add-on components
– Removed the pre- and post- functions as they didn’t serve any real purpose. If you need it back, please let me know.
– Now uses AJAX functions to trigger the code when appropriate instead of forcing the code to run during the SHUTDOWN action
– AJAX functions also add an extra level of protection against calling code while not logged in
– Renamed the functions in a paranoia driven attempt at website hacking prevention
– Force function name prefixes to prevent my code from being used as an exploit to run arbitrary code on your site

v1.3
– This update requires that the WUPlugin on the website be replaced with this version
– WULogin prefab now allows you to specify what fields to return upon login and also allows you to fetch any piece of info from the usermeta table.
– All the info returned during login is stored in a publicly accessible CMLData variable called fetched_info
– logged_in variable is now set automatically upon login and logout. You no longer need to do this manually in the GUI script
– WULogin now contains a Static WULogin.GameID field that other kits can use to make sure all WU kits use the same game ID
– WUServer now contains a public function to generate the WWW request. All other WU kits will use this function to contact the server
– WUServer has been updated to fix some login issues on iOS
– Fixed the bug where logging in without first logging out caused the previous login’s cookie to be used
– You are now able to test web player projects in the editor
– Updated WULProfileImage to only fetch personal info if the email was not requested during login, thereby saving one extra round trip to the server
– Now adds a WUL define to the project

v1.22
– Modified the method for fetching your gravatar image. You can use it as always or you can now pass in the type of image of
gravatar you want to show. Simply use the new WULGravatarTypes enum as the second param.
– Updated the WULProfileImage script so you can select your gravatar type from the inspector
– Added the WUServer_Instance property to WUServer in preparation for dependent kit updates

v1.21
– Modified the WUCookie script to remove the deprecated warning introduced in Unity 4.5 and thus made it more future proof

v1.2
– Added multisite installation support
– Added wulogin_pre and wulogin_post hooks for custom plugins
– Moved execution from immediately to WordPress’s ‘shutdown’ filter for improved compatability with 3rd party plugins on your website
NOTE: This update will break a previous install if installed on a multisite

v1.11
– Fixed a security issue introduced in v1.1
– Modified this file so the upload would work…

v1.1
– Now includes a new class WULProfileImg.
– After login, player’s preofile image will be available from static WULProfileImg.ProfileImage
– Updated the WordPress plugin to fix a strange bug that occurs in the WUData package

: How do I get started?Q: Why do I only see a blank screen after Login?

The WordPress Login kit will authenticate your identity and log you in if your credentials match up. Once it’s done that, it triggers an event to tell you “You are successfully logged in”. It is now up to you to decide what you want to do now. Example: Load the next scene… How you do that is by first registering to the event and then running your own code once the event fires. This means 2 things:

The login kit can be up and running in under 2 minutes and do what it’s supposed to do, but for your game to integrate with it you will need to write an extra script or function of your own

You never need to edit anything in this kit to make it do custom things in your project. Just wait for the event to fire then tell your project to do whatever it is you want to happen when that happens

In the inspector you will find a number of checkboxes that you can tick to select what fields you want to return from the WP_users table. Right below that you will find an array where you can specify any field you desire and that is basically the short answer to this question: If the field exists in usermeta then it can be fetched. Just enter it’s name in the array and immediately after successful login that information will be available to your application

No. If you show the prefab while not logged in then the main login screen shows to give you the option of logging in or creating an account. If you show the prefab while you are logged in, those options are pointless. Instead, then you show the PostLogin page to give them the option to log out or to go back to playing the game. See the demo scene for an example of how to show the prefab with the PostLogin screen

I have attempted to fix this issue but some people still sometimes report having this issue pop up so let me explain it in case you ever encounter it. When you login the kit sends the success event to every function that is listening for it. Usually there will be at least 2 functions that respond to it. One is the one that you created to run your own code after login. The other is one of mine that takes the server’s response and stores it statically for your ease of use later. Depending on which function runs first, the static data will be available or it will not.

Just to play it safe I would recommend you use the static fields anywhere in your project EXCEPT in your login success event response function. All the data that will be stored statically are also passed to your function so simply use the data that was passed to your function rather than relying on the static data.

This means that the URL you are giving the WULogin plugin is not a direct link to your site and that it get redirected first. Unity’s WWW class does not support this redirection so you will need to find out where and why and how your URL is getting redirected and figure out the solution from there.

This is mostly related to how your server is setup. Many people don’t realise that www is simply a subdomain like any other subdomain and that some websites are setup to forward any link that starts with www to just / while others work the other way around. Other sites have http redirect to https while others use framed redirects to make www.mysite.com point to www.someothersite.com/users/12345/wordpress for example.

If you are getting that error then it means you need to give my plugin the URL of your website up to the folder that CONTAINS wp-content. I.e. if WordPress is installed at www.mysite.com then wp-content will be located at www.mysite.com/wp-content so you need to give my prefab the url http://www.mysite.com

One customer spent 2 days trying to get past this rewind error. I told her to remove “www.” from her URL and it worked perfectly. It turns out her site was redirecting all www traffic to /.

Another customer struggled for days to get past this error so I told him to change “http” to “https” and it worked perfectly. Turns out his server was setup to forward all http calls to https.

You need to figure out what is causing your URL to be forwarded and then use the final, forwarded url as the url in the prefab.

Mostly when people ask that question they mean “any data” and the short answer is no. However, with that being said, the information that WordPress creates for all users when their account is created (username, web site url, AIM, biography etc) that info is available to you via the kit and that information can be freely modified.

: I have a user management plugin installed. Is this kit compatible with that?

That is a bit of a tricky one to answer since “compatible” is a very broad term. If there is any information that you need from that other plugin and that information is stored in the usermeta table then, yes, you can fetch that info back, no problem at all. If the plugin contains data that you need but which it stores in custom tables then, no, this kit does not support that right out of the box.

One customer did have this request once and it took something like 3 lines of code to fetch the data he wanted and pass that along with the login information and provide the compatibility he wanted. For further customisation a little more work will be needed but this kit is designed to be super, super easy to modify to add new features of whatever nature you require.

: If I want to add custom behaviour or integrate this kit with other WP plugins, does this kit allow for that?

Absolutely yes. There are a number of security precautions in place to prevent tampering with your website (I take care of that so you don’t have to worry about that) but with that said, adding new functions to the kit(s) is extremely, EXTREMELY simple and only has a few steps…

Each kit has a CONST value defined within it inside of Unity. The login kit has the value “LOGIN”, for example. What you need to do is open the file named unity_functions.php and create a function that starts with the CONST value from the kit you wish to extend (but in lower case) followed by whatever name you want to call the function. After that, just add your custom code to that function. That easy.
Example:

function loginHalloWorld() {}

Your output from the function must be sent back as a single string or else WindowsRT platforms will throw out errors. Always use only my SendNode and SendField functions to format your response as proper CML. When ready, send the base64 encoded results to Unity using the SendToUnity function. Errors can be reported using the PrintError function.

In Unity, duplicate one of the functions in WULogin.cs that call WPServer.ContactServer (or create one yourself. Duplicating it just saves you some typing) and for the action to perform, pass it the name of your function, minus the prefix and that is it. You have now added a custom action to the kit.
Example:

: How can I use the login prefab across scenes without duplicating the prefabs?

WordPress Login, starting from version 5.1.1, now contains a sample project to demonstrate this along with a very detailed readme.txt that explains exactly what is going on in the sample project and why it is done the way that it is done. It also contains an alternate version for cases where the first method is not appropriate. Please see the demo folder in the asset for the detailed answer and example for this question.

: Everything works fine in the editor and when I build the game. Why does the WebGL build give me errors?

Unfortunately, since web browsers now enforce CORS for security and Unity themselves don’t have any idea how to setup CORS to allow you to use your WebGL builds across domains, the answer they gave me was simply to “Don’t do it”. WebGL games have the added restriction that other platforms does not have in that WebGL builds need to be uploaded to the domain that is being used in the login prefab. Any testing of the build must be done from that domain. In other words, in the editor it will work just fine but as soon as you build and then try to run the WebGL game from your local machine your web browser (not my code, not your code, not Unity, not your website…but your web browser) will simply deny your project from accessing the website.

If you look in the browser console you will see it shows an errors that plainly says something along the lines of “This code will not be run”. No matter how well you write your game, if the web browser decides what parts of your code it will run and what parts it will simply NOT run, then your project is always going to be at the mercy of your browser. So simply do what the guys from Unity told me and don’t try to run the WebGL game from any domain other than the intended target location (i.e. the domain used in the login prefab). Always upload your build first, then test it.