Update basic sample

This commit is contained in:
hevinci
2022-11-03 15:21:03 +08:00
parent ecfced7195
commit c37b5e52ac
9 changed files with 117 additions and 419 deletions
@@ -0,0 +1,14 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Spawner : MonoBehaviour
{
public GameObject SpawnGo;
void Start()
{
UnityEngine.Debug.Log("开始复制挂载的GameObject");
GameObject.Instantiate<GameObject>(SpawnGo, this.transform);
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: be3e0c14618d8ac4fa7687c9e5a1fe15
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -190,6 +190,12 @@ public class GameScene1 : MonoBehaviour
YooAssets.LoadSceneAsync("GameScene2");
});
}
// 加载面板
{
var handle = YooAssets.LoadAssetSync<GameObject>("ui_window");
handle.InstantiateSync(CanvasRoot.transform);
}
}
private void OnUnityAtlas_Completed(AssetOperationHandle handle)