public override void ApplyDataSetProperties()
        {
            if (VuforiaUtilities.GetPrefabType(this.mTarget) == PrefabType.Prefab)
            {
                return;
            }
            ImageTargetAbstractBehaviour it = (ImageTargetAbstractBehaviour)this.mTarget;

            ConfigData.ImageTargetData imageTargetData;
            using (this.mSerializedObject.Edit())
            {
                if (this.TrackableInDataSet(this.mSerializedObject.TrackableName, this.mSerializedObject.GetDataSetName()))
                {
                    ConfigDataManager.Instance.GetConfigData(this.mSerializedObject.GetDataSetName()).GetImageTarget(this.mSerializedObject.TrackableName, out imageTargetData);
                }
                else if (this.mSerializedObject.ImageTargetType != ImageTargetType.PREDEFINED)
                {
                    imageTargetData = VuforiaUtilities.CreateDefaultImageTarget();
                }
                else
                {
                    ConfigDataManager.Instance.GetConfigData("--- EMPTY ---").GetImageTarget("--- EMPTY ---", out imageTargetData);
                    this.mSerializedObject.DataSetPath   = "--- EMPTY ---";
                    this.mSerializedObject.TrackableName = "--- EMPTY ---";
                }
                ImageTargetEditor.UpdateScale(this.mSerializedObject, imageTargetData.size);
            }
            VirtualButtonEditor.UpdateVirtualButtons(it, imageTargetData.virtualButtons.ToArray());
        }
 public static void EditorConfigureTarget(ImageTargetAbstractBehaviour itb, SerializedImageTarget serializedObject)
 {
     if (itb == null)
     {
         Debug.LogError("ImageTargetAbstractBehaviour parameter is null !");
         return;
     }
     if (VuforiaUtilities.GetPrefabType(itb) == PrefabType.Prefab)
     {
         return;
     }
     if (!SceneManager.Instance.SceneInitialized)
     {
         SceneManager.Instance.InitScene();
     }
     using (serializedObject.Edit())
     {
         if (!serializedObject.InitializedInEditor && !EditorApplication.isPlaying)
         {
             ConfigData.ImageTargetData imageTargetData;
             ConfigDataManager.Instance.GetConfigData("--- EMPTY ---").GetImageTarget("--- EMPTY ---", out imageTargetData);
             serializedObject.DataSetPath   = "--- EMPTY ---";
             serializedObject.TrackableName = "--- EMPTY ---";
             ImageTargetEditor.UpdateAspectRatio(serializedObject, imageTargetData.size);
             ImageTargetEditor.UpdateScale(serializedObject, imageTargetData.size);
             ImageTargetEditor.UpdateMaterial(serializedObject);
             serializedObject.InitializedInEditor = true;
         }
         else if (!EditorApplication.isPlaying)
         {
             ImageTargetEditor.CheckMesh(serializedObject);
         }
     }
 }
        private static void UpdateDataSetAppearance(SerializedImageTarget serializedObject)
        {
            ConfigData configData = ConfigDataManager.Instance.GetConfigData(serializedObject.GetDataSetName());

            if (configData.ImageTargetExists(serializedObject.TrackableName))
            {
                ConfigData.ImageTargetData imageTargetData;
                configData.GetImageTarget(serializedObject.TrackableName, out imageTargetData);
                ImageTargetEditor.UpdateAspectRatio(serializedObject, imageTargetData.size);
                ImageTargetEditor.UpdateScale(serializedObject, imageTargetData.size);
            }
            ImageTargetEditor.UpdateMaterial(serializedObject);
        }