mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-04-10 04:14:49 -05:00
32 lines
824 B
C#
32 lines
824 B
C#
using System.IO;
|
|
using UnityEngine;
|
|
|
|
namespace UniVRM10
|
|
{
|
|
public static class TestAsset
|
|
{
|
|
public static string AliciaPath
|
|
{
|
|
get
|
|
{
|
|
return Path.GetFullPath(Application.dataPath + "/../Tests/Models/Alicia_vrm-0.51/AliciaSolid_vrm-0.51.vrm")
|
|
.Replace("\\", "/");
|
|
}
|
|
}
|
|
|
|
public static Vrm10Instance LoadAlicia()
|
|
{
|
|
Vrm10Data.TryParseOrMigrate(AliciaPath, true, out Vrm10Data vrm);
|
|
using (var loader = new Vrm10Importer(vrm))
|
|
{
|
|
var task = loader.LoadAsync(new VRMShaders.ImmediateCaller());
|
|
task.Wait();
|
|
|
|
var instance = task.Result;
|
|
|
|
return instance.GetComponent<Vrm10Instance>();
|
|
}
|
|
}
|
|
}
|
|
}
|