Skip to main content
deleted 82 characters in body
Source Link
Hash Buoy
  • 1.5k
  • 1
  • 9
  • 17

The most simplest way of doing this is to make Sub State Machine. So based onBasically you just change the sprites through code depending upon the skin , it can entertype. You should not put the code in Late Update as shown in the tutorial as its just for demonstration purpose. Call the function only once when you want to update the appropriate sub state machineskin.

Each sub state machine will contain allYou can find the required states and transitions which your character currently has. Socomplete tutorial in short you need one more layer on top of the current animator controller, which decides which sub state machine is to be played based upon its skin.this link - https://youtu.be/HM17mAmLd7k?t=1609

enter image description here And the entire source code for the tutorial in this link - http://goo.gl/6oSzDx

The most simplest way of doing this is to make Sub State Machine. So based on the the skin , it can enter in to the appropriate sub state machine.

Each sub state machine will contain all the required states and transitions which your character currently has. So in short you need one more layer on top of the current animator controller, which decides which sub state machine is to be played based upon its skin.

enter image description here

Basically you just change the sprites through code depending upon the skin type. You should not put the code in Late Update as shown in the tutorial as its just for demonstration purpose. Call the function only once when you want to update the skin.

You can find the complete tutorial in this link - https://youtu.be/HM17mAmLd7k?t=1609

And the entire source code for the tutorial in this link - http://goo.gl/6oSzDx

Source Link
Hash Buoy
  • 1.5k
  • 1
  • 9
  • 17

The most simplest way of doing this is to make Sub State Machine. So based on the the skin , it can enter in to the appropriate sub state machine.

Each sub state machine will contain all the required states and transitions which your character currently has. So in short you need one more layer on top of the current animator controller, which decides which sub state machine is to be played based upon its skin.

enter image description here