Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to transfer data to change animation parameters through scripts?

Discussion in 'Animation' started by Meowgman, Nov 19, 2023.

  1. Meowgman


    Nov 19, 2023
    So i'm making a farming RPG and the player character has different preset colors for example he has a green and gold color scheme then a red and blue color scheme each of these has their own animation sprites and i was using a Interger parameter named "color" to change the color of the animation.
    this is my code to find the other script (For context in the select player screen you can hit a button which changes the players color and the color variable, this variable is then sent to the other script)
    this is my code to change the paramater it doesn't say it has any errors but i get an error upon starting the selection screen
    I'm very new to Unity and this is only my first real project i'm working on so any help would be much appreciated
    Last edited: Nov 19, 2023