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)); }
/// <summary> /// 从项目直接加载 /// </summary> protected virtual void OnLoad() { #if UNITY_EDITOR asset = UnityEditor.AssetDatabase.LoadAssetAtPath(MyAssets.GetAssetPathByAssetName(assetName), assetType); #endif }
protected override void OnLoad() { bundle = MyBundles.Load(MyAssets.GetBundleByAssetName(assetName)); asset = bundle.LoadAsset(MyAssets.GetAssetPathByAssetName(assetName), assetType); }