mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-10-01 07:11:02 -05:00
Removed show argument from ImporterContext
This commit is contained in:
@@ -56,13 +56,29 @@ namespace VRM
|
||||
{
|
||||
context.ParseGlb(bytes);
|
||||
}
|
||||
context.LoadAsync(onLoaded, onError, show);
|
||||
context.LoadAsync(_ =>
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
context.ShowMeshes();
|
||||
}
|
||||
onLoaded(context.Root);
|
||||
},
|
||||
onError);
|
||||
}
|
||||
|
||||
[Obsolete("use VVRMImporterContext.LoadAsync")]
|
||||
public static void LoadVrmAsync(VRMImporterContext context, Action<GameObject> onLoaded, Action<Exception> onError = null, bool show = true)
|
||||
{
|
||||
context.LoadAsync(onLoaded, onError, show);
|
||||
context.LoadAsync(_ =>
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
context.ShowMeshes();
|
||||
}
|
||||
onLoaded(context.Root);
|
||||
},
|
||||
onError);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace VRM
|
||||
OnLoadModel();
|
||||
}
|
||||
|
||||
protected override Schedulable<GameObject> LoadAsync(bool show)
|
||||
protected override Schedulable<Unit> LoadAsync()
|
||||
{
|
||||
return Schedulable.Create()
|
||||
.AddTask(Scheduler.ThreadPool, () =>
|
||||
@@ -129,17 +129,10 @@ namespace VRM
|
||||
{
|
||||
Root.name = "VRM";
|
||||
Debug.Log(GetSpeedLog());
|
||||
|
||||
if (show)
|
||||
{
|
||||
ShowMeshes();
|
||||
}
|
||||
|
||||
return Root;
|
||||
return Unit.Default;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
#region OnLoad
|
||||
void OnLoadModel()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user