async Task <RuntimeGltfInstance> LoadAsync(string path) { var instance = await Vrm10Utility.LoadAsync(path, true, true); // VR用 FirstPerson 設定 var controller = instance.GetComponent <Vrm10Instance>(); await controller.Vrm.FirstPerson.SetupAsync(controller.gameObject); return(instance); }
async void LoadModel(string path) { if (!File.Exists(path)) { return; } Debug.LogFormat("{0}", path); var instance = await Vrm10Utility.LoadAsync(path, true, m_useNormalization.isOn, awaitCaller : new RuntimeOnlyAwaitCaller(), materialGenerator : GetVrmMaterialDescriptorGenerator(m_useUrpMaterial.isOn), metaCallback : m_texts.UpdateMeta); if (instance == null) { // fallback to gltf instance = await GltfUtility.LoadAsync(path, awaitCaller : new RuntimeOnlyAwaitCaller()); } SetModel(instance); }