Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Dear Users,

Now, we are seeking users who can give us a hand with expertise to evolve our software more dynamically.
If you are willing to help us, we’d like you to make a registration for “Live2D Creators Circle” via the link below.
Designers, programmers, translators are especially welcomed so far.
(More detailed explanation will be given to you before we ask you to do tasks)

How to Change Expression/ motion of displayed model by a button press (C# plz)

edited July 2016 in Help
I've attached the Code i've made in a Zip file, though really only The Char Select and Quiz Answers are the ones i think you should be concerned about. Also worth mentioning is that i have 2 models on the canvas in unity, and have only one of them displayed at a time.

So I'm trying to remake the TangoTango quiz From the Tumblr Tutorial. Although since it's both Outdated and doesn't explain the code very well i've tried to make the code myself. The last part I'm concerned about is making it so the character will do a certain emotion (expression and motion). Try as i might though i can't figure out how to make it do so when i make a choice Here's a screenshot what what's there so far

Could anyone help with this? I'm using The SampleApp Data from the Unity SDK, if that's worth mentioning. I can also send the data scripts if necessary, But they've gotten pretty big, so i might need to put some tag comments on them before i do that.


  • edited July 2016
    Nepsmug lmao

    I've had the same problem, but there are a few ways as for how exactly motions are given to the model. Please send me your code, and I'll give it a look to see how we can work it out.
  • I've just attached a zip folder with the script i've written. You should only have to look at Quiz answered, and maybe Select Char. Sorry if it's hard to read.
  • Well crap i only just now realized that i post it in the wrong Folder. SDK and SDK for unity got me confused
  • Also i already figured out how to do this, just for some reason the discussion is not letting me edit it again. Here's how i did it

    public GameObject Shizu; // The Model Canvas, has to be connected from the game object
    private LAppModelProxy Proxy; // The model Proxy
    private LAppModel Model; // The Model

    public void SetChar() { //

    Proxy = Shizu.GetComponent (); // Get the proxy from the Shizu Canvas object
    Debug.Log("Set to; Shizuku"); //Just says in console that you did this

    Model = Proxy.GetModel (); // Sets Model to the canvas Live2D model

    public void SelectButton1 () {
    Model.StartRandomMotion("happy", LAppDefine.PRIORITY_NORMAL);

    That's what i got it. I hope this might help you in some way.
  • Ah, I'm glad that you've found a solution. Thank you for posting it!
  • Yeah, thanks for posting your solution :D !
Sign In or Register to comment.