private void OnEnable() { if (autoHide) { newLevels = !GameSave.HasSeenLatestLevel(); if (!newLevels) { base.gameObject.SetActive(value: false); } } }
public override void Bind(int index, object data) { base.Bind(index, data); level = (WorkshopLevelMetadata)data; if (level == null) { base.gameObject.SetActive(value: false); } else { base.gameObject.SetActive(value: true); if (label != null) { Type type = label.GetType(); if (labelIsUIText) { if (labelComponent != null) { ((Text)labelComponent).text = level.title; } } else if (labelComponent != null) { ((TextMeshProUGUI)labelComponent).text = level.title; } if (image != null && level != null) { image.texture = level.thumbnailTexture; } } if (newLevelStar != null) { bool active = false; if (!GameSave.HasSeenLatestLevel() && level.levelType == WorkshopItemSource.EditorPick && level.workshopId == 2) { active = true; } newLevelStar.SetActive(active); } } if (boundData != null) { boundData.ReleaseThumbnailReference(); } boundData = level; }