Esempio n. 1
0
 internal static EnumInfo CreateEnumInfoFromNativeEnum(string[] names, int[] values, string[] annotations, bool isFlags)
 {
     EnumInfo info = new EnumInfo {
         names = names,
         values = values,
         annotations = annotations,
         isFlags = isFlags,
         guiNames = new GUIContent[names.Length]
     };
     for (int i = 0; i < names.Length; i++)
     {
         info.guiNames[i] = new GUIContent(names[i], annotations[i]);
     }
     return info;
 }
 private static void AppendDiagnosticSwitchToList(List <DiagnosticSwitch> list, string name, string description, DiagnosticSwitchFlags flags, object value, object minValue, object maxValue, object persistentValue, EnumInfo enumInfo)
 {
     list.Add(new DiagnosticSwitch
     {
         name            = name,
         description     = description,
         flags           = flags,
         value           = value,
         minValue        = minValue,
         maxValue        = maxValue,
         persistentValue = persistentValue,
         enumInfo        = enumInfo
     });
 }