playMaker

Author Topic: Mecanim support and demo [New February 2014 Version]  (Read 26821 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Mecanim support and demo
« Reply #15 on: November 11, 2013, 01:26:01 AM »
Hi,

 It's not your teddybear that controls your character, it's likely that you have both objects reactin to user input, right?

bye,

 Jean

Blitztron

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Mecanim support and demo
« Reply #16 on: November 19, 2013, 05:34:14 AM »
Yeah.

But  when the teddybear is removed the new character is stuck in idle forever. Weird.

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Mecanim support and demo
« Reply #17 on: November 19, 2013, 07:33:26 AM »
I just downloaded this stuff to have a look, from https://hutonggames.fogbugz.com/default.asp?W1031

Using Unity 4.3.

I imported PlayMakerAnimatorActions.unitypackage  first, then PlayMakerAnimatorWithDemos.unitypackage

However I get the following error, so can't do anything:

Assets/PlayMaker Custom Actions/Animator/DoLocomotion.cs(27,27): error CS0246: The type or namespace name `Locomotion' could not be found. Are you missing a using directive or an assembly reference?
« Last Edit: November 19, 2013, 07:40:16 AM by jess84 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Mecanim support and demo
« Reply #18 on: November 19, 2013, 07:42:53 AM »
Hi,

 Have you also downloading the Unity Demo package? it's required, it has all the assets. The link is on the meacnim wiki page, but I added it below for convenience.

http://u3d.as/content/unity-technologies/mecanim-example-scenes/3Bs


WARNING: it has yet to be ported to Unity 4.3 as a lot has changed on Mecanim with the latest Unity, so you mae have obsolete warnings and errors here and there, until I properly adjust everything.

Bye,

 Jean

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
Re: Mecanim support and demo
« Reply #19 on: December 17, 2013, 07:48:10 PM »
any news about 4.3 support? I will love to animate my 2D sprite with Mecanic.
Thanks!

edited: Mecanim Animator is not supported yet; i hope for some handy actions to work with sprites.
« Last Edit: December 17, 2013, 08:34:13 PM by elvis75k »

funshark

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Mecanim support and demo
« Reply #20 on: December 18, 2013, 11:43:39 AM »
Well, actually, you can't animate anything without mecanim in 4.3, am I wrong?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Mecanim support and demo
« Reply #21 on: December 18, 2013, 12:18:23 PM »
Hi,

 of course you can, everything you could do before mecanim, you can still do. What makes you think that Mecanim is the only way?

bye,

 Jean

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Mecanim support and demo
« Reply #22 on: December 18, 2013, 01:23:06 PM »
Just reporting that GetAnimatorIsControlled action in Unity 4.3.2f1 is obsolete.
Assets/PlayMaker Animator/Actions/GetAnimatorIsControlled.cs(87,56): error CS0619: `UnityEngine.Animator.IsControlled(UnityEngine.Transform)' is obsolete: `use mask and layers to control subset of transfroms in a skeleton'

funshark

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Mecanim support and demo
« Reply #23 on: December 18, 2013, 01:33:19 PM »
Hi,

 of course you can, everything you could do before mecanim, you can still do. What makes you think that Mecanim is the only way?

bye,

 Jean

Because when I create an animation in the Animation editor, it creates automatically an "Animator" component and an "event" in the Animator window.
It's not totally what we call mecanim I think, but it's related in a way.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Mecanim support and demo
« Reply #24 on: December 18, 2013, 02:34:28 PM »
Hi,

 what Animation editor are talking about? can you make a reference or a screenshot?

I know for sure ( and it's a real shame), that Unity messed up a bit with the name "animation" and it's very very confusing right now, because there is two types of animation, one for mecanim and one for legacy. and it's mess cause switching between the two is not clear not well documented.

 You may be experiencing this, and in which case, you should report a bug to Unity, so they get as much complains as possible on that matter to properly adjust their interface to make it obvious.

Bye,

 Jean


funshark

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Mecanim support and demo
« Reply #25 on: December 18, 2013, 03:05:47 PM »
That's the Animation editor I'm talking about :


Here we can see that Playmaker is asking for the Animation component :


And here I've added manually an Animation component to be able to fill the action but it doesn't work --> the events are not taken in account

funshark

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Mecanim support and demo
« Reply #26 on: December 18, 2013, 03:23:38 PM »
Ok I have some news.

I wasn't aware of the existence of a "switch" to pass your Animation to the legacy mode. ( btw you can find it on the clip with the help of the Inspector debug mode =3= yay!)
Now I can use Playmaker to control the Animations ( with the Animation component ) but unfortunately, the Sprite animation integrated in Unity 4.3 does not work anymore after that :(((

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
Re: Mecanim support and demo
« Reply #27 on: December 18, 2013, 07:32:24 PM »
That's the Animation editor I'm talking about
---
Here we can see that Playmaker is asking for the Animation component :
---
And here I've added manually an Animation component to be able to fill the action but it doesn't work --> the events are not taken in account
This is the same problem i've ecountered yesterday. I was trying to convert the logic behind the prime31 CharacterController2D with PM but failed miserably at the animation stage (never used mecanim before). All the brand new unity 2D tutorials 4.3 use mecanim to handle animation of sprites. How can we play 2D sprites animations then (idle, jump, walk, run) using playmaker? Do we need a custom mecanim action? or it's already here?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Mecanim support and demo
« Reply #28 on: December 19, 2013, 02:20:59 AM »
Hi,

 Ok, the way to go is likely the following ( thanks to lea Hayes for this)

Quote
1. Remove "Animator" component from game object.
2. Add "Animation" component to game object.
3. Associate the recorded animation with the animation component.
4. Select the animation asset.
5. Right-click the inspector and select "Debug" mode.
6. Change the animation type from "2" to "1" (legacy mode).
7. Right-click the inspector and re-select "Normal" mode.
 
This allows you to use animations recorded using the animator component,
with the legacy animation component. I have been encountering a number of
issues with the animator components in my current project and have been
forced to use the legacy one.

Can you try this?

Bye,
 
Jean

funshark

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Mecanim support and demo
« Reply #29 on: December 19, 2013, 06:39:00 AM »
The thing is, when we do that, we can't use the Sprite animation functionality included in Unity 4.3