#No but we can make a thread here

1 messages · Page 1 of 1 (latest)

dark badge
#

Start thread

#

So basically these animations are for an avatar in VRChat.
Each Layer contains animations that toggle on or off a piece of clothing in the game. Each type of clothing has an int parameter, and its animations are only called on its corresponding layer.

But for some reason when I tried to not use Any State, what would happen is that I can for example turn on Socks, but then I would not be able to turn on/off Pants which are in a layer above the Socks layer

#

Any State solves that, but it introduces the problem that I can't also play the Turn Off animations since it skips them and goes directly to Any State

valid talon
#

Hmm are they override or additive layers?

dark badge
#

Override

valid talon
#

Could try as additive and/or with "write defaults" off

dark badge
#

I have write defaults off already since that caused other problems

valid talon
#

From my experience there really shouldn't be a reason why the layers would have any effect on each other when they're modifying entirely different properties

dark badge
#

Could it be that the animation gets stuck inside one layer and can't go to the next? I don't know if this makes sense

valid talon
#

The layer state machines run independently of each other

dark badge
#

Hmmm ok

valid talon
#

Can you use scripts instead of animations?

dark badge
#

I could, but I'm not very familiar with how scripting works in Unity. I tried yesterday to use a script in order to modify some parameters of a Game Object from within an Animation, and it just wouldn't be able to access the Game Object, so that was quite frustrating...

valid talon
#

Fundamentally animations do everything they do by modifying exposed properties of components/scripts

dark badge
#

Do you have any links to some resources on how scripting works with animations?

valid talon
#

This specific system I'd do 100% in scripting

dark badge
#

Oh ok...

#

Maybe I should try that as well

#

I assume I attach different scripts to different layers, because I can't see an option to attach scripts to the .controller file

valid talon
#

I'd make a script that gets a reference to the gameobjects by one of the many ways you can get references, then toggles the gameobject enabled/disabled via a public method that can be called from elsewhere by whatever way VRChat lets you call methods

valid talon
dark badge
#

Oh, the problem is I HAVE to use Animations

valid talon
#

So, scripts or no scripts?

dark badge
#

I assumed u meant using scripts within the animation controller

#

VRChat uses the animation controller to grab data from the avatar, so I must use it sadly...

valid talon
#

You can call scripts from animation events, but that requires you have the ability to add scripts to gameobjects for the events to call

dark badge
#

I can add scripts to the gameobjects, so that should not be a problem

#

Ok, thx for the help. I'll start looking into using scripts instead of the annoying visual scripting thing

valid talon
#

Good luck! There's always !learn if you need to study some basics

warped voidBOT
#

🧑‍🏫 Unity Learn can offer you over 750 hours of free live and on-demand learning content for all levels of experience! Make sure to check it out at https://learn.unity.com/

valid talon
#

And also !vrchat where people will actually know the constraints and limits you're working around

warped voidBOT