1 [
ComponentEditorProps(
category:
"GameScripted/Editor", description:
"Management of placeable entities. Works only with SCR_EditorBaseEntity!", icon:
"WBData/ComponentEditorProps/componentEditor.png")]
18 [
Attribute(
"1",
"If true will show the faction icon on the content browser cards, If false will hide them")]
19 protected bool m_bShowFactionOnContentBrowserCards;
21 protected const int ASYNC_TICK_LENGTH = 16;
29 [
Attribute(
"1",
desc:
"If true it makes sure that the content browser states are loaded from user settings. Else keeps the keeps the sates as defined in m_aContentBrowserTabStates")]
30 protected bool m_bUsePersistentBrowserStates;
32 [
Attribute(
desc:
"A list of saved states of the content browser such as labels and pagination. Index 0 is the saved hand filters.")]
33 protected ref array<ref SCR_EditorContentBrowserSaveStateDataUI> m_aContentBrowserTabStates;
35 [
Attribute(
desc:
"Entities with blacklisted labels are not displayed in the content browser unless a SCR_EditorContentBrowserDisplayConfig is used when opening the content browser and the label is in the AlwaysActiveLabels", uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(
EEditableEntityLabel))]
36 protected ref array<EEditableEntityLabel> m_eBlackListedLabels;
39 protected ref map<ref SCR_EditorContentBrowserDisplayConfig, ref SCR_EditorContentBrowserSaveStateData> m_mContentBrowserConfigStates =
new map<ref SCR_EditorContentBrowserDisplayConfig, ref SCR_EditorContentBrowserSaveStateData>;
41 protected ref set<ref SCR_EditableEntityCache> m_aExtendedEntitiesCache =
new set<ref SCR_EditableEntityCache>();
45 private ref array<EEditableEntityLabel> m_ActiveLabels = {};
47 protected ref array<ref SCR_EditableEntityCoreLabelGroupSetting> m_LabelGroups = {};
50 protected ref array<int> m_aHiddenStateTabs = {};
52 protected ref array<int> m_aFilteredPrefabIDs = {};
53 protected ref array<string> m_aLocalizationKeys = {};
54 protected int m_iFilteredPrefabIDsCount;
61 protected ref array<ref SCR_EditableEntityUIInfo> m_aInfos;
62 protected ref array<ResourceName> m_aAsyncPrefabs;
63 protected int m_iAsyncIndex;
65 protected int m_iBrowserStateIndex = 0;
66 protected int m_iPageIndex;
67 protected int m_iPageEntryCount = 15;
68 protected string m_sCurrentSearchText;
69 protected string m_sLastSearchText;
70 protected bool m_bShowEntityBudgetCost;
75 protected ref ScriptInvoker Event_OnLabelChanged =
new ScriptInvoker;
76 protected ref ScriptInvoker Event_OnSearchConfirm =
new ScriptInvoker;
77 protected ref ScriptInvoker Event_OnBrowserStatesSaved =
new ScriptInvoker;
78 protected ref ScriptInvoker Event_OnBrowserStatePreload =
new ScriptInvoker;
79 protected ref ScriptInvoker Event_OnBrowserStateLoaded =
new ScriptInvoker;
80 protected ref ScriptInvoker Event_OnBrowserEntriesFiltered =
new ScriptInvoker;
81 protected ref ScriptInvoker Event_OnBrowserStateCleared =
new ScriptInvoker;
82 protected ref ScriptInvoker Event_OnEnableSaveStateTabs =
new ScriptInvoker;
83 protected ref ScriptInvoker Event_OnStateTabVisibilityChanged =
new ScriptInvoker;
90 ResourceName GetResourceNamePrefabID(
int prefabID)
92 if (m_PlacingManagerData)
93 return m_PlacingManagerData.GetPrefab(prefabID);
95 return ResourceName.Empty;
103 int GetFilteredPrefabID(
int index)
105 if (
index >= 0 &&
index < m_aFilteredPrefabIDs.Count())
107 return m_aFilteredPrefabIDs.Get(
index);
117 int GetFilteredPrefabCount()
119 return m_iFilteredPrefabIDsCount;
126 bool AreFactionsShownOnContentCards()
128 return m_bShowFactionOnContentBrowserCards;
136 int FilterExtendedSlots()
142 ResourceName extendedEntityResource = extendedEntity.GetPrefab();
145 if (!extendedEntityCache)
148 set<int> extendableEntities =
new set<int>();
149 extendedEntityCache.GetExtendedEntities(extendableEntities);
150 m_aFilteredPrefabIDs.Clear();
152 foreach (
int prefabID : extendableEntities)
154 m_aFilteredPrefabIDs.Insert(prefabID);
157 m_iFilteredPrefabIDsCount = m_aFilteredPrefabIDs.Count();
158 return m_iFilteredPrefabIDsCount;
164 return FindExtendedEntityCache(entity.GetPrefab()) !=
null;
173 int GetValidBlackListedLabels(out notnull array<EEditableEntityLabel> validBlackListLabels)
175 if (m_ContentBrowserConfig)
177 validBlackListLabels.Clear();
182 if (!m_ContentBrowserConfig.IsAlwaysActiveLabel(label))
183 validBlackListLabels.Insert(label);
188 validBlackListLabels.Copy(m_eBlackListedLabels);
191 return validBlackListLabels.Count();
199 if (entityCache.GetPrefab() == extendedEntityResource)
203 set<int> extendedEntities =
new set<int>();
206 for (
int prefabId, count = GetInfoCount(); prefabId < count; prefabId++)
208 info = GetInfo(prefabId);
212 if (extendedEntityResource == info.GetSlotPrefab())
213 extendedEntities.Insert(prefabId);
216 if (extendedEntities.Count() <= 0)
220 m_aExtendedEntitiesCache.Insert(extendedEntityCache);
221 extendedEntityCache.SetExtendedEntities(extendedEntities);
222 extendedEntityCache.SetPrefab(extendedEntityResource);
224 return extendedEntityCache;
233 if (GetExtendedEntity())
237 m_aFilteredPrefabIDs.Clear();
238 m_aLocalizationKeys.Clear();
239 array<EEditableEntityLabel> entityLabels = {};
241 array<EEditableEntityLabel> validBlackListLabels = {};
242 GetValidBlackListedLabels(validBlackListLabels);
246 int count = GetInfoCount();
247 for (
int i = 0; i < count; i++)
249 isBlackListed =
false;
250 entityLabels.Clear();
258 info.GetEntityLabels(entityLabels);
259 if (!IsMatchingToggledLabels(entityLabels))
265 if (entityLabels.Contains(blackListLabel))
267 isBlackListed =
true;
276 m_aFilteredPrefabIDs.Insert(i);
278 m_aLocalizationKeys.Insert(info.GetName());
282 string currentSearch = GetCurrentSearch();
283 if (!currentSearch.IsEmpty())
285 array<int> searchResultPrefabID = {}, searchResultIndices = {};
286 WidgetManager.SearchLocalized(currentSearch, m_aLocalizationKeys, searchResultIndices);
288 foreach (
int searchResultIndex : searchResultIndices)
290 int prefabID = m_aFilteredPrefabIDs.Get(searchResultIndex);
291 searchResultPrefabID.Insert(prefabID);
293 m_aFilteredPrefabIDs.Copy(searchResultPrefabID);
296 m_iFilteredPrefabIDsCount = m_aFilteredPrefabIDs.Count();
298 Event_OnBrowserEntriesFiltered.Invoke();
301 bool isMatchingToggledLabelsOfState(
int savedStateIndex)
303 if (savedStateIndex >= m_aContentBrowserTabStates.Count())
306 array<EEditableEntityLabel> activeLabels = {};
308 m_aContentBrowserTabStates[savedStateIndex].GetLabels(activeLabels);
309 return IsMatchingToggledLabels(activeLabels);
316 bool IsMatchingToggledLabels(notnull array<EEditableEntityLabel> entityLabels)
318 if (!IsAnyLabelActive())
322 if (entityLabels.IsEmpty())
327 array<SCR_EditableEntityCoreLabelSetting> groupLabels = {};
332 m_EntityCore.GetLabelsOfGroup(labelGroupType, groupLabels);
334 int activeLabels = 0;
335 int matchesActive = 0;
337 bool needsAllActive = labelGroup.GetRequiresAllLabelsMatch();
342 if (!IsLabelActive(entityLabel))
347 if (entityLabels.Find(entityLabel) != -1)
353 if (activeLabels > 0)
355 if (needsAllActive && matchesActive != activeLabels)
359 else if (!needsAllActive && matchesActive == 0)
376 return m_ActiveLabels.Find(entityLabel) != -1;
383 bool IsAnyLabelActive()
385 return !m_ActiveLabels.IsEmpty();
395 bool labelActive = IsLabelActive(entityLabel);
396 if (active && !labelActive)
398 m_ActiveLabels.Insert(entityLabel);
400 else if (!active && labelActive)
402 m_ActiveLabels.RemoveItem(entityLabel);
405 Event_OnLabelChanged.Invoke(entityLabel, active);
412 void ResetAllLabels(
bool setConfigData =
true)
414 m_ActiveLabels.Clear();
420 void GetActiveLabels(out notnull array<EEditableEntityLabel> activeLabels)
422 activeLabels.Copy(m_ActiveLabels);
425 int GetActiveLabelCount()
427 return m_ActiveLabels.Count();
430 void GetLabelGroups(out notnull array<ref SCR_EditableEntityCoreLabelGroupSetting> labelGroups)
432 labelGroups = m_LabelGroups;
437 return m_EntityCore.GetLabelGroupType(entityLabel, groupLabel);
450 bool GetLabelsOfGroup(
EEditableEntityLabelGroup labelGroupType, out notnull array<SCR_EditableEntityCoreLabelSetting> labels)
452 return m_EntityCore.GetLabelsOfGroup(labelGroupType, labels);
457 return m_EntityCore.GetLabelUIInfo(entityLabel, uiInfo);
462 return m_EntityCore.GetLabelUIInfoIfValid(entityLabel, currentMode, uiInfo);
469 void OrderLabels(inout notnull array<EEditableEntityLabel> activeLabels)
481 GetLabelGroupType(entityLabel, groupLabel);
483 array<SCR_EditableEntityCoreLabelSetting> labelsInGroup =
new array<SCR_EditableEntityCoreLabelSetting>;
484 GetLabelsOfGroup(groupLabel, labelsInGroup);
488 int count = labelsInGroup.Count();
490 for (
int i = 0; i < count; i++)
492 if (labelsInGroup[i].GetLabelType() == entityLabel)
507 if (GetLabelUIInfo(entityLabel, uiInfo))
509 return uiInfo.GetName();
518 void SetPageIndex(
int pageIndex)
520 m_iPageIndex = pageIndex;
532 void SetPageEntryCount(
int pageEntryCount)
534 m_iPageEntryCount = pageEntryCount;
537 int GetPageEntryCount()
539 return m_iPageEntryCount;
546 void SetBrowserStateIndex(
int index)
548 m_iBrowserStateIndex =
index;
555 int GetBrowserStateIndex()
557 return m_iBrowserStateIndex;
566 void GetHiddenStateTabs(out notnull array<int> hiddenStateTabs)
568 hiddenStateTabs.Copy(m_aHiddenStateTabs);
576 void SetStateTabVisible(
int tabIndex,
bool setVisible)
578 if (!setVisible && !m_aHiddenStateTabs.Contains(tabIndex))
579 m_aHiddenStateTabs.Insert(tabIndex);
580 else if (setVisible && m_aHiddenStateTabs.Contains(tabIndex))
581 m_aHiddenStateTabs.RemoveItem(tabIndex);
586 Event_OnStateTabVisibilityChanged.Invoke(tabIndex, setVisible);
594 int GetContentBrowserTabStates(out notnull array<SCR_EditorContentBrowserSaveStateDataUI> contentBrowserStates)
597 contentBrowserStates.Insert(state);
599 return contentBrowserStates.Count();
612 if (GetConfigState(m_ContentBrowserConfig, state))
616 index = GetBrowserStateIndex();
619 if (index < 0 || index >= m_aContentBrowserTabStates.Count())
622 return m_aContentBrowserTabStates[
index];
629 string GetLastSearch()
631 return m_sLastSearchText;
638 string GetCurrentSearch()
640 return m_sCurrentSearchText;
647 void SetCurrentSearch(
string searchText)
649 m_sLastSearchText = m_sCurrentSearchText;
650 m_sCurrentSearchText = searchText;
657 void SetSaveStateTabsEnabled(
bool enabled)
659 Event_OnEnableSaveStateTabs.Invoke(enabled);
665 bool CanSavePersistentBrowserStates()
667 return !GetContentBrowserDisplayConfig();
674 ScriptInvoker GetOnLabelChanged()
676 return Event_OnLabelChanged;
683 ScriptInvoker GetOnBrowserStatesSaved()
685 return Event_OnBrowserStatesSaved;
692 ScriptInvoker GetOnBrowserStatePreload()
694 return Event_OnBrowserStatePreload;
701 ScriptInvoker GetOnBrowserStateLoaded()
703 return Event_OnBrowserStateLoaded;
710 ScriptInvoker GetOnBrowserEntriesFiltered()
712 return Event_OnBrowserEntriesFiltered;
719 ScriptInvoker GetOnBrowserStateCleared()
721 return Event_OnBrowserStateCleared;
728 ScriptInvoker GetOnEnableSaveStateTabs()
730 return Event_OnEnableSaveStateTabs;
737 ScriptInvoker GetOnSearchConfirm()
739 return Event_OnSearchConfirm;
746 ScriptInvoker GetOnStateTabVisibilityChanged()
748 return Event_OnStateTabVisibilityChanged;
758 m_ExtendedEntity = extendedEntity;
767 return m_ExtendedEntity;
779 return m_aInfos.Count();
790 if (m_aInfos &&
index >= 0 &&
index < m_aInfos.Count())
792 return m_aInfos[
index];
807 if (m_aInfos && info)
811 if (browserInfo && browserInfo.GetName() == info.GetName())
826 array<ref SCR_EntityBudgetValue> budgetCosts = {};
827 m_BudgetManager.GetEntityPreviewBudgetCosts(prefabInfo, budgetCosts);
829 if (!budgetCosts.IsEmpty())
830 budgetCost = budgetCosts.Get(0);
831 return budgetCost !=
null;
834 bool CanPlace(
int prefabID, out notnull array<ref SCR_EntityBudgetValue> budgetCosts, out
SCR_UIInfo blockingBudgetInfo,
bool showNotification =
false)
836 if (!m_BudgetManager)
844 if (m_BudgetManager.CanPlaceEntityInfo(prefabInfo, budgetCosts, blockingBudget, showNotification))
850 m_BudgetManager.GetCurrentBudgetInfo(blockingBudget, blockingBudgetInfo);
861 bool CanPlace(notnull array<ResourceName> prefabs,
EEditableEntityType fallbackBudgetType = -1)
864 if (!m_BudgetManager)
872 IEntitySource source;
873 array<ref SCR_EntityBudgetValue> fullBudgetCosts = {};
874 array<ref SCR_EntityBudgetValue> budgetCosts = {};
876 foreach (ResourceName prefab : prefabs)
881 if (!m_BudgetManager.GetEntityPreviewBudgetCosts(GetInfo(prefabId), budgetCosts))
887 if (fallbackBudgetType != -1)
888 m_BudgetManager.GetEntityTypeBudgetCost(fallbackBudgetType, budgetCosts);
905 return m_BudgetManager.CanPlace(budgetCosts, blockingBudget);
908 bool RefreshPreviewCost(
int prefabID = -1)
912 m_BudgetManager.ResetPreviewCost();
922 array<ref SCR_EntityBudgetValue> budgetCosts = {};
923 if (m_BudgetManager.GetEntityPreviewBudgetCosts(editableUIInfo, budgetCosts))
925 m_BudgetManager.UpdatePreviewCost(budgetCosts);
937 static bool OpenBrowserInstance(
int browserStateIndex = -1)
940 if (contentBrowserManager)
941 return contentBrowserManager.OpenBrowser(browserStateIndex);
954 if (contentBrowserManager)
955 return contentBrowserManager.OpenBrowserState(saveState);
969 if (contentBrowserManager)
970 return contentBrowserManager.OpenBrowserLabelConfig(contentBrowserConfig);
988 SCR_CompositionSlotManagerComponent slotManager = SCR_CompositionSlotManagerComponent.GetInstance();
989 if (slotManager && slotManager.IsOccupied(extendedEntity.GetOwner()))
994 if (contentBrowserConfig ==
null)
995 SetExtendedEntity(extendedEntity);
997 SetExtendedEntity(
null);
999 int extendedPrefabCount = 0;
1001 if (extendedEntity && !contentBrowserConfig)
1002 extendedPrefabCount = FilterExtendedSlots();
1004 extendedPrefabCount = m_iFilteredPrefabIDsCount;
1006 if (extendedPrefabCount == 0)
1008 SetExtendedEntity(
null);
1012 if ((!contentBrowserConfig && OpenBrowser()) || (contentBrowserConfig && OpenBrowserLabelConfig(contentBrowserConfig)))
1017 verticalMode = previewManager.GetVerticalMode();
1019 vector transform[4];
1020 extendedEntity.GetTransform(transform);
1029 else if (extendedEntity.GetOwner().FindComponent(SCR_BaseCompartmentManagerComponent))
1031 transform[3] = extendedEntity.GetOwner().GetOrigin() + BaseCompartmentSlot.SPAWN_IN_VEHICLE_OFFSET;
1033 params.m_Parent = extendedEntity;
1034 params.m_ParentID = Replication.FindId(extendedEntity);
1037 params.m_vTransform = transform;
1038 params.SetTarget(extendedEntity);
1051 bool OpenBrowser(
int browserStateIndex = -1)
1053 if (!m_EditorMenuManager)
1057 m_ContentBrowserConfig =
null;
1058 if (browserStateIndex > 0)
1060 SetBrowserState(browserStateIndex);
1075 if (!m_EditorMenuManager)
1080 m_ContentBrowserConfig = displayConfig;
1082 m_ContentBrowserConfig =
null;
1084 LoadBrowserState(saveState,
false);
1100 if (!contentBrowserConfig)
1101 return OpenBrowser();
1103 if (!m_EditorMenuManager)
1106 SetExtendedEntity(
null);
1107 m_ContentBrowserConfig = contentBrowserConfig;
1108 SetBrowserState(contentBrowserConfig);
1120 void SetBrowserState(
int browserStateIndex = -1,
bool saveCurrentState =
false,
bool clearConfigData =
true)
1122 if (saveCurrentState)
1125 if (browserStateIndex < 0)
1126 LoadBrowserState(m_iBrowserStateIndex, clearConfigData);
1129 SetBrowserStateIndex(browserStateIndex);
1130 LoadBrowserState(browserStateIndex, clearConfigData);
1136 LoadBrowserState(state,
false);
1146 m_ContentBrowserConfig = contentBrowserConfig;
1148 if (GetConfigState(contentBrowserConfig, state))
1149 LoadBrowserState(state,
false);
1151 ClearBrowserState(
false);
1159 bool SaveBrowserState()
1164 if (!m_ContentBrowserConfig)
1166 state = GetContentBrowserTabState(m_iBrowserStateIndex);
1173 else if (!m_ContentBrowserConfig.GetSaveContentBrowserState() || !GetConfigState(m_ContentBrowserConfig, state))
1179 state.SetLabels(m_ActiveLabels);
1180 state.SetPageIndex(m_iPageIndex);
1181 state.SetSearchString(m_sCurrentSearchText);
1183 Event_OnBrowserStatesSaved.Invoke();
1195 void AddRemoveLabelOfPersistentBrowserState(
EEditableEntityLabel label,
bool addLabel,
int stateIndex = -1)
1197 if (stateIndex >= m_aContentBrowserTabStates.Count())
1201 if (stateIndex > -1)
1203 m_aContentBrowserTabStates[stateIndex].AddRemoveLabel(label, addLabel);
1209 state.AddRemoveLabel(label, addLabel);
1212 void ResetBrowserState(
bool clearConfigData)
1214 ClearBrowserState(clearConfigData);
1225 if (GetExtendedEntity())
1228 SetExtendedEntity(
null);
1231 LoadBrowserState(m_iBrowserStateIndex,
false);
1234 bool isBuilding = GetManager().GetCurrentMode() ==
EEditorMode.BUILDING;
1235 SetBrowserState(-1,
true, !isBuilding);
1238 if (CanSavePersistentBrowserStates())
1239 SaveAllPersistentBrowserState();
1242 protected bool OpenBrowserMenu()
1244 if (m_EditorMenuManager)
1246 return m_EditorMenuManager.GetMenu().OpenDialog(
m_MenuPreset);
1252 protected void ClearBrowserState(
bool clearConfigData)
1254 ResetAllLabels(!clearConfigData);
1256 SetCurrentSearch(
string.Empty);
1259 if (clearConfigData)
1260 m_ContentBrowserConfig =
null;
1262 Event_OnBrowserStateCleared.Invoke();
1266 protected void LoadBrowserState(
int stateIndex,
bool clearConfigData)
1268 if (stateIndex < 0 || stateIndex >= m_aContentBrowserTabStates.Count())
1274 LoadBrowserState(state, clearConfigData);
1282 Event_OnBrowserStatePreload.Invoke(state);
1284 ClearBrowserState(clearConfigData);
1287 array<EEditableEntityLabel> stateActiveLabels =
new array<EEditableEntityLabel>;
1288 state.GetLabels(stateActiveLabels);
1291 SetLabel(activeLabel,
true);
1294 SetPageIndex(state.GetPageIndex());
1297 SetCurrentSearch(state.GetSearchString());
1299 if (!clearConfigData)
1303 Event_OnBrowserStateLoaded.Invoke(state);
1305 if (m_aInfos && m_aAsyncPrefabs ==
null)
1314 if (!m_mContentBrowserConfigStates.Find(browserConfig, state))
1317 m_mContentBrowserConfigStates.Insert(browserConfig, state);
1322 protected void SetConfigLabels()
1324 if (!m_ContentBrowserConfig)
1328 array<EEditableEntityLabel> labels =
new array<EEditableEntityLabel>;
1329 m_ContentBrowserConfig.GetAlwaysActiveLabels(labels);
1332 SetLabel(label,
true);
1341 return m_ContentBrowserConfig;
1345 void SaveAllPersistentBrowserState()
1347 if (!m_bUsePersistentBrowserStates)
1350 BaseContainer editorSettings =
GetGame().GetGameUserSettings().GetModule(
"SCR_EditorPersistentData");
1351 if (!editorSettings)
1354 array<ref SCR_EditorContentBrowserSaveStateData> settingBrowserStates = {};
1359 settingBrowserStates.Insert(state);
1363 editorSettings.Set(
"m_aSavedContentBrowserStates", settingBrowserStates);
1365 GetGame().UserSettingsChanged();
1369 protected void LoadAllPersistentBrowserState()
1371 if (!m_bUsePersistentBrowserStates)
1374 BaseContainer editorSettings =
GetGame().GetGameUserSettings().GetModule(
"SCR_EditorPersistentData");
1375 if (!editorSettings)
1378 array<ref SCR_EditorContentBrowserSaveStateData> settingBrowserStates;
1379 editorSettings.Get(
"m_aSavedContentBrowserStates", settingBrowserStates);
1381 if (!settingBrowserStates)
1384 int savedCount = settingBrowserStates.Count();
1387 if (m_aContentBrowserTabStates.Count() == savedCount)
1389 array<EEditableEntityLabel> settingSavedLabels = {};
1392 for (
int i = 0; i < savedCount; i++)
1395 settingBrowserStates[i].GetLabels(settingSavedLabels);
1396 m_aContentBrowserTabStates[i].SetLabels(settingSavedLabels,
true);
1397 m_aContentBrowserTabStates[i].SetSearchString(settingBrowserStates[i].GetSearchString());
1402 override void EOnEditorInit()
1408 LoadAllPersistentBrowserState();
1414 override void EOnEditorActivateServer()
1423 override void EOnEditorDeactivateServer()
1429 override void EOnEditorActivate()
1439 override bool EOnEditorActivateAsync(
int attempt)
1445 if (!placingPrefabData)
1449 m_aAsyncPrefabs = {};
1450 placingPrefabData.GetPrefabs(m_aAsyncPrefabs,
true);
1455 if (!m_aAsyncPrefabs)
1458 ResourceName entityPrefab;
1459 Resource entityResource;
1460 IEntityComponentSource editableEntitySource;
1463 int tickEnd = System.GetTickCount() + ASYNC_TICK_LENGTH;
1464 int count = m_aAsyncPrefabs.Count();
1465 while (System.GetTickCount() < tickEnd)
1468 if (m_iAsyncIndex >= count)
1470 m_aAsyncPrefabs =
null;
1476 entityPrefab = m_aAsyncPrefabs[m_iAsyncIndex];
1479 entityResource = BaseContainerTools.LoadContainer(m_aAsyncPrefabs[m_iAsyncIndex]);
1480 if (entityResource && entityResource.IsValid())
1483 if (editableEntitySource)
1488 Print(
string.Format(
"Prefab '%1' is missing UI info in SCR_EditableEntityComponent!", m_aAsyncPrefabs[m_iAsyncIndex]), LogLevel.ERROR);
1493 Print(
string.Format(
"Prefab '%1' is missing SCR_EditableEntityComponent!", m_aAsyncPrefabs[m_iAsyncIndex]), LogLevel.ERROR);
1498 Print(
string.Format(
"Prefab '%1' is missing at index '%2'!", m_aAsyncPrefabs[m_iAsyncIndex], m_iAsyncIndex), LogLevel.ERROR);
1503 m_aInfos.Insert(info);
1510 override void EOnEditorDeactivate()