Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: solideuk on August 22, 2015, 06:46:29 AM

Title: Playmaker - Animator has not been Initialized
Post by: solideuk on August 22, 2015, 06:46:29 AM
Hi All,

I have run into a small issue. I have a prefab which is tile, when a character enters the tile a custom animation plays on the character model.

The problem is, as GameObject references are not saved/stored on prefabs, I have to set the reference using a global variable.

I now have a Goblal Variable which is a gameobject type and holds the player reference.

The issue is everything works, except the custom animation, the error message states that the animator has not been initialized.

Anyone know what i'm doing wrong?

Thanks
Title: Re: Playmaker - Animator has not been Initialized
Post by: sebaslive on August 23, 2015, 03:39:41 PM
Try a couple of things to see if the animation works. Put the action on the player first and see if its a prefab issue. If its not then the animation is set incorrectly.

If it is a prefab issue then you can change the logic so that when the player collides/triggers a tile with tag <burn> then do animation on self.

You can also set the tiles and player under an empty game object which will be your manager and have the tile get parent, and then get child of that parent with the name player(your character gameobject) and send the animation that way. This is to remove the need of this global variable.