void OnResult(ActorableSearchResult incomingResult, bool isInternal) { // Ignore pfx/sfx results, they are loaded already if (incomingResult.name == "Empty" && incomingResult.name == "Sound") { return; } SquareImageButtonUI newResult = Instantiate(creationLibraryUI.resultsPrefab, creationLibraryUI.resultsRect); newResult.SetImage(incomingResult.thumbnail); newResult.onPointerDown = () => ResultClicked(newResult); newResult.SetSearchResult(incomingResult); ItemWithTooltipWithEventSystem tooltip = newResult.gameObject.AddComponent <ItemWithTooltipWithEventSystem>(); tooltip.SetupWithUserMain(userMain); tooltip.SetDescription(incomingResult.name); // int categoryValue = creationLibraryUI.categoryDropdown.value; if (isInternal) { internalResults.Add(newResult); // if (incomingResult.actorPrefab != null && !sceneActorLibrary.Exists(incomingResult.actorPrefab.GetId())) // { // DropdownCategoryPut(incomingResult.actorPrefab.GetAssetPackName()); // } if (sceneActorLibrary.Exists(incomingResult.actorPrefab.GetId())) { SetResultShowing(newResult, selectedCategory == CATEGORY_CUSTOM || selectedCategory == null || selectedCategory == CATEGORY_ALL); } else { UpdateInternalResultShowing(newResult); } } else { webResults.Add(newResult); if (incomingResult.renderableReference.assetType == AssetType.Poly) { SetResultShowing(newResult, selectedCategory == CATEGORY_POLY); } else if (incomingResult.renderableReference.assetType == AssetType.Image) { SetResultShowing(newResult, selectedCategory == CATEGORY_GIS); } } }
void OnResult(ActorableSearchResult incomingResult, bool isInternal) { // hacckk if (incomingResult.name == "Empty") { emptyActorTemplate = incomingResult; return; } SquareImageButtonUI newResult = Instantiate(renderableLibraryUI.resultsPrefab, renderableLibraryUI.resultsRect); newResult.SetImage(incomingResult.thumbnail); newResult.onPointerDown = () => ResultClicked(newResult); newResult.SetSearchResult(incomingResult); ItemWithTooltipWithEventSystem tooltip = newResult.gameObject.AddComponent <ItemWithTooltipWithEventSystem>(); tooltip.SetDescription(incomingResult.name); // int categoryValue = creationLibraryUI.categoryDropdown.value; if (isInternal) { internalResults.Add(newResult); } else { webResults.Add(newResult); if (incomingResult.renderableReference.assetType == AssetType.Poly) { SetResultShowing(newResult, selectedCategory == CATEGORY_POLY); } else if (incomingResult.renderableReference.assetType == AssetType.Image) { SetResultShowing(newResult, selectedCategory == CATEGORY_GIS); } } }