unity animation event custom parameters code example Example: unity animation set parameter component.getComponent<Animator>().SetBool("Slice", true);