Beispiel #1
0
    /// <summary>
    /// vrm読み込み
    /// </summary>
    void Load()
    {
        if (VRM != null)
        {
            Destroy(VRM);
        }

        Context.Load();
        Context.ShowMeshes();

        VRM = Context.Root;

        // 3Dビューの初期表示位置を頭に設定
        var anim = VRM.GetComponent <Animator>();
        var head = anim.GetBoneTransform(HumanBodyBones.Head);

        Camera.position = new Vector3(0, head.position.y, 0);

        // メタ情報とメッシュ・マテリアル・テクスチャの取得
        Meta.Get();
        Tex.Path = Path;
        Tex.Get();
        Export.Path = Path;

        Text.gameObject.SetActive(false);
    }