Forum rules - please read before posting.

Changing skinned mesh renderer

Hello!
I would like to ask for some advice, I just start using AC.
I need to change the mesh of the skinned mesh renderer during the game. That should be clothing changing system. Is it possible to make that by using AC? Maybe any other way for the clothing system?
I found some answer on the forum from 2015 - switch whole character prefab, but it could be problematic to duplicate cut scenes and action lists for each case of clothing(multiply character prefabs), would be much better to just check some variable and change clothing.
Any advice?

Comments

  • Welcome to the community, @windofwar.

    There's a number of techniques to changing a character's clothing in Unity - it really depends on how complex / involved you want it to be. A proper costume customisation system would really need to involve a dedicated asset or script system.

    But if it's just a case of showing/hiding components in your character's hierarchy, you can do that with animation. You can create a sub-layer in your character's Animator that only deals with hiding/showing meshes based on animator parameter values.

    That would be all using Unity's animation system - so check up on Unity's own docs if you're just getting started with it. AC would only need to be involved when you want to change those parameter values (and hence which animation is played). To do that, you can use the Character: Animate Action.

    That said, switching player prefab is still a viable option. You wouldn't have to change your ActionLists - since relevant Actions have an Is Player? option. Checking this will cause them to affect the currently-active Player character - not a specific one that you've had to pre-define.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.