From d5833cff8124d3876a5c72b93d3ec207b748aa64 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 8 Apr 2025 16:00:57 +0900 Subject: [PATCH] WWW to UnityWebRequest --- Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerController.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerController.cs b/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerController.cs index f44077685..934ee4df6 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerController.cs +++ b/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerController.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using UniGLTF; using UniGLTF.SpringBoneJobs.Blittables; using UnityEngine; +using UnityEngine.Networking; using UnityEngine.Rendering; using static UniVRM10.Vrm10; @@ -157,9 +158,9 @@ namespace UniVRM10.VRM10Viewer public IEnumerator LoadCoroutine(string url, LoadOptions opts) { - var www = new WWW(url); - yield return www; - var _ = LoadModelBytes("WebGL.vrm", www.bytes, opts); + var www = UnityWebRequest.Get(url); + yield return www.SendWebRequest(); + var _ = LoadModelBytes("WebGL.vrm", www.downloadHandler.data, opts); } public void OnOpenModelClicked(LoadOptions opts, string callbackObject, string callbackMethod)