private void RebuildGradientList() { gradientList.Clear(); foreach (SkySettings sky in GlobalState.Settings.skies) { AddGradient(sky); } }
private void LoadProjectItems() { projects.Clear(); projectList.Clear(); List <string> paths = Serialization.SaveManager.Instance.GetProjectThumbnailPaths(); foreach (string path in paths) { GameObject item = Instantiate(itemPrefab); item.name = Directory.GetParent(path).Name; ProjectItem projectItem = item.GetComponent <ProjectItem>(); UIDynamicListItem dlItem = projectList.AddItem(item.transform); projectItem.SetListItem(dlItem, path); projects.Add(item); } projectList.ForceUpdate(); UpdateButtons(); }
// Update UI: rebuild shots list void OnShotManagerChanged() { shotList.Clear(); ShotManager sm = ShotManager.Instance; int activeShotCount = 0; foreach (Shot shot in sm.shots) { ShotItem shotItem = ShotItem.GenerateShotItem(shot); shotItem.AddListeners(OnUpdateShotName, OnUpdateShotStart, OnUpdateShotEnd, OnUpdateShotColor, OnUpdateShotEnabled, OnSetCamera); UIDynamicListItem dlItem = shotList.AddItem(shotItem.transform); dlItem.UseColliderForUI = false; // dont use the default global collider, sub-widget will catch UI events and propagate them. shotItem.transform.localScale = Vector3.one; // Items are hidden (scale 0) while they are not added into a list, so activate the item here. shotItem.SetListItem(dlItem); // link individual elements to their parent list in order to be able to send messages upwards. if (shot.enabled) { activeShotCount++; } } shotList.CurrentIndex = sm.ActiveShotIndex; activeShotCountLabel.Text = activeShotCount.ToString() + "/" + sm.shots.Count.ToString(); }
public void ClearPrefabs() { prefabs.Clear(); prefabList.Clear(); }
private void OnClearScene() { grassList.Clear(); }
private void OnClearScene() { cameraList.Clear(); }
private void OnClearScene() { lightList.Clear(); }