public static void EditorConfigureTarget(VuMarkAbstractBehaviour vmb, SerializedVuMark serializedObject) { if (vmb == null) { Debug.LogError("VuMarkAbstractBehaviour parameter is null !"); return; } if (VuforiaUtilities.GetPrefabType(vmb) == PrefabType.Prefab) { return; } if (!SceneManager.Instance.SceneInitialized) { SceneManager.Instance.InitScene(); } using (serializedObject.Edit()) { if (!serializedObject.InitializedInEditor && !EditorApplication.isPlaying) { ConfigData.VuMarkData vuMarkData; ConfigDataManager.Instance.GetConfigData("--- EMPTY ---").GetVuMarkTarget("--- EMPTY ---", out vuMarkData); serializedObject.DataSetPath = "--- EMPTY ---"; serializedObject.TrackableName = "--- EMPTY ---"; VuMarkEditor.UpdateDataSetInfo(serializedObject, vuMarkData); VuMarkEditor.UpdateAspectRatio(serializedObject, vuMarkData.size); VuMarkEditor.UpdateScale(serializedObject, vuMarkData.size); serializedObject.InitializedInEditor = true; } } if (!EditorApplication.isPlaying) { VuMarkEditor.CheckMesh(serializedObject); } }
public static void EditorConfigureTarget(MultiTargetAbstractBehaviour mtb, SerializedMultiTarget serializedObject) { if (mtb == null) { Debug.LogError("MultiTargetAbstractBehaviour parameter is null !"); return; } if (VuforiaUtilities.GetPrefabType(mtb) == PrefabType.Prefab) { return; } if (!SceneManager.Instance.SceneInitialized) { SceneManager.Instance.InitScene(); } using (serializedObject.Edit()) { if (!serializedObject.InitializedInEditor && !EditorApplication.isPlaying) { ConfigData.MultiTargetData multiTargetData; ConfigDataManager.Instance.GetConfigData("--- EMPTY ---").GetMultiTarget("--- EMPTY ---", out multiTargetData); serializedObject.DataSetPath = "--- EMPTY ---"; serializedObject.TrackableName = "--- EMPTY ---"; List <ConfigData.MultiTargetPartData> parts = multiTargetData.parts; MultiTargetEditor.UpdateParts(serializedObject, parts.ToArray()); serializedObject.InitializedInEditor = true; } else if (!EditorApplication.isPlaying) { MultiTargetEditor.CheckMesh(mtb); } } }
public static void EditorConfigureTarget(CylinderTargetAbstractBehaviour ctb, SerializedCylinderTarget serializedObject) { if (ctb == null) { Debug.LogError("CylinderTargetAbstractBehaviour parameter is null !"); return; } if (VuforiaUtilities.GetPrefabType(ctb) == PrefabType.Prefab) { return; } if (!SceneManager.Instance.SceneInitialized) { SceneManager.Instance.InitScene(); } using (serializedObject.Edit()) { if (!serializedObject.InitializedInEditor && !EditorApplication.isPlaying) { ConfigData.CylinderTargetData cylinderTargetData; ConfigDataManager.Instance.GetConfigData("--- EMPTY ---").GetCylinderTarget("--- EMPTY ---", out cylinderTargetData); serializedObject.DataSetPath = "--- EMPTY ---"; serializedObject.TrackableName = "--- EMPTY ---"; CylinderTargetEditor.UpdateAspectRatio(serializedObject, cylinderTargetData); CylinderTargetEditor.UpdateScale(serializedObject, cylinderTargetData.sideLength); serializedObject.InitializedInEditor = true; } else if (!EditorApplication.isPlaying) { CylinderTargetEditor.CheckMesh(serializedObject); } } }
public static void EditorConfigureTarget(WordAbstractBehaviour wb, SerializedWord serializedObject) { if (wb == null) { Debug.LogError("WordAbstractBehaviour parameter is null !"); return; } if (VuforiaUtilities.GetPrefabType(wb) == PrefabType.Prefab) { return; } if (!SceneManager.Instance.SceneInitialized) { SceneManager.Instance.InitScene(); } using (serializedObject.Edit()) { if (!serializedObject.InitializedInEditor && !EditorApplication.isPlaying) { serializedObject.Mode = WordTemplateMode.Template; serializedObject.SpecificWord = "Word"; WordEditor.UpdateMesh(wb); serializedObject.InitializedInEditor = true; } } }
public static void EditorConfigureTarget(VirtualButtonAbstractBehaviour vb) { if (vb == null) { Debug.LogError("VirtualButtonAbstractBehaviour parameter is null !"); return; } if (VuforiaUtilities.GetPrefabType(vb) == PrefabType.Prefab) { return; } if (!SceneManager.Instance.SceneInitialized) { SceneManager.Instance.InitScene(); } if (!EditorApplication.isPlaying) { if (!vb.HasUpdatedPose) { vb.UpdatePose(); } if (!VirtualButtonEditor.IsVBMeshCreated(vb)) { VirtualButtonEditor.CreateVBMesh(vb.gameObject); } VirtualButtonEditor.Validate(); } }
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 override void ApplyDataSetAppearance() { if (VuforiaUtilities.GetPrefabType(this.mTarget) == PrefabType.Prefab) { return; } using (this.mSerializedObject.Edit()) { ConfigData.ImageTargetData imageTargetData; 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.UpdateAspectRatio(this.mSerializedObject, imageTargetData.size); ImageTargetEditor.UpdateMaterial(this.mSerializedObject); } }
public static void EditorConfigureTarget(ObjectTargetAbstractBehaviour otb, SerializedObjectTarget serializedObject) { if (VuforiaUtilities.GetPrefabType(otb) == PrefabType.Prefab) { return; } if (!SceneManager.Instance.SceneInitialized) { SceneManager.Instance.InitScene(); } using (serializedObject.Edit()) { if (!serializedObject.InitializedInEditor && !EditorApplication.isPlaying) { ConfigData.ObjectTargetData objectTargetData; ConfigDataManager.Instance.GetConfigData("--- EMPTY ---").GetObjectTarget("--- EMPTY ---", out objectTargetData); ObjectTargetEditor.UpdateAspectRatio(serializedObject, objectTargetData.size); ObjectTargetEditor.UpdateScale(serializedObject, objectTargetData.size); ObjectTargetEditor.UpdateBoundingBox(serializedObject, objectTargetData.bboxMin, objectTargetData.bboxMax); ObjectTargetEditor.UpdatePreviewImage(serializedObject, objectTargetData.targetID); serializedObject.DataSetPath = "--- EMPTY ---"; serializedObject.TrackableName = "--- EMPTY ---"; serializedObject.InitializedInEditor = true; } } }
public static void DisableGuiForPrefab(UnityEngine.Object target) { if (VuforiaUtilities.GetPrefabType(target) == PrefabType.Prefab) { GUILayout.Label("You can't configure a prefab.", new GUILayoutOption[0]); GUI.enabled = false; } }
public override void OnInspectorGUI() { VuforiaUtilities.DisableGuiForPrefab(base.target); base.DrawDefaultInspector(); using (base.serializedObject.Edit()) { bool flag = true; bool showCameraAnchors = true; bool flag2 = true; if (VuforiaUtilities.GetPrefabType(base.target) != PrefabType.Prefab) { flag2 = false; VuforiaAbstractConfiguration expr_3C = VuforiaAbstractConfigurationEditor.LoadConfigurationObject(); VuforiaAbstractConfiguration.DigitalEyewearConfiguration digitalEyewear = expr_3C.DigitalEyewear; bool arg_74_0 = digitalEyewear.EyewearType == DigitalEyewearARController.EyewearType.VideoSeeThrough && digitalEyewear.StereoFramework > DigitalEyewearARController.StereoFramework.Vuforia; bool flag3 = digitalEyewear.EyewearType == DigitalEyewearARController.EyewearType.OpticalSeeThrough && digitalEyewear.SeeThroughConfiguration == DigitalEyewearARController.SeeThroughConfiguration.HoloLens; object expr_74 = arg_74_0; flag = ((arg_74_0 || flag3) != false); showCameraAnchors = (expr_74 != null); bool autoInitAndStartTracker = expr_3C.DeviceTracker.AutoInitAndStartTracker; int num = 3; if (autoInitAndStartTracker && this.mWorldCenterMode.intValue != num) { this.mWorldCenterMode.intValue = num; } else if (!autoInitAndStartTracker && this.mWorldCenterMode.intValue == num) { this.mWorldCenterMode.intValue = 2; } if (flag && !this.WereBindingFieldsExposed) { this.WereBindingFieldsExposed = true; if (this.CentralAnchorPoint == null && (this.mWorldCenterMode.intValue == 1 || this.mWorldCenterMode.intValue == 0)) { this.mWorldCenterMode.intValue = 2; } } else if (!flag && this.WereBindingFieldsExposed) { this.WereBindingFieldsExposed = false; } } VuforiaARController.WorldCenterMode worldCenterMode = this.DrawWorldCenterModeInspector(); if (flag2 || worldCenterMode == VuforiaARController.WorldCenterMode.SPECIFIC_TARGET) { this.DrawWorldCenterInspector(); } if (flag) { this.DrawDigitalEyewearInspector(worldCenterMode, showCameraAnchors); } } if (GUILayout.Button("Open Vuforia configuration", new GUILayoutOption[0])) { VuforiaAbstractConfigurationEditor.Init(); } }
public static void EditorConfigureTarget(TextRecoAbstractBehaviour trb) { if (trb == null) { Debug.LogError("TextRecoAbstractBehaviour parameter is null !"); return; } if (VuforiaUtilities.GetPrefabType(trb) == PrefabType.Prefab) { return; } if (!SceneManager.Instance.SceneInitialized) { SceneManager.Instance.InitScene(); } }
public override void ApplyDataSetAppearance() { if (VuforiaUtilities.GetPrefabType(this.mTarget) == PrefabType.Prefab) { return; } using (this.mSerializedObject.Edit()) { ConfigData.CylinderTargetData ctConfig; if (this.TrackableInDataSet(this.mSerializedObject.TrackableName, this.mSerializedObject.GetDataSetName())) { ConfigDataManager.Instance.GetConfigData(this.mSerializedObject.GetDataSetName()).GetCylinderTarget(this.mSerializedObject.TrackableName, out ctConfig); } else { ConfigDataManager.Instance.GetConfigData("--- EMPTY ---").GetCylinderTarget("--- EMPTY ---", out ctConfig); this.mSerializedObject.DataSetPath = "--- EMPTY ---"; this.mSerializedObject.TrackableName = "--- EMPTY ---"; } CylinderTargetEditor.UpdateAspectRatio(this.mSerializedObject, ctConfig); } }
public override void ApplyDataSetAppearance() { if (VuforiaUtilities.GetPrefabType(this.mTarget) == PrefabType.Prefab) { return; } using (this.mSerializedObject.Edit()) { ConfigData.ObjectTargetData objectTargetData; if (this.TrackableInDataSet(this.mSerializedObject.TrackableName, this.mSerializedObject.GetDataSetName())) { ConfigDataManager.Instance.GetConfigData(this.mSerializedObject.GetDataSetName()).GetObjectTarget(this.mSerializedObject.TrackableName, out objectTargetData); } else { ConfigDataManager.Instance.GetConfigData("--- EMPTY ---").GetObjectTarget("--- EMPTY ---", out objectTargetData); this.mSerializedObject.DataSetPath = "--- EMPTY ---"; this.mSerializedObject.TrackableName = "--- EMPTY ---"; } ObjectTargetEditor.UpdateBoundingBox(this.mSerializedObject, objectTargetData.bboxMin, objectTargetData.bboxMax); ObjectTargetEditor.UpdatePreviewImage(this.mSerializedObject, objectTargetData.targetID); } }
public override void ApplyDataSetProperties() { if (VuforiaUtilities.GetPrefabType(this.mTarget) == PrefabType.Prefab) { return; } using (this.mSerializedObject.Edit()) { ConfigData.ObjectTargetData objectTargetData; if (this.TrackableInDataSet(this.mSerializedObject.TrackableName, this.mSerializedObject.GetDataSetName())) { ConfigDataManager.Instance.GetConfigData(this.mSerializedObject.GetDataSetName()).GetObjectTarget(this.mSerializedObject.TrackableName, out objectTargetData); } else { ConfigDataManager.Instance.GetConfigData("--- EMPTY ---").GetObjectTarget("--- EMPTY ---", out objectTargetData); this.mSerializedObject.DataSetPath = "--- EMPTY ---"; this.mSerializedObject.TrackableName = "--- EMPTY ---"; } ObjectTargetEditor.UpdateAspectRatio(this.mSerializedObject, objectTargetData.size); ObjectTargetEditor.UpdateScale(this.mSerializedObject, objectTargetData.size); } }
public static void EditorConfigureTarget(SurfaceAbstractBehaviour surface, SerializedSmartTerrainTrackable serializedObject) { if (surface == null) { Debug.LogError("SurfaceAbstractBehaviour parameter is null !"); return; } if (VuforiaUtilities.GetPrefabType(surface) == PrefabType.Prefab) { return; } if (!SceneManager.Instance.SceneInitialized) { SceneManager.Instance.InitScene(); } using (serializedObject.Edit()) { if (!EditorApplication.isPlaying) { serializedObject.InitializedInEditor = true; } } }
public override void ApplyDataSetProperties() { if (VuforiaUtilities.GetPrefabType(this.mTarget) == PrefabType.Prefab) { return; } using (this.mSerializedObject.Edit()) { ConfigData.MultiTargetData multiTargetData; if (this.TrackableInDataSet(this.mSerializedObject.TrackableName, this.mSerializedObject.GetDataSetName())) { ConfigDataManager.Instance.GetConfigData(this.mSerializedObject.GetDataSetName()).GetMultiTarget(this.mSerializedObject.TrackableName, out multiTargetData); } else { ConfigDataManager.Instance.GetConfigData("--- EMPTY ---").GetMultiTarget("--- EMPTY ---", out multiTargetData); this.mSerializedObject.DataSetPath = "--- EMPTY ---"; this.mSerializedObject.TrackableName = "--- EMPTY ---"; } List <ConfigData.MultiTargetPartData> parts = multiTargetData.parts; MultiTargetEditor.UpdateParts(this.mSerializedObject, parts.ToArray()); } }
public static void EditorConfigureTarget(PropAbstractBehaviour prop, SerializedProp serializedObject) { if (prop == null) { Debug.LogError("PropAbstractBehaviour parameter is null !"); return; } if (VuforiaUtilities.GetPrefabType(prop) == PrefabType.Prefab) { return; } if (!SceneManager.Instance.SceneInitialized) { SceneManager.Instance.InitScene(); } using (serializedObject.Edit()) { if (!EditorApplication.isPlaying) { serializedObject.InitializedInEditor = true; } } }
public static void EditorConfigureTarget(ReconstructionAbstractBehaviour rb, SerializedObject serializedObject = null) { if (rb == null) { Debug.LogError("ReconstructionAbstractBehaviour parameter is null !"); return; } if (VuforiaUtilities.GetPrefabType(rb) == PrefabType.Prefab) { return; } if (!SceneManager.Instance.SceneInitialized) { SceneManager.Instance.InitScene(); } if (serializedObject == null) { serializedObject = new SerializedObject(rb); } if (!EditorApplication.isPlaying) { serializedObject.Update(); SerializedProperty serializedProperty = serializedObject.FindProperty("mInitializedInEditor"); if (!serializedProperty.boolValue) { Debug.Log("Reconstruction added to scene, enabling SmartTerrainTracker"); VuforiaAbstractConfiguration expr_6F = VuforiaAbstractConfigurationEditor.LoadConfigurationObject(); expr_6F.SmartTerrainTracker.AutoInitAndStartTracker = true; expr_6F.SmartTerrainTracker.AutoInitBuilder = true; using (serializedObject.Edit()) { serializedObject.FindProperty("mMaximumExtentEnabled").boolValue = false; serializedProperty.boolValue = true; } } } }
public override void ApplyDataSetAppearance() { if (VuforiaUtilities.GetPrefabType(this.mTarget) == PrefabType.Prefab) { return; } using (this.mSerializedObject.Edit()) { ConfigData.VuMarkData vuMarkData; if (this.TrackableInDataSet(this.mSerializedObject.TrackableName, this.mSerializedObject.GetDataSetName())) { ConfigDataManager.Instance.GetConfigData(this.mSerializedObject.GetDataSetName()).GetVuMarkTarget(this.mSerializedObject.TrackableName, out vuMarkData); } else { ConfigDataManager.Instance.GetConfigData("--- EMPTY ---").GetVuMarkTarget("--- EMPTY ---", out vuMarkData); this.mSerializedObject.DataSetPath = "--- EMPTY ---"; this.mSerializedObject.TrackableName = "--- EMPTY ---"; } VuMarkEditor.UpdateDataSetInfo(this.mSerializedObject, vuMarkData); VuMarkEditor.UpdateAspectRatio(this.mSerializedObject, vuMarkData.size); VuMarkEditor.UpdateMaterial(this.mSerializedObject); } }