playMaker

Author Topic: Script errors after updating Unity  (Read 2479 times)

hexzon

  • Playmaker Newbie
  • *
  • Posts: 6
Script errors after updating Unity
« on: July 31, 2017, 10:10:19 AM »
I was using Playmaker version 1.8.4 with Unity 5.5.2f1 - everything was okay.
But today I decided to update to latest Unity version 2017.
And after update is finished, I started to receive strange errors from the scripts.
First of all let me describe situation:
1. When I press 'Build' in Visual Studio - I see a lot of errors and warnings (attaching 2 screenshots with errors) all of them are related to Playmaker part.
2. This is very strange - I can press 'Play' button in Unity to start the game - everything works fine. I don't understand this, how it is possible that those errors are not blocking the 'Play' button for the project. But regardless they are very annoying.

I haven't yet rolled back to Unity 5.5. I decided to take a shot to ask for the help on forums, maybe somebody here encountered similar problem and knows how to fix it. Any help would be very appreciated.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Script errors after updating Unity
« Reply #1 on: July 31, 2017, 03:37:06 PM »
Hi,
Usually i would ask to send a bug report inside unity,
You can find it in the top menu : Playmaker/Tools.
But due to a Unity Bug that might not work
(if it does work, add a link to this post)
I will send a mail to Alex.
Could you make a video showing some of the errors and the error descriptions,
And anything that might be relevant.

hexzon

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Script errors after updating Unity
« Reply #2 on: July 31, 2017, 03:44:32 PM »
I've attached two screenshots of errors, did you see them? Or you want full list? Basically its 178 errors and all are about missing namespace, however if I double click on error message from the log - it opens file in visual studio, and this particular error is gone. By clicking on all errors I managed to clear them, but on next build they appear again. The most strange thing that these errors allow me to hit 'Play' from Unity and project starts without errors, they appear only during building.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Script errors after updating Unity
« Reply #3 on: July 31, 2017, 04:00:05 PM »
Hi, I'm curious why you're building in Visual Studio? Do you get errors when building in Unity?

The visual studio projects are built by Unity, and the most likely explanation for the errors is that some references to third party libraries are not setup properly in 2017.1. I'd need to investigate to know more... but it would help to know your use case for building in VS.

hexzon

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Script errors after updating Unity
« Reply #4 on: July 31, 2017, 04:23:46 PM »
Hm, what do you mean by building in Unity?
« Last Edit: July 31, 2017, 05:01:07 PM by hexzon »

hexzon

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Script errors after updating Unity
« Reply #5 on: July 31, 2017, 04:57:52 PM »
Ok, I switched from VS to Monodevelop. Seems it doesn't help, there are almost same list of errors and warnings about missing namespaces.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Script errors after updating Unity
« Reply #6 on: July 31, 2017, 05:30:13 PM »
Typically you make a build in Unity using File > Build Settings or File > Build & Run.
How do you normally make builds?
How are you building in VS?

hexzon

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Script errors after updating Unity
« Reply #7 on: July 31, 2017, 06:04:14 PM »
When I build in Unity as you described there are no such errors.
So errors appear during code compilation in script editor, in Monodevelop "Build -> Build All" (F8 hotkey).
« Last Edit: July 31, 2017, 06:06:32 PM by hexzon »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Script errors after updating Unity
« Reply #8 on: July 31, 2017, 06:46:04 PM »
Why are you making builds in VS/Monodevelop? To check for errors?
Just trying to figure out how this fits into your workflow, since I never do it personally, so I didn't notice that it broke in 2017.1.

I've emailed Unity to see what changed in 2017.1 since Building in VS worked in older versions.

hexzon

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Script errors after updating Unity
« Reply #9 on: August 01, 2017, 04:31:40 AM »
Well, basically I am using Playmaker for part of the project. For other parts I am just writing my own code, then checking for errors this way.
Yes, it worked fine until I got Unity 2017, so I guess you were able to reproduce this issue?
« Last Edit: August 01, 2017, 04:33:58 AM by hexzon »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Script errors after updating Unity
« Reply #10 on: August 01, 2017, 11:48:33 PM »
Yeah, I can repro here. Waiting on Unity's response. Like I said, Unity builds the VS projects, and they must have changed something in 2017.1.

Personally, I don't use Build because VS highlights errors as I type (but maybe this is a Resharper feature). Also when you switch back to Unity errors appear in the console that you can double click to open in VS. The Unity and VS C# compilers are actually subtly different, so it's always best to check in Unity.