How to set an animator bool as true on start?

I need a bool that controls one of my animation transitions to be set as true once my game starts.


for example:

void Awake()
    {
        animator.SetBool("isWinter", true);
        isWinter = true;
        isSpring = false;
        isSummer = false;
        isAutumn = false;
}

Upon starting the “isWinter” bool should be true

129169-unity.png

I realised that the definition of my animator variable wasn’t calling the Animator component before my Awake function.

void Awake()
    {
        animator = GetComponent<Animator>();
        animator.SetBool("isWinter", true);
        isWinter = true;
        isSpring = false;
        isSummer = false;
        isAutumn = false;
}

This works now, thanks for the help!