Esempio n. 1
0
 private void OnEnable()
 {
     this.m_InspectedTypes.Clear();
     UnityEngine.Object[] targets = base.targets;
     for (int i = 0; i < targets.Length; i++)
     {
         UnityEngine.Object @object            = targets[i];
         Preset             preset             = (Preset)@object;
         string             targetFullTypeName = preset.GetTargetFullTypeName();
         if (!this.m_InspectedTypes.ContainsKey(targetFullTypeName))
         {
             this.m_InspectedTypes.Add(targetFullTypeName, new List <UnityEngine.Object>());
         }
         this.m_InspectedTypes[targetFullTypeName].Add(@object);
     }
     if (this.m_InspectedTypes.Count == 1)
     {
         Preset preset2 = (Preset)base.target;
         if (preset2.IsValid())
         {
             this.m_SelectedPresetTypeName = preset2.GetTargetFullTypeName();
             this.GenerateInternalEditor();
         }
         else
         {
             this.m_SelectedPresetTypeName = "Invalid";
             this.m_DisplayErrorPreset     = true;
         }
     }
 }