IEnumerator Start() { var loader = new GLTFLoader( Url, gameObject.transform ); loader.SetShaderForMaterialType(GLTFLoader.MaterialType.PbrMetallicRoughness, GLTFStandard); loader.SetShaderForMaterialType(GLTFLoader.MaterialType.CommonConstant, GLTFConstant); loader.Multithreaded = Multithreaded; loader.MaximumLod = MaximumLod; yield return loader.Load(); }
IEnumerator Start() { UnityWebRequest www = UnityWebRequest.Get(Url); yield return(www.SendWebRequest()); byte[] gltfData = www.downloadHandler.data; var loader = new GLTFLoader( gltfData, gameObject.transform ); loader.SetShaderForMaterialType(GLTFLoader.MaterialType.PbrMetallicRoughness, GLTFStandard); loader.SetShaderForMaterialType(GLTFLoader.MaterialType.CommonConstant, GLTFConstant); loader.Multithreaded = Multithreaded; loader.MaximumLod = MaximumLod; yield return(loader.Load()); }