mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-20 01:37:59 -05:00
Merge pull request #386 from hiroj/fix_onloadmodel_to_ienumerator
onloadmodel to return ienumerator
This commit is contained in:
commit
e41708101c
|
|
@ -586,10 +586,10 @@ namespace UniGLTF
|
|||
AnimationImporter.ImportAnimation(this);
|
||||
}
|
||||
})
|
||||
.ContinueWithCoroutine(Scheduler.MainThread, OnLoadModel)
|
||||
.ContinueWith(Scheduler.CurrentThread,
|
||||
_ =>
|
||||
{
|
||||
OnLoadModel();
|
||||
if (m_showSpeedLog)
|
||||
{
|
||||
Debug.Log(GetSpeedLog());
|
||||
|
|
@ -598,9 +598,10 @@ namespace UniGLTF
|
|||
});
|
||||
}
|
||||
|
||||
protected virtual void OnLoadModel()
|
||||
protected virtual IEnumerator OnLoadModel()
|
||||
{
|
||||
Root.name = "GLTF";
|
||||
yield break;
|
||||
}
|
||||
|
||||
IEnumerator TexturesProcessOnAnyThread()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
|||
using UniGLTF;
|
||||
using UnityEngine;
|
||||
using System.IO;
|
||||
|
||||
using System.Collections;
|
||||
|
||||
namespace VRM
|
||||
{
|
||||
|
|
@ -39,7 +39,7 @@ namespace VRM
|
|||
}
|
||||
|
||||
#region OnLoad
|
||||
protected override void OnLoadModel()
|
||||
protected override IEnumerator OnLoadModel()
|
||||
{
|
||||
Root.name = "VRM";
|
||||
|
||||
|
|
@ -47,21 +47,27 @@ namespace VRM
|
|||
{
|
||||
LoadMeta();
|
||||
}
|
||||
yield return null;
|
||||
|
||||
using (MeasureTime("VRM LoadHumanoid"))
|
||||
{
|
||||
LoadHumanoid();
|
||||
}
|
||||
yield return null;
|
||||
|
||||
using (MeasureTime("VRM LoadBlendShapeMaster"))
|
||||
{
|
||||
LoadBlendShapeMaster();
|
||||
}
|
||||
yield return null;
|
||||
|
||||
using (MeasureTime("VRM LoadSecondary"))
|
||||
{
|
||||
VRMSpringUtility.LoadSecondary(Root.transform, Nodes,
|
||||
GLTF.extensions.VRM.secondaryAnimation);
|
||||
}
|
||||
yield return null;
|
||||
|
||||
using (MeasureTime("VRM LoadFirstPerson"))
|
||||
{
|
||||
LoadFirstPerson();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user