I followed all the steps on the official website to make Cubism DIY Viewer by Unity but failed.
Hope someone who understand the error message can help me, thanks ><
This is the error message:
NullReferenceException: Object reference not set to an instance of an object
System.Windows.Forms.CommonDialog.ShowDialog () (at <361626b7593f474ba856a43d392652dc>:0)
(wrapper remoting-invoke-with-check) System.Windows.Forms.CommonDialog.ShowDialog()
Live2D.Cubism.Viewer.CubismViewer.ShowFileDialog () (at Assets/Live2D/Cubism/Viewer/CubismViewer.cs:108)
UnityEngine.Events.InvokableCall.Invoke () (at <24599fe2776145d58ab771516c063d56>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <24599fe2776145d58ab771516c063d56>:0)
UnityEngine.UI.Button.Press () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:68)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:110)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:262)
UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:385)
The steps on official website:
https://docs.live2d.com/cubism-sdk-tutorials/use-cubismdiyviewer/
Comments
Thank you for your contact.
This is Live2D Support.
Cubism DIY Viewer was prepared because there was no viewer available to check the operation at that time.
However, it is no longer maintained since Cubism Viewer (for OW) and Cubism Viewer for Unity exist now.
Could you please check if the following steps would resolve the phenomenon?
1. change the project's .Net Framework from Project Settings.
Unity 2020 : .NET 4.x
Unity 2021 : .NET Framework
2. replace System.Windows.Forms.dll with 4.x-api.
Thanks.