private LabelListController ConfigureNewLabel(int i, GameObject newLabelList) { LabelListController labelListController = newLabelList.GetComponentInChildren <LabelListController>(); string currentObjectId = currentObjectsList.objectsList[i]; LabelConfiguration labelConfiguration = new LabelConfiguration(); labelConfiguration.labelText = "- " + currentObjectId; labelConfiguration.objectId = currentObjectId; labelListController.ConfigureLabel(labelConfiguration); return(labelListController); }
public void RemoveObject(SelectableObjectPack objectPack) { LabelListController labelListController = listReferences.Find(x => x.objectId == objectPack.id); if (labelListController != null) { listReferences.Remove(labelListController); Debug.Log("Trying to mark the flag"); labelListController.ShowLabelFinishedFeedback(); } }
public void InstantiateLabels() { listReferences = new List <LabelListController>(); currentObjectsList = FindSystemManager.get.currentObjectsList; for (int i = 0; i < currentObjectsList.objectsList.Count; i++) { GameObject newLabelList = Instantiate(labelListPrefab, parentList); LabelListController labelListController = ConfigureNewLabel(i, newLabelList); listReferences.Add(labelListController); } }