mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-20 17:57:57 -05:00
refactoring
This commit is contained in:
parent
12ac6e372e
commit
e7ed265d67
|
|
@ -15,11 +15,15 @@ namespace UniVRM10
|
|||
/// </summary>
|
||||
public class Vrm10Importer : UniGLTF.ImporterContext
|
||||
{
|
||||
VrmLib.Model m_model;
|
||||
private readonly Vrm10Data m_vrm;
|
||||
/// VrmLib.Model の オブジェクトと UnityEngine.Object のマッピングを記録する
|
||||
private readonly ModelMap m_map = new ModelMap();
|
||||
|
||||
readonly Vrm10Data m_vrm;
|
||||
|
||||
IReadOnlyDictionary<SubAssetKey, UnityEngine.Object> m_externalMap;
|
||||
private VrmLib.Model m_model;
|
||||
private IReadOnlyDictionary<SubAssetKey, UnityEngine.Object> m_externalMap;
|
||||
private Avatar m_humanoid;
|
||||
private VRM10Object m_vrmObject;
|
||||
private List<(ExpressionPreset Preset, VRM10Expression Clip)> m_expressions = new List<(ExpressionPreset, VRM10Expression)>();
|
||||
|
||||
public Vrm10Importer(
|
||||
Vrm10Data vrm,
|
||||
|
|
@ -44,18 +48,6 @@ namespace UniVRM10
|
|||
}
|
||||
}
|
||||
|
||||
public class ModelMap
|
||||
{
|
||||
public readonly Dictionary<VrmLib.Node, GameObject> Nodes = new Dictionary<VrmLib.Node, GameObject>();
|
||||
public readonly Dictionary<VrmLib.MeshGroup, UnityEngine.Mesh> Meshes = new Dictionary<VrmLib.MeshGroup, UnityEngine.Mesh>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// VrmLib.Model の オブジェクトと UnityEngine.Object のマッピングを記録する
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
readonly ModelMap m_map = new ModelMap();
|
||||
|
||||
static void AssignHumanoid(List<VrmLib.Node> nodes, UniGLTF.Extensions.VRMC_vrm.HumanBone humanBone, VrmLib.HumanoidBones key)
|
||||
{
|
||||
if (nodes == null)
|
||||
|
|
@ -237,10 +229,6 @@ namespace UniVRM10
|
|||
}
|
||||
}
|
||||
|
||||
UnityEngine.Avatar m_humanoid;
|
||||
VRM10Object m_vrmObject;
|
||||
List<(ExpressionPreset Preset, VRM10Expression Clip)> m_expressions = new List<(ExpressionPreset, VRM10Expression)>();
|
||||
|
||||
protected override async Task OnLoadHierarchy(IAwaitCaller awaitCaller, Func<string, IDisposable> MeasureTime)
|
||||
{
|
||||
Root.name = "VRM1";
|
||||
|
|
@ -847,5 +835,11 @@ namespace UniVRM10
|
|||
|
||||
base.Dispose();
|
||||
}
|
||||
|
||||
public sealed class ModelMap
|
||||
{
|
||||
public readonly Dictionary<VrmLib.Node, GameObject> Nodes = new Dictionary<VrmLib.Node, GameObject>();
|
||||
public readonly Dictionary<VrmLib.MeshGroup, UnityEngine.Mesh> Meshes = new Dictionary<VrmLib.MeshGroup, UnityEngine.Mesh>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user