Playmaker and Unity 2018.1

With a new version of Unity, means that more of my PlayMaker games are now broken.  I believe I can now reproduce the steps which will most likely put you in the position to save a PlayMaker game after the latest Unity update.

If your game was using a newer version of PlayMaker, you my just need to do the following steps.  This was tested with a Unity project using PlayMaker 1.8.2.

  • Delete Assets/PlayMaker/Actions/ProceduralMaterial
  • Restart Unity

For older versions of PlayMaker, it may be necessary to reinstall PlayMaker completely.  Below are the steps I used to recover an older project, by upgrading to PlayMaker 1.8.8 and Unity 2018.1.0f2 Personal 64bit.

  • Save PlayMaker/Resources/PlayMakerGlobals.asset outside of the Assets tree
  • Save any PlayMaker addons used, such as ArrayMaker, PlayMaker Utils, and any Custom Actions downloaded from the Ecosystem.  Make sure to save these files outside of the Assets tree, otherwise Unity will try to compile them into the project again, which seems to cause problems.
  • Delete all PlayMaker, Gizmos, iTween, and Plugins/PlayMaker folders out of project
  • Restart Unity if it is running
  • Install a fresh new PlayMaker from the Unity Asset Store
  • After PlayMaker has installed, delete the PlayMaker/Actions/ProceduralMaterial folder.  This should make some of the errors go away.
  • Restart Unity.  At this point the PlayMaker menu interface should now display
  • Move PlayMakerGlobals.asset back to original location
  • Move ArrayMaker, PlayMaker Utils, and any CustomActions to their original locations
  • You may still have to manually edit some of the source code files in PlayMaker or PlayMaker addons to remove references to ProceduralMaterial.  I had to comment out lines of code in one of  the PlayMaker Utils source files.

PlayMaker in Unity

If you are using a revision control system such as Mercurial, the PlayMakerGlobals.asset file can alternatively be restored by finding the file in the current branch and discard the changes.  It seems counter intuitive, but discarding a deleted file is the same as restoring the file.

There is a thread on the Hutong Games PlayMaker support forum, which reported the issue with the references to ProceduralMaterial, so maybe these problems will be fixed in a future release of PlayMaker.

LeaderboardExample Code Updated to MySQLi

I updated the LeaderboardExample PHP code to replace the MySQL methods with MySQLi methods. The MySQL methods are no longer supported in the latest versions of PHP, which caused warning and error messages to display in the generated JSON file containing the score data.  This caused the Leaderboard page to fail to display.  Many of the MySQLi methods are the same, except they take the connection object as a parameter. Other methods like error, results, and fetch array use the exact same parameters, so the change was just simply adding the letter ‘i’.

The .htaccess file has now been checked into the repository, which didn’t appear to be checked in before.  This file converts the TopScoresAllJSON.php file to the JSON extension, which is consumed by the DisplayScores.html file to display the scores for all of the games.

This code is currently being used in a few of my games such as Fifty Flags.  It gives an example Unity project, which shows how to use the leaderboard methods.  It also shows how to retrieve scores to be displayed in the game.  A MySQL script is provided, to setup the initial score tables.  PHP files are provided, which are called by the game code to add new scores and return the leaderboard values.  The game identifier must be a unique integer for each game.  The unique key must be generated and inserted into both the game code and on the PHP server code.

Download LeaderboardExample Code

See the LeaderboardExample project on my GitHub –



SSL Certificate for

Last night I purchased an SSL certificate for, so my site can now be accessed via https.  It may take a while for search engines to update the links in their engines to use the https URLs.  It was a little more than $100 to have a certificate issued for 2 years.

I’m very familiar with CSRs (certificate signing requests) and installing signed certificates for web servers.  The price for my web certificate was fairly steep, but it did automate the signing and installation process.  Next time I may shop around and see if I can get a better deal.  It’s a fairly simple process, but for public websites you’re pretty much forced to use one of the root certification authorities (registrars) that are defined in the Windows certificate store (Internet Explorer, Opera, Chrome) or the FireFox certificate store.  I highly recommend looking through your certificate store, and removing any trusted root certificates that are questionable (such as CNNIC or the Hong Kong Post Office).

You can see the Windows certificate store by entering certmgr.msc in the run box.  Then open the Trusted Root Certification Authorities folder and select Certificates.  The FireFox certificate store can be found in the Privacy and Security settings under Certificates.

Windows Certificate Store

One thing that I had to fix, was updating the site URLs in WordPress under Settings > General.  There were a few other URLs in my functions.php file that had to be updated to use https.  My wiki also no longer worked, so I had to remove one outdated .htaccess file in the wiki directory, and I had to rearrange the rules in the main .htaccess file for my site.

It would be nice if my site automatically did a HTTP 301 redirection when using http, but from what I’ve read the optimal solution is to make a change at the web server configuration level, which I don’t have access.  I may try to do a mod_rewrite change to redirect to https, but I’m just happy that it’s working right now.  Clicking any of the links on my site will automatically transfer to the SSL encryption version.

After doing some research, I found that creating a few mod_rewrite rules is the correct way to do a 301 redirect for the secured version of the site if direct access to the web server configuration files is not available.

This may not make a huge difference since I’m not running a site with financial transactions (buy or selling), but it will add a bit of extra protection whenever logging into WordPress or MediaWiki, especially when logging in using public WiFi.  Having the SSL certificate also displays a lock next to the address in most browsers, and eliminates any browser notifications that my site is unsecure.

I found one more problem with my site.  All of the embedded images still use http:// instead of https://.  This causes a problem, because most browsers will show your site an insecure, if any of the images are not using https.  I found a site that gives the appropriate command to use to update all WordPress images to use https.  I had been doing this manually with a search and replace, but with so many pages, it would take a considerable amount of time to change them all.

UPDATE wp_posts SET `post_content` = REPLACE (`post_content`, src=”, src=”;