コード例 #1
0
 private void GenerateInternalEditor()
 {
     UnityEngine.Object[] array = new UnityEngine.Object[base.targets.Length];
     for (int i = 0; i < base.targets.Length; i++)
     {
         Preset preset = (Preset)base.targets[i];
         PresetEditor.ReferenceCount referenceCount = null;
         if (!PresetEditor.s_References.TryGetValue(preset.GetInstanceID(), out referenceCount))
         {
             referenceCount = new PresetEditor.ReferenceCount
             {
                 count     = 0,
                 reference = preset.GetReferenceObject()
             };
             if (referenceCount.reference == null)
             {
                 this.m_NotSupportedEditorName = preset.GetTargetTypeName();
                 return;
             }
             PresetEditor.s_References.Add(preset.GetInstanceID(), referenceCount);
         }
         referenceCount.count++;
         array[i] = referenceCount.reference;
     }
     this.m_InternalEditor = Editor.CreateEditor(array);
 }