Пример #1
0
        void OnOpenClicked()
        {
#if UNITY_STANDALONE_WIN
            var path = ComDialog.Open("open VRM", "*.vrm", "*.glb", "*.bvh");
#else
            var path = Application.dataPath + "/default.vrm";
#endif
            if (string.IsNullOrEmpty(path))
            {
                return;
            }

            var ext = Path.GetExtension(path).ToLower();
            switch (ext)
            {
            case ".gltf":
            case ".glb":
            case ".vrm":
                StartCoroutine(LoadModelAsync(path));
                break;

            case ".bvh":
                LoadMotionAsync(path);
                break;
            }
        }
Пример #2
0
        private void OnOpenClickedBVH()
        {
            var path = ComDialog.Open("open BVH", "*.bvh");

            if (string.IsNullOrEmpty(path))
            {
                return;
            }
            _errorMessagePanel.gameObject.SetActive(false);
            LoadMotion(path);
        }
Пример #3
0
        private void OnOpenClickedVRM()
        {
            var path = ComDialog.Open("open VRM", "*.vrm");

            if (string.IsNullOrEmpty(path))
            {
                return;
            }
            _errorMessagePanel.gameObject.SetActive(false);
            LoadModel(path);
        }