x


Animation Event not working with syncLayer ?

I'm utilizing the new Animation Editor in Unity 2.6.1 adding Animation Events to clips in the timeline. However it doesn't seem to work if using the SyncLayer funtion in the animation script. For example, I'm using the animation editor to add an event to the "run" animation to call a "playFootStepSound" function, it simply does not work if the animation's layer is set to syncLayer.

I have seen this issue briefly mentioned on the forums (see below), but there hasn't been a confirmation whether this is a known bug to be fixed soon, or whether there are workarounds etc.

It would be a shame not to be able to use both of these essential and powerful features in conjunction.

http://forum.unity3d.com/viewtopic.php?t=13333&highlight=animationevent

more ▼

asked Feb 10 '10 at 06:45 PM

christopholus gravatar image

christopholus
3 1 1 4

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

I can reproduce this bug. We'll work on getting it fixed.

more ▼

answered Feb 12 '10 at 01:29 PM

runevision gravatar image

runevision ♦♦
8.1k 29 46 112

I look forward to that, thanks!

Feb 12 '10 at 09:43 PM christopholus
(comments are locked)
10|3000 characters needed characters left

I can confirm this bug is still happening in 3.1. It might be just an oversight, or the way Unity designed things. Apparently Unity only considers that an animation is "active" - for event checkings, etc - after any transition that are blending into it are complete. For our game we had to add a "fire hack" toggle for the weapons with instant or very early fire (relative to the animation start). For weapons with a relatively long pre-attack, ie. attack starts after some preparation move, events work just fine. Another alternative is having another layer with fake animations (ie. that doesn't affect the actual animations) but with the same duration and firing the events instead of the main animations. These fake animations would always transition in cuts instead of crossfading. The big question in that case would be, if you can't see the relevant animation (eg. attack) playing to sync the event, why bother? True, better add any short delay manually.

Ideally, all events on all transitioning animations should be considered, always. Can you make a plight for us to get this changed, Rune? :)

more ▼

answered Dec 21 '10 at 01:36 AM

MaDDoX gravatar image

MaDDoX
165 8

(comments are locked)
10|3000 characters needed characters left

This bug was also in 2.5. It also doesn't execute Animation Events when the animation is cross fading.

more ▼

answered Feb 27 '10 at 08:51 PM

Gabriel 1 gravatar image

Gabriel 1
87 2

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3772
x166
x150

asked: Feb 10 '10 at 06:45 PM

Seen: 1510 times

Last Updated: Feb 10 '10 at 06:45 PM