#No but we can make a thread here
1 messages · Page 1 of 1 (latest)
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
Hmm are they override or additive layers?
Override
Could try as additive and/or with "write defaults" off
I have write defaults off already since that caused other problems
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
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
The layer state machines run independently of each other
Hmmm ok
Can you use scripts instead of animations?
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...
Fundamentally animations do everything they do by modifying exposed properties of components/scripts
Do you have any links to some resources on how scripting works with animations?
This specific system I'd do 100% in scripting
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
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
You attach scripts to gameobjects
Oh, the problem is I HAVE to use Animations
So, scripts or no scripts?
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...
You can call scripts from animation events, but that requires you have the ability to add scripts to gameobjects for the events to call
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
Good luck! There's always !learn if you need to study some basics
🧑🏫 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/
And also !vrchat where people will actually know the constraints and limits you're working around
Join the growing VRChat community as you explore, play, and create the future of social VR! https://discord.com/invite/vrchat