1234567891011121314151617181920212223242526272829303132333435363738 |
- using System.Collections;
- using System.Collections.Generic;
- using System.IO;
- using TriLibCore;
- using TriLibCore.Interfaces;
- using TriLibCore.Textures;
- using UnityEngine;
- public class LoadSample : MonoBehaviour
- {
-
-
- string ModelURL = "https://ricardoreis.net/trilib/demos/sample/TriLibSampleModel.zip";
-
-
- string ModelfILE = "E:\\upright-piano.zip";
-
- void Start()
- {
- TriLibModelLoad.Load(ModelfILE, (AssetLoaderContext ac) => {
- Debug.Log("模型加载完成");
- }, (AssetLoaderContext ac) => {
- Debug.Log("载材质加完成" );
- ac.RootGameObject.transform.position = Camera.main.transform.forward;
- }, (AssetLoaderContext ac, float f) => {
- Debug.Log("加载中==》" + f);
- }, (IContextualizedError error) => {
- Debug.Log("加载失败" + error);
- });
- }
-
- void Update()
- {
-
- }
- }
|