[About macOS Ventura 13.0] (12/20/2022)
The currently released Live2D Cubism SDK is not guaranteed to work with macOS Ventura.
Please refrain from upgrading the macOS as they may not work properly.
The Cubism Editor license file may be lost after the macOS upgrade.
Please make sure to deactivate the Cubism Editor license before upgrading the macOS.
For more details
About the support for Mac models
Cubism Editor is not supported with Apple M1 processors.
Please refer to System Requirements
We will not respond to any related inquiries with this message.
Switching scenes: MissingReferenceException
I'm displaying my model in Unity without any problems.
Now I want to change from my scene with the model to another scene which has an options menu. Switching to the options scene works fine but when I switch back and try to move the model, I get the following error:
MissingReferenceException: The object of type 'Transform' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Transform.TransformPoint (Vector3 position) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineTransformBindings.gen.cs:378)
LAppView.UpdateTouchPos_2DCamera (Vector3 inputPos) (at Assets/Scripts/sample/LAppView.cs:305)
LAppView.TouchesBegan (Vector3 inputPos) (at Assets/Scripts/sample/LAppView.cs:83)
LAppModel.TouchesBegan (Vector3 inputPos) (at Assets/Scripts/sample/LAppModel.cs:607)
LAppLive2DManager.TouchesBegan (Vector3 inputPos) (at Assets/Scripts/sample/LAppLive2DManager.cs:126)
MyGameController.Update () (at Assets/Scripts/sample/MyGameController.cs:369)
Sorry that it took a few days to answer.
How are you switching between scenes? Are you using the 'SceneManager' functionality Unity provides?
I'm using the 'SceneManager' class (
This error is the same as the following thread .
Japanese Live2D Forum - SampleApp1でScene切り替え
I think that to solve in LAppView Modify .
Hey, thanks for posting a link to the solution !
Could you try out naotaro's suggestion? (Just add a null check). Let us know how that worked out .
Thank you, that fixed the exception. I can move the model with my finger und play expressions without a problem after changing the scene back.
But for some reason when I try to access
LAppModelProxyit throws a MissingReferenceException: I try to call a CoRoutine that accesses the model and that is working fine before the scene change.
It looks like the
LAppModelProxyis destroyed when switching scenes and not created again when loading the scene with the model in it.
Sorry. I thought I'd already answered you but I just noticed I forgot to push the "Post Coment" button last week...
Could you check whether the GameObject the LAppModelProxy component is attached to "survives" the scene switch? Or whether it is recreated? (Or whether it doesn't exist at all)?
It seems like the GameObject with the LAppModelProxy component gets destroyed in scene switch and gets recreated when returning to the previous scene.
The Awake() method with CreateModel() is called each time.
If that doesn't work, things get a little bit hacky because while the lifecycle of the LAppModelProxy is controlled by Unity the LAppModel lifecycle is not... (This design will change in the next major version of the SDK, though).
I looked into 'LoadSceneMode.Additive', but when I do that the "old" scene with the model is overlapping my new scene. I tried to figure out how to solve that but I couldn't find anything...
I'm doing the following in the Start() method of my script:
"Canvas_Model" is a Canvas that holds only the model.
When I'm now switching scenes and return to the scene with my model, "Canvas_Model" gets created again so now I have now two models in my scene.
Do I miss there something with DontDestroyOnLoad()?
Is there any eta for the next major version of the SDK to make this more simple?