Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Could we have blendtree switch by integer?

Discussion in 'Animation' started by Thaina, Sep 12, 2018.

  1. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,157
    While animation could take integer parameter, the blendtree could only take float value. I wish we could allow blendtree to take interger as switching, not blending, between multiple motion without creating state

    We could emulate by change interger parameter to float parameter and just let it blend the only one value. but I think I would like to have the value still be interger for other places

    Is it possible?
     
  2. sxnorthrop

    sxnorthrop

    Joined:
    Sep 29, 2014
    Posts:
    43
    That sounds kind of redundant. You can use the float as if it's an integer by only assigning integer values to it. Or maybe I'm misunderstanding the question.
     
  3. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,157
    @sxnorthrop It's the problem that we might have declare that parameter as integer from the start and use it as state for other statemachine and having other system read it as int. But when we want to use it as blendtree switch we need to change it to float everywhere

    It also possible to optimize the blendtree to not blend from multiple motion but just switch in these scenario
     
    Roman-Ilyin likes this.