playMaker

Author Topic: Cannot convert type UnityEngine.SceneManagement & Delegate/Using Directives[SOLV  (Read 2426 times)

btarrant

  • Playmaker Newbie
  • *
  • Posts: 2
When I install Playmaker, I keep getting a ton of errors related to assembly references. I've searched the web a good bit but can't find this, so either this forum is poorly covered by Google or someone has not yet asked the same question so here goes. I get about 100 errors related to scene management. Since I'm still learning (I bought playmaker over Black Friday)I have been deleting these files but am getting closer to where I will want to ensure everything works well with Playmaker.

I'm not on the beta but using the latest public release, 2018.2.17f1

Simply adding something like using UnityEngine.Playables as the engine suggests doesn't fix it ,but of coruse the files it is looking at has using UnityEngine anyway. They all have #if Unity 5.3 at the beginning.

I know how to add these directives if that were to be the fix, but it doesn't seem to be the case. Also, the errors toward the bottom are related to delegates and I'm just learning about that and couldn't hope to fix it myself. Can someone give me some advice on clearing these errors the RIGHT way?

This is a sampling of the 5 or so types of errors I see when I browse them. I hope I am giving the details you need, from the Editor.log:


Assets/PlayMaker/Actions/SceneManager/Internal/GetSceneActionBase.cs(73,28): error CS0029: Cannot implicitly convert type `UnityEngine.SceneManagement.Scene' to `Scene'
 
(Filename: Assets/PlayMaker/Actions/SceneManager/Internal/GetSceneActionBase.cs Line: 73)


Assets/PlayMaker/Actions/SceneManager/GetSceneUnLoadedEventData.cs(99,28): error CS1061: Type `Scene' does not contain a definition for `IsValid' and no extension method `IsValid' of type `Scene' could be found. Are you missing `UnityEngine.Playables' using directive?

Assets/PlayMaker/Actions/SceneManager/GetSceneLoadedEventData.cs(110,30): error CS1061: Type `Scene' does not contain a definition for `rootCount' and no extension method `rootCount' of type `Scene' could be found. Are you missing an assembly reference?
 
(Filename: Assets/PlayMaker/Actions/SceneManager/GetSceneLoadedEventData.cs Line: 110)

Assets/PlayMaker/Actions/SceneManager/GetSceneLoadedEventData.cs(114,16): error CS0453: The type `Scene' must be a non-nullable value type in order to use it as type parameter `U' in the generic type or method `UnityEngine.Playables.PlayableExtensions.IsValid<U>(this U)'
 
(Filename: Assets/PlayMaker/Actions/SceneManager/GetSceneLoadedEventData.cs Line: 114)

Assets/PlayMaker/Actions/SceneManager/GetSceneLoadedEventData.cs(115,38): error CS1061: Type `Scene' does not contain a definition for `GetRootGameObjects' and no extension method `GetRootGameObjects' of type `Scene' could be found. Are you missing an assembly reference?
 
(Filename: Assets/PlayMaker/Actions/SceneManager/GetSceneLoadedEventData.cs Line: 115)

Assets/PlayMaker/Actions/SceneManager/GetSceneName.cs(46,25): error CS1061: Type `Scene' does not contain a definition for `name' and no extension method `name' of type `Scene' could be found. Are you missing an assembly reference?
 
(Filename: Assets/PlayMaker/Actions/SceneManager/GetSceneName.cs Line: 46)

Assets/PlayMaker/Actions/SceneManager/GetScenePath.cs(46,25): error CS1061: Type `Scene' does not contain a definition for `path' and no extension method `path' of type `Scene' could be found. Are you missing an assembly reference?
 
(Filename: Assets/PlayMaker/Actions/SceneManager/GetScenePath.cs Line: 46)

Assets/PlayMaker/Actions/SceneManager/SendActiveSceneChangedEvent.cs(29,17): error CS0123: A method or delegate `HutongGames.PlayMaker.Actions.SendActiveSceneChangedEvent.SceneManager_activeSceneChanged(Scene, Scene)' parameters do not match delegate `UnityEngine.Events.UnityAction<UnityEngine.SceneManagement.Scene,UnityEngine.SceneManagement.Scene>(UnityEngine.SceneManagement.Scene, UnityEngine.SceneManagement.Scene)' parameters
 
(Filename: Assets/PlayMaker/Actions/SceneManager/SendActiveSceneChangedEvent.cs Line: 29)

Assets/PlayMaker/Actions/SceneManager/SendActiveSceneChangedEvent.cs(47,17): error CS0123: A method or delegate `HutongGames.PlayMaker.Actions.SendActiveSceneChangedEvent.SceneManager_activeSceneChanged(Scene, Scene)' parameters do not match delegate `UnityEngine.Events.UnityAction<UnityEngine.SceneManagement.Scene,UnityEngine.SceneManagement.Scene>(UnityEngine.SceneManagement.Scene, UnityEngine.SceneManagement.Scene)' parameters
 
« Last Edit: December 06, 2018, 06:30:11 AM by jeanfabre »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Hi.
I just tested on the latest unity version (2018.2.18f1) and the latest playmaker version (1.9.0.p4) just to be sure.
But i am not gettting any errors.

Did you install playmaker in an existing project and if so is the project upgraded from an older unity version?

Can you try on a new project if errors persist?

btarrant

  • Playmaker Newbie
  • *
  • Posts: 2
OK, so I tried only playmaker and a few assets I was sure to need and was able to see a clean project with no major compiler errors as well.

So I will share this in case it helps some anonymous person in the future. The editor may blame playmaker but it might not be playmaker's fault at all. If you have multiple assets you need, but making the project results in similar compiler errors make the project clean and ensure playmaker is fully installed.

On windows go to C:\Users\Appdata or w%AppData%\Roaming\Unity\asset store5.x/ or whatever version and put in your downloaded asset packages one at a time. They end in .unity or .unitypackage, whatever but contain the entire package in one file. Just double click them as they're tied to unity, then pick import.

Check for compiler errors between each step. This can be tedious but it's the only way to know for sure which asset may be causing it. I'd look to those that make changes to core features vs those that are just graphical assets, this may save you some time.

For me, it was Bullet Physics for Unity causing this to happen yet I had no errors that pointed me there, or else it was buried in a very long list of noise.

Unity changed their version naming and something "compatible with 5.3 or higher" may be 2 years old, as now versions are named by year (like 2018.2 or 3). Now that these errors are definitely on the web maybe this will be of use to a few people.
« Last Edit: December 05, 2018, 03:15:18 AM by btarrant »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Hi.

I am happy you got it to work :)

Quote
On windows go to C:\Users\Appdata or w%AppData%\Roaming\Unity\asset store5.x/ or whatever version and put in your downloaded asset packages one at a time. They end in .unity or .unitypackage, whatever but contain the entire package in one file. Just double click them as they're tied to unity, then pick import.

you should be able to open the asset store inside unity and import from there :)

Quote
Check for compiler errors between each step. This can be tedious but it's the only way to know for sure which asset may be causing it. I'd look to those that make changes to core features vs those that are just graphical assets, this may save you some time.

It is indeed important to check for (red) errors after each import.
PlayMaker and some other assets will not install correctly if there are (red) errors