![Unity加载AB资源 Unity加载AB资源](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
using System.Collections;
using System.Collections.Generic;
using UnityEngine; public class AssetBundleLoad : MonoBehaviour { void Start () { AssetBundle ab = AssetBundle.LoadFromFile(Application.dataPath + "/StreamingAssets/player1.ab"); GameObject player = ab.LoadAsset<GameObject>("Necromancer"); GameObject.Instantiate<GameObject>(player, Vector3.zero, Quaternion.identity);
}
}