playMaker

Author Topic: Unity 5 Playmaker Auto Updater (BETA)  (Read 4689 times)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3205
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Unity 5 Playmaker Auto Updater (BETA)
« on: March 12, 2015, 08:22:56 PM »
We're going to add an Auto Updater to Playmaker soon to try and fix common update problems automatically. I've attached a beta version that moves PlayMaker.dll from Assets\PlayMaker to Assets\Plugins\PlayMaker. This is a common problem when updating a 4.x project to 5.0.

If you have have a 4.x project that you can test this on I'd love to get some feedback.

Testing:
  • BACKUP your projects first!
  • Load the project in Unity 5.0
  • Update and import Playmaker 1.7.8.2
  • Press play and you probably have errors: Method not found: 'UnityEngine.Component.get_guiTexture'
  • Import PlaymakerAutoUpdater. It should run automatically.
  • Press play and the errors should be gone.

NOTE: The updater currently only checks for and fixes this one problem. I'd like to get feedback on how this works before we expand this proof of concept into a framework for other issues... so please keep this thread focused on that issue. Feel free to start new threads about other upgrade issues :)

EDIT: New version. Checks for Unity 5 version of Playmaker.

EDIT: Version 3. Added dialog to allow AutoUpdater to make changes.
« Last Edit: March 15, 2015, 09:25:16 PM by Alex Chouls »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12344
  • Official Playmaker Support
    • View Profile
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #1 on: March 13, 2015, 12:46:02 AM »
Hi,

Thanks, that works very well indeed. And thanks for the open source code, I'll be using this tricks in packages I think, for other things like deleting obsolete files and moving files.


Bye,

 Jean


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12344
  • Official Playmaker Support
    • View Profile
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #2 on: March 13, 2015, 01:02:31 AM »
Hi,

WARNING:

 It doesn't work in the case of an 4X project using PlayMaker 1.7.8.2 already that is then upgraded to Unity 5.

Even if I delete the auto updater file and reimport it.

 Bye,

 Jean


Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3205
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #3 on: March 13, 2015, 06:52:32 AM »
Thanks, I'll test that case... So you ran the auto updater in 4.x? Or just imported 1.7.8.2 in 4.x?
« Last Edit: March 13, 2015, 06:54:18 AM by Alex Chouls »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12344
  • Official Playmaker Support
    • View Profile
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #4 on: March 13, 2015, 08:38:45 AM »
Hi,

 Yes,

1: Fresh project in 4.x,
2: Import PlayMaker 1.7.8.2.
3: Close Unity
4: Open this project in 5.x. ( you will have this error)
5:  Import the autoUpdater, it will not work.

 Bye,

 Jean

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3205
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #5 on: March 13, 2015, 09:04:45 AM »
EDIT: Not sure if this addresses the issue above (still looking into that), but still useful info:

Currently the Auto Updater won't update the same project with the same auto-updater version. If you open another project in-between or change the version number in the code it should update.

I'll add Unity Version to the update check, so if it changes it triggers the auto-update. I need to limit the update check somehow, otherwise it happens on every import/recompile. Since updates often trigger a recompile it's easy to get caught in an infinite update loop!
 
The final release will also have a menu item to manually launch the update tool.
Add this to PlayMakerMainMenu.cs to get it now:

Code: [Select]
    [MenuItem(MenuRoot + "Tools/Run AutoUpdater", false, 30)]
    public static void RunAutoUpdater()
    {
        PlayMakerAutoUpdater.RunAutoUpdate();
    }
« Last Edit: March 13, 2015, 09:14:32 AM by Alex Chouls »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12344
  • Official Playmaker Support
    • View Profile
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #6 on: March 13, 2015, 09:29:59 AM »
Hi,

 Yep, menu is nice.

I haven't installed the update at all in the 4.x project, I just close the project, then open it in 5.x. I verify that the error is there and then I import the auto updater, and it doesn't work.

Bye,

 Jean

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3205
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #7 on: March 13, 2015, 09:32:47 AM »
I think you're missing a step after 4: Import Playmaker 1.7.8.2 for Unity 5. The asset store maintains different versions of Playmaker for different Unity versions. So you need to update Playmaker and import in Unity 5 to get the proper version.

Actually sounds like something I should add to the AutoUpdater - check that proper version of Playmaker is imported!


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12344
  • Official Playmaker Support
    • View Profile
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #8 on: March 13, 2015, 10:08:14 AM »
Hi,

 Well spotted!

 Bye,

 Jean

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3205
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #9 on: March 13, 2015, 01:38:54 PM »
I've uploaded a new version that checks for Unity 5 version of Playmaker.

GregK

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #10 on: March 13, 2015, 09:32:37 PM »
Worked like a charm, thank you for the fix.

stigma

  • Junior Playmaker
  • **
  • Posts: 74
    • View Profile
    • Maximages
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #11 on: April 29, 2015, 01:07:44 AM »
Hi,
My project began in version 4 of unity
Unable to resolve a big problem, can I
- Playmaker delete all files in the folder Asset
- import again the playmaker store asset
thank you for the answer
Myst-Like WIP :  Cutish

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12344
  • Official Playmaker Support
    • View Profile
Re: Unity 5 Playmaker Auto Updater (BETA)
« Reply #12 on: April 29, 2015, 03:16:56 AM »
Hi,

 yes, delete both the PlayMaker folder, and also any PlayMaker.dll inside the Plugins folder ( in various sub folder). then reimport PlayMaker, you'll have a clean install.

 Bye,
 
Jean