Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Changing Animated Characters via Script

Discussion in 'Animation' started by alimadan, Apr 23, 2019.

  1. alimadan

    alimadan

    Joined:
    Mar 15, 2019
    Posts:
    3
    Hey,

    I have 3 different animated characters which are all drawn with photoshop. Parts of the characters that I wanted to animate were drawn in different layers and were animated through unity's skeletal animator successfully. I am new to Unity, and I want to change the appearance of the player to any of animated characters prefabs when the player collides with a certain gameobject.

    For example, when the character collides with the blue gameobject, it becomes the blue animated character. When it collides with the yellow gameobject, it becomes the yellow animated character and so on. How can I do so through script given that all animated characters are different prefabs with different animations?

    Thanks in advance.