Ejemplo n.º 1
0
 static void CheckInstace()
 {
     if (instance == null)
     {
         GameObject go = new GameObject("Assets");
         DontDestroyOnLoad(go);
         instance = go.AddComponent <MyAssets>();
     }
 }
 protected override void OnLoad()
 {
     bundle = MyBundles.LoadSync(MyAssets.GetBundleByAssetName(assetName));
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 从项目直接加载
        /// </summary>
        protected virtual void OnLoad()
        {
#if UNITY_EDITOR
            asset = UnityEditor.AssetDatabase.LoadAssetAtPath(MyAssets.GetAssetPathByAssetName(assetName), assetType);
#endif
        }
Ejemplo n.º 4
0
 protected override void OnLoad()
 {
     bundle = MyBundles.Load(MyAssets.GetBundleByAssetName(assetName));
     asset  = bundle.LoadAsset(MyAssets.GetAssetPathByAssetName(assetName), assetType);
 }