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 void OnEnable() { ObjectTargetAbstractBehaviour arg_22_0 = (ObjectTargetAbstractBehaviour)base.target; this.mSerializedObject = new SerializedObjectTarget(base.serializedObject); ObjectTargetEditor.EditorConfigureTarget(arg_22_0, this.mSerializedObject); }
public ObjectTargetAccessor(ObjectTargetAbstractBehaviour target) { this.mTarget = target; this.mSerializedObject = new SerializedObjectTarget(new SerializedObject(this.mTarget)); }