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)));
    }
Ejemplo n.º 2
0
 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;
         }
     }
 }
Ejemplo n.º 3
0
 private void OnProjectParameterAdded(object sender, ProjectParameterEventArgs args)
 {
     //it needs to be sorted alphabetically, so cannot just add new button
     DestroyConstantButtons();
     GenerateParameterButtons();
 }