Exemplo n.º 1
0
		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();
		}
Exemplo n.º 2
0
        IEnumerator Start()
        {
            var loader = new GLTFLoader(
                Url,
                GLTFStandard,
                gameObject.transform
                );

            loader.Multithreaded = Multithreaded;
            loader.MaximumLod    = MaximumLod;
            yield return(loader.Load());
        }
        public IEnumerator LoadModel()
        {
            var loader = new GLTFLoader(
                GLTFData,
                gameObject.transform
                );

            loader.ColorMaterial   = ColorMaterial;
            loader.NoColorMaterial = NoColorMaterial;
            loader.Multithreaded   = Multithreaded;
            loader.MaximumLod      = MaximumLod;
            yield return(loader.Load());
        }
Exemplo n.º 4
0
        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());
        }