Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: doppelmonster on May 28, 2014, 04:55:54 AM

Title: Unity 4.5 and namespace problem with custom actions
Post by: doppelmonster on May 28, 2014, 04:55:54 AM
I just installed Unity 4.5.
First everything worked fine. Until the scripts where recompiled. Now my custom actions are throwing errors and playmaker is gone. Im using Playmaker 1.7.7.f6

Here is the error:

Assets/06__CustomScripts/CustomActions/CheckdeviceMW.cs(8,10): error CS0246: The type or namespace name `Tooltip' could not be found. Are you missing a using directive or an assembly reference?

Assets/06__CustomScripts/CustomActions/CheckdeviceMW.cs(8,10): error CS0104: `TooltipAttribute' is an ambiguous reference between `UnityEngine.TooltipAttribute' and `HutongGames.PlayMaker.TooltipAttribute'

This is one of the faulty Actions (aswell as all DF-GUI actions for example):

Code: [Select]
using UnityEngine;
using HutongGames.PlayMaker;

[ActionCategory(ActionCategory.Device)]
public class CheckdeviceMW : FsmStateAction
{
[UIHint(UIHint.Variable)]
[Tooltip("Type of device: 0 = Web/PC/other, 1 = android, 2 = iOS")]
public FsmInt deviceType;

.....


However if i change the beginning everything is okay and playmaker runs again:

Code: [Select]
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{

[ActionCategory(ActionCategory.Device)]
[Tooltip("Type of device: 0 = Web/PC/other, 1 = android, 2 = iOS")]
public class CheckdeviceMW : FsmStateAction

.....



But this would be much work to do for all my custom actions...
What is the best way to solve this?



Title: Re: Unity 4.5 and namespace problem with custom actions
Post by: doppelmonster on May 28, 2014, 05:37:38 AM
okay i fixed my current actions by replacing 'Tooltip' with 'HutongGames.PlayMaker.Tooltip'

so i can continue with my project.
Title: Re: Unity 4.5 and namespace problem with custom actions
Post by: moure on May 28, 2014, 11:35:52 AM
I had the same exact issue, thanx for this solution ;)
Though in the daikon forge actions you have to change [Tooltip.... with [HutongGames....... otherwise you destroy a couple of their functions that use also tooltip inside them.

Cheers!
Title: Re: Unity 4.5 and namespace problem with custom actions
Post by: doppelmonster on May 28, 2014, 12:21:04 PM
Yes i forgot to mention that. In DF GUI there are two tooltip actions where i manually reverted the batch replaced changes. Otherwise you get a parsing error.

good tip using the '['
Title: Re: Unity 4.5 and namespace problem with custom actions
Post by: Alex Chouls on May 28, 2014, 06:49:09 PM
Please see the post here:
http://hutonggames.com/playmakerforum/index.php?topic=7454.0