Hi all My scene has 44 instances of the same FBX model. There is no prefab connection to the FBX model, the gameobjects were simply duplicated in the scene view. There is a script on them all that adds an animation event to one of the animations in the Start Function. Other scripts determine _ONE_ of these 44 to play that specific animation. All 43 others continue to play their 'idle' animation. The event gets called 44 times, once for every existing gameobject even though only one of them plays the animation with the event on it. Why is this? The script as it exists on all of the GameObjects is below: Code (csharp): void Start () { attached = new AnimationEvent(); attached.time = .6f; attached.functionName = "startAttaching"; animation["Attach Direct"].clip.AddEvent(attached); }
Yes... the same thing is happening here. It seems as if all GameObjects use one instance of the clips, but that doesn't work when you want to know when a particular object is triggering an animationevent.