private void PopulatePools() { foreach (KeyValuePair <Type, GameObject> contentPrefab in ContentPrefabs) { UIGameObjectPool uIGameObjectPool = new UIGameObjectPool(contentPrefab.Value); uIGameObjectPool.disabledElementParent = widgetPool; ContentUIPools[contentPrefab.Key] = uIGameObjectPool; } }
private void SetupPrefabs() { contentContainerPool = new UIGameObjectPool(prefabContentContainer); contentContainerPool.disabledElementParent = widgetPool; ContentPrefabs[typeof(CodexText)] = prefabTextWidget; ContentPrefabs[typeof(CodexImage)] = prefabImageWidget; ContentPrefabs[typeof(CodexDividerLine)] = prefabDividerLineWidget; ContentPrefabs[typeof(CodexSpacer)] = prefabSpacer; ContentPrefabs[typeof(CodexLabelWithIcon)] = prefabLabelWithIcon; ContentPrefabs[typeof(CodexLabelWithLargeIcon)] = prefabLabelWithLargeIcon; ContentPrefabs[typeof(CodexContentLockedIndicator)] = prefabContentLocked; ContentPrefabs[typeof(CodexLargeSpacer)] = prefabLargeSpacer; ContentPrefabs[typeof(CodexVideo)] = prefabVideoWidget; }