playMaker

Author Topic: Unity 4.5 and namespace problem with custom actions  (Read 10564 times)

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • Grinder Games
Unity 4.5 and namespace problem with custom actions
« 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?




doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • Grinder Games
Re: Unity 4.5 and namespace problem with custom actions
« Reply #1 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.

moure

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Unity 4.5 and namespace problem with custom actions
« Reply #2 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!

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • Grinder Games
Re: Unity 4.5 and namespace problem with custom actions
« Reply #3 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 '['

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn