コード例 #1
0
 private void DrawPredefinedTargetInspectorUI(bool typeChanged)
 {
     if (ConfigDataManager.Instance.NumConfigDataObjects > 1)
     {
         if (VuforiaUtilities.DrawDatasetTrackableInspector(this.mSerializedObject, typeChanged, new Func <ConfigData, string[]>(ImageTargetEditor.GetTrackableNames), "Image Target") | typeChanged)
         {
             if (base.serializedObject.isEditingMultipleObjects)
             {
                 this.mSerializedObject.SerializedObject.ApplyModifiedPropertiesWithoutUndo();
                 UnityEngine.Object[] targetObjects = this.mSerializedObject.SerializedObject.targetObjects;
                 for (int i = 0; i < targetObjects.Length; i++)
                 {
                     ImageTargetEditor.UpdateDataSetAppearance(new SerializedImageTarget(new SerializedObject(targetObjects[i])));
                 }
             }
             else
             {
                 ImageTargetEditor.UpdateDataSetAppearance(this.mSerializedObject);
             }
         }
         this.mSerializedObject.WidthProperty.FixApproximatelyEqualFloatValues();
         EditorGUILayout.PropertyField(this.mSerializedObject.WidthProperty, new GUIContent("Width"), new GUILayoutOption[0]);
         this.mSerializedObject.HeightProperty.FixApproximatelyEqualFloatValues();
         EditorGUILayout.PropertyField(this.mSerializedObject.HeightProperty, new GUIContent("Height"), new GUILayoutOption[0]);
         VuforiaUtilities.DrawTrackableOptions(this.mSerializedObject, true, true, true);
         return;
     }
     if (typeChanged)
     {
         ImageTargetEditor.UpdateMaterial(this.mSerializedObject);
     }
     VuforiaUtilities.DrawMissingTargetsButton();
 }