File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2525 * SOFTWARE.
2626 */
27+ #pragma warning disable CS0162
2728using UnityEngine ;
2829using UnityEditor ;
2930using UnityEditor . AnimatedValues ;
@@ -37,7 +38,7 @@ public class Tutorial : EditorWindow
3738 static GUIStyle style = new GUIStyle ( ) ;
3839 static int page = 1 ;
3940 static AnimFloat anim = new AnimFloat ( 0.001f ) ;
40- const bool check = VRMVersion . MAJOR != 0 || VRMVersion . MINOR != 80 ;
41+ const bool check = VRMVersion . MAJOR != 0 || VRMVersion . MINOR != 99 ;
4142
4243 [ InitializeOnLoadMethod ]
4344 static void InitializeOnLoad ( )
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ namespace EVMC4U
4444 //[RequireComponent(typeof(uOSC.uOscServer))]
4545 public class ExternalReceiver : MonoBehaviour , IExternalReceiver
4646 {
47- [ Header ( "ExternalReceiver v3.8 " ) ]
47+ [ Header ( "ExternalReceiver v3.9 " ) ]
4848 public GameObject Model = null ;
4949 public bool Freeze = false ; //すべての同期を止める(撮影向け)
5050 public bool PacktLimiter = true ; //パケットフレーム数が一定値を超えるとき、パケットを捨てる
@@ -673,12 +673,13 @@ public void LoadVRMFromData(byte[] VRMdata)
673673 //読み込み
674674 GlbLowLevelParser glbLowLevelParser = new GlbLowLevelParser ( null , VRMdata ) ;
675675 GltfData gltfData = glbLowLevelParser . Parse ( ) ;
676- VRMImporterContext vrmImporter = new VRMImporterContext ( gltfData ) ;
676+ VRMData vrm = new VRMData ( gltfData ) ;
677+ VRMImporterContext vrmImporter = new VRMImporterContext ( vrm ) ;
677678
678679 isLoading = true ;
679680
680681 synchronizationContext . Post ( async ( arg ) => {
681- RuntimeGltfInstance instance = await vrmImporter . LoadAsync ( ) ;
682+ RuntimeGltfInstance instance = await vrmImporter . LoadAsync ( new VRMShaders . ImmediateCaller ( ) ) ;
682683 isLoading = false ;
683684
684685 Model = instance . Root ;
@@ -696,6 +697,10 @@ public void LoadVRMFromData(byte[] VRMdata)
696697 //カメラなどの移動補助のため、頭の位置を格納する
697698 animator = Model . GetComponent < Animator > ( ) ;
698699 HeadPosition = animator . GetBoneTransform ( HumanBodyBones . Head ) . position ;
700+
701+ //開放
702+ vrmImporter . Dispose ( ) ;
703+ gltfData . Dispose ( ) ;
699704 } , null ) ;
700705 }
701706
You can’t perform that action at this time.
0 commit comments