mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-11 04:54:17 -05:00
Removed VRMImporter.Load
This commit is contained in:
parent
21b1c6d520
commit
fa93df71bc
|
|
@ -14,13 +14,23 @@ namespace VRM
|
|||
[Obsolete("use VRMImporterContext.Load(path)")]
|
||||
public static GameObject LoadFromPath(string path)
|
||||
{
|
||||
return VRMImporterContext.Load(path).Root;
|
||||
var context = new VRMImporterContext();
|
||||
context.Parse(path, File.ReadAllBytes(path));
|
||||
context.Load();
|
||||
context.ShowMeshes();
|
||||
context.EnableUpdateWhenOffscreen();
|
||||
return context.Root;
|
||||
}
|
||||
|
||||
[Obsolete("use VRMImporterContext.Load(bytes)")]
|
||||
public static GameObject LoadFromBytes(Byte[] bytes)
|
||||
{
|
||||
return VRMImporterContext.Load(bytes).Root;
|
||||
var context = new VRMImporterContext();
|
||||
context.ParseGlb(bytes);
|
||||
context.Load();
|
||||
context.ShowMeshes();
|
||||
context.EnableUpdateWhenOffscreen();
|
||||
return context.Root;
|
||||
}
|
||||
|
||||
[Obsolete("use VRMImporterContext.Load()")]
|
||||
|
|
@ -28,6 +38,7 @@ namespace VRM
|
|||
{
|
||||
context.Load();
|
||||
context.ShowMeshes();
|
||||
context.EnableUpdateWhenOffscreen();
|
||||
}
|
||||
|
||||
#region LoadVrmAsync
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UniGLTF;
|
||||
using UnityEngine;
|
||||
|
||||
|
|
@ -14,24 +13,13 @@ namespace VRM
|
|||
const string HUMANOID_KEY = "humanoid";
|
||||
const string MATERIAL_KEY = "materialProperties";
|
||||
|
||||
public VRMImporterContext(UnityPath gltfPath = default(UnityPath)) : base(gltfPath)
|
||||
[Obsolete]
|
||||
public VRMImporterContext(UnityPath gltfPath) : base(gltfPath)
|
||||
{
|
||||
}
|
||||
|
||||
public static VRMImporterContext Load(string path)
|
||||
public VRMImporterContext()
|
||||
{
|
||||
var context = new VRMImporterContext(UniGLTF.UnityPath.FromFullpath(path));
|
||||
context.ParseGlb(File.ReadAllBytes(path));
|
||||
context.Load();
|
||||
return context;
|
||||
}
|
||||
|
||||
public static VRMImporterContext Load(Byte[] bytes)
|
||||
{
|
||||
var context = new VRMImporterContext();
|
||||
context.ParseGlb(bytes);
|
||||
context.Load();
|
||||
return context;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
|
|
|
|||
2
UniGLTF
2
UniGLTF
|
|
@ -1 +1 @@
|
|||
Subproject commit e0c90f42cc192b42d45be53c9fd5551cbe1b1984
|
||||
Subproject commit 5595029d7446fa4c1a8136dc47527c87c5a89fdd
|
||||
Loading…
Reference in New Issue
Block a user