Howdy, Stranger!

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

If you have any questions, reports, suggestions, or requests about Live2D, please send them to this community.
※We cannot guarantee statements or answers from Live2D staff. Thank you for your understanding in advance.
 
Live2D Cubism
Cubism Products and Downloads
Cubism product manuals and tutorials
Cubism Editor Manual    Cubism Editor Tutorial    Cubism SDK Manual    Cubism SDK Tutorial
"[NOTICE]" About the support for Mac models
Cubism Editor is not supported with Apple M1 processors.
Please refer to System Requirements for details.
We will not respond to any related inquiries with this message.
Please note that Cubism SDK is not supported with Apple M1 processors and macOS 11.0 Big Sur.
Live2D user has created a tutorial video(unoffilcial) in English. SEE ALSO.
Thank you, brian_tsui!
[Live2D Tutorial 2020] Introduction to Tools and Technical Concepts

Dynamically Changing Model

Heya ^_^

I'm trying to have the model be change-able mid-game, through a script.

My current attempt is to have the script set the path in LAppModelProxy to the path of the new model.json file. This resulted in nothing happening >.<

I then tried to force the Visible variable, call Awake and OnRenderObject methods. These haven't accomplished anything =/

If I set the starting path to the model, it loads the model, but doesn't override it when I change the path and/or try these method calls.

Any help would be appreciated :D

Comments

  • Turns out that the problem is trying to load resources outside of the Resource Folder -.- And it looks like it'll be a big headache to sort all of that out D:
  • i'm more of an artist than a programmer, but I'm sure it would make it easier for programmers to help you find a solution if you mention what programs you're using (Unity, Tyranobuilder etc) and what version SDK you have :)
  • renoa said:

    i'm more of an artist than a programmer, but I'm sure it would make it easier for programmers to help you find a solution if you mention what programs you're using (Unity, Tyranobuilder etc) and what version SDK you have :)

    Hello Renoa ^^

    I'm using Unity (as this is the Unity board :P), I'm writing my scripts in C# and am using whatever SDK was current a month ago. >_<

    Thanks :D
  • Hi Adura,

    do you want to swap models or do you want to swap parts of a model in game?
  • Hi Andi!

    My post was about swapping models mid-game (switching the model.json files). I got it to work, but only for files in the Unity Resource folder. And it looks like the FileManager, and many of the other classes, are designed to work that way. At this point, I'll probably just have to work within that restraint :x Not optimal, but I can live with it :p
    Thanks for the reply ^^
  • You could also create a game object for every model you want to use and one additional game object that works as a proxy for the models. You could then manipulate the proxy and control which model to display via the proxy. This would erase the necessity to put everything in resource folders.
  • You could also create a game object for every model you want to use and one additional game object that works as a proxy for the models. You could then manipulate the proxy and control which model to display via the proxy. This would erase the necessity to put everything in resource folders.

    But the Live2D class can only load textures, text assets and sounds (everything, basically) from the resource files. If I set the path to anything outside of the resource folder, the Live2D game object doesn't work, and I get errors from the FileManager class (which tries to gather the resources the model file uses, I think.)

    Is there something I'm missing? Or would I have to rewrite how the Live2D classes access their files (which I'd much rather not do >_<) (I had tried to alter how the Live2D FileManager gathers its resources, but loading a 'TextAsset' proved too annoying D: )
  • I posted a small app I created in another thread (http://community.live2d.com/discussion/295/what-are-you-working-on). For that app I wrapped a few Live2D classes so that I didn't have to put everything in resource folders. It ended up rather simple to implement. I didn't implement animations, though. Maybe you could give the project a look?
Sign In or Register to comment.