protected override void OnLoad() { var AssetList = Bundle_.LoadAllAssets <UnityEngine.TextAsset>(); if (AssetList != null && AssetList.Length > 0) { foreach (var Asset in AssetList) { AssetList_.Add(Asset.name.ToLower(), Asset); AssetInstanceIDList_.Add(Asset.GetInstanceID()); } } }
protected override void OnLoad() { var AssetList = Bundle_.LoadAllAssets <UnityEngine.GameObject>(); if (AssetList != null) { foreach (var Asset in AssetList) { var Name = Asset.name.ToLower(); if (AssetList_.ContainsKey(Name)) { LLogger.LWarning($"Repeat Asset : {Name}"); continue; } AssetList_.Add(Name, Asset); } } }
/// <summary> /// Sets result for certain page /// </summary> /// <param name="amountOnPage">max amount of items on each page</param> /// <param name="CurrentPage">number of page</param> public void SetResultOnPage(int amountOnPage, bool firstBrowse = false) { // this.CurrentPageNumb_ = CurrentPage; //if (amountOnPage > TotalAmountOfItems_ - amountOnPage * (CurrentPageNumb_-1) // & TotalAmountOfItems_ - amountOnPage * (CurrentPageNumb_ - 1) !=0) // CurrentAmountOfItems_ = TotalAmountOfItems_ - amountOnPage * (CurrentPageNumb_ - 1); //else CurrentAmountOfItems_ = amountOnPage; // ResultOnPage_ = new String[CurrentAmountOfItems_]; // var firstIndex = amountOnPage * (CurrentPageNumb_ - 1); //TotalResult_.CopyTo(firstIndex, ResultOnPage_, 0, CurrentAmountOfItems_); if (!firstBrowse) { Bundle_ = repository_.redirect(Bundle_, PagingIndx_); } ResultForPage_ = Bundle_.GetResources().Select(r => r.Id); }
protected override void OnLoad() { var AssetList = Bundle_.LoadAllAssets <T>(); if (AssetList != null) { foreach (var Asset in AssetList) { var Name = $"{Asset.name.ToLower()}_{Asset.GetType().Name.ToLower()}"; if (AssetList_.ContainsKey(Name)) { LLogger.LWarning($"Repeat Asset : {Name}"); continue; } AssetList_.Add(Name, Asset); AssetInstanceIDList_.Add(Asset.GetInstanceID()); } } }