Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Alex Chouls on March 12, 2015, 11:22:56 PM

Title: Unity 5 Playmaker Auto Updater (BETA)
Post by: Alex Chouls on March 12, 2015, 11: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:

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.
Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: jeanfabre on March 13, 2015, 03: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

Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: jeanfabre on March 13, 2015, 04: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

Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: Alex Chouls on March 13, 2015, 09: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?
Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: jeanfabre on March 13, 2015, 11: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
Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: Alex Chouls on March 13, 2015, 12:04:45 PM
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();
    }
Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: jeanfabre on March 13, 2015, 12:29:59 PM
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
Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: Alex Chouls on March 13, 2015, 12:32:47 PM
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!

Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: jeanfabre on March 13, 2015, 01:08:14 PM
Hi,

 Well spotted!

 Bye,

 Jean
Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: Alex Chouls on March 13, 2015, 04:38:54 PM
I've uploaded a new version that checks for Unity 5 version of Playmaker.
Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: GregK on March 14, 2015, 12:32:37 AM
Worked like a charm, thank you for the fix.
Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: stigma on April 29, 2015, 04: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
Title: Re: Unity 5 Playmaker Auto Updater (BETA)
Post by: jeanfabre on April 29, 2015, 06: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