private void OnProjectParameterUpdated(object sender, ProjectParameterEventArgs args) { if (args.ProjectParameter.Id != Id) { return; } SetName(args.ProjectParameter.Name); SetValue(ProjectParametersHelper.GetValue(args.ProjectParameter.Value, ProjectParametersHelper.ConvertStringParameterTypeToEnum(args.ProjectParameter.Type))); }
private void OnProjectParameterRemoved(object sender, ProjectParameterEventArgs args) { ProjectParameterButton[] btns = ContentConstants.GetComponentsInChildren <ProjectParameterButton>(); if (btns != null) { foreach (ProjectParameterButton btn in btns.Where(o => o.Id == args.ProjectParameter.Id)) { Destroy(btn.gameObject); return; } } }
private void OnProjectParameterAdded(object sender, ProjectParameterEventArgs args) { //it needs to be sorted alphabetically, so cannot just add new button DestroyConstantButtons(); GenerateParameterButtons(); }