1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System.Collections;
- using System.Collections.Generic;
- using TriLibCore;
- using UnityEngine;
- public class LoadSample : MonoBehaviour
- {
-
-
- string ModelURL = "https://ricardoreis.net/trilib/demos/sample/TriLibSampleModel.zip";
-
-
- string ModelfILE = "D:\\JiHe\\MMD20230728021557 (1)\\Unity2GLTF.gltf";
-
- void Start()
- {
- TriLibModelLoad.Load(ModelURL, (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);
- });
- 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()
- {
-
- }
- }
|