Example #1
0
 private void MainSectionValueCustomizationsContainer(ValueCustomizationSystem.ValueCustomization current, SerializedProperty currentProperty)
 {
     LabelWidth(50);
     if (Asset(ref current.profile, currentProperty.FindPropertyRelative("profile"), name: current.name))
     {
         ValueCustomizationProfile profile = current.profile;
         profile.name          = current.name;
         profile.variable      = current.variable;
         profile.overrideTypes = current.types.Count != 0;
         if (profile.overrideTypes)
         {
             profile.SetTypesUnlinked(current.types);
         }
     }
     OpenVerticalSubsection();
     {
         GUI.enabled = !current.profile;
         LabelWidth(44);
         Property(currentProperty.FindPropertyRelative("name"));
         GUI.enabled = true;
         LabelWidth(53);
         SerializedProperty sourceProperty = currentProperty.FindPropertyRelative("source");
         Selection(sourceProperty);
         Variable(sourceProperty, ref current.variable, ref current.variableNameIndex, currentProperty.FindPropertyRelative("variable"), variableState: !current.profile);
         Container2(currentProperty.FindPropertyRelative("types"), current.types, primary: MainSectionValueCustomizationsContainerTypesContainer, header: () => IndexContainer(currentProperty.FindPropertyRelative("index"), currentProperty.FindPropertyRelative("types"), design: 1), state: !current.profile);
     }
     CloseVertical();
 }
 public void SetProfile(ValueCustomizationProfile value)
 {
     profile = value;
 }