playMaker

Author Topic: [SOLVED] Unity 4.x --> 5, Compiler Errors after AutoUpdater  (Read 5368 times)

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Hi everyone! Long time no see, hehe.

I'm trying to update my old Unity 4 project (and Playmaker) to Unity 5. Don't worry, I have backups hehe - this is just an experiment!

I've read the threads on updating, and after running the Playmaker autoupdater, I receive a window that says "Nothing to import! All assets from this package are already in your project". Maybe I'm doing something wrong?

After running (or rather, failing to run) the auto updater, I'm able to see a few compiler errors. Would these have been fixed if the autoupdater ran correctly, or is this a separate problem?
Quote
Assets/PlayMaker/Actions/CallMethod.cs(88,31): error CS1061: Type `HutongGames.PlayMaker.FsmVar' does not contain a definition for `UpdateValue' and no extension method `UpdateValue' of type `HutongGames.PlayMaker.FsmVar' could be found (are you missing a using directive or an assembly reference?)
Quote
Assets/PlayMaker/Actions/CallMethod.cs(94,25): error CS1061: Type `HutongGames.PlayMaker.FsmVar' does not contain a definition for `SetValue' and no extension method `SetValue' of type `HutongGames.PlayMaker.FsmVar' could be found (are you missing a using directive or an assembly reference?)
Quote
Assets/PlayMaker/Actions/CallMethod.cs(143,35): error CS1061: Type `HutongGames.PlayMaker.FsmVar' does not contain a definition for `RealType' and no extension method `RealType' of type `HutongGames.PlayMaker.FsmVar' could be found (are you missing a using directive or an assembly reference?)

As always, I'd be super thankful for any guidance or advice anyone can share!
« Last Edit: May 25, 2015, 01:22:04 PM by Breadman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Unity 4.x --> 5, Compiler Errors after AutoUpdater
« Reply #1 on: May 19, 2015, 02:21:32 AM »
Hi,

 Few double check:

-- the best way: You have first updated PlayMaker when still in U4 and then upgraded right. have you done it this way?

-- you are not using the beta right?

-- what platform target are you setup with?

 Bye,

 Jean



Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Unity 4.x --> 5, Compiler Errors after AutoUpdater
« Reply #2 on: May 19, 2015, 02:39:24 AM »
Hi Jean,

No, I installed Unity 5 directly, and then installed the newest version of PlayMaker. This is a new computer so I didn't have Unity 4 available. I can possibly copy over the old Unity 4 version from the old computer, though, and then follow your steps!

This is not beta, and I'm setup for PC platform!

Thanks so much :D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Unity 4.x --> 5, Compiler Errors after AutoUpdater
« Reply #3 on: May 20, 2015, 03:50:53 AM »
Hi,

 yeah, try that. else, simply delete the PlayMaker folder and plugins folder ( just the playmaker dlls.) and then install PlayMaker again. have you tried that?

 Bye,

 Jean

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Unity 4.x --> 5, Compiler Errors after AutoUpdater
« Reply #4 on: May 23, 2015, 12:21:02 PM »
Ok, deleting the folder and then re-importing the whole PlayMaker package worked pretty well. I changed a few tooltip lines in accordance with that topic about updating, and had to change a few things here and there. But now I'm stuck again!

In my old 4.x project, I was using an action (I think you gave me this Jean?) called PlayerPrefsX. Because I use this action a lot in my game, I copied this over into the new Playermaker/Actions folder, and I got the following errors:
Quote
Assets/PlayMaker/Actions/PlayerPrefsX.cs(11,14): error CS0101: The namespace `global::' already contains a definition for `PlayerPrefsX'
Quote
Assets/PlayMaker/Actions/PlayerPrefsxGetValue.cs(7,22): error CS0101: The namespace `HutongGames.PlayMaker.Actions' already contains a definition for `PlayerPrefsxGetValue'
My first guess is that this action was replaced or updated? If that's true, would I have to go through and find each time I use this action and replace it with the new one? Or is there something else I should do to get this action working again?

Thank you again! I'm learning so much by going through this process :D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Unity 4.x --> 5, Compiler Errors after AutoUpdater
« Reply #5 on: May 25, 2015, 10:02:13 AM »
Hi,

 typically to find the issue here:

 search ( using the search field, not manually) for "PlayerPrefsxGetValue", you will probably find that you have two scripts, and so one is a duplicate, you only need one ( probably because Unity renamed it "PlayerPrefsxGetValue 1", or else because you pasted it manually but in a different location.

 else, let me know. we'll debug further.

 Bye,

 Jean

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Unity 4.x --> 5, Compiler Errors after AutoUpdater
« Reply #6 on: May 25, 2015, 01:21:37 PM »
Hey, it worked, thank you!!

Now to get all my animations and colliders working with the switch from 4.x to 5, haha. Thanks again Jean!