Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Use Wordpress as your game's database

Discussion in 'Assets and Asset Store' started by MrDude, Feb 17, 2014.


If I were to build the kits in order of preference, which kit would you like first?

  1. Friends system: Invite friends and see what they are playing. Include PM and chat services

  2. Online privacy: Protect your info select exactly who can see what

  3. Message boards system: Categories for author, clan leaders, groups personal

  4. Online market place: Trade with NPCs or real players. Includes gifting service

  5. Custom character system: Create a character in one game and take him into other games

  6. 2D narrative game template: Write a story, build a game in a day...

  7. Clan system: Access your friends arsenal during your own battles

  8. Wordpress Games portal: Display available games, sell them and show stats (ratings/reviews)

  9. Other: Please specify...

Multiple votes are allowed.
  1. Magasenakwa


    Oct 13, 2018
    In the above example the first function will catch the transaction when it completes as long as your item has an SKU along the lines of: WUSKU_GameID_MYINV.

    In that function it will make two entries: First it will add the SKU to a comma separated string. Secondly, it will fetch the current stock levels and then update it with the qty selected during the Woo checkout.

    Now that you have your purchased items saved and you have your stock updated, the next thing is of course to fetch that info inside of Unity. For that I added 2 functions:

    customGetPurchasedItems() will return the list of purchaed items. In Unity you just split the string on ',' and that will give you the SKUs of each individual item to ue however you wish.

    The second function requires you to provide a comma separated list of SKUs and it will then return the qty of each item. Send it 1 or send it the complete inventory a subset... you choose, it returns the qty for those you chose...

    To call those functions in Unity you would do something like this:
    Code (csharp):
    2. public void GetListOfPurchasedItems(CML onSuccess, CMLData onFailed = null)
    3. {
    4.     WPServer.ContactServer("GetPurchasedItems", filepath, "CUSTOM", null, onSuccess, onFailed);
    5. }
    7. public void GetStockQuantities(CML onSuccess, CMLData onFailed = null, string items)
    8. {
    9.     CMLData data = new CMLData();
    10.     data.Set("inventory", items);
    11.     WPServer.ContactServer("GetInventoryStock", filepath, "CUSTOM", data, onSuccess, onFailed);
    12. }
    14. public void GetStockQuantities(CML onSuccess, CMLData onFailed = null, string[] items)
    15. {
    16.    string combined = string.Empty;
    17.    foreach(var s in items)
    18.       combined += $",{s}";
    19.    combined = s.SubString(1);
    20.    GetStockQuantities(onSuccess, onFailed, combined);
    21. }
    23. string[] products;
    24. void PrintError(CMLData response) => Debug.LogWarning( response.String("message") );
    25. void Start() => WULogin.onLoggedIn += FetchMyPurchases;
    26. void FetchMyPurchases() => GetListOfPurchasedItems(GetStockQty, PrintError);
    28. void GetStockQty(CML response)
    29. {
    30.    products = response[1].String("products").Split(',');
    31.    GetStockQuantities(PrintQtys, PrintError, products);
    32. }
    34. void PrintQtys(CML response)
    35. {
    36.    var items = response.Children(0);
    37.    foreach(var item in items)
    38.       Debug.Log($"I own {item.Int("qty")} of item {item.String("name")}}");
    39. }
    Of course, all of this is just one quickand dirty way to get things up and running so don't think this is THE way to do it. This can definitely be improved upon by, for example, NOT using usermeta and creating a custom table instead. Like I said, how you store and retrieve your data is up to you. This is just one example...

    The old Asset Store is closing next week. If you haven't saved out your invoices numbers by then then proving you own any of our assets later on will be up to you to do. PayPal transaction ID's are not gonna cut it! Save your invoice numbers while you still can!
    Last edited: Apr 18, 2019
  2. Hamesh81


    Mar 9, 2012
    Ok sure that makes sense, thank you for your detailed answer.
    Magasenakwa likes this.
  3. Magasenakwa


    Oct 13, 2018
    PLEASE NOTE: MBSCore has been updated for Unity 2019.1

    In addition.... We think we FINALLY figured out WHAT started the chain of events that led to all our assets being removed from the Asset Store and the "problem" is fixed now also. Please note the quotes aroundthe word "problem".
    Also, as should be painfully obvious by now, the update and "fix" will NOT be available via the Asset Store.

    MBSCore on the Asset Store is broken and thanks to the WWW class now being obsolete it will require you to manually update the Utilities class in future or else all assets that depend on it will be broken also.
    WordPress Login, for example, will not work any more unless you fix it yourself... And considering that all of the WordPress assets rely on WordPress Login, well...

    For now you will be stuck with an annoying warning message but once they remove the WWW class frfom Unity entirely, our assets will stop working unless, for each project, you manually do all the fixes that we would have done... well, actually, HAVE done... but are just not allowed to give you.

    So, why then all this hassle? Well, Unity refused to let us upload the fixed version and for weeks we were baffled by what they could possibly mean when they tell us that "something is wrong with something somewhere. Please fix it and resubmit". All we had to do to fix the broken MBSCore was change a 3 to a 4 in 2 places... what could possibly now "be wrong in something somewhere"?

    The actual decline message was more like "A texture or file or prefab could not be found, is not linked or not present. Please fix this and resubmit". This was absolutely useless in terms of figuring out what they were complaining about and more so when looking at the console and seeing there are no errors or warnings at all ... so what did they want MrDude to fix?

    MrDude spent weeks asking them on the forum, via email and also during the asset submission comments section but received absolutely no response from anyone at Unity except for the same copy pasted decline message that basically said 'Something is wrong with something somewhere. Please fix it'. After weeks of asking for help they decided to kick us off the store instead because MrDude was too unprofessional to be on the store after 8 years of nothing but rave customer reviews and having had priority submission privileges for most of that time...

    Now, almost 8 months later, we think we finally figured out what the reason was for the asset being declined. The thing MrDude kept asking Unity to point out to him and the thing they couldn't be bothered to answer him for for all those weeks... The problem was with something completely unrelated to the fixes applied to the broken asset...

    You are gonna love this:
    For the Entities demo MrDude had created a sphere from the GameObject menu, turned that into a prefab and then used that in the demo to show numerous instances of the prefab in the scene. It worked perfectly... but Unity wanted him to create a new material to apply to the prefab even though it was not needed. And THAT is ALL!!! Just THAT!!!

    So in order to get MBSCore approved he simply had to do one of two things:
    1. Create a material for no reason other than to make Unity happy
    2. Delete the prefab from the project and do this:
    Code (csharp):
    1.            //Instantiate(prefab);
    2.             GameObject sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere); //new
    3.             sphere.AddComponent<EntityClass>();//new
    And that was that!

    Weeks of asking Unity "What am I supposed to do? How do I fix it? What does 'Something is wrong with something somewhere' mean?" and all he got back was nothing. All it would have taken from Unity was to reply with "We want you to create a material for the sphere, even though you don't need it" and then everything would have been sorted...

    Instead, they couldn't be bothered to write that incredibly long response and now, after 8 years on the store, he got kicked off and all our products have been removed from the Asset Store meaning anyone who bought anything in the past is now doomed to forever download outdated assets (and in the near future be stuck with non-functional assets) unless they come get the updates from our site directly.

    All those weeks he asked them "Just tell me what to fix and I'll fix it" and all these months later he solved the mystery on his own..! Seriously, would it have been THAT much effort, during all those weeks of constant asking for help, to just TELL him that THAT was why the asset was being declined all the time? Instead, after 8 years of being on the store and getting rave reviews from customers about exceptional customer support they deemed him too unprofessional to be on the store and now leave you to download outdated assets, just waiting for them to break them in a future release of Unity... Total facepalm.

    In any event, please be advised: The 2 functions are still broken on the Asset Store version of MBSCore and will forever remain so since Unity won't allow us to fix it. Also, 2019.1 warns of the imminent death of MBSCore and all dependent assets if you continue to download it from the Asset Store. Download the updates from our site if you want your assets to continue working.
    Last edited: Apr 24, 2019
  4. Magasenakwa


    Oct 13, 2018
    Also, please be aware that I don't come by this thread/forum very often.

    I am the owner of myBad Studios but MrDude, being my only employee, has run it since day one. I've stayed out if it and like a good boss just said: "You do what you have to do, if you need me, I'll be in my office counting the money you made me... I mean us" ;)

    I only started coming here after MrDude was kicked off so SOMEONE could tell you that your assets are still being updated and you still have access to everything you bought. I stopped coming by for a while again and just thought I'd check in "just in case" a few days ago. After this post I don't know if/when I'll check in again.

    Any customer who needs support, please contact us via email or the support form on the website and MrDude will get back to you ASAP. If you need any help with anything, posting on here is likely to go very long without a response.

    Thank you all.
  5. jonathangunn


    Apr 24, 2019
    Great job!!! I'll probably use your plugins when have time. I would like even to test all abilities you provide. Thank you for your work.
  6. Hamesh81


    Mar 9, 2012
    Hi @Magasenakwa ,

    I have a question about the integration between the Login and Data assets to see if these can achieve my particular use case.

    In my Woocomerce products I am using the ACF plugin to add two additional text fields as backend only meta boxes. ACF fields get saved in the database table wp-postmeta. In Unity what I need to do is for the logged in user (via Login assets) to get a list of all of the products that user has purchased and be able to store the values from the ACF fields into a Unity variable for each of these products.

    I understand I would need to handle all of the display logic the list of products, but is the actual getting of the products list something that the Data asset can assist with?
  7. Magasenakwa


    Oct 13, 2018
    New version of Wordpress For Unity is being released on 1st September 2019. See the changelogs to see what is new!

    1 September is the 8 year anniversary of MrDude joining myBad Studios fulltime
    5 October is the 1 year anniversary of myBad Studios leaving the Asset Store
    On these two dates you can get 50% off on everything on the site using the voucher: anniversary

    Thank you to everyone for your continued support
  8. rmorph


    Apr 3, 2012
    Crap - how did I miss this?

    Sorry to see you go. Will there be any chance for users of one of your packs to pick up the others?
  9. Magasenakwa


    Oct 13, 2018
  10. Magasenakwa


    Oct 13, 2018
    (With a few changes)

    • MrDude is no longer part of myBad Studios. He left to focus on his new company, quit Unity altogether and is no longer in the asset making business at all. For those of you who knew/dealt with him often, don't worry, I'm quite a nice person also :p I will grow on you, you'll see ;)
    • MrDude retains ownership of the WUSS assets while myBad Studios has been granted a sublicense to sell the products while being developed independently from the WUSS versions. This means that, should WUSS ever become available again it will most likely NOT have the same feature sets as the myBad Studios versions
    • myBad Studios has rebranded the Login kit as the "WordPress for Unity Bridge" and all the other assets are being marketed as "Bridge Extensions"
    • The WFU Bridge and extensions are NOT compatible with their WUSS counterparts!!!
    • The Bridge: Data extension has seen a major overhaul and now stores it's data across an index and a data table. This should make a drastic impact on the amount of storage space used and the speed at which your data is fetched.
      NOTE: The data asset has an experimental function to move the old data to the new tables but has not been properly tested yet and is thus not available at this time. Before upgrading to the Bridge, please consider the Data extension incompatible with the WUData asset and know that all your existing data will not be accessible! Please hold off on upgrading if you are making use of WUData in your projects at the moment
    • As always, the customer comes first and thus existing WUSS customers can still register their Unity Asset Store invoice numbers at and will then be able to download the new versions of their purchased assets FREE OF CHARGE.
    • The WUSS assets can no longer be downloaded from If you prefer to use them you will need to get the older versions from the Asset Store. When you log in on to download your assets you will find the Bridge extensions in your profile in place of the WUSS assets
    • The complete WordPress For Unity asset was not part of the sublicense agreement and will not be updated any longer (at the very least not by us)
    As a special GLAD TO BE BACK gift, all assets are 50% off for the rest of 2020! Simply use the coupon Seasonal2020 during checkout to receive your discount!

    Merry Christmas, everyone!
    p.s. Just so @rmorph doesn't miss this... ;)