is LAppModelProxy.cs has function to stop motion (except idle motion) while playing ? I think it would be more fun i can control when motion of my model stop
thank you for your help, but after i followed your instruction i found this problem.
it say: Assets/Scripts/sample/LAppModel.cs(197,22): error CS0136: A local variable named `update' cannot be declared in this scope because it would give a different meaning to `update', which is already used in a `parent' scope to denote something else
Comments
[LAppModelProxy.cs] public void button1_click(){ model.StartMotion("shake", 0, 2); } public void button2_click(){ model.StartMotion("tap_body", 0, 2); }model.StartMotion(argument1, argument2, argument3)・argument1 = model.json - GroupID("idle", "tap_body", "pinch_in", "shake"...)
・argument2 = model.json - GroupID - File number(0, 1, 2, from the top ...)
・argument3 = 2(fixed) → Priority
Please try this.
↓
・Specified motion playback in SampleApp1 of Live2D
is LAppModelProxy.cs has function to stop motion (except idle motion) while playing ?
I think it would be more fun i can control when motion of my model stop
[LAppModel.cs] public class LAppModel :L2DBaseModel { private LAppModelProxy parent; private LAppView view; public bool motion_stop = false; // add code . . public void Update(){ . . live2DModel.loadParam(); // modify code start bool update = false; if(motion_stop == false){ // bool update = mainMotionManager.updateParam(live2DModel); update = mainMotionManager.updateParam(live2DModel); } // modify code stop if (!update) . . if(motion_stop == false){ // add code live2DModel.update(); } // add code }[LAppModelProxy.cs] // add code public void button4_click(){ // motion stop model.motion_stop = false; } public void button5_click(){ // motion start model.motion_stop = true; }it say:
Assets/Scripts/sample/LAppModel.cs(197,22): error CS0136: A local variable named `update' cannot be declared in this scope because it would give a different meaning to `update', which is already used in a `parent' scope to denote something else
Do you have what code to 197 line ?
here the code in 197 line.
i found error code come from the code that you give
i wonder, am i wrong write the code that you give or something?
because i really follow your instruction correctly
i upload code from LAppModel.cs and LAppModelProxy.cs
Please look at my wrote code!
The code in 197 line is comment out.
thank you a lot
now my motion can stop but the audio still running.
can audio set like motion too?
Voice stop is add the following code.
[LAppModel.cs] public void Update() { ・ ・ // Add code start if (motion_stop == true) { // voice stop asVoice.Stop(); } // Add code stop ・ ・ }thank you naotaro, you really help me