mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-05 02:21:28 -05:00
Removed VRMImporter.Load
This commit is contained in:
@@ -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
Submodule UniGLTF updated: e0c90f42cc...5595029d74
Reference in New Issue
Block a user