Update basic sample
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user