Search Unity

How to change UMA Dynamic Character aspect such as Body - Headsize as example vis Code C#?

Discussion in 'Getting Started' started by cratica, Dec 24, 2021.

  1. cratica

    cratica

    Joined:
    Dec 11, 2016
    Posts:
    59
    As title indicates, I want to be able to adjust the avatars features via code... change headsize, arm size, etc. So far I haven't found a way to easily do this.

    Are there commands available to modify these in c#? Or do I need to save avatar string to file, parse it and change the values, reload avatar? (really bad option but I am desperate... :) )

    Thank you!
     
    Last edited: Dec 24, 2021
  2. cratica

    cratica

    Joined:
    Dec 11, 2016
    Posts:
    59
  3. cratica

    cratica

    Joined:
    Dec 11, 2016
    Posts:
    59
    That is really not all that helpful. Still not sure the actual commands to use to change an element of the dna of an avatar. This shows you how to read I guess the entire dna into a dictionary and somehow dna.set value but how to tell it what value to set? Very unclear documentation...

    So if I wanted to change the head size of an avatar in code, does anyone know how to do this? Thank you very much!

    something like this ex: avatar.setDna("HeadSize").newValue(.1f);