Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: DigitalDesignSvc on November 25, 2017, 08:27:28 PM

Title: Unity 5.6.3p2 and Playmaker 1.8.5 [SOLVED]
Post by: DigitalDesignSvc on November 25, 2017, 08:27:28 PM
Trying to install fresh download of Playmaker from the Asset Store (within Unity) to my project and get the two errors that were present from the Unity 5.6 beta thread on this forum:

Quote
Assets/PlayMaker/Actions/SceneManager/Editor/LoadSceneCustomEditor.cs(17,24): error CS0030: Cannot convert type `HutongGames.PlayMaker.FsmStateAction' to `LoadScene'

and

Quote
Assets/PlayMaker/Actions/SceneManager/Editor/LoadSceneCustomEditor.cs(21,15): error CS1061: Type `LoadScene' does not contain a definition for `sceneReference' and no extension method `sceneReference' of type `LoadScene' could be found. Are you missing an assembly reference?

Please advise.  Thank you!


Edit:
I have tried "reimport all assets".
Also same error on 5.6.3f version
A fresh download/import/install of Playmaker did not cure the issue.
Title: Re: Unity 5.6.3p2 and Playmaker 1.8.5
Post by: DigitalDesignSvc on November 25, 2017, 08:40:47 PM
The code in question:

Code: [Select]
#if UNITY_5_3 || UNITY_5_3_OR_NEWER

using UnityEngine;
using UnityEditor;
using HutongGames.PlayMaker.Actions;
using HutongGames.PlayMakerEditor;

[CustomActionEditor(typeof(LoadScene))]
public class LoadSceneCustomEditor : CustomActionEditor
{
LoadScene _target ;

public override bool OnGUI()
{
_target = (LoadScene)target;       // THIS LINE HAS FIRST ERROR

EditField ("sceneReference");

if (_target.sceneReference == GetSceneActionBase.SceneSimpleReferenceOptions.SceneAtIndex) {    // SECOND ERROR
EditField ("sceneAtIndex");
} else {
EditField ("sceneByName");
}

EditField ("asynch");

EditField ("loadSceneMode");

EditField("found");
EditField("foundEvent");
EditField("notFoundEvent");

return GUI.changed;
}
}

#endif
Title: Re: Unity 5.6.3p2 and Playmaker 1.8.5
Post by: DigitalDesignSvc on November 25, 2017, 10:17:06 PM
Had a thought and did a search on "LoadScene" in my project.  Turns out, the Turret script from that asset also has a script named "LoadScene".   So.... that was the bugger that got me.  I changed the name of the Turret script and voila!  Solved!

Thank you!  :o)
Title: Re: Unity 5.6.3p2 and Playmaker 1.8.5 [SOLVED]
Post by: Alex Chouls on November 25, 2017, 11:03:53 PM
Thanks for posting the solution - I'm sure it will help other people who run into the same problem!