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 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()); }
private void DrawUserDefinedTargetInspectorUI(bool typeChanged) { if (typeChanged) { ConfigData.ImageTargetData imageTargetData = VuforiaUtilities.CreateDefaultImageTarget(); this.mSerializedObject.TrackableName = string.Empty; ImageTargetEditor.UpdateAspectRatio(this.mSerializedObject, imageTargetData.size); this.mSerializedObject.SetMaterial(ImageTargetEditor.UpdateMaterial("", "", ImageTargetType.USER_DEFINED, this.mSerializedObject.GetMaterial())); } if (this.mSerializedObject.TrackableName.Length > 64) { EditorGUILayout.HelpBox("Target name must not exceed 64 character limit!", MessageType.Error); } EditorGUILayout.PropertyField(this.mSerializedObject.TrackableNameProperty, new GUIContent("Target Name"), new GUILayoutOption[0]); EditorGUILayout.PropertyField(this.mSerializedObject.PreserveChildSizeProperty, new GUIContent("Preserve child size"), new GUILayoutOption[0]); bool expr_BB = SceneManager.Instance.SmartTerrainInitializationEnabled(); if (expr_BB) { EditorGUILayout.HelpBox("Extended Tracking cannot be enabled at the same time as Smart Terrain.", MessageType.Info); } GUI.enabled = !expr_BB; EditorGUILayout.PropertyField(this.mSerializedObject.ExtendedTrackingProperty, new GUIContent("Enable Extended Tracking"), new GUILayoutOption[0]); GUI.enabled = true; }
private ConfigData CreateDefaultDataSet() { ConfigData expr_0A = new ConfigData("Assets/StreamingAssets/QCAR/--- EMPTY ---.xml"); expr_0A.SetImageTarget(VuforiaUtilities.CreateDefaultImageTarget(), "--- EMPTY ---"); expr_0A.SetMultiTarget(this.CreateDefaultMultiTarget(), "--- EMPTY ---"); expr_0A.SetCylinderTarget(this.CreateDefaultCylinderTarget(), "--- EMPTY ---"); expr_0A.SetObjectTarget(this.CreateDefaultObjectTarget(), "--- EMPTY ---"); expr_0A.SetVuMarkTarget(this.CreateDefaultVuMarkTarget(), "--- EMPTY ---"); return(expr_0A); }
private List <ConfigData.MultiTargetPartData> CreateDefaultParts() { List <ConfigData.MultiTargetPartData> arg_6C_0 = new List <ConfigData.MultiTargetPartData>(6); float num = VuforiaUtilities.CreateDefaultImageTarget().size.x * 0.5f; arg_6C_0.Add(new ConfigData.MultiTargetPartData { translation = new Vector3(0f, num, 0f), rotation = Quaternion.AngleAxis(0f, new Vector3(1f, 0f, 0f)), name = "--- EMPTY ---" }); arg_6C_0.Add(new ConfigData.MultiTargetPartData { translation = new Vector3(0f, -num, 0f), rotation = Quaternion.AngleAxis(180f, new Vector3(1f, 0f, 0f)), name = "--- EMPTY ---" }); arg_6C_0.Add(new ConfigData.MultiTargetPartData { translation = new Vector3(-num, 0f, 0f), rotation = Quaternion.AngleAxis(90f, new Vector3(0f, 0f, 1f)), name = "--- EMPTY ---" }); arg_6C_0.Add(new ConfigData.MultiTargetPartData { translation = new Vector3(num, 0f, 0f), rotation = Quaternion.AngleAxis(-90f, new Vector3(0f, 0f, 1f)), name = "--- EMPTY ---" }); arg_6C_0.Add(new ConfigData.MultiTargetPartData { translation = new Vector3(0f, 0f, num), rotation = Quaternion.AngleAxis(90f, new Vector3(1f, 0f, 0f)), name = "--- EMPTY ---" }); arg_6C_0.Add(new ConfigData.MultiTargetPartData { translation = new Vector3(0f, 0f, -num), rotation = Quaternion.AngleAxis(-90f, new Vector3(1f, 0f, 0f)), name = "--- EMPTY ---" }); return(arg_6C_0); }
private void DrawCloudRecoTargetInspectorUI(bool typeChanged) { if (typeChanged) { ConfigData.ImageTargetData imageTargetData = VuforiaUtilities.CreateDefaultImageTarget(); this.mSerializedObject.TrackableName = string.Empty; ImageTargetEditor.UpdateAspectRatio(this.mSerializedObject, imageTargetData.size); this.mSerializedObject.SetMaterial(ImageTargetEditor.UpdateMaterial("", "", ImageTargetType.CLOUD_RECO, this.mSerializedObject.GetMaterial())); } EditorGUILayout.PropertyField(this.mSerializedObject.PreserveChildSizeProperty, new GUIContent("Preserve child size"), new GUILayoutOption[0]); bool expr_7B = SceneManager.Instance.SmartTerrainInitializationEnabled(); if (expr_7B) { EditorGUILayout.HelpBox("Extended Tracking cannot be enabled at the same time as Smart Terrain.", MessageType.Info); } GUI.enabled = !expr_7B; EditorGUILayout.PropertyField(this.mSerializedObject.ExtendedTrackingProperty, new GUIContent("Enable Extended Tracking"), new GUILayoutOption[0]); GUI.enabled = true; SmartTerrainInitializationTargetEditorExtension.DrawInspectorForInitializationTarget(this.mSerializedObject, true); }