diff --git a/Editor/DrawDebugLibrary.meta b/Editor/DrawDebugLibrary.meta
new file mode 100644
index 0000000..da5458a
--- /dev/null
+++ b/Editor/DrawDebugLibrary.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: bfb845b368c96cd4ba331f8878a70332
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/BezierSplineDrawer2DInspector.cs b/Editor/DrawDebugLibrary/BezierSplineDrawer2DInspector.cs
new file mode 100644
index 0000000..7568c3f
--- /dev/null
+++ b/Editor/DrawDebugLibrary/BezierSplineDrawer2DInspector.cs
@@ -0,0 +1,2121 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(BezierSplineDrawer2D))]
+ public class BezierSplineDrawer2DInspector : VisualizerParentInspector
+ {
+ BezierSplineDrawer2D bezierSplineDrawer_unserializedMonoB;
+ Tool toolToSelectAfterThisInspectorGetsUnselcted = Tool.None;
+ Tool selectedToolDuringPreviousOnSceneGUI = Tool.None;
+ bool sheduleFocusSceneViewOnControlPoint = false;
+ int delayCounter_afterShedulingFocusSceneViewOnControlPoint = 0;
+ float dotLength_ofDottedLines = 4.0f;
+ bool hasRegisteredUndo_sinceMouseDown = false;
+ GUIContent plusSymbolIcon;
+ Vector3 sceneViewCamForward_normalized;
+ Vector3 sceneViewCamUp_normalized;
+ Vector3 sceneViewCamRight_normalized;
+ Vector3 sceneViewCam_to_anchorPoint;
+ BezierSplineDrawerInspector.ManyDrawnLinesWarningState manyDrawnLinesWarningState = BezierSplineDrawerInspector.ManyDrawnLinesWarningState.noWarning;
+
+ void OnEnable()
+ {
+ OnEnable_base();
+ bezierSplineDrawer_unserializedMonoB = (BezierSplineDrawer2D)target;
+ plusSymbolIcon = EditorGUIUtility.TrIconContent("Toolbar Plus", "Add new control point");
+
+ toolToSelectAfterThisInspectorGetsUnselcted = Tools.current;
+ ProcessChangingEditorTool();
+ selectedToolDuringPreviousOnSceneGUI = Tools.current;
+ }
+
+ public void OnDisable()
+ {
+ Tools.current = toolToSelectAfterThisInspectorGetsUnselcted;
+ }
+
+ public void OnSceneGUI()
+ {
+ if (bezierSplineDrawer_unserializedMonoB != null) //-> sometimes after deleting the spline component in the inspector this "OnSceneGUI()" is still called, which would result in a missingRefException without this check
+ {
+ bezierSplineDrawer_unserializedMonoB.sheduledSceneViewRepaint_hasBeenExecuted = true;
+
+ if (bezierSplineDrawer_unserializedMonoB.enabled) //-> GizmoLines automatically hide if a component is disabled, Handles do not: Therefore manual disabling here
+ {
+ TryFocusControlPointInSceneView_onKeypressF();
+ TryProcessChangingEditorTool();
+
+ Matrix4x4 handlesMatrix_before = Handles.matrix;
+ Color handlesColor_before = Handles.color;
+
+ DrawHandles();
+
+ Handles.matrix = handlesMatrix_before;
+ Handles.color = handlesColor_before;
+ }
+ }
+ }
+
+ void TryFocusControlPointInSceneView_onKeypressF()
+ {
+ delayCounter_afterShedulingFocusSceneViewOnControlPoint++;
+ SheduleFocusing_onKeypressF();
+ ExecuteSheduledFocusingAfterDelay();
+ }
+
+ void SheduleFocusing_onKeypressF()
+ {
+ Event currentEvent = Event.current;
+ if (currentEvent.type == EventType.KeyDown)
+ {
+ if (currentEvent.keyCode == KeyCode.F)
+ {
+ //this only works when the mouse is in the scene view window (in contrast to Unitys build-in behaviour, where you can focus the scene view camera via pressing "F" even when the mouse is not in the scene view)
+ sheduleFocusSceneViewOnControlPoint = true;
+ delayCounter_afterShedulingFocusSceneViewOnControlPoint = 0;
+ }
+ }
+ }
+
+ void ExecuteSheduledFocusingAfterDelay()
+ {
+ if (sheduleFocusSceneViewOnControlPoint)
+ {
+ //This overwrites the focusing on the gameobject center (which is automatically executed by Unity onKeypressF) with focusing on the the selected control point instead.
+ //The sheduling is because otherwise Unitys automatic focussing on the gameobject will overwrite the here executed focusing
+ int delayValue = 20; //This is a guessed trial-an-error value.
+ if (delayCounter_afterShedulingFocusSceneViewOnControlPoint > delayValue)
+ {
+ sheduleFocusSceneViewOnControlPoint = false;
+ if (SceneView.lastActiveSceneView != null)
+ {
+ int i_ofFirstHighlightedControlPoint = bezierSplineDrawer_unserializedMonoB.Get_i_ofFirstHighlightedControlPoint();
+ if (i_ofFirstHighlightedControlPoint == (-1))
+ {
+ FrameSceneViewCam_soItSeesAllControlPoints(i_ofFirstHighlightedControlPoint);
+ }
+ else
+ {
+ FrameSceneViewCam_soItSeesSpecifiedControlPoints(i_ofFirstHighlightedControlPoint, true);
+ }
+ }
+ }
+ }
+ }
+
+ void FrameSceneViewCam_soItSeesAllControlPoints(int i_ofFirstHighlightedControlPoint)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count == 0)
+ {
+ Bounds boundsOfSelection = new Bounds(bezierSplineDrawer_unserializedMonoB.Get_originPos_ofActiveDrawSpace_inUnitsOfGlobalSpace(), Vector3.zero);
+ SceneView.lastActiveSceneView.Frame(boundsOfSelection, false);
+ }
+ else
+ {
+ FrameSceneViewCam_soItSeesSpecifiedControlPoints(i_ofFirstHighlightedControlPoint, false);
+ }
+ }
+
+ void FrameSceneViewCam_soItSeesSpecifiedControlPoints(int i_ofFirstHighlightedControlPoint, bool includeOnlySelectedControlPoints_notAllControlPoints)
+ {
+ Vector3 posGlobal_ofFirstFramedControlPoint;
+ if (includeOnlySelectedControlPoints_notAllControlPoints)
+ {
+ posGlobal_ofFirstFramedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i_ofFirstHighlightedControlPoint].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos();
+ }
+ else
+ {
+ //"listOfControlPointTriplets.Count" is guaranteed bigger than 0 here:
+ posGlobal_ofFirstFramedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[0].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos();
+ }
+ Bounds boundsOfSelection = new Bounds(posGlobal_ofFirstFramedControlPoint, Vector3.zero);
+
+ for (int i = 0; i < bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count; i++)
+ {
+ if ((includeOnlySelectedControlPoints_notAllControlPoints == false) || bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].isHighlighted)
+ {
+ boundsOfSelection.Encapsulate(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos());
+
+ InternalDXXL_BezierControlPointTriplet2D nextControlPoint = bezierSplineDrawer_unserializedMonoB.GetNextControlPointTriplet(i, false);
+ if (nextControlPoint != null) { boundsOfSelection.Encapsulate(nextControlPoint.anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos()); }
+
+ InternalDXXL_BezierControlPointTriplet2D previousControlPoint = bezierSplineDrawer_unserializedMonoB.GetPreviousControlPointTriplet(i, false);
+ if (previousControlPoint != null) { boundsOfSelection.Encapsulate(previousControlPoint.anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos()); }
+ }
+ }
+ SceneView.lastActiveSceneView.Frame(boundsOfSelection, false);
+ }
+
+ void DrawHandles()
+ {
+ if (bezierSplineDrawer_unserializedMonoB.hideAllHandles == false)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count == 0)
+ {
+ DrawPlusButton_asFallbackIfNoControlPointsExist();
+ }
+ else
+ {
+ for (int i = 0; i < bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count; i++)
+ {
+ Handles.matrix = Matrix4x4.identity;
+
+ AssignControlHandleIDs(i);
+ DrawLinesBetweenSubPoints(i);
+ DrawLinesAlongZToBoundGameobjects(i);
+ DrawIndexAsText(i);
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out sceneViewCamForward_normalized, out sceneViewCamUp_normalized, out sceneViewCamRight_normalized, out sceneViewCam_to_anchorPoint, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), DrawBasics.CameraForAutomaticOrientation.sceneViewCamera);
+ DrawNonInteractableAnchorPointVisualizer(i);
+ DrawNonInteractableHelperPointVisualizer(i, true, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos());
+ DrawNonInteractableHelperPointVisualizer(i, false, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos());
+ DrawPlusButtonsForAddingNewControlPoints_atSplineStartAndEnd(i);
+ DrawPlusButtonsForAddingNewControlPoints_somewhereOnUpcomingSplineSegment(i);
+ DrawUnitysBuildInHandlesAtSubPoints(i);
+ DrawCustomHandlesAtSubPoints(i);
+ TrySetSelectedListSlot_dueToHandlesInteraction(i);
+ Reset_recalculationFlags_duringNoHandleClickedOrDraggedPhases(i);
+ }
+ }
+ }
+
+ ResetUndoRegistrationFlag_duringNoInteractionPhases();
+ }
+
+ void DrawPlusButton_asFallbackIfNoControlPointsExist()
+ {
+ Vector3 posOfPlusButton_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.Get_originPos_ofActiveDrawSpace_inUnitsOfGlobalSpace();
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out sceneViewCamForward_normalized, out sceneViewCamUp_normalized, out sceneViewCamRight_normalized, out sceneViewCam_to_anchorPoint, posOfPlusButton_inUnitsOfGlobalSpace, DrawBasics.CameraForAutomaticOrientation.sceneViewCamera);
+ bool buttonHasBeenClicked = InternalDXXL_BezierHandles.PlusButton(posOfPlusButton_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.handleSizeOf_plusButtons, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, sceneViewCamForward_normalized, sceneViewCamUp_normalized, sceneViewCamRight_normalized, plusSymbolIcon);
+ if (buttonHasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CreateNewControlPoint_atSplineEnd();
+ }
+ }
+
+ void AssignControlHandleIDs(int i)
+ {
+ InternalDXXL_BezierControlPointTriplet2D concernedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ int hint_base = 100 * i; //probably also working without the int-hints
+
+ concernedControlPoint.anchorPoint.controlID_ofCustomHandles_sphere = GUIUtility.GetControlID(hint_base + 1, FocusType.Passive);
+ concernedControlPoint.anchorPoint.controlID_ofCustomHandles_forwardCone = GUIUtility.GetControlID(hint_base + 2, FocusType.Passive);
+ concernedControlPoint.anchorPoint.controlID_ofCustomHandles_backwardCone = GUIUtility.GetControlID(hint_base + 3, FocusType.Passive);
+ concernedControlPoint.anchorPoint.controlID_ofUnityStylePositionHandleUp = GUIUtility.GetControlID(hint_base + 4, FocusType.Passive);
+ concernedControlPoint.anchorPoint.controlID_ofUnityStylePositionHandleRight = GUIUtility.GetControlID(hint_base + 5, FocusType.Passive);
+ concernedControlPoint.anchorPoint.controlID_ofUnityStyleRotationHandle2D = GUIUtility.GetControlID(hint_base + 6, FocusType.Passive);
+
+ concernedControlPoint.forwardHelperPoint.controlID_ofCustomHandles_sphere = GUIUtility.GetControlID(hint_base + 7, FocusType.Passive);
+ concernedControlPoint.forwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithAnchor = GUIUtility.GetControlID(hint_base + 8, FocusType.Passive);
+ concernedControlPoint.forwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithNeighborsHelper = GUIUtility.GetControlID(hint_base + 9, FocusType.Passive);
+ concernedControlPoint.forwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithAnchor = GUIUtility.GetControlID(hint_base + 10, FocusType.Passive);
+ concernedControlPoint.forwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithNeighborsHelper = GUIUtility.GetControlID(hint_base + 11, FocusType.Passive);
+ concernedControlPoint.forwardHelperPoint.controlID_ofUnityStylePositionHandleUp = GUIUtility.GetControlID(hint_base + 12, FocusType.Passive);
+ concernedControlPoint.forwardHelperPoint.controlID_ofUnityStylePositionHandleRight = GUIUtility.GetControlID(hint_base + 13, FocusType.Passive);
+
+ concernedControlPoint.backwardHelperPoint.controlID_ofCustomHandles_sphere = GUIUtility.GetControlID(hint_base + 14, FocusType.Passive);
+ concernedControlPoint.backwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithAnchor = GUIUtility.GetControlID(hint_base + 15, FocusType.Passive);
+ concernedControlPoint.backwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithNeighborsHelper = GUIUtility.GetControlID(hint_base + 16, FocusType.Passive);
+ concernedControlPoint.backwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithAnchor = GUIUtility.GetControlID(hint_base + 17, FocusType.Passive);
+ concernedControlPoint.backwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithNeighborsHelper = GUIUtility.GetControlID(hint_base + 18, FocusType.Passive);
+ concernedControlPoint.backwardHelperPoint.controlID_ofUnityStylePositionHandleUp = GUIUtility.GetControlID(hint_base + 19, FocusType.Passive);
+ concernedControlPoint.backwardHelperPoint.controlID_ofUnityStylePositionHandleRight = GUIUtility.GetControlID(hint_base + 20, FocusType.Passive);
+ }
+
+ void DrawLinesBetweenSubPoints(int i)
+ {
+ TryDrawLineToForwardWeight(i);
+ TryDrawLineToBackwardWeight(i);
+ TryDrawLineFromForwardHelperPoint_toBackwardHelperPointOfNextControlPoint(i);
+ TryDrawLineFromForwardHelperPoint_toAnchorPointOfNextControlPoint(i);
+ TryDrawLineFromAnchorPoint_toBackwardHelperPointOfNextControlPoint(i);
+ }
+
+ void TryDrawLineToForwardWeight(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.isUsed)
+ {
+ Vector3 lineStartPos_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos();
+ Vector3 lineEndPos_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos();
+
+ TryDrawExpandedLowAlphaLine_fromAnchorToHelper(i, lineStartPos_inUnitsOfGlobalSpace, lineEndPos_inUnitsOfGlobalSpace);
+
+ Handles.color = bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints;
+ Handles.DrawLine(lineStartPos_inUnitsOfGlobalSpace, lineEndPos_inUnitsOfGlobalSpace);
+ }
+ }
+
+ void TryDrawLineToBackwardWeight(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.isUsed)
+ {
+ Vector3 lineStartPos_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos();
+ Vector3 lineEndPos_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos();
+
+ TryDrawExpandedLowAlphaLine_fromAnchorToHelper(i, lineStartPos_inUnitsOfGlobalSpace, lineEndPos_inUnitsOfGlobalSpace);
+
+ Handles.color = bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints;
+ Handles.DrawLine(lineStartPos_inUnitsOfGlobalSpace, lineEndPos_inUnitsOfGlobalSpace);
+ }
+ }
+
+ void TryDrawExpandedLowAlphaLine_fromAnchorToHelper(int i, Vector3 lineStartPos_inUnitsOfGlobalSpace, Vector3 lineEndPos_inUnitsOfGlobalSpace)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].isHighlighted)
+ {
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, BezierSplineDrawerInspector.alpha_ofAdditionalExpandedLowAlphaLineToHelpers_ofSelectedControlPoints);
+ Handles.DrawAAPolyLine(BezierSplineDrawerInspector.width_ofAdditionalExpandedLowAlphaLineToHelpers_ofSelectedControlPoints, lineStartPos_inUnitsOfGlobalSpace, lineEndPos_inUnitsOfGlobalSpace);
+ }
+ }
+
+ void TryDrawLineFromForwardHelperPoint_toBackwardHelperPointOfNextControlPoint(int i)
+ {
+ if (CheckIf_drawLineFromForwardHelperPoint_toBackwardHelperPointOfNextControlPoint(i))
+ {
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, BezierSplineDrawerInspector.alphaOfDottedLineBetweenHelperPoints);
+ int i_ofNextControlPoint = UtilitiesDXXL_Math.LoopOvershootingIndexIntoCollectionSize(i + 1, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count);
+ Handles.DrawDottedLine(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i_ofNextControlPoint].backwardHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), dotLength_ofDottedLines);
+ }
+ }
+
+ bool CheckIf_drawLineFromForwardHelperPoint_toBackwardHelperPointOfNextControlPoint(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.isUsed)
+ {
+ InternalDXXL_BezierControlPointTriplet2D nextControlPointTriplet = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetNextControlPointTripletAlongSplineDir(false);
+ if (nextControlPointTriplet == null)
+ {
+ return false;
+ }
+ else
+ {
+ return nextControlPointTriplet.backwardHelperPoint.isUsed;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void TryDrawLineFromForwardHelperPoint_toAnchorPointOfNextControlPoint(int i)
+ {
+ if (CheckIf_drawLineFromForwardHelperPoint_toAnchorPointOfNextControlPoint(i))
+ {
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, BezierSplineDrawerInspector.alphaOfDottedLineBetweenHelperPoints);
+ int i_ofNextControlPoint = UtilitiesDXXL_Math.LoopOvershootingIndexIntoCollectionSize(i + 1, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count);
+ Handles.DrawDottedLine(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i_ofNextControlPoint].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), dotLength_ofDottedLines);
+ }
+ }
+
+ bool CheckIf_drawLineFromForwardHelperPoint_toAnchorPointOfNextControlPoint(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.isUsed)
+ {
+ InternalDXXL_BezierControlPointTriplet2D nextControlPointTriplet = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetNextControlPointTripletAlongSplineDir(false);
+ if (nextControlPointTriplet == null)
+ {
+ return false;
+ }
+ else
+ {
+ return (nextControlPointTriplet.backwardHelperPoint.isUsed == false);
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void TryDrawLineFromAnchorPoint_toBackwardHelperPointOfNextControlPoint(int i)
+ {
+ if (CheckIf_drawLineFromAnchorPoint_toBackwardHelperPointOfNextControlPoint(i))
+ {
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, BezierSplineDrawerInspector.alphaOfDottedLineBetweenHelperPoints);
+ int i_ofNextControlPoint = UtilitiesDXXL_Math.LoopOvershootingIndexIntoCollectionSize(i + 1, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count);
+ Handles.DrawDottedLine(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i_ofNextControlPoint].backwardHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), dotLength_ofDottedLines);
+ }
+ }
+
+ bool CheckIf_drawLineFromAnchorPoint_toBackwardHelperPointOfNextControlPoint(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.isUsed == false)
+ {
+ InternalDXXL_BezierControlPointTriplet2D nextControlPointTriplet = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetNextControlPointTripletAlongSplineDir(false);
+ if (nextControlPointTriplet == null)
+ {
+ return false;
+ }
+ else
+ {
+ return nextControlPointTriplet.backwardHelperPoint.isUsed;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void DrawLinesAlongZToBoundGameobjects(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showDottedLinesAlongZToBoundGameobjects)
+ {
+ Handles.color = bezierSplineDrawer_unserializedMonoB.colorOfLinesAlongZToBoundGameobjects;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.SetBoolOf_boundGameobjectInclConnectionComponent_isAssignedActiveAndEnabled();
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.boundGameobjectInclConnectionComponent_isAssignedActiveAndEnabled)
+ {
+ Handles.DrawDottedLine(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.boundGameobject.transform.position, bezierSplineDrawer_unserializedMonoB.dotLength_ofDottedLinesAlongZToBoundGameobjects);
+ }
+
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.SetBoolOf_boundGameobjectInclConnectionComponent_isAssignedActiveAndEnabled();
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.boundGameobjectInclConnectionComponent_isAssignedActiveAndEnabled)
+ {
+ Handles.DrawDottedLine(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.boundGameobject.transform.position, bezierSplineDrawer_unserializedMonoB.dotLength_ofDottedLinesAlongZToBoundGameobjects);
+ }
+
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.SetBoolOf_boundGameobjectInclConnectionComponent_isAssignedActiveAndEnabled();
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.boundGameobjectInclConnectionComponent_isAssignedActiveAndEnabled)
+ {
+ Handles.DrawDottedLine(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.boundGameobject.transform.position, bezierSplineDrawer_unserializedMonoB.dotLength_ofDottedLinesAlongZToBoundGameobjects);
+ }
+ }
+ }
+
+ void TryProcessChangingEditorTool()
+ {
+ if (selectedToolDuringPreviousOnSceneGUI != Tools.current)
+ {
+ ProcessChangingEditorTool();
+ }
+ selectedToolDuringPreviousOnSceneGUI = Tools.current;
+ }
+
+ void ProcessChangingEditorTool()
+ {
+ if (Tools.current == Tool.Move)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_anchorPoints == bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_helperPoints)
+ {
+ //-> custom handles are "both on" or "both off"
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atAnchors = true;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atHelpers = true;
+ }
+ else
+ {
+ //-> one custom handle is on, the other is off
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atAnchors = bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_anchorPoints;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atHelpers = bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_helperPoints;
+ }
+
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_rotation = false;
+ }
+ else
+ {
+ if (Tools.current == Tool.Rotate)
+ {
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atAnchors = false;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atHelpers = false;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_rotation = true;
+ }
+ else
+ {
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atAnchors = false;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atHelpers = false;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_rotation = false;
+ }
+ }
+ }
+
+ void DrawNonInteractableAnchorPointVisualizer(int i)
+ {
+ Vector3 position_ofAnchorPoint_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos();
+ DrawNonInteractableSubPointVisualizer(i, position_ofAnchorPoint_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, bezierSplineDrawer_unserializedMonoB.handleSizeOf_customHandle_atAnchors, bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_anchorPoints);
+ }
+
+ void DrawNonInteractableHelperPointVisualizer(int i, bool concerncedHelperPoint_isForward_notBackward, Vector3 position_ofHelperPoint_inUnitsOfGlobalSpace)
+ {
+ if (CheckIf_drawNonInteractableHelperPointVisualizer(i, concerncedHelperPoint_isForward_notBackward))
+ {
+ DrawNonInteractableSubPointVisualizer(i, position_ofHelperPoint_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, bezierSplineDrawer_unserializedMonoB.handleSizeOf_customHandle_atHelpers, bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_helperPoints);
+ }
+ }
+
+ void DrawNonInteractableSubPointVisualizer(int i, Vector3 position_ofSubPoint_inUnitsOfGlobalSpace, Color color, float handleSize, bool handlesAreActivated)
+ {
+ Handles.color = color;
+ float radius_ofSubPointIndicator = 0.5f * handleSize * HandleUtility.GetHandleSize(position_ofSubPoint_inUnitsOfGlobalSpace);
+
+ if (handlesAreActivated == false)
+ {
+ Handles.DrawSolidDisc(position_ofSubPoint_inUnitsOfGlobalSpace, Vector3.back, radius_ofSubPointIndicator);
+ }
+
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].isHighlighted)
+ {
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, BezierSplineDrawerInspector.alpha_ofExpandedNonInteractableFlatSubPointVisualizer_forHighlightedControlPoints);
+ Handles.DrawSolidDisc(position_ofSubPoint_inUnitsOfGlobalSpace, Vector3.back, BezierSplineDrawerInspector.sizeFactor_ofNonInteracalbeFlatSubPointVisualizer_forHighlightedPoints * radius_ofSubPointIndicator);
+ }
+ }
+
+ bool CheckIf_drawNonInteractableHelperPointVisualizer(int i, bool concerncedHelperPoint_isForward_notBackward)
+ {
+ return bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetAHelperPoint(concerncedHelperPoint_isForward_notBackward).isUsed;
+ }
+
+ void DrawIndexAsText(int i)
+ {
+ GUIStyle style_ofTextAtControlPoints = new GUIStyle();
+ string space_beforeTextString = " ";
+
+ float scaleFactorOfText = bezierSplineDrawer_unserializedMonoB.handleSizeOf_customHandle_atAnchors / BezierSplineDrawer2D.default_handleSizeOf_customHandle_atAnchors;
+ int scale_ofSpaceBeforeTextString = Mathf.RoundToInt(scaleFactorOfText * 11);
+ int scale_ofNumberItself = Mathf.RoundToInt(scaleFactorOfText * 25);
+
+ string text_atControlPoint = "" + space_beforeTextString + "" + i + "";
+ Handles.Label(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), text_atControlPoint, style_ofTextAtControlPoints);
+ }
+
+ void DrawPlusButtonsForAddingNewControlPoints_atSplineStartAndEnd(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed == false)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showHandleFor_plusButtons_atSplineStartAndEnd)
+ {
+ DrawPlusButtonsForAddingNewControlPoints_atSplineStart(i);
+ DrawPlusButtonsForAddingNewControlPoints_atSplineEnd(i);
+ }
+ }
+ }
+
+ void DrawPlusButtonsForAddingNewControlPoints_atSplineStart(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.IsFirstControlPoint(i))
+ {
+ InternalDXXL_BezierControlPointTriplet2D currControlPointTriplet = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ Vector2 currentFirstControlPoint_backTo_newlyCreatableControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_firstControlPoint_to_newlyCreatedControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized(currControlPointTriplet);
+ if (UtilitiesDXXL_Math.CheckIfNormalizationFailed_meaningLineStayedTooShort(currentFirstControlPoint_backTo_newlyCreatableControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized))
+ {
+ currentFirstControlPoint_backTo_newlyCreatableControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized = (-bezierSplineDrawer_unserializedMonoB.Get_right_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized());
+ }
+ Vector3 currentFirstControlPoint_backTo_newlyCreatableControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized_asV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(currentFirstControlPoint_backTo_newlyCreatableControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized);
+ float distanceToCurrentFirstControlPoint_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.Get_distance_from_prevLastControlPoint_to_newlyCreatedControlPoint_inUnitsOfGlobalSpace();
+ Vector3 posOf_plusButtonAtSplineStart_inUnitsOfGlobalSpace = currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos() + currentFirstControlPoint_backTo_newlyCreatableControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized_asV3 * distanceToCurrentFirstControlPoint_inUnitsOfGlobalSpace;
+
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, BezierSplineDrawerInspector.alphaOfSolidBackgroundLine_ofLinesTowardsPlusButtonsAtSplineEnds);
+ Handles.DrawLine(currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), posOf_plusButtonAtSplineStart_inUnitsOfGlobalSpace);
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, BezierSplineDrawerInspector.alphaOfDottedLine_ofLinesTowardsPlusButtonsAtSplineEnds);
+ Handles.DrawDottedLine(currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), posOf_plusButtonAtSplineStart_inUnitsOfGlobalSpace, dotLength_ofDottedLines);
+
+ bool buttonHasBeenClicked = InternalDXXL_BezierHandles.PlusButton(posOf_plusButtonAtSplineStart_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.handleSizeOf_plusButtons, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, sceneViewCamForward_normalized, sceneViewCamUp_normalized, sceneViewCamRight_normalized, plusSymbolIcon);
+ if (buttonHasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CreateNewControlPoint_atSplineStart();
+ }
+ }
+ }
+
+ void DrawPlusButtonsForAddingNewControlPoints_atSplineEnd(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.IsLastControlPoint(i))
+ {
+ InternalDXXL_BezierControlPointTriplet2D currControlPointTriplet = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ Vector2 currentLastControlPoint_to_newlyCreatableControlPoint_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_previouslyLastControlPoint_to_newlyCreatedControlPointAtSplineEnd_inUnitsOfGlobalSpace_normalized(currControlPointTriplet);
+ if (UtilitiesDXXL_Math.CheckIfNormalizationFailed_meaningLineStayedTooShort(currentLastControlPoint_to_newlyCreatableControlPoint_inUnitsOfGlobalSpace_normalized))
+ {
+ currentLastControlPoint_to_newlyCreatableControlPoint_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_right_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized();
+ }
+ Vector3 currentLastControlPoint_to_newlyCreatableControlPoint_inUnitsOfGlobalSpace_normalized_asV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(currentLastControlPoint_to_newlyCreatableControlPoint_inUnitsOfGlobalSpace_normalized);
+ float distanceToCurrentLastControlPoint_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.Get_distance_from_prevLastControlPoint_to_newlyCreatedControlPoint_inUnitsOfGlobalSpace();
+ Vector3 posOf_plusButtonAtSplineEnd_inUnitsOfGlobalSpace = currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos() + currentLastControlPoint_to_newlyCreatableControlPoint_inUnitsOfGlobalSpace_normalized_asV3 * distanceToCurrentLastControlPoint_inUnitsOfGlobalSpace;
+
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, BezierSplineDrawerInspector.alphaOfSolidBackgroundLine_ofLinesTowardsPlusButtonsAtSplineEnds);
+ Handles.DrawLine(currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), posOf_plusButtonAtSplineEnd_inUnitsOfGlobalSpace);
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, BezierSplineDrawerInspector.alphaOfDottedLine_ofLinesTowardsPlusButtonsAtSplineEnds);
+ Handles.DrawDottedLine(currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), posOf_plusButtonAtSplineEnd_inUnitsOfGlobalSpace, dotLength_ofDottedLines);
+
+ bool buttonHasBeenClicked = InternalDXXL_BezierHandles.PlusButton(posOf_plusButtonAtSplineEnd_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.handleSizeOf_plusButtons, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, sceneViewCamForward_normalized, sceneViewCamUp_normalized, sceneViewCamRight_normalized, plusSymbolIcon);
+ if (buttonHasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CreateNewControlPoint_atSplineEnd();
+ }
+ }
+ }
+
+ void DrawPlusButtonsForAddingNewControlPoints_somewhereOnUpcomingSplineSegment(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showHandleFor_plusButtons_insideSegments)
+ {
+ InternalDXXL_BezierControlPointTriplet2D concernedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ if (bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed || concernedControlPoint.IsLastControlPoint() == false)
+ {
+ float pos0to1_insideSegment_ofPlusButton_beforeDrag = concernedControlPoint.progress0to1_ofPlusButtonPosition_inUpcomingBezierSegment;
+ Vector2 posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace_asV2 = concernedControlPoint.GetPosAtPlusButton_onUpcomingBezierSegment_inUnitsOfGlobalSpace();
+ Vector3 posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace_asV2, bezierSplineDrawer_unserializedMonoB.GetZPos_global_for2D());
+ Vector2 directionOfConeForShifting_inUnitsOfGlobalSpace_normalized = concernedControlPoint.GetTangentAtPlusButton_onUpcomingBezierSegment_inUnitsOfGlobalSpace(true);
+ float handleSize = bezierSplineDrawer_unserializedMonoB.handleSizeOf_plusButtons * HandleUtility.GetHandleSize(posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace);
+
+ Handles.color = bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints;
+ Quaternion rotation_ofForwardCone = Quaternion.LookRotation(directionOfConeForShifting_inUnitsOfGlobalSpace_normalized, Vector3.zero);
+ Quaternion rotation_ofBackwardCone = Quaternion.LookRotation(-directionOfConeForShifting_inUnitsOfGlobalSpace_normalized, Vector3.zero);
+ Get_posOfPlusButtonCones(out Vector3 posOf_forwardCone_beforeDrag_inUnitsOfGlobalSpace, out Vector3 posOf_backwardCone_beforeDrag_inUnitsOfGlobalSpace, posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace, directionOfConeForShifting_inUnitsOfGlobalSpace_normalized, handleSize);
+
+ Start_handlesChangeCheck();
+ float pos0to1_insideSegment_ofPlusButton_afterDragOfForwardCone = InternalDXXL_BezierHandles.ValueSliderAlongCurve(pos0to1_insideSegment_ofPlusButton_beforeDrag, posOf_forwardCone_beforeDrag_inUnitsOfGlobalSpace, rotation_ofForwardCone, directionOfConeForShifting_inUnitsOfGlobalSpace_normalized, handleSize, Handles.ConeHandleCap, 1.0f);
+ bool forwardCone_hasChanged = End_handlesChangeCheck("Shift Button on Spline", i, false);
+
+ Start_handlesChangeCheck();
+ float pos0to1_insideSegment_ofPlusButton_afterDragOfBackwardCone = InternalDXXL_BezierHandles.ValueSliderAlongCurve(pos0to1_insideSegment_ofPlusButton_beforeDrag, posOf_backwardCone_beforeDrag_inUnitsOfGlobalSpace, rotation_ofBackwardCone, directionOfConeForShifting_inUnitsOfGlobalSpace_normalized, handleSize, Handles.ConeHandleCap, 1.0f);
+ bool backwardCone_hasChanged = End_handlesChangeCheck("Shift Button on Spline", i, false);
+
+ if (forwardCone_hasChanged) { Update_progress0to1_ofPlusButtonPosition_inUpcomingBezierSegment(pos0to1_insideSegment_ofPlusButton_afterDragOfForwardCone, concernedControlPoint); }
+ if (backwardCone_hasChanged) { Update_progress0to1_ofPlusButtonPosition_inUpcomingBezierSegment(pos0to1_insideSegment_ofPlusButton_afterDragOfBackwardCone, concernedControlPoint); }
+
+ bool buttonHasBeenClicked = InternalDXXL_BezierHandles.PlusButton(posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.handleSizeOf_plusButtons, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, sceneViewCamForward_normalized, sceneViewCamUp_normalized, sceneViewCamRight_normalized, plusSymbolIcon);
+ if (buttonHasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CreateNewControlPoint_somewhereOnUpcomingSplineSegment(i);
+ }
+ }
+ }
+ }
+
+ void Get_posOfPlusButtonCones(out Vector3 posOf_forwardCone_beforeDrag_inUnitsOfGlobalSpace, out Vector3 posOf_backwardCone_beforeDrag_inUnitsOfGlobalSpace, Vector3 posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace, Vector2 directionOfConeForShifting_inUnitsOfGlobalSpace_normalized_asV2, float handleSize)
+ {
+ Vector3 directionOfConeForShifting_inUnitsOfGlobalSpace_normalized = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(directionOfConeForShifting_inUnitsOfGlobalSpace_normalized_asV2);
+
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out Vector3 unused1, out Vector3 unused2, out Vector3 unused3, out Vector3 sceneViewCam_to_plusButton, posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace, DrawBasics.CameraForAutomaticOrientation.sceneViewCamera);
+ float acuteAngleDeg0to90_betweenObserverViewDir_andCurveTangent = UtilitiesDXXL_Math.AcuteAngle_0to90(sceneViewCam_to_plusButton, directionOfConeForShifting_inUnitsOfGlobalSpace_normalized);
+ acuteAngleDeg0to90_betweenObserverViewDir_andCurveTangent = Mathf.Max(acuteAngleDeg0to90_betweenObserverViewDir_andCurveTangent, 15.0f);
+
+ float offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton = 1.0f / Mathf.Sin(acuteAngleDeg0to90_betweenObserverViewDir_andCurveTangent * Mathf.Deg2Rad);
+ float offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofForwardConeHandle;
+ float offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofBackwardConeHandle;
+
+ bool curveDirectionGoesAwayFromSceneViewCamera = (Vector3.Dot(sceneViewCam_to_plusButton, directionOfConeForShifting_inUnitsOfGlobalSpace_normalized) > 0.0f);
+ if (curveDirectionGoesAwayFromSceneViewCamera)
+ {
+ offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofForwardConeHandle = 1.0f;
+ offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofBackwardConeHandle = offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton;
+ }
+ else
+ {
+ offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofForwardConeHandle = offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton;
+ offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofBackwardConeHandle = 1.0f;
+ }
+
+ float relConeOffset_ifObservingCamViesPerp = 0.75f;
+ float offsetOfForwardConeHandle = handleSize * relConeOffset_ifObservingCamViesPerp * offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofForwardConeHandle;
+ float offsetOfBackwardConeHandle = handleSize * relConeOffset_ifObservingCamViesPerp * offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofBackwardConeHandle;
+
+ posOf_forwardCone_beforeDrag_inUnitsOfGlobalSpace = posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace + directionOfConeForShifting_inUnitsOfGlobalSpace_normalized * offsetOfForwardConeHandle;
+ posOf_backwardCone_beforeDrag_inUnitsOfGlobalSpace = posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace - directionOfConeForShifting_inUnitsOfGlobalSpace_normalized * offsetOfBackwardConeHandle;
+ }
+
+ void Update_progress0to1_ofPlusButtonPosition_inUpcomingBezierSegment(float pos0to1_insideSegment_ofPlusButton_afterDrag, InternalDXXL_BezierControlPointTriplet2D concernedControlPoint)
+ {
+ pos0to1_insideSegment_ofPlusButton_afterDrag = Mathf.Clamp(pos0to1_insideSegment_ofPlusButton_afterDrag, 0.05f, 0.95f);
+ concernedControlPoint.progress0to1_ofPlusButtonPosition_inUpcomingBezierSegment = pos0to1_insideSegment_ofPlusButton_afterDrag;
+ }
+
+ BezierSplineDrawerInspector.PartOfTripleHandleCompound nearest_anchorSubHandle;
+ BezierSplineDrawerInspector.PartOfTripleHandleCompound middle_anchorSubHandle;
+ BezierSplineDrawerInspector.PartOfTripleHandleCompound farest_anchorSubHandle;
+
+ void DrawCustomHandlesAtSubPoints(int i)
+ {
+ Determine_nearestMiddleFarestSubHandle(i);
+
+ DrawCustomHandleAtASubPoint(farest_anchorSubHandle, i);
+ DrawCustomHandleAtASubPoint(middle_anchorSubHandle, i);
+ DrawCustomHandleAtASubPoint(nearest_anchorSubHandle, i);
+ }
+
+ void Determine_nearestMiddleFarestSubHandle(int i)
+ {
+ float dotProduct_camViewDir_directionOfForwardCone = Vector3.Dot(sceneViewCam_to_anchorPoint, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized);
+ float dotProduct_camViewDir_directionOfBackwardCone = Vector3.Dot(sceneViewCam_to_anchorPoint, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized);
+
+ if ((dotProduct_camViewDir_directionOfForwardCone > 0.0f) && (dotProduct_camViewDir_directionOfBackwardCone > 0.0f))
+ {
+ nearest_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.center;
+ if (dotProduct_camViewDir_directionOfForwardCone > dotProduct_camViewDir_directionOfBackwardCone)
+ {
+ middle_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.backward;
+ farest_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.forward;
+ }
+ else
+ {
+ middle_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.forward;
+ farest_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.backward;
+ }
+ }
+ else
+ {
+ if ((dotProduct_camViewDir_directionOfForwardCone < 0.0f) && (dotProduct_camViewDir_directionOfBackwardCone < 0.0f))
+ {
+ farest_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.center;
+ if (dotProduct_camViewDir_directionOfForwardCone < dotProduct_camViewDir_directionOfBackwardCone)
+ {
+ nearest_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.forward;
+ middle_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.backward;
+ }
+ else
+ {
+ nearest_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.backward;
+ middle_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.forward;
+ }
+ }
+ else
+ {
+ middle_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.center;
+ if (dotProduct_camViewDir_directionOfForwardCone < 0.0f)
+ {
+ nearest_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.forward;
+ farest_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.backward;
+ }
+ else
+ {
+ nearest_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.backward;
+ farest_anchorSubHandle = BezierSplineDrawerInspector.PartOfTripleHandleCompound.forward;
+ }
+ }
+ }
+ }
+
+ void DrawCustomHandleAtASubPoint(BezierSplineDrawerInspector.PartOfTripleHandleCompound subHandleToDraw, int i)
+ {
+ switch (subHandleToDraw)
+ {
+ case BezierSplineDrawerInspector.PartOfTripleHandleCompound.center:
+ DrawAnchorPointsCustomHandle(i);
+ break;
+ case BezierSplineDrawerInspector.PartOfTripleHandleCompound.forward:
+ DrawAHelperPointHandle(i, true);
+ break;
+ case BezierSplineDrawerInspector.PartOfTripleHandleCompound.backward:
+ DrawAHelperPointHandle(i, false);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawAnchorPointsCustomHandle(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_anchorPoints)
+ {
+ Handles.color = bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints;
+
+ float size_ofAnchorPointsCustomHandle = bezierSplineDrawer_unserializedMonoB.handleSizeOf_customHandle_atAnchors * HandleUtility.GetHandleSize(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos());
+
+ bool drawForwardCone_ofAnchorPointsCustomHandle = CheckIf_drawForwardCone_ofAnchorPointsCustomHandle(i);
+ bool drawBackwardCone_ofAnchorPointsCustomHandle = CheckIf_drawBackwardCone_ofAnchorPointsCustomHandle(i);
+
+ if (drawForwardCone_ofAnchorPointsCustomHandle) { TryRecalcHandleDirectionOfForwardConeOnAnchorHandle(i); }
+ if (drawBackwardCone_ofAnchorPointsCustomHandle) { TryRecalcHandleDirectionOfBackwardConeOnAnchorHandle(i); }
+
+ bool flipBackwardCone_dueToIsLastControlPointOfNonClosedSpline = FlipDirectionOfAnchorPointsCustomHandleBackwardCone(i);
+ if (flipBackwardCone_dueToIsLastControlPointOfNonClosedSpline)
+ {
+ //-> "forward cone" (whichever of the three handles it may be) is always skipped here
+ //-> so this just flips the draw order of the remaining two subHandles: sphere and the backward cone
+ DrawASubHandle_ofAnchorPointsCustomHandle(nearest_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ DrawASubHandle_ofAnchorPointsCustomHandle(middle_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ DrawASubHandle_ofAnchorPointsCustomHandle(farest_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ }
+ else
+ {
+ DrawASubHandle_ofAnchorPointsCustomHandle(farest_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ DrawASubHandle_ofAnchorPointsCustomHandle(middle_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ DrawASubHandle_ofAnchorPointsCustomHandle(nearest_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ }
+ }
+ }
+
+ bool CheckIf_drawForwardCone_ofAnchorPointsCustomHandle(int i)
+ {
+ if ((bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed == false) && bezierSplineDrawer_unserializedMonoB.IsLastControlPoint(i))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ void TryRecalcHandleDirectionOfForwardConeOnAnchorHandle(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_forwardCone_duringNextOnSceneGUI)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.isUsed)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.Get_direction_toForward_inUnitsOfGlobalSpace_normalized();
+ }
+ else
+ {
+ InternalDXXL_BezierControlSubPoint2D nextUsedNonSuperimposedSubPointAlongSplineDir = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetNextUsedNonSuperimposedSubPointAlongSplineDir(false);
+ if (nextUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized = (nextUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace() - bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace()).normalized;
+ }
+ else
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_right_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized();
+ }
+ }
+ }
+ }
+
+ bool CheckIf_drawBackwardCone_ofAnchorPointsCustomHandle(int i)
+ {
+ if ((bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed == false) && (bezierSplineDrawer_unserializedMonoB.IsFirstControlPoint(i)))
+ {
+ return false;
+ }
+
+ //note 1: for non-kinked juncture types the backwardHelper cannot be disabled (meaning "isUsed == true" is always guaranteed). Therefore the backward direction cone is always redundant and can be skipped, because it is the same as the forward direction.
+ //note 2: the one case, where no forward direction for non-kinked juncture-types would be possible is the splineEnd of non-closed splines. But such spline end points are always forced to "juncture=kinked", and therefore don't need special treatment here
+ return (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.junctureType == InternalDXXL_BezierControlAnchorSubPoint.JunctureType.kinked);
+ }
+
+ void TryRecalcHandleDirectionOfBackwardConeOnAnchorHandle(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_backwardCone_duringNextOnSceneGUI)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.isUsed)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.Get_direction_toBackward_inUnitsOfGlobalSpace_normalized();
+ }
+ else
+ {
+ InternalDXXL_BezierControlSubPoint2D previousUsedNonSuperimposedSubPointAlongSplineDir = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPreviousUsedNonSuperimposedSubPointAlongSplineDir(false);
+ if (previousUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized = (previousUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace() - bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace()).normalized;
+ }
+ else
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized = (-bezierSplineDrawer_unserializedMonoB.Get_right_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized());
+ }
+ }
+ }
+ }
+
+ void DrawASubHandle_ofAnchorPointsCustomHandle(BezierSplineDrawerInspector.PartOfTripleHandleCompound subHandleToDraw, int i, bool drawForwardCone_ofAnchorPointsCustomHandle, bool drawBackwardCone_ofAnchorPointsCustomHandle, float size_ofAnchorPointsCustomHandle)
+ {
+ switch (subHandleToDraw)
+ {
+ case BezierSplineDrawerInspector.PartOfTripleHandleCompound.center:
+ DrawAnchorPointsCustomHandles_freeMoveSubHandle(i, size_ofAnchorPointsCustomHandle);
+ break;
+ case BezierSplineDrawerInspector.PartOfTripleHandleCompound.forward:
+ if (drawForwardCone_ofAnchorPointsCustomHandle) { DrawAnchorPointsCustomHandles_forwardConeSubHandle(i, size_ofAnchorPointsCustomHandle); }
+ break;
+ case BezierSplineDrawerInspector.PartOfTripleHandleCompound.backward:
+ if (drawBackwardCone_ofAnchorPointsCustomHandle) { DrawAnchorPointsCustomHandles_backwardConeSubHandle(i, size_ofAnchorPointsCustomHandle); }
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawAnchorPointsCustomHandles_freeMoveSubHandle(int i, float size_ofAnchorPointsCustomHandle)
+ {
+ Start_handlesChangeCheck();
+ Vector3 pos_shiftedByFreeMoveHandle_inUnitsOfGlobalSpace = Handles.Slider2D(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.controlID_ofCustomHandles_sphere, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), Vector3.back, Vector3.up, Vector3.right, size_ofAnchorPointsCustomHandle, Handles.SphereHandleCap, Vector2.one);
+ bool hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ if (hasChanged)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.SetPos_inUnitsOfGlobalSpace(pos_shiftedByFreeMoveHandle_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+
+ void DrawAnchorPointsCustomHandles_forwardConeSubHandle(int i, float size_ofAnchorPointsCustomHandle)
+ {
+ Vector3 posOffset_fromAnchorPoint_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized * size_ofAnchorPointsCustomHandle;
+ Vector3 pos_ofForwardCone_beforeDrag_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos() + posOffset_fromAnchorPoint_inUnitsOfGlobalSpace;
+
+ Start_handlesChangeCheck();
+ Vector3 pos_ofForwardCone_afterDrag_inUnitsOfGlobalSpace = Handles.Slider(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.controlID_ofCustomHandles_forwardCone, pos_ofForwardCone_beforeDrag_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized, size_ofAnchorPointsCustomHandle, Handles.ConeHandleCap, 1.0f);
+ bool hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ if (hasChanged)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_forwardCone_duringNextOnSceneGUI = false; //Without this there is strange flickering behaviour, see notes at "recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = false"
+ Vector3 posDifference_inUnitsOfGlobalSpace = pos_ofForwardCone_afterDrag_inUnitsOfGlobalSpace - pos_ofForwardCone_beforeDrag_inUnitsOfGlobalSpace;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.AddPosOffset_inUnitsOfGlobalSpace(posDifference_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+
+ void DrawAnchorPointsCustomHandles_backwardConeSubHandle(int i, float size_ofAnchorPointsCustomHandle)
+ {
+ bool flipDirectionOfCone = FlipDirectionOfAnchorPointsCustomHandleBackwardCone(i);
+ Vector3 posOffset_fromAnchorPoint_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized * size_ofAnchorPointsCustomHandle;
+ if (flipDirectionOfCone) { posOffset_fromAnchorPoint_inUnitsOfGlobalSpace = -posOffset_fromAnchorPoint_inUnitsOfGlobalSpace; }
+ Vector3 pos_ofBackwardCone_beforeDrag_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos() + posOffset_fromAnchorPoint_inUnitsOfGlobalSpace;
+ Vector3 usedDirection_inUnitsOfGlobalSpace = flipDirectionOfCone ? (-bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized) : bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized;
+
+ Start_handlesChangeCheck();
+ Vector3 pos_ofBackwardCone_afterDrag_inUnitsOfGlobalSpace = Handles.Slider(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.controlID_ofCustomHandles_backwardCone, pos_ofBackwardCone_beforeDrag_inUnitsOfGlobalSpace, usedDirection_inUnitsOfGlobalSpace, size_ofAnchorPointsCustomHandle, Handles.ConeHandleCap, 1.0f);
+ bool hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ if (hasChanged)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_backwardCone_duringNextOnSceneGUI = false; //Without this there is strange flickering behaviour, see notes at "recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = false"
+ Vector3 posDifference_inUnitsOfGlobalSpace = pos_ofBackwardCone_afterDrag_inUnitsOfGlobalSpace - pos_ofBackwardCone_beforeDrag_inUnitsOfGlobalSpace;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.AddPosOffset_inUnitsOfGlobalSpace(posDifference_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+
+ bool FlipDirectionOfAnchorPointsCustomHandleBackwardCone(int i)
+ {
+ //-> this is only for visual continuity (because the default case is that the conesAtAnchorHandles point along forwardOfSpline).
+ if (bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed == false)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.IsLastControlPoint(i))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle nearest_helperSubHandle;
+ BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle secondNearest_helperSubHandle;
+ BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle middle_helperSubHandle;
+ BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle secondFarest_helperSubHandle;
+ BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle farest_helperSubHandle;
+ bool nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints;
+ bool secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints;
+ bool secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints;
+ bool farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints;
+ void DrawAHelperPointHandle(int i, bool helperHandleToDraw_isForwardNotBackward)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_helperPoints)
+ {
+ InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetAHelperPoint(helperHandleToDraw_isForwardNotBackward);
+ if (concernedHelperPoint.isUsed)
+ {
+ Handles.color = bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints;
+
+ bool draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor = CheckIf_draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor(i, concernedHelperPoint);
+ bool draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir = CheckIf_draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir(i, concernedHelperPoint);
+
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out Vector3 observerCamForward_normalized, out Vector3 observerCamUp_normalized, out Vector3 observerCamRight_normalized, out Vector3 cam_to_helperPosition, concernedHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), DrawBasics.CameraForAutomaticOrientation.sceneViewCamera);
+
+ TryRecalc_directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized(concernedHelperPoint);
+ TryRecalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized(i, concernedHelperPoint);
+
+ Determine_nearestMiddleAndFarestSubHandles_ofHelperPointsCustomHandle(concernedHelperPoint, cam_to_helperPosition);
+
+ DrawASubHandle_ofHelperPointsCustomHandle(farest_helperSubHandle, farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, i, draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, concernedHelperPoint);
+ DrawASubHandle_ofHelperPointsCustomHandle(secondFarest_helperSubHandle, secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, i, draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, concernedHelperPoint);
+ DrawASubHandle_ofHelperPointsCustomHandle(middle_helperSubHandle, false, i, draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, concernedHelperPoint);
+ DrawASubHandle_ofHelperPointsCustomHandle(secondNearest_helperSubHandle, secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, i, draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, concernedHelperPoint);
+ DrawASubHandle_ofHelperPointsCustomHandle(nearest_helperSubHandle, nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, i, draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, concernedHelperPoint);
+ }
+ }
+ }
+
+ bool CheckIf_draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor(int i, InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint)
+ {
+ if (concernedHelperPoint.GetMountingAnchorPoint().junctureType == InternalDXXL_BezierControlAnchorSubPoint.JunctureType.mirrored)
+ {
+ return false;
+ }
+ else
+ {
+ return (concernedHelperPoint.GetOppositeHelperPoint().isUsed);
+ }
+ }
+
+ bool CheckIf_draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir(int i, InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint)
+ {
+ InternalDXXL_BezierControlPointTriplet2D neighboringControlPoint = concernedHelperPoint.Get_neighboringControlPoint(false);
+ if (neighboringControlPoint != null)
+ {
+ if (concernedHelperPoint.isForward_notBackward)
+ {
+ return neighboringControlPoint.backwardHelperPoint.isUsed;
+ }
+ else
+ {
+ return neighboringControlPoint.forwardHelperPoint.isUsed;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void TryRecalc_directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized(InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint)
+ {
+ if (concernedHelperPoint.recalc_directionForHandles_alongLineWithMountingAnchor_duringNextOnSceneGUI)
+ {
+ if (concernedHelperPoint.isForward_notBackward)
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = concernedHelperPoint.Get_direction_fromMountingAnchorToThisHelperPoint_inUnitsOfGlobalSpace_normalized();
+ }
+ else
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = -concernedHelperPoint.Get_direction_fromMountingAnchorToThisHelperPoint_inUnitsOfGlobalSpace_normalized();
+ }
+ }
+ }
+
+ void TryRecalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized(int i, InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint)
+ {
+ if (concernedHelperPoint.recalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_duringNextOnSceneGUI)
+ {
+ if (concernedHelperPoint.isForward_notBackward)
+ {
+ InternalDXXL_BezierControlSubPoint2D nextUsedNonSuperimposedSubPointAlongSplineDir = concernedHelperPoint.GetNextUsedNonSuperimposedSubPointAlongSplineDir(false);
+
+ if (nextUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = (nextUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace_asV3DrawPos() - concernedHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos()).normalized;
+ }
+ else
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_right_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized();
+ }
+ }
+ else
+ {
+ InternalDXXL_BezierControlSubPoint2D previousUsedNonSuperimposedSubPointAlongSplineDir = concernedHelperPoint.GetPreviousUsedNonSuperimposedSubPointAlongSplineDir(false);
+ if (previousUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = (concernedHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos() - previousUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace_asV3DrawPos()).normalized;
+ }
+ else
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_right_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized();
+ }
+ }
+ }
+ }
+
+ void Determine_nearestMiddleAndFarestSubHandles_ofHelperPointsCustomHandle(InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint, Vector3 cam_to_helperPosition)
+ {
+ middle_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.sphere;
+
+ float dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor = Vector3.Dot(cam_to_helperPosition, concernedHelperPoint.directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized);
+ float dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir = Vector3.Dot(cam_to_helperPosition, concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized);
+ if ((dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor > 0.0f) && (dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir > 0.0f))
+ {
+ //both dirs point AWAY from camera:
+ if (dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor > dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir)
+ {
+ //"dirAlongLineWithAnchor" points STEEPER away from camera than "dir_toNeighborOfNeighbor":
+ nearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ secondNearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ secondFarest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ farest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ }
+ else
+ {
+ //"dir_toNeighborOfNeighbor" points STEEPER away from camera than "dirAlongLineWithAnchor":
+ nearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ secondNearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ secondFarest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ farest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ }
+ }
+ else
+ {
+ if ((dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor < 0.0f) && (dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir < 0.0f))
+ {
+ //both dirs point TOWARDS camera:
+ if (dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor < dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir)
+ {
+ //"dirAlongLineWithAnchor" points STEEPER towards camera than "dir_toNeighborOfNeighbor":
+ nearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ secondNearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ secondFarest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ farest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ }
+ else
+ {
+ //"dir_toNeighborOfNeighbor" points STEEPER towards camera than "dirAlongLineWithAnchor":
+ nearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ secondNearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ secondFarest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ farest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ }
+ }
+ else
+ {
+ if ((dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor > 0.0f) && (dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir < 0.0f))
+ {
+ //"dirAlongLineWithAnchor" points AWAY from camera, "dir_toNeighborOfNeighbor" points TOWARDS camera:
+ float abs_dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir = -dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir;
+ if (dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor > abs_dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir)
+ {
+ //"dirAlongLineWithAnchor" points STEEPER away from camera than "(cylinder)dir_toNeighborOfNeighbor":
+ nearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ secondNearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ secondFarest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ farest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ }
+ else
+ {
+ //"(cylinder)dir_toNeighborOfNeighbor" points STEEPER away from camera than "dirAlongLineWithAnchor":
+ nearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ secondNearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ secondFarest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ farest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ }
+ }
+ else
+ {
+ //"dirAlongLineWithAnchor" points TOWARDS camera, "dir_toNeighborOfNeighbor" points AWAY from camera:
+ float abs_dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor = -dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor;
+ if (abs_dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor > dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir)
+ {
+ //"(cylinder)dirAlongLineWithAnchor" points STEEPER away from camera than "dir_toNeighborOfNeighbor":
+ nearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ secondNearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ secondFarest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ farest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ }
+ else
+ {
+ //"dir_toNeighborOfNeighbor" points STEEPER away from camera than "(cylinder)dirAlongLineWithAnchor":
+ nearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ secondNearest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ secondFarest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ farest_helperSubHandle = BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ }
+ }
+ }
+ }
+ }
+
+ void DrawASubHandle_ofHelperPointsCustomHandle(BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle subHandleToDraw, bool belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, int i, bool draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, bool draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint)
+ {
+ float handleSize_unmodified = bezierSplineDrawer_unserializedMonoB.handleSizeOf_customHandle_atHelpers * HandleUtility.GetHandleSize(concernedHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos());
+ switch (subHandleToDraw)
+ {
+ case BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.sphere:
+ DrawHelperPointsCustomHandles_sphereHandle(i, concernedHelperPoint.controlID_ofCustomHandles_sphere, concernedHelperPoint, handleSize_unmodified);
+ break;
+ case BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor:
+ DrawAnUnidirectionalSubHandle_ofHelperPointsCustomHandle(i, concernedHelperPoint.controlID_ofCustomHandles_coneAlongLineWithAnchor, concernedHelperPoint, 1.0f, handleSize_unmodified, Handles.ConeHandleCap, belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, true, false, false);
+ break;
+ case BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir:
+ DrawAnUnidirectionalSubHandle_ofHelperPointsCustomHandle(i, concernedHelperPoint.controlID_ofCustomHandles_coneAlongLineWithNeighborsHelper, concernedHelperPoint, 1.0f, handleSize_unmodified, Handles.ConeHandleCap, belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, false, false, false);
+ break;
+ case BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor:
+ if (draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor)
+ {
+ DrawAnUnidirectionalSubHandle_ofHelperPointsCustomHandle(i, concernedHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithAnchor, concernedHelperPoint, -1.0f * BezierSplineDrawerInspector.offsetFactor_forCylinderHandles, BezierSplineDrawerInspector.scaleFactor_forCylinderHandles * handleSize_unmodified, Handles.CylinderHandleCap, belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, false, true, false);
+ }
+ break;
+ case BezierSplineDrawerInspector.PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir:
+ if (draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir)
+ {
+ DrawAnUnidirectionalSubHandle_ofHelperPointsCustomHandle(i, concernedHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithNeighborsHelper, concernedHelperPoint, -1.0f * BezierSplineDrawerInspector.offsetFactor_forCylinderHandles, BezierSplineDrawerInspector.scaleFactor_forCylinderHandles * handleSize_unmodified, Handles.CylinderHandleCap, belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, false, false, true);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawHelperPointsCustomHandles_sphereHandle(int i, int controlID_ofHandle, InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint, float handleSize)
+ {
+ Start_handlesChangeCheck();
+ Vector3 posOfSphereHandle_afterDrag_shifedInsideCamPlane_inUnitsOfGlobalSpace = Handles.Slider2D(controlID_ofHandle, concernedHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), Vector3.back, Vector3.up, Vector3.right, handleSize, Handles.SphereHandleCap, Vector2.one);
+ bool hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ if (hasChanged)
+ {
+ concernedHelperPoint.SetPos_inUnitsOfGlobalSpace(posOfSphereHandle_afterDrag_shifedInsideCamPlane_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+
+ void DrawAnUnidirectionalSubHandle_ofHelperPointsCustomHandle(int i, int controlID_ofHandle, InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint, float handlePosOffsetFactorAlongDir, float handleSize, Handles.CapFunction capFunction, bool belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, bool tryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint, bool mirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint, bool mirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint)
+ {
+ Vector3 dragDirection_inUnitsOfGlobalSpace_normalized = belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints ? concernedHelperPoint.directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized : concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized;
+ Vector3 handleOffset = dragDirection_inUnitsOfGlobalSpace_normalized * handleSize * handlePosOffsetFactorAlongDir;
+ Vector3 posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace = concernedHelperPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos();
+ Vector3 posOfConeHandle_beforeDrag_inUnitsOfGlobalSpace = posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace + handleOffset;
+
+ Start_handlesChangeCheck();
+ Vector3 posOfConeHandle_afterDrag_inUnitsOfGlobalSpace = Handles.Slider(controlID_ofHandle, posOfConeHandle_beforeDrag_inUnitsOfGlobalSpace, dragDirection_inUnitsOfGlobalSpace_normalized, handleSize, capFunction, 1.0f);
+ bool hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ if (hasChanged)
+ {
+ if (belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints)
+ {
+ concernedHelperPoint.recalc_directionForHandles_alongLineWithMountingAnchor_duringNextOnSceneGUI = false;
+ }
+ else
+ {
+ concernedHelperPoint.recalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_duringNextOnSceneGUI = false;
+ }
+
+ Vector3 shiftOffset_throughDragSlider_inUnitsOfGlobalSpace = posOfConeHandle_afterDrag_inUnitsOfGlobalSpace - posOfConeHandle_beforeDrag_inUnitsOfGlobalSpace;
+ Vector3 posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace = posOfConeHandle_afterDrag_inUnitsOfGlobalSpace - handleOffset;
+
+ TryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint(concernedHelperPoint, tryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint, posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace, posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace);
+
+ float absDistanceToMountingAnchorPoint_beforeDrag_inUnitsOfGlobalSpace = concernedHelperPoint.Get_absDistanceToAnchorPoint_inUnitsOfGlobalSpace();
+ concernedHelperPoint.SetPos_inUnitsOfGlobalSpace(posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace, true, null);
+ float absDistanceToMountingAnchorPoint_afterDrag_inUnitsOfGlobalSpace = concernedHelperPoint.Get_absDistanceToAnchorPoint_inUnitsOfGlobalSpace();
+
+ TryMirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint(concernedHelperPoint, mirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint, absDistanceToMountingAnchorPoint_beforeDrag_inUnitsOfGlobalSpace, absDistanceToMountingAnchorPoint_afterDrag_inUnitsOfGlobalSpace);
+ TryMirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint(i, concernedHelperPoint, mirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint, shiftOffset_throughDragSlider_inUnitsOfGlobalSpace);
+ }
+ }
+
+ void TryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint(InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint, bool tryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint, Vector3 posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace, Vector3 posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace)
+ {
+ if (tryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint)
+ {
+ if (concernedHelperPoint.isUsed && concernedHelperPoint.GetOppositeHelperPoint().isUsed)
+ {
+ if (concernedHelperPoint.GetMountingAnchorPoint().junctureType == InternalDXXL_BezierControlAnchorSubPoint.JunctureType.aligned)
+ {
+ Vector2 posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace_asV2 = posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace;
+ Vector2 posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace_asV2 = posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace;
+ Vector3 anchor_to_helperPosBeforeDrag = posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace_asV2 - concernedHelperPoint.GetMountingAnchorPoint().GetPos_inUnitsOfGlobalSpace();
+ Vector3 anchor_to_helperPosAfterDrag = posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace_asV2 - concernedHelperPoint.GetMountingAnchorPoint().GetPos_inUnitsOfGlobalSpace();
+ float dotProduct_ofDirectionFromAnchorToConcernedHelper_beforeAndAfterDrag = Vector3.Dot(anchor_to_helperPosBeforeDrag, anchor_to_helperPosAfterDrag);
+ bool coneSliderPassedTheMountingAnchorPoint = (dotProduct_ofDirectionFromAnchorToConcernedHelper_beforeAndAfterDrag < 0.0f);
+ if (coneSliderPassedTheMountingAnchorPoint)
+ {
+ concernedHelperPoint.Get_controlPointTriplet_thisSubPointIsPartOf().Invert_alignedHelperPoints_areOnTheSameSideOfTheAnchor();
+ }
+ }
+ }
+ }
+ }
+
+ void TryMirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint(InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint, bool mirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint, float absDistanceToMountingAnchorPoint_beforeDrag_inUnitsOfGlobalSpace, float absDistanceToMountingAnchorPoint_afterDrag_inUnitsOfGlobalSpace)
+ {
+ if (mirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint)
+ {
+ float absChangeRatio_ofDistance_throughSliderDrag = absDistanceToMountingAnchorPoint_afterDrag_inUnitsOfGlobalSpace / absDistanceToMountingAnchorPoint_beforeDrag_inUnitsOfGlobalSpace;
+ if (UtilitiesDXXL_Math.FloatIsValid(absChangeRatio_ofDistance_throughSliderDrag))
+ {
+ float newAbsDistanceToAnchorPoint_ofOppositeHelperPoint_inUnitsOfGlobalSpace = concernedHelperPoint.GetOppositeHelperPoint().Get_absDistanceToAnchorPoint_inUnitsOfGlobalSpace() * absChangeRatio_ofDistance_throughSliderDrag;
+ concernedHelperPoint.GetOppositeHelperPoint().Set_absDistanceToAnchorPoint_inUnitsOfGlobalSpace(newAbsDistanceToAnchorPoint_ofOppositeHelperPoint_inUnitsOfGlobalSpace, true, null); //-> oppositeHelperPoint is guaranteed "isUsed = true" here
+ //bool cylinderSliderPassedTheMountingAnchorPoint -> No further action required because "concernedHelperPoint.SetPos_inUnitsOfGlobalSpace()" already executed the "flip" of the other helper side.
+ }
+ }
+ }
+
+ void TryMirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint(int i, InternalDXXL_BezierControlHelperSubPoint2D concernedHelperPoint, bool mirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint, Vector3 shiftOffset_throughDragSlider_inUnitsOfGlobalSpace)
+ {
+ if (mirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint)
+ {
+ InternalDXXL_BezierControlHelperSubPoint2D neighboringHelperPoint_ofNeighboringControlPoint = concernedHelperPoint.Get_neighboringHelperPoint_ofNeighboringControlPoint(false);
+ if (neighboringHelperPoint_ofNeighboringControlPoint != null)
+ {
+ neighboringHelperPoint_ofNeighboringControlPoint.AddPosOffset_inUnitsOfGlobalSpace(-shiftOffset_throughDragSlider_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+ }
+
+ void DrawUnitysBuildInHandlesAtSubPoints(int i)
+ {
+ //Could be improved: The handles here in the 2D version could be drawn "back-to-front"-order as "DrawCustomHandlesAtSubPoints()" does, because here custom handles are used and not Unitys build-in PositionHandle and RotatoinHandle (see explanation in the corresponding function of the 3D-version)
+ //Though in 2D it is anyway not as important, because all handles lie in a plane and therefore the readability what's "nearer or farer" is anyway clearer.
+ InternalDXXL_BezierControlPointTriplet2D concernedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ TryDrawAUnityRotationHandle(i);
+ TryDrawAUnityPositionHandle(i, concernedControlPoint.backwardHelperPoint);
+ TryDrawAUnityPositionHandle(i, concernedControlPoint.forwardHelperPoint);
+ TryDrawAUnityPositionHandle(i, concernedControlPoint.anchorPoint);
+ }
+
+ void TryDrawAUnityPositionHandle(int i, InternalDXXL_BezierControlSubPoint2D concernedSubPoint)
+ {
+ if (CheckIf_drawPositionHandle(concernedSubPoint))
+ {
+ if (concernedSubPoint.recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI) { Recalc_globalRotation_ofPositionHandle(concernedSubPoint); }
+
+ float handleSizeFactor = (concernedSubPoint.subPointType == InternalDXXL_BezierControlSubPoint.SubPointType.anchor) ? bezierSplineDrawer_unserializedMonoB.handleSizeFor_position_atAnchors : bezierSplineDrawer_unserializedMonoB.handleSizeFor_position_atHelpers;
+ float handleSize = handleSizeFactor * HandleUtility.GetHandleSize(concernedSubPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos());
+
+ Vector3 direction_ofUpHandle = concernedSubPoint.globalRotation_ofPositionHandle * Vector3.up;
+ Handles.color = Handles.yAxisColor;
+
+ Start_handlesChangeCheck();
+ Vector3 pos_shiftedByPositionUpHandle_inUnitsOfGlobalSpace = Handles.Slider(concernedSubPoint.controlID_ofUnityStylePositionHandleUp, concernedSubPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), direction_ofUpHandle, handleSize, Handles.ArrowHandleCap, 1.0f);
+ bool up_hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ Vector3 direction_ofRightHandle = concernedSubPoint.globalRotation_ofPositionHandle * Vector3.right;
+ Handles.color = Handles.xAxisColor;
+
+ Start_handlesChangeCheck();
+ Vector3 pos_shiftedByPositionRightHandle_inUnitsOfGlobalSpace = Handles.Slider(concernedSubPoint.controlID_ofUnityStylePositionHandleRight, concernedSubPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), direction_ofRightHandle, handleSize, Handles.ArrowHandleCap, 1.0f);
+ bool right_hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ if (up_hasChanged)
+ {
+ concernedSubPoint.recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = false; //Without this there is strange flickering behaviour, maybe due to some internals of how "Handles.PositionHandle()" works. The flickering appears for "Editor.pivotMode=local" when you grab a the position handle that points to the neighboring control point and then get nearer towards this other control point.
+ concernedSubPoint.SetPos_inUnitsOfGlobalSpace(pos_shiftedByPositionUpHandle_inUnitsOfGlobalSpace, true, null);
+ }
+
+ if (right_hasChanged)
+ {
+ concernedSubPoint.recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = false; //Without this there is strange flickering behaviour, maybe due to some internals of how "Handles.PositionHandle()" works. The flickering appears for "Editor.pivotMode=local" when you grab a the position handle that points to the neighboring control point and then get nearer towards this other control point.
+ concernedSubPoint.SetPos_inUnitsOfGlobalSpace(pos_shiftedByPositionRightHandle_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+ }
+
+ bool CheckIf_drawPositionHandle(InternalDXXL_BezierControlSubPoint2D concernedSubPoint)
+ {
+ if (concernedSubPoint.subPointType == InternalDXXL_BezierControlSubPoint.SubPointType.anchor)
+ {
+ return (bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atAnchors && concernedSubPoint.isUsed);
+ }
+ else
+ {
+ return (bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atHelpers && concernedSubPoint.isUsed);
+ }
+ }
+
+ void Recalc_globalRotation_ofPositionHandle(InternalDXXL_BezierControlSubPoint2D concernedSubPoint)
+ {
+ switch (Tools.pivotRotation)
+ {
+ case PivotRotation.Local:
+ concernedSubPoint.SetBoolOf_boundGameobjectInclConnectionComponent_isAssignedActiveAndEnabled();
+ if (concernedSubPoint.boundGameobjectInclConnectionComponent_isAssignedActiveAndEnabled && (concernedSubPoint.subPointType == InternalDXXL_BezierControlSubPoint.SubPointType.anchor))
+ {
+ if (UtilitiesDXXL_EngineBasics.CheckIfThisOrAParentHasANonZRotation_2D(concernedSubPoint.boundGameobject.transform))
+ {
+ Recalc_globalRotation_ofPositionHandle_caseLocalPivotWithoutBoundGameobject(concernedSubPoint);
+ }
+ else
+ {
+ concernedSubPoint.globalRotation_ofPositionHandle = concernedSubPoint.boundGameobject.transform.rotation;
+ }
+ }
+ else
+ {
+ Recalc_globalRotation_ofPositionHandle_caseLocalPivotWithoutBoundGameobject(concernedSubPoint);
+ }
+ break;
+ case PivotRotation.Global:
+ Recalc_globalRotation_ofPositionHandle_caseGlobalPivot(concernedSubPoint);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void Recalc_globalRotation_ofPositionHandle_caseLocalPivotWithoutBoundGameobject(InternalDXXL_BezierControlSubPoint2D concernedSubPoint)
+ {
+ Vector3 posOfConcernedSubPoint_inUnitsOfGlobalSpace = concernedSubPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos();
+ Vector3 posOfNextNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace = posOfConcernedSubPoint_inUnitsOfGlobalSpace;
+ Vector3 posOfPreviousNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace = posOfConcernedSubPoint_inUnitsOfGlobalSpace;
+ bool the3MountingPointsLieOnALine_soThePlaneIsUndefined = false;
+
+ InternalDXXL_BezierControlSubPoint2D nextUsedNonSuperimposedSubPointAlongSplineDir = concernedSubPoint.GetNextUsedNonSuperimposedSubPointAlongSplineDir(false);
+ if (nextUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ posOfNextNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace = nextUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace_asV3DrawPos();
+ }
+ else
+ {
+ the3MountingPointsLieOnALine_soThePlaneIsUndefined = true;
+ }
+
+ InternalDXXL_BezierControlSubPoint2D previousUsedNonSuperimposedSubPointAlongSplineDir = concernedSubPoint.GetPreviousUsedNonSuperimposedSubPointAlongSplineDir(false);
+ if (previousUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ posOfPreviousNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace = previousUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace_asV3DrawPos();
+ }
+ else
+ {
+ the3MountingPointsLieOnALine_soThePlaneIsUndefined = true;
+ }
+
+ Vector3 normalOfPlane_inUnitsOfGlobalSpace_notNormalized = Vector3.forward;
+ if (the3MountingPointsLieOnALine_soThePlaneIsUndefined == false)
+ {
+ Vector3 planeMountingVector1_inUnitsOfGlobalSpace = posOfConcernedSubPoint_inUnitsOfGlobalSpace - posOfNextNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace;
+ Vector3 planeMountingVector2_inUnitsOfGlobalSpace = posOfConcernedSubPoint_inUnitsOfGlobalSpace - posOfPreviousNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace;
+ normalOfPlane_inUnitsOfGlobalSpace_notNormalized = Vector3.Cross(planeMountingVector1_inUnitsOfGlobalSpace, planeMountingVector2_inUnitsOfGlobalSpace);
+
+ the3MountingPointsLieOnALine_soThePlaneIsUndefined = (UtilitiesDXXL_Math.GetBiggestAbsComponent(normalOfPlane_inUnitsOfGlobalSpace_notNormalized) < 0.001f);
+ }
+
+ if (the3MountingPointsLieOnALine_soThePlaneIsUndefined)
+ {
+ Vector3 forwardDirectionPreferablyAlongHandleAxis_inUnitsOfGlobalSpace = concernedSubPoint.GetDirectionAlongSplineForwardBasedOnNeighborPoints_inUnitsOfGlobalSpace();
+ if (UtilitiesDXXL_Math.ApproximatelyZero(forwardDirectionPreferablyAlongHandleAxis_inUnitsOfGlobalSpace))
+ {
+ Recalc_globalRotation_ofPositionHandle_caseGlobalPivot(concernedSubPoint);
+ }
+ else
+ {
+ Vector3 up_ofCreatedRotation = Vector3.Cross(Vector3.forward, forwardDirectionPreferablyAlongHandleAxis_inUnitsOfGlobalSpace);
+ concernedSubPoint.globalRotation_ofPositionHandle = Quaternion.LookRotation(Vector3.forward, up_ofCreatedRotation);
+ }
+ }
+ else
+ {
+ Vector3 rotation_forward = normalOfPlane_inUnitsOfGlobalSpace_notNormalized;
+ Vector3 rotation_up = posOfNextNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace - posOfPreviousNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace;
+ concernedSubPoint.globalRotation_ofPositionHandle = Quaternion.LookRotation(rotation_forward, rotation_up);
+ }
+ }
+
+ void Recalc_globalRotation_ofPositionHandle_caseGlobalPivot(InternalDXXL_BezierControlSubPoint2D concernedSubPoint)
+ {
+ switch (bezierSplineDrawer_unserializedMonoB.drawSpace)
+ {
+ case BezierSplineDrawer.DrawSpace.global:
+ concernedSubPoint.globalRotation_ofPositionHandle = Quaternion.identity;
+ break;
+ case BezierSplineDrawer.DrawSpace.localDefinedByThisGameobject:
+ Recalc_globalRotation_ofPositionHandle_caseGlobalPivotButLocalDrawSpace(concernedSubPoint);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void Recalc_globalRotation_ofPositionHandle_caseGlobalPivotButLocalDrawSpace(InternalDXXL_BezierControlSubPoint2D concernedSubPoint)
+ {
+ switch (bezierSplineDrawer_unserializedMonoB.positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal)
+ {
+ case BezierSplineDrawer.PositionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal.localDrawSpace:
+ concernedSubPoint.globalRotation_ofPositionHandle = bezierSplineDrawer_unserializedMonoB.transform.rotation;
+ break;
+ case BezierSplineDrawer.PositionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal.globalSpace:
+ concernedSubPoint.globalRotation_ofPositionHandle = Quaternion.identity;
+ break;
+ default:
+ break;
+ }
+ }
+
+ void TryDrawAUnityRotationHandle(int i)
+ {
+ InternalDXXL_BezierControlPointTriplet2D concernedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ if (CheckIf_drawRotationHandle(concernedControlPoint))
+ {
+ InternalDXXL_BezierControlAnchorSubPoint2D concernedAnchorPoint = concernedControlPoint.anchorPoint;
+ float handleSize = bezierSplineDrawer_unserializedMonoB.handleSizeFor_rotation * HandleUtility.GetHandleSize(concernedAnchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos());
+
+ if (concernedAnchorPoint.recalc_rotation_ofRotationHandleDuringRotationDragPhases_duringNextOnSceneGUI) { concernedAnchorPoint.rotation_ofRotationHandleDuringRotationDragPhases = Quaternion.identity; }
+
+ Handles.color = Handles.zAxisColor;
+
+ Start_handlesChangeCheck();
+ Quaternion rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace = Handles.Disc(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.controlID_ofUnityStyleRotationHandle2D, concernedAnchorPoint.rotation_ofRotationHandleDuringRotationDragPhases, concernedAnchorPoint.GetPos_inUnitsOfGlobalSpace_asV3DrawPos(), Vector3.forward, handleSize, false, 1.0f);
+ bool hasChanged = End_handlesChangeCheck("Rotation of Bezier Point", i, true);
+
+ if (hasChanged)
+ {
+ concernedAnchorPoint.recalc_rotation_ofRotationHandleDuringRotationDragPhases_duringNextOnSceneGUI = false;
+ Set_rotation_afterChangeThroughRotationHandle(rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, concernedAnchorPoint.rotation_ofRotationHandleDuringRotationDragPhases, concernedAnchorPoint);
+ concernedAnchorPoint.rotation_ofRotationHandleDuringRotationDragPhases = rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace;
+ }
+ }
+ }
+
+ bool CheckIf_drawRotationHandle(InternalDXXL_BezierControlPointTriplet2D concernedControlPoint)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showHandleFor_rotation)
+ {
+ return (concernedControlPoint.forwardHelperPoint.isUsed || concernedControlPoint.backwardHelperPoint.isUsed);
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void Set_rotation_afterChangeThroughRotationHandle(Quaternion rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, Quaternion rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, InternalDXXL_BezierControlAnchorSubPoint2D concernedAnchorPoint)
+ {
+ Quaternion rotationIncrement = GetRotationIncrement(rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace);
+
+ if (concernedAnchorPoint.junctureType == InternalDXXL_BezierControlAnchorSubPoint.JunctureType.kinked)
+ {
+ if (concernedAnchorPoint.GetBackwardHelperPoint().isUsed)
+ {
+ concernedAnchorPoint.AddRotation_toBackwardDirection(rotationIncrement, true, null);
+ }
+
+ if (concernedAnchorPoint.GetForwardHelperPoint().isUsed)
+ {
+ concernedAnchorPoint.AddRotation_toForwardDirection(rotationIncrement, true, null);
+ }
+ }
+ else
+ {
+ if (concernedAnchorPoint.GetForwardHelperPoint().isUsed)
+ {
+ concernedAnchorPoint.AddRotation_toForwardDirection(rotationIncrement, true, null);
+ }
+ else
+ {
+ if (concernedAnchorPoint.GetBackwardHelperPoint().isUsed)
+ {
+ concernedAnchorPoint.AddRotation_toBackwardDirection(rotationIncrement, true, null);
+ }
+ }
+ }
+ }
+
+ Quaternion GetRotationIncrement(Quaternion rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, Quaternion rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace)
+ {
+ Quaternion rotationIncrement = rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace * Quaternion.Inverse(rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace);
+ rotationIncrement.Normalize(); //-> the quaternion difference multiplication seems to introduce non-normalized quaternions somehow, therefore normalizing here.
+ return rotationIncrement;
+ }
+
+ void Reset_recalculationFlags_duringNoHandleClickedOrDraggedPhases(int i)
+ {
+ if (GUIUtility.hotControl == 0) //-> no handle is selcted or dragged = mouse button is not held down
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_forwardCone_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_backwardCone_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_rotation_ofRotationHandleDuringRotationDragPhases_duringNextOnSceneGUI = true;
+
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.recalc_directionForHandles_alongLineWithMountingAnchor_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.recalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_duringNextOnSceneGUI = true;
+
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.recalc_directionForHandles_alongLineWithMountingAnchor_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.recalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_duringNextOnSceneGUI = true;
+
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = true;
+ }
+ }
+
+ void ResetUndoRegistrationFlag_duringNoInteractionPhases()
+ {
+ if (GUIUtility.hotControl == 0) //-> no handle is selcted or dragged = mouse button is not held down
+ {
+ hasRegisteredUndo_sinceMouseDown = false;
+ }
+ }
+
+ void Start_handlesChangeCheck()
+ {
+ EditorGUI.BeginChangeCheck();
+ }
+
+ bool End_handlesChangeCheck(string nameOfUndoEntry, int i_controlPointWithInteraction, bool markConcernedControlPoint_asSelected)
+ {
+ bool hasChanged = EditorGUI.EndChangeCheck();
+ if (hasChanged)
+ {
+ TryRegisterStateForUndo(nameOfUndoEntry, true, false);
+ if (markConcernedControlPoint_asSelected)
+ {
+ bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i_controlPointWithInteraction);
+ }
+ }
+ return hasChanged;
+ }
+
+ void TryRegisterStateForUndo(string nameOfUndoEntry, bool includeTransformsOfAllBoundGameobjects, bool includeConnectionComponentsOfAllBoundGameobjects)
+ {
+ if (hasRegisteredUndo_sinceMouseDown == false)
+ {
+ bezierSplineDrawer_unserializedMonoB.RegisterStateForUndo(nameOfUndoEntry, includeTransformsOfAllBoundGameobjects, includeConnectionComponentsOfAllBoundGameobjects);
+ hasRegisteredUndo_sinceMouseDown = true;
+ }
+ }
+
+ void TrySetSelectedListSlot_dueToHandlesInteraction(int i)
+ {
+ InternalDXXL_BezierControlAnchorSubPoint2D anchorPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint;
+ InternalDXXL_BezierControlHelperSubPoint2D forwardHelperPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint;
+ InternalDXXL_BezierControlHelperSubPoint2D backwardHelperPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint;
+
+ if (anchorPoint.controlID_ofCustomHandles_sphere == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (anchorPoint.controlID_ofCustomHandles_forwardCone == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (anchorPoint.controlID_ofCustomHandles_backwardCone == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (anchorPoint.controlID_ofUnityStylePositionHandleUp == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (anchorPoint.controlID_ofUnityStylePositionHandleRight == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (anchorPoint.controlID_ofUnityStyleRotationHandle2D == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+
+ if (forwardHelperPoint.controlID_ofCustomHandles_sphere == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (forwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithAnchor == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (forwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithNeighborsHelper == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (forwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithAnchor == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (forwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithNeighborsHelper == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (forwardHelperPoint.controlID_ofUnityStylePositionHandleUp == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (forwardHelperPoint.controlID_ofUnityStylePositionHandleRight == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+
+ if (backwardHelperPoint.controlID_ofCustomHandles_sphere == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (backwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithAnchor == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (backwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithNeighborsHelper == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (backwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithAnchor == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (backwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithNeighborsHelper == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (backwardHelperPoint.controlID_ofUnityStylePositionHandleUp == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (backwardHelperPoint.controlID_ofUnityStylePositionHandleRight == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ }
+
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+
+ serializedObject.Update();
+
+ float allowedConsumedLines_0to1 = DrawConsumedLines("spline curve");
+ TryDrawInfoTextHowToReducedDrawnLines(allowedConsumedLines_0to1);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color"));
+
+ SerializedProperty sP_lineWidth = serializedObject.FindProperty("lineWidth");
+ EditorGUILayout.PropertyField(sP_lineWidth, new GUIContent("Width"));
+ sP_lineWidth.floatValue = Mathf.Max(sP_lineWidth.floatValue, 0.0f);
+
+ SerializedProperty sP_straightSubDivisionsPerSegment = serializedObject.FindProperty("straightSubDivisionsPerSegment");
+ EditorGUILayout.PropertyField(sP_straightSubDivisionsPerSegment, new GUIContent("Resolution (=straight lines per bezier segment)"));
+ sP_straightSubDivisionsPerSegment.intValue = Mathf.Max(sP_straightSubDivisionsPerSegment.intValue, 3);
+
+ DrawCloseRingToggle();
+ DrawDrawSpaceSection();
+ DrawHandlesSection();
+ DrawControlPointsSection();
+ DrawZPosChooserFor2D();
+ DrawTextInputInclMarkupHelper();
+ DrawCheckboxFor_drawOnlyIfSelected("Spline curve");
+ DrawCheckboxFor_hiddenByNearerObjects("Spline curve");
+
+ serializedObject.ApplyModifiedProperties();
+ ResetUndoRegistrationFlag_duringNoInteractionPhases();
+
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void TryDrawInfoTextHowToReducedDrawnLines(float allowedConsumedLines_0to1)
+ {
+ if (GUIUtility.hotControl == 0) //-> no handle is selcted or dragged = mouse button is not held down. Otherwise the warning box would disappear while the user drags the mentioned "Width"- or "Resolution"-field, which results in unconvenient line jumps.
+ {
+ if (allowedConsumedLines_0to1 > 0.5f)
+ {
+ if (UtilitiesDXXL_Math.ApproximatelyZero(serializedObject.FindProperty("lineWidth").floatValue) == false)
+ {
+ if (serializedObject.FindProperty("straightSubDivisionsPerSegment").intValue > 20)
+ {
+ manyDrawnLinesWarningState = BezierSplineDrawerInspector.ManyDrawnLinesWarningState.reduceWidthAndResolution;
+ }
+ else
+ {
+ manyDrawnLinesWarningState = BezierSplineDrawerInspector.ManyDrawnLinesWarningState.reduceWidth;
+ }
+ }
+ else
+ {
+ if (serializedObject.FindProperty("straightSubDivisionsPerSegment").intValue > 10)
+ {
+ manyDrawnLinesWarningState = BezierSplineDrawerInspector.ManyDrawnLinesWarningState.reduceResolution;
+ }
+ else
+ {
+ manyDrawnLinesWarningState = BezierSplineDrawerInspector.ManyDrawnLinesWarningState.noWarning;
+ }
+ }
+ }
+ else
+ {
+ manyDrawnLinesWarningState = BezierSplineDrawerInspector.ManyDrawnLinesWarningState.noWarning;
+ }
+ }
+
+ switch (manyDrawnLinesWarningState)
+ {
+ case BezierSplineDrawerInspector.ManyDrawnLinesWarningState.noWarning:
+ break;
+ case BezierSplineDrawerInspector.ManyDrawnLinesWarningState.reduceWidthAndResolution:
+ EditorGUILayout.HelpBox("Many drawn lines could be saved if 'Width' would be set to 0. Another option is to decrease the 'Resolution'.", MessageType.Info, true);
+ break;
+ case BezierSplineDrawerInspector.ManyDrawnLinesWarningState.reduceWidth:
+ EditorGUILayout.HelpBox("Many drawn lines could be saved if 'Width' would be set to 0.", MessageType.Info, true);
+ break;
+ case BezierSplineDrawerInspector.ManyDrawnLinesWarningState.reduceResolution:
+ EditorGUILayout.HelpBox("To save drawn lines it may help to decrease the 'Resolution'.", MessageType.Info, true);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawDrawSpaceSection() //two times "Draw" in the name is in meant this way
+ {
+ SerializedProperty sP_drawSpaceSection_isOutfolded = serializedObject.FindProperty("drawSpaceSection_isOutfolded");
+ sP_drawSpaceSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_drawSpaceSection_isOutfolded.boolValue, "Draw Space", true);
+ if (sP_drawSpaceSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ DrawDrawSpaceEnum();
+
+ SerializedProperty sP_keepWorldPos_duringDrawSpaceChange = serializedObject.FindProperty("keepWorldPos_duringDrawSpaceChange");
+ sP_keepWorldPos_duringDrawSpaceChange.boolValue = EditorGUILayout.ToggleLeft(new GUIContent("Keep world position during space change", "If this is selected then the global position and shape of the spline will stay the same when the draw space gets changed." + Environment.NewLine + Environment.NewLine + "If it is unselected then the spline will keep it's shape but will be scaled and rotated to fit the new draw space."), sP_keepWorldPos_duringDrawSpaceChange.boolValue);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void DrawDrawSpaceEnum() //two times "Draw" in the name is in meant this way
+ {
+ serializedObject.ApplyModifiedProperties();
+
+ if (bezierSplineDrawer_unserializedMonoB.drawSpace == BezierSplineDrawer.DrawSpace.localDefinedByThisGameobject)
+ {
+ if (UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale_2D(bezierSplineDrawer_unserializedMonoB.transform))
+ {
+ EditorGUILayout.HelpBox("The transform of this gameobject or of a parent has a non-uniform scale. This may lead to wrong or weird results, when drawing in local space.", MessageType.Warning, true);
+ }
+
+ if (UtilitiesDXXL_EngineBasics.CheckIfThisOrAParentHasANonZRotation_2D(bezierSplineDrawer_unserializedMonoB.transform))
+ {
+ EditorGUILayout.HelpBox("The transform of this gameobject or of a parent has a non-z rotation. This may lead to wrong or weird results, when drawing in local space.", MessageType.Warning, true);
+ }
+ }
+
+ BezierSplineDrawer.DrawSpace drawSpace_after = (BezierSplineDrawer.DrawSpace)EditorGUILayout.EnumPopup(GUIContent.none, bezierSplineDrawer_unserializedMonoB.drawSpace);
+ if (drawSpace_after != bezierSplineDrawer_unserializedMonoB.drawSpace)
+ {
+ bezierSplineDrawer_unserializedMonoB.RegisterStateForUndo("Change Spline Space", true, false);
+ bezierSplineDrawer_unserializedMonoB.ChangeDrawSpace(drawSpace_after);
+ }
+
+ serializedObject.Update();
+ }
+
+ void DrawCloseRingToggle()
+ {
+ serializedObject.ApplyModifiedProperties();
+
+ bool closeGapState_after = EditorGUILayout.Toggle(new GUIContent("Close ring from end to start"), bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed);
+ if (closeGapState_after != bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed)
+ {
+ bezierSplineDrawer_unserializedMonoB.ChangeCloseGapState(closeGapState_after);
+ }
+
+ serializedObject.Update();
+ }
+
+ void DrawControlPointsSection()
+ {
+ SerializedProperty sP_controlPointsList_isOutfolded = serializedObject.FindProperty("controlPointsList_isOutfolded");
+ sP_controlPointsList_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_controlPointsList_isOutfolded.boolValue, "Control Points", true);
+ if (sP_controlPointsList_isOutfolded.boolValue)
+ {
+ DrawNonSerializedControlPointsList();
+ DrawSectionWithDefaultValuesOfNewlyCreatedPoints();
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void DrawNonSerializedControlPointsList()
+ {
+ //-> exceptionally: no indent here to have more display space for the list
+
+ serializedObject.ApplyModifiedProperties();
+
+ bezierSplineDrawer_unserializedMonoB.TryResheduleSceneViewRepaint();
+
+ Rect firstControlPointRect = default;
+ bool firstControlPointRect_hasBeenFilled = false;
+
+ for (int i = 0; i < bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count; i++)
+ {
+ float height_ofCurrentControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetPropertyHeightForInspectorList();
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].inspectorRect_reservedForThisTriplet = EditorGUILayout.GetControlRect(true, height_ofCurrentControlPoint);
+
+ if (firstControlPointRect_hasBeenFilled == false)
+ {
+ firstControlPointRect = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].inspectorRect_reservedForThisTriplet;
+ firstControlPointRect_hasBeenFilled = true;
+ }
+ }
+
+ float height_ofEmptyControlPointHoldingOnlyPlusButton = InternalDXXL_BezierControlPointTriplet.GetPropertyHeightForEmptyControlPointHoldingOnlyAPlusButtonAndFoldAllButtons();
+ Rect rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons = EditorGUILayout.GetControlRect(true, height_ofEmptyControlPointHoldingOnlyPlusButton);
+
+ if (firstControlPointRect_hasBeenFilled == false)
+ {
+ firstControlPointRect = rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons;
+ }
+
+ float y_ofListsLowerEnd = rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons.y + rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons.height;
+ float heightOfListBackground = y_ofListsLowerEnd - firstControlPointRect.y;
+ Rect space_ofBackgroundColorRect = new Rect(firstControlPointRect.x, firstControlPointRect.y, firstControlPointRect.width, heightOfListBackground);
+ Rect space_ofBackgroundColorRectFrame = new Rect(space_ofBackgroundColorRect.x - 1.0f, space_ofBackgroundColorRect.y - 1.0f, space_ofBackgroundColorRect.width + 2.0f, space_ofBackgroundColorRect.height + 2.0f);
+ EditorGUI.DrawRect(space_ofBackgroundColorRectFrame, BezierSplineDrawer.color_ofControlPointListBackgroundFrameInInspecor);
+ EditorGUI.DrawRect(space_ofBackgroundColorRect, BezierSplineDrawer.color_ofControlPointListBackgroundInInspecor);
+
+ for (int i = 0; i < bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count; i++)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].DrawValuesToInspector();
+ }
+
+ for (int i = 0; i < bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count; i++)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].minusButtonAtThisListItem_hasBeenClickedInInspector)
+ {
+ bezierSplineDrawer_unserializedMonoB.TryDeleteControlPoint_dueToMinusButtonAtControlPointListItemHasBeenClicked(i);
+ bezierSplineDrawer_unserializedMonoB.SheduleSceneViewRepaint();
+ break; //-> only one change at a time
+ }
+
+ bool didChangeSomething = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].TryApplyChangesAfterInspectorInput();
+ if (didChangeSomething)
+ {
+ bezierSplineDrawer_unserializedMonoB.SheduleSceneViewRepaint();
+ break; //-> only one change at a time
+ }
+ }
+
+ DrawEmptyControlPointBelowControlPointsList_thatHoldsOnlyAPlusButtonAndFoldAllButtons(rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons);
+
+ serializedObject.Update();
+ }
+
+ void DrawEmptyControlPointBelowControlPointsList_thatHoldsOnlyAPlusButtonAndFoldAllButtons(Rect rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons)
+ {
+ bool greyOutBothFoldAllButtons = ((bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count == 0) || ((bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count == 1) && (bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed == false)));
+ bool greyOutUnfoldAllButton = greyOutBothFoldAllButtons || bezierSplineDrawer_unserializedMonoB.CheckIf_allFoldableHelperPoints_areUnfolded_inTheInspectorList();
+ bool greyOutCollapseAllButton = greyOutBothFoldAllButtons || bezierSplineDrawer_unserializedMonoB.CheckIf_allFoldableHelperPoints_areCollapsed_inTheInspectorList();
+
+ InternalDXXL_BezierControlPointTriplet.DrawEmptyControlPointHoldingOnlyAPlusButton_forInspector(out bool plusButtonBelowListOfControlPoints_hasBeenClicked, out bool unfoldAllWeightsBelowListOfControlPoints_hasBeenClicked, out bool collapseAllWeightsBelowListOfControlPoints_hasBeenClicked, rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, plusSymbolIcon, greyOutUnfoldAllButton, greyOutCollapseAllButton);
+ if (plusButtonBelowListOfControlPoints_hasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CreateNewControlPoint_dueToPlusButtonBelowControlPointsListHasBeenClicked();
+ bezierSplineDrawer_unserializedMonoB.SheduleSceneViewRepaint();
+ }
+
+ if (unfoldAllWeightsBelowListOfControlPoints_hasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.UnfoldAllHelperPointInTheInspectorList();
+ }
+
+ if (collapseAllWeightsBelowListOfControlPoints_hasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CollapseAllHelperPointInTheInspectorList();
+ }
+ }
+
+ void DrawSectionWithDefaultValuesOfNewlyCreatedPoints()
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_defaultPosRotWeightOffsetOfNewlyCreatedPoints_section_isOutfolded = serializedObject.FindProperty("defaultPosRotWeightOffsetOfNewlyCreatedPoints_section_isOutfolded");
+ sP_defaultPosRotWeightOffsetOfNewlyCreatedPoints_section_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_defaultPosRotWeightOffsetOfNewlyCreatedPoints_section_isOutfolded.boolValue, "Default values of newly created control points", true);
+ if (sP_defaultPosRotWeightOffsetOfNewlyCreatedPoints_section_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ DrawSectionWithDefaultOffsetOfNewlyCreatedPoints();
+ DrawSectionWithDefaultOrientationOfNewlyCreatedPoints();
+ DrawSectionWithDefaultWeightDistancesOfNewlyCreatedPoints();
+ DrawSectionWithDefaultJunctureTypeOfNewlyCreatedPoints();
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawSectionWithDefaultOffsetOfNewlyCreatedPoints()
+ {
+ SerializedProperty sP_defaultPosOffsetOfNewlyCreatedPoints_subSection_isOutfolded = serializedObject.FindProperty("defaultPosOffsetOfNewlyCreatedPoints_subSection_isOutfolded");
+ sP_defaultPosOffsetOfNewlyCreatedPoints_subSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_defaultPosOffsetOfNewlyCreatedPoints_subSection_isOutfolded.boolValue, "Default Position Offset", true);
+ if (sP_defaultPosOffsetOfNewlyCreatedPoints_subSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_definitionType_ofDefaultPosOffset = serializedObject.FindProperty("definitionType_ofDefaultPosOffset");
+ EditorGUILayout.PropertyField(sP_definitionType_ofDefaultPosOffset, new GUIContent("Offset source"));
+ switch (sP_definitionType_ofDefaultPosOffset.enumValueIndex)
+ {
+ case (int)BezierSplineDrawer.DefinitionType_ofDefaultPosOffset.straightExtentionOfCurveEnd:
+ SerializedProperty sP_distanceBetweenTriplets_forNewlyCreatedTriplets_caseOf_straightExtentionOfCurveEnd_inUnitsOfActiveDrawSpace = serializedObject.FindProperty("distanceBetweenTriplets_forNewlyCreatedTriplets_caseOf_straightExtentionOfCurveEnd_inUnitsOfActiveDrawSpace");
+ EditorGUILayout.PropertyField(sP_distanceBetweenTriplets_forNewlyCreatedTriplets_caseOf_straightExtentionOfCurveEnd_inUnitsOfActiveDrawSpace, new GUIContent("Distance"));
+ sP_distanceBetweenTriplets_forNewlyCreatedTriplets_caseOf_straightExtentionOfCurveEnd_inUnitsOfActiveDrawSpace.floatValue = Mathf.Max(sP_distanceBetweenTriplets_forNewlyCreatedTriplets_caseOf_straightExtentionOfCurveEnd_inUnitsOfActiveDrawSpace.floatValue, 0.0f);
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ break;
+ case (int)BezierSplineDrawer.DefinitionType_ofDefaultPosOffset.customOffset:
+ DrawSpecificationOf_customVector2_1("Custom offset value", false, null, false, false, true, false);
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawSectionWithDefaultOrientationOfNewlyCreatedPoints()
+ {
+ SerializedProperty sP_defaultRotOfNewlyCreatedPoints_subSection_isOutfolded = serializedObject.FindProperty("defaultRotOfNewlyCreatedPoints_subSection_isOutfolded");
+ sP_defaultRotOfNewlyCreatedPoints_subSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_defaultRotOfNewlyCreatedPoints_subSection_isOutfolded.boolValue, "Default Initial Orientation", true);
+ if (sP_defaultRotOfNewlyCreatedPoints_subSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_definitionType_ofDefaultRot = serializedObject.FindProperty("definitionType_ofDefaultRot");
+ EditorGUILayout.PropertyField(sP_definitionType_ofDefaultRot, new GUIContent("Orientation source"));
+ switch (sP_definitionType_ofDefaultRot.enumValueIndex)
+ {
+ case (int)BezierSplineDrawer.DefinitionType_ofDefaultRot.sameAsCurveEnd:
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ break;
+ case (int)BezierSplineDrawer.DefinitionType_ofDefaultRot.customOrientation:
+ DrawSpecificationOf_customVector2_2("Custom forward vector that defines the orientation", false, null, true, false, true, false);
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawSectionWithDefaultWeightDistancesOfNewlyCreatedPoints()
+ {
+ SerializedProperty sP_defaultWeightsOfNewlyCreatedPoints_subSection_isOutfolded = serializedObject.FindProperty("defaultWeightsOfNewlyCreatedPoints_subSection_isOutfolded");
+ sP_defaultWeightsOfNewlyCreatedPoints_subSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_defaultWeightsOfNewlyCreatedPoints_subSection_isOutfolded.boolValue, "Default Initial Weight Distances", true);
+ if (sP_defaultWeightsOfNewlyCreatedPoints_subSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_forwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace = serializedObject.FindProperty("forwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace");
+ EditorGUILayout.PropertyField(sP_forwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace, new GUIContent("Forward"));
+ sP_forwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace.floatValue = Mathf.Max(sP_forwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace.floatValue, 0.0f);
+
+ SerializedProperty sP_backwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace = serializedObject.FindProperty("backwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace");
+ EditorGUILayout.PropertyField(sP_backwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace, new GUIContent("Backward"));
+ sP_backwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace.floatValue = Mathf.Max(sP_backwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace.floatValue, 0.0f);
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawSectionWithDefaultJunctureTypeOfNewlyCreatedPoints()
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("junctureType_ofNewlyCreatedPoints"), new GUIContent("Default Juncture Type"));
+ }
+
+ void DrawHandlesSection()
+ {
+ SerializedProperty sP_handlesSection_isOutfolded = serializedObject.FindProperty("handlesSection_isOutfolded");
+ SerializedProperty sP_hideAllHandles = serializedObject.FindProperty("hideAllHandles");
+
+ Rect rect_ofHandlesHeadline = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight);
+ Rect rect_ofHandlesHeadlineFoldout = new Rect(rect_ofHandlesHeadline.x, rect_ofHandlesHeadline.y, EditorGUIUtility.singleLineHeight, rect_ofHandlesHeadline.height);
+ Rect rect_ofHandlesHeadlineTextWithCheckbox = new Rect(rect_ofHandlesHeadline.x, rect_ofHandlesHeadline.y, rect_ofHandlesHeadline.width, rect_ofHandlesHeadline.height);
+
+ sP_hideAllHandles.boolValue = !EditorGUI.ToggleLeft(rect_ofHandlesHeadlineTextWithCheckbox, new GUIContent("Handles"), !sP_hideAllHandles.boolValue);
+ sP_handlesSection_isOutfolded.boolValue = EditorGUI.Foldout(rect_ofHandlesHeadlineFoldout, sP_handlesSection_isOutfolded.boolValue, GUIContent.none, true);
+
+ if (sP_handlesSection_isOutfolded.boolValue == true)
+ {
+ EditorGUI.BeginDisabledGroup(sP_hideAllHandles.boolValue);
+ DrawHandlesSection_outfoldedPart();
+ EditorGUI.EndDisabledGroup();
+ }
+ }
+
+ void DrawHandlesSection_outfoldedPart()
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ GUIStyle labelStyle_withRichtext = new GUIStyle();
+
+ DrawPositionHandlesSection(labelStyle_withRichtext);
+ DrawRotationHandlesSection(labelStyle_withRichtext);
+ DrawCustomHandlesSection(labelStyle_withRichtext);
+ DrawPlusButtonHandleSection(labelStyle_withRichtext);
+ DrawDottedLineAlongZToBoundGameobjectsSection(labelStyle_withRichtext);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawPositionHandlesSection(GUIStyle labelStyle_withRichtext)
+ {
+ EditorGUILayout.LabelField("Move Position Handle (Unity style)", labelStyle_withRichtext);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_showHandleFor_position_atAnchors = serializedObject.FindProperty("showHandleFor_position_atAnchors");
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_showHandleFor_position_atAnchors, new GUIContent("At Anchor Points (show/size)"));
+ EditorGUI.BeginDisabledGroup(!sP_showHandleFor_position_atAnchors.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeFor_position_atAnchors"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ SerializedProperty sP_showHandleFor_position_atHelpers = serializedObject.FindProperty("showHandleFor_position_atHelpers");
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_showHandleFor_position_atHelpers, new GUIContent("At Helper Points (show/size)"));
+ EditorGUI.BeginDisabledGroup(!sP_showHandleFor_position_atHelpers.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeFor_position_atHelpers"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ bool drawSpaceIsLocal = (serializedObject.FindProperty("drawSpace").enumValueIndex == (int)BezierSplineDrawer.DrawSpace.localDefinedByThisGameobject);
+ bool positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal_chooserIsAvailable = (Tools.pivotRotation == PivotRotation.Global) && drawSpaceIsLocal;
+ string positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal_displayName = "Global orientation in local draw space";
+ if (positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal_chooserIsAvailable)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal"), new GUIContent(positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal_displayName, "If your Editor tool handle rotation is set to 'global' orientation, but you work in a local draw space for a spline then the question arises which space should be considered as 'global' in den local draw space and accordingly how the position handle should be displayed." + Environment.NewLine + Environment.NewLine + "Chose 'global space' if you want the position handles aligned with the global world space." + Environment.NewLine + Environment.NewLine + "Chose 'local draw space' if you want the position handles aligned with the local draw space."));
+ }
+ else
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal"), new GUIContent(positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal_displayName, "Only available if Editor tool handle rotation is set to 'global' and if draw space is 'local'."));
+ EditorGUI.EndDisabledGroup();
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+
+ void DrawRotationHandlesSection(GUIStyle labelStyle_withRichtext)
+ {
+ EditorGUILayout.LabelField("Rotate Handle", labelStyle_withRichtext);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_showHandleFor_rotation = serializedObject.FindProperty("showHandleFor_rotation");
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_showHandleFor_rotation, new GUIContent("Show / Size"));
+ EditorGUI.BeginDisabledGroup(!sP_showHandleFor_rotation.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeFor_rotation"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+
+ void DrawCustomHandlesSection(GUIStyle labelStyle_withRichtext)
+ {
+ EditorGUILayout.LabelField("Spline Custom Handles", labelStyle_withRichtext);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUILayout.LabelField("At Anchor Points");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ SerializedProperty sP_showCustomHandleFor_anchorPoints = serializedObject.FindProperty("showCustomHandleFor_anchorPoints");
+ EditorGUILayout.PropertyField(sP_showCustomHandleFor_anchorPoints, new GUIContent("Show"));
+ EditorGUI.BeginDisabledGroup(!sP_showCustomHandleFor_anchorPoints.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeOf_customHandle_atAnchors"), new GUIContent("Size"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_ofAnchorPoints"), new GUIContent("Color"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("At Helper Points");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ SerializedProperty sP_showCustomHandleFor_helperPoints = serializedObject.FindProperty("showCustomHandleFor_helperPoints");
+ EditorGUILayout.PropertyField(sP_showCustomHandleFor_helperPoints, new GUIContent("Show"));
+ EditorGUI.BeginDisabledGroup(!sP_showCustomHandleFor_helperPoints.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeOf_customHandle_atHelpers"), new GUIContent("Size"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_ofHelperPoints"), new GUIContent("Color"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+
+ void DrawPlusButtonHandleSection(GUIStyle labelStyle_withRichtext)
+ {
+ EditorGUILayout.LabelField("Add Point Buttons ('+')", labelStyle_withRichtext);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_showHandleFor_plusButtons_atSplineStartAndEnd = serializedObject.FindProperty("showHandleFor_plusButtons_atSplineStartAndEnd");
+ SerializedProperty sP_showHandleFor_plusButtons_insideSegments = serializedObject.FindProperty("showHandleFor_plusButtons_insideSegments");
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_showHandleFor_plusButtons_atSplineStartAndEnd, new GUIContent("At Start/End"));
+ EditorGUILayout.PropertyField(sP_showHandleFor_plusButtons_insideSegments, new GUIContent("Inside Curve"));
+ GUILayout.EndHorizontal();
+
+ bool atLeastOnePlusButtonOption_isChecked = (sP_showHandleFor_plusButtons_atSplineStartAndEnd.boolValue || sP_showHandleFor_plusButtons_insideSegments.boolValue);
+ EditorGUI.BeginDisabledGroup(!atLeastOnePlusButtonOption_isChecked);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeOf_plusButtons"), new GUIContent("Size"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+
+ void DrawDottedLineAlongZToBoundGameobjectsSection(GUIStyle labelStyle_withRichtext)
+ {
+ EditorGUILayout.LabelField("Dotted Lines along Z to bound Gameobjects", labelStyle_withRichtext);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("showDottedLinesAlongZToBoundGameobjects"), new GUIContent("Show"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorOfLinesAlongZToBoundGameobjects"), GUIContent.none);
+ GUILayout.EndHorizontal();
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("dotLength_ofDottedLinesAlongZToBoundGameobjects"), new GUIContent("Dash Length"));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/BezierSplineDrawer2DInspector.cs.meta b/Editor/DrawDebugLibrary/BezierSplineDrawer2DInspector.cs.meta
new file mode 100644
index 0000000..f81f222
--- /dev/null
+++ b/Editor/DrawDebugLibrary/BezierSplineDrawer2DInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 45cf81c1a7d89284dab549f3c2e6aa3f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/BezierSplineDrawerInspector.cs b/Editor/DrawDebugLibrary/BezierSplineDrawerInspector.cs
new file mode 100644
index 0000000..6865ea4
--- /dev/null
+++ b/Editor/DrawDebugLibrary/BezierSplineDrawerInspector.cs
@@ -0,0 +1,2226 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(BezierSplineDrawer))]
+ public class BezierSplineDrawerInspector : VisualizerParentInspector
+ {
+ BezierSplineDrawer bezierSplineDrawer_unserializedMonoB;
+ Tool toolToSelectAfterThisInspectorGetsUnselcted = Tool.None;
+ Tool selectedToolDuringPreviousOnSceneGUI = Tool.None;
+ bool sheduleFocusSceneViewOnControlPoint = false;
+ int delayCounter_afterShedulingFocusSceneViewOnControlPoint = 0;
+ float dotLength_ofDottedLines = 4.0f;
+ bool hasRegisteredUndo_sinceMouseDown = false;
+ GUIContent plusSymbolIcon;
+ Vector3 sceneViewCamForward_normalized;
+ Vector3 sceneViewCamUp_normalized;
+ Vector3 sceneViewCamRight_normalized;
+ Vector3 sceneViewCam_to_anchorPoint;
+
+ public enum ManyDrawnLinesWarningState { noWarning, reduceWidthAndResolution, reduceWidth, reduceResolution };
+ ManyDrawnLinesWarningState manyDrawnLinesWarningState = ManyDrawnLinesWarningState.noWarning;
+
+ void OnEnable()
+ {
+ OnEnable_base();
+ bezierSplineDrawer_unserializedMonoB = (BezierSplineDrawer)target;
+ bezierSplineDrawer_unserializedMonoB.ResetAll_rotation_ofRotationHandle_thatIsIndependentFromSplineDir_butDefinedByDrawSpaceOrientation();
+ plusSymbolIcon = EditorGUIUtility.TrIconContent("Toolbar Plus", "Add new control point");
+
+ toolToSelectAfterThisInspectorGetsUnselcted = Tools.current;
+ ProcessChangingEditorTool();
+ selectedToolDuringPreviousOnSceneGUI = Tools.current;
+ }
+
+ public void OnDisable()
+ {
+ Tools.current = toolToSelectAfterThisInspectorGetsUnselcted;
+ }
+
+ public void OnSceneGUI()
+ {
+ if (bezierSplineDrawer_unserializedMonoB != null) //-> sometimes after deleting the spline component in the inspector this "OnSceneGUI()" is still called, which would result in a missingRefException without this check
+ {
+ bezierSplineDrawer_unserializedMonoB.sheduledSceneViewRepaint_hasBeenExecuted = true;
+
+ if (bezierSplineDrawer_unserializedMonoB.enabled) //-> GizmoLines automatically hide if a component is disabled, Handles do not: Therefore manual disabling here
+ {
+ TryFocusControlPointInSceneView_onKeypressF();
+ TryProcessChangingEditorTool();
+ TryResetRotationOfIndependentRotationHandles();
+
+ Matrix4x4 handlesMatrix_before = Handles.matrix;
+ Color handlesColor_before = Handles.color;
+
+ DrawHandles();
+
+ Handles.matrix = handlesMatrix_before;
+ Handles.color = handlesColor_before;
+ }
+ }
+ }
+
+ void TryFocusControlPointInSceneView_onKeypressF()
+ {
+ delayCounter_afterShedulingFocusSceneViewOnControlPoint++;
+ SheduleFocusing_onKeypressF();
+ ExecuteSheduledFocusingAfterDelay();
+ }
+
+ void SheduleFocusing_onKeypressF()
+ {
+ Event currentEvent = Event.current;
+ if (currentEvent.type == EventType.KeyDown)
+ {
+ if (currentEvent.keyCode == KeyCode.F)
+ {
+ //this only works when the mouse is in the scene view window (in contrast to Unitys build-in behaviour, where you can focus the scene view camera via pressing "F" even when the mouse is not in the scene view)
+ sheduleFocusSceneViewOnControlPoint = true;
+ delayCounter_afterShedulingFocusSceneViewOnControlPoint = 0;
+ }
+ }
+ }
+
+ void ExecuteSheduledFocusingAfterDelay()
+ {
+ if (sheduleFocusSceneViewOnControlPoint)
+ {
+ //This overwrites the focusing on the gameobject center (which is automatically executed by Unity onKeypressF) with focusing on the the selected control point instead.
+ //The sheduling is because otherwise Unitys automatic focussing on the gameobject will overwrite the here executed focusing
+ int delayValue = 20; //This is a guessed trial-an-error value.
+ if (delayCounter_afterShedulingFocusSceneViewOnControlPoint > delayValue)
+ {
+ sheduleFocusSceneViewOnControlPoint = false;
+ if (SceneView.lastActiveSceneView != null)
+ {
+ int i_ofFirstHighlightedControlPoint = bezierSplineDrawer_unserializedMonoB.Get_i_ofFirstHighlightedControlPoint();
+ if (i_ofFirstHighlightedControlPoint == (-1))
+ {
+ FrameSceneViewCam_soItSeesAllControlPoints(i_ofFirstHighlightedControlPoint);
+ }
+ else
+ {
+ FrameSceneViewCam_soItSeesSpecifiedControlPoints(i_ofFirstHighlightedControlPoint, true);
+ }
+ }
+ }
+ }
+ }
+
+ void FrameSceneViewCam_soItSeesAllControlPoints(int i_ofFirstHighlightedControlPoint)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count == 0)
+ {
+ Bounds boundsOfSelection = new Bounds(bezierSplineDrawer_unserializedMonoB.Get_originPos_ofActiveDrawSpace_inUnitsOfGlobalSpace(), Vector3.zero);
+ SceneView.lastActiveSceneView.Frame(boundsOfSelection, false);
+ }
+ else
+ {
+ FrameSceneViewCam_soItSeesSpecifiedControlPoints(i_ofFirstHighlightedControlPoint, false);
+ }
+ }
+
+ void FrameSceneViewCam_soItSeesSpecifiedControlPoints(int i_ofFirstHighlightedControlPoint, bool includeOnlySelectedControlPoints_notAllControlPoints)
+ {
+ Vector3 posGlobal_ofFirstFramedControlPoint;
+ if (includeOnlySelectedControlPoints_notAllControlPoints)
+ {
+ posGlobal_ofFirstFramedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i_ofFirstHighlightedControlPoint].anchorPoint.GetPos_inUnitsOfGlobalSpace();
+ }
+ else
+ {
+ //"listOfControlPointTriplets.Count" is guaranteed bigger than 0 here:
+ posGlobal_ofFirstFramedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[0].anchorPoint.GetPos_inUnitsOfGlobalSpace();
+ }
+ Bounds boundsOfSelection = new Bounds(posGlobal_ofFirstFramedControlPoint, Vector3.zero);
+
+ for (int i = 0; i < bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count; i++)
+ {
+ if ((includeOnlySelectedControlPoints_notAllControlPoints == false) || bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].isHighlighted)
+ {
+ boundsOfSelection.Encapsulate(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace());
+
+ InternalDXXL_BezierControlPointTriplet nextControlPoint = bezierSplineDrawer_unserializedMonoB.GetNextControlPointTriplet(i, false);
+ if (nextControlPoint != null) { boundsOfSelection.Encapsulate(nextControlPoint.anchorPoint.GetPos_inUnitsOfGlobalSpace()); }
+
+ InternalDXXL_BezierControlPointTriplet previousControlPoint = bezierSplineDrawer_unserializedMonoB.GetPreviousControlPointTriplet(i, false);
+ if (previousControlPoint != null) { boundsOfSelection.Encapsulate(previousControlPoint.anchorPoint.GetPos_inUnitsOfGlobalSpace()); }
+ }
+ }
+ SceneView.lastActiveSceneView.Frame(boundsOfSelection, false);
+ }
+
+ void DrawHandles()
+ {
+ if (bezierSplineDrawer_unserializedMonoB.hideAllHandles == false)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count == 0)
+ {
+ DrawPlusButton_asFallbackIfNoControlPointsExist();
+ }
+ else
+ {
+ for (int i = 0; i < bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count; i++)
+ {
+ Handles.matrix = Matrix4x4.identity;
+
+ AssignControlHandleIDs(i);
+ DrawLinesBetweenSubPoints(i);
+ DrawIndexAsText(i);
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out sceneViewCamForward_normalized, out sceneViewCamUp_normalized, out sceneViewCamRight_normalized, out sceneViewCam_to_anchorPoint, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace(), DrawBasics.CameraForAutomaticOrientation.sceneViewCamera);
+ DrawNonInteractableAnchorPointVisualizer(i);
+ DrawNonInteractableHelperPointVisualizer(i, true, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.GetPos_inUnitsOfGlobalSpace());
+ DrawNonInteractableHelperPointVisualizer(i, false, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.GetPos_inUnitsOfGlobalSpace());
+ DrawPlusButtonsForAddingNewControlPoints_atSplineStartAndEnd(i);
+ DrawPlusButtonsForAddingNewControlPoints_somewhereOnUpcomingSplineSegment(i);
+ DrawUnitysBuildInHandlesAtSubPoints(i);
+ DrawCustomHandlesAtSubPoints(i);
+ TrySetSelectedListSlot_dueToHandlesInteraction(i);
+ Reset_recalculationFlags_duringNoHandleClickedOrDraggedPhases(i);
+ }
+ }
+ }
+
+ ResetUndoRegistrationFlag_duringNoInteractionPhases();
+ }
+
+ void DrawPlusButton_asFallbackIfNoControlPointsExist()
+ {
+ Vector3 posOfPlusButton_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.Get_originPos_ofActiveDrawSpace_inUnitsOfGlobalSpace();
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out sceneViewCamForward_normalized, out sceneViewCamUp_normalized, out sceneViewCamRight_normalized, out sceneViewCam_to_anchorPoint, posOfPlusButton_inUnitsOfGlobalSpace, DrawBasics.CameraForAutomaticOrientation.sceneViewCamera);
+ bool buttonHasBeenClicked = InternalDXXL_BezierHandles.PlusButton(posOfPlusButton_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.handleSizeOf_plusButtons, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, sceneViewCamForward_normalized, sceneViewCamUp_normalized, sceneViewCamRight_normalized, plusSymbolIcon);
+ if (buttonHasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CreateNewControlPoint_atSplineEnd();
+ }
+ }
+
+ void AssignControlHandleIDs(int i)
+ {
+ InternalDXXL_BezierControlPointTriplet concernedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ int hint_base = 100 * i; //probably also working without the int-hints
+
+ concernedControlPoint.anchorPoint.controlID_ofCustomHandles_sphere = GUIUtility.GetControlID(hint_base + 1, FocusType.Passive);
+ concernedControlPoint.anchorPoint.controlID_ofCustomHandles_forwardCone = GUIUtility.GetControlID(hint_base + 2, FocusType.Passive);
+ concernedControlPoint.anchorPoint.controlID_ofCustomHandles_backwardCone = GUIUtility.GetControlID(hint_base + 3, FocusType.Passive);
+
+ concernedControlPoint.forwardHelperPoint.controlID_ofCustomHandles_sphere = GUIUtility.GetControlID(hint_base + 4, FocusType.Passive);
+ concernedControlPoint.forwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithAnchor = GUIUtility.GetControlID(hint_base + 5, FocusType.Passive);
+ concernedControlPoint.forwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithNeighborsHelper = GUIUtility.GetControlID(hint_base + 6, FocusType.Passive);
+ concernedControlPoint.forwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithAnchor = GUIUtility.GetControlID(hint_base + 7, FocusType.Passive);
+ concernedControlPoint.forwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithNeighborsHelper = GUIUtility.GetControlID(hint_base + 8, FocusType.Passive);
+
+ concernedControlPoint.backwardHelperPoint.controlID_ofCustomHandles_sphere = GUIUtility.GetControlID(hint_base + 9, FocusType.Passive);
+ concernedControlPoint.backwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithAnchor = GUIUtility.GetControlID(hint_base + 10, FocusType.Passive);
+ concernedControlPoint.backwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithNeighborsHelper = GUIUtility.GetControlID(hint_base + 11, FocusType.Passive);
+ concernedControlPoint.backwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithAnchor = GUIUtility.GetControlID(hint_base + 12, FocusType.Passive);
+ concernedControlPoint.backwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithNeighborsHelper = GUIUtility.GetControlID(hint_base + 13, FocusType.Passive);
+ }
+
+ void DrawLinesBetweenSubPoints(int i)
+ {
+ TryDrawLineToForwardWeight(i);
+ TryDrawLineToBackwardWeight(i);
+ TryDrawLineFromForwardHelperPoint_toBackwardHelperPointOfNextControlPoint(i);
+ TryDrawLineFromForwardHelperPoint_toAnchorPointOfNextControlPoint(i);
+ TryDrawLineFromAnchorPoint_toBackwardHelperPointOfNextControlPoint(i);
+ }
+
+ void TryDrawLineToForwardWeight(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.isUsed)
+ {
+ Vector3 lineStartPos_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace();
+ Vector3 lineEndPos_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.GetPos_inUnitsOfGlobalSpace();
+
+ TryDrawExpandedLowAlphaLine_fromAnchorToHelper(i, lineStartPos_inUnitsOfGlobalSpace, lineEndPos_inUnitsOfGlobalSpace);
+
+ Handles.color = bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints;
+ Handles.DrawLine(lineStartPos_inUnitsOfGlobalSpace, lineEndPos_inUnitsOfGlobalSpace);
+ }
+ }
+
+ void TryDrawLineToBackwardWeight(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.isUsed)
+ {
+ Vector3 lineStartPos_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace();
+ Vector3 lineEndPos_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.GetPos_inUnitsOfGlobalSpace();
+
+ TryDrawExpandedLowAlphaLine_fromAnchorToHelper(i, lineStartPos_inUnitsOfGlobalSpace, lineEndPos_inUnitsOfGlobalSpace);
+
+ Handles.color = bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints;
+ Handles.DrawLine(lineStartPos_inUnitsOfGlobalSpace, lineEndPos_inUnitsOfGlobalSpace);
+ }
+ }
+
+ public static float width_ofAdditionalExpandedLowAlphaLineToHelpers_ofSelectedControlPoints = 15.0f;
+ public static float alpha_ofAdditionalExpandedLowAlphaLineToHelpers_ofSelectedControlPoints = 0.3f;
+ void TryDrawExpandedLowAlphaLine_fromAnchorToHelper(int i, Vector3 lineStartPos_inUnitsOfGlobalSpace, Vector3 lineEndPos_inUnitsOfGlobalSpace)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].isHighlighted)
+ {
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, alpha_ofAdditionalExpandedLowAlphaLineToHelpers_ofSelectedControlPoints);
+ Handles.DrawAAPolyLine(width_ofAdditionalExpandedLowAlphaLineToHelpers_ofSelectedControlPoints, lineStartPos_inUnitsOfGlobalSpace, lineEndPos_inUnitsOfGlobalSpace);
+ }
+ }
+
+ public static float alphaOfDottedLineBetweenHelperPoints = 0.45f;
+ void TryDrawLineFromForwardHelperPoint_toBackwardHelperPointOfNextControlPoint(int i)
+ {
+ if (CheckIf_drawLineFromForwardHelperPoint_toBackwardHelperPointOfNextControlPoint(i))
+ {
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, alphaOfDottedLineBetweenHelperPoints);
+ int i_ofNextControlPoint = UtilitiesDXXL_Math.LoopOvershootingIndexIntoCollectionSize(i + 1, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count);
+ Handles.DrawDottedLine(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.GetPos_inUnitsOfGlobalSpace(), bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i_ofNextControlPoint].backwardHelperPoint.GetPos_inUnitsOfGlobalSpace(), dotLength_ofDottedLines);
+ }
+ }
+
+ bool CheckIf_drawLineFromForwardHelperPoint_toBackwardHelperPointOfNextControlPoint(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.isUsed)
+ {
+ InternalDXXL_BezierControlPointTriplet nextControlPointTriplet = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetNextControlPointTripletAlongSplineDir(false);
+ if (nextControlPointTriplet == null)
+ {
+ return false;
+ }
+ else
+ {
+ return nextControlPointTriplet.backwardHelperPoint.isUsed;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void TryDrawLineFromForwardHelperPoint_toAnchorPointOfNextControlPoint(int i)
+ {
+ if (CheckIf_drawLineFromForwardHelperPoint_toAnchorPointOfNextControlPoint(i))
+ {
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, alphaOfDottedLineBetweenHelperPoints);
+ int i_ofNextControlPoint = UtilitiesDXXL_Math.LoopOvershootingIndexIntoCollectionSize(i + 1, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count);
+ Handles.DrawDottedLine(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.GetPos_inUnitsOfGlobalSpace(), bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i_ofNextControlPoint].anchorPoint.GetPos_inUnitsOfGlobalSpace(), dotLength_ofDottedLines);
+ }
+ }
+
+ bool CheckIf_drawLineFromForwardHelperPoint_toAnchorPointOfNextControlPoint(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.isUsed)
+ {
+ InternalDXXL_BezierControlPointTriplet nextControlPointTriplet = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetNextControlPointTripletAlongSplineDir(false);
+ if (nextControlPointTriplet == null)
+ {
+ return false;
+ }
+ else
+ {
+ return (nextControlPointTriplet.backwardHelperPoint.isUsed == false);
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void TryDrawLineFromAnchorPoint_toBackwardHelperPointOfNextControlPoint(int i)
+ {
+ if (CheckIf_drawLineFromAnchorPoint_toBackwardHelperPointOfNextControlPoint(i))
+ {
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, alphaOfDottedLineBetweenHelperPoints);
+ int i_ofNextControlPoint = UtilitiesDXXL_Math.LoopOvershootingIndexIntoCollectionSize(i + 1, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count);
+ Handles.DrawDottedLine(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace(), bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i_ofNextControlPoint].backwardHelperPoint.GetPos_inUnitsOfGlobalSpace(), dotLength_ofDottedLines);
+ }
+ }
+
+ bool CheckIf_drawLineFromAnchorPoint_toBackwardHelperPointOfNextControlPoint(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.isUsed == false)
+ {
+ InternalDXXL_BezierControlPointTriplet nextControlPointTriplet = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetNextControlPointTripletAlongSplineDir(false);
+ if (nextControlPointTriplet == null)
+ {
+ return false;
+ }
+ else
+ {
+ return nextControlPointTriplet.backwardHelperPoint.isUsed;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void TryProcessChangingEditorTool()
+ {
+ if (selectedToolDuringPreviousOnSceneGUI != Tools.current)
+ {
+ ProcessChangingEditorTool();
+ }
+ selectedToolDuringPreviousOnSceneGUI = Tools.current;
+ }
+
+ void ProcessChangingEditorTool()
+ {
+ if (Tools.current == Tool.Move)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_anchorPoints == bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_helperPoints)
+ {
+ //-> custom handles are "both on" or "both off"
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atAnchors = true;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atHelpers = true;
+ }
+ else
+ {
+ //-> one custom handle is on, the other is off
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atAnchors = bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_anchorPoints;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atHelpers = bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_helperPoints;
+ }
+
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_rotation = false;
+ }
+ else
+ {
+ if (Tools.current == Tool.Rotate)
+ {
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atAnchors = false;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atHelpers = false;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_rotation = true;
+ }
+ else
+ {
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atAnchors = false;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atHelpers = false;
+ bezierSplineDrawer_unserializedMonoB.showHandleFor_rotation = false;
+ }
+ }
+ }
+
+ void TryResetRotationOfIndependentRotationHandles()
+ {
+ //this emulates an "reset on activate rotation handle"-behaviour:
+ if (bezierSplineDrawer_unserializedMonoB.showHandleFor_rotation == false)
+ {
+ bezierSplineDrawer_unserializedMonoB.ResetAll_rotation_ofRotationHandle_thatIsIndependentFromSplineDir_butDefinedByDrawSpaceOrientation();
+ }
+ }
+
+ void DrawNonInteractableAnchorPointVisualizer(int i)
+ {
+ Vector3 position_ofAnchorPoint_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace();
+ DrawNonInteractableSubPointVisualizer(i, position_ofAnchorPoint_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, bezierSplineDrawer_unserializedMonoB.handleSizeOf_customHandle_atAnchors, bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_anchorPoints);
+ }
+
+ void DrawNonInteractableHelperPointVisualizer(int i, bool concerncedHelperPoint_isForward_notBackward, Vector3 position_ofHelperPoint_inUnitsOfGlobalSpace)
+ {
+ if (CheckIf_drawNonInteractableHelperPointVisualizer(i, concerncedHelperPoint_isForward_notBackward))
+ {
+ DrawNonInteractableSubPointVisualizer(i, position_ofHelperPoint_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, bezierSplineDrawer_unserializedMonoB.handleSizeOf_customHandle_atHelpers, bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_helperPoints);
+ }
+ }
+
+ public static float sizeFactor_ofNonInteracalbeFlatSubPointVisualizer_forHighlightedPoints = 3.25f;
+ public static float alpha_ofExpandedNonInteractableFlatSubPointVisualizer_forHighlightedControlPoints = 0.15f;
+ void DrawNonInteractableSubPointVisualizer(int i, Vector3 position_ofSubPoint_inUnitsOfGlobalSpace, Color color, float handleSize, bool handlesAreActivated)
+ {
+ Handles.color = color;
+ float radius_ofSubPointIndicator = 0.5f * handleSize * HandleUtility.GetHandleSize(position_ofSubPoint_inUnitsOfGlobalSpace);
+
+ if (handlesAreActivated == false)
+ {
+ Handles.DrawSolidDisc(position_ofSubPoint_inUnitsOfGlobalSpace, sceneViewCamForward_normalized, radius_ofSubPointIndicator);
+ }
+
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].isHighlighted)
+ {
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, alpha_ofExpandedNonInteractableFlatSubPointVisualizer_forHighlightedControlPoints);
+ Handles.DrawSolidDisc(position_ofSubPoint_inUnitsOfGlobalSpace, sceneViewCamForward_normalized, sizeFactor_ofNonInteracalbeFlatSubPointVisualizer_forHighlightedPoints * radius_ofSubPointIndicator);
+ }
+ }
+
+ bool CheckIf_drawNonInteractableHelperPointVisualizer(int i, bool concerncedHelperPoint_isForward_notBackward)
+ {
+ return bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetAHelperPoint(concerncedHelperPoint_isForward_notBackward).isUsed;
+ }
+
+ void DrawIndexAsText(int i)
+ {
+ GUIStyle style_ofTextAtControlPoints = new GUIStyle();
+ string space_beforeTextString = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].isHighlighted ? " " : " ";
+
+ float scaleFactorOfText = bezierSplineDrawer_unserializedMonoB.handleSizeOf_customHandle_atAnchors / BezierSplineDrawer.default_handleSizeOf_customHandle_atAnchors;
+ int scale_ofSpaceBeforeTextString = Mathf.RoundToInt(scaleFactorOfText * 11);
+ int scale_ofNumberItself = Mathf.RoundToInt(scaleFactorOfText * 25);
+
+ string text_atControlPoint = "" + space_beforeTextString + "" + i + "";
+ Handles.Label(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace(), text_atControlPoint, style_ofTextAtControlPoints);
+ }
+
+ void DrawPlusButtonsForAddingNewControlPoints_atSplineStartAndEnd(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed == false)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showHandleFor_plusButtons_atSplineStartAndEnd)
+ {
+ DrawPlusButtonsForAddingNewControlPoints_atSplineStart(i);
+ DrawPlusButtonsForAddingNewControlPoints_atSplineEnd(i);
+ }
+ }
+ }
+
+ public static float alphaOfSolidBackgroundLine_ofLinesTowardsPlusButtonsAtSplineEnds = 0.25f;
+ public static float alphaOfDottedLine_ofLinesTowardsPlusButtonsAtSplineEnds = 0.5f;
+ void DrawPlusButtonsForAddingNewControlPoints_atSplineStart(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.IsFirstControlPoint(i))
+ {
+ InternalDXXL_BezierControlPointTriplet currControlPointTriplet = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ Vector3 currentFirstControlPoint_backTo_newlyCreatableControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_firstControlPoint_to_newlyCreatedControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized(currControlPointTriplet);
+ if (UtilitiesDXXL_Math.CheckIfNormalizationFailed_meaningLineStayedTooShort(currentFirstControlPoint_backTo_newlyCreatableControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized))
+ {
+ currentFirstControlPoint_backTo_newlyCreatableControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized = (-bezierSplineDrawer_unserializedMonoB.Get_forward_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized());
+ }
+ float distanceToCurrentFirstControlPoint_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.Get_distance_from_prevLastControlPoint_to_newlyCreatedControlPoint_inUnitsOfGlobalSpace();
+ Vector3 posOf_plusButtonAtSplineStart_inUnitsOfGlobalSpace = currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace() + currentFirstControlPoint_backTo_newlyCreatableControlPointAtSplineStart_inUnitsOfGlobalSpace_normalized * distanceToCurrentFirstControlPoint_inUnitsOfGlobalSpace;
+
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, alphaOfSolidBackgroundLine_ofLinesTowardsPlusButtonsAtSplineEnds);
+ Handles.DrawLine(currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace(), posOf_plusButtonAtSplineStart_inUnitsOfGlobalSpace);
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, alphaOfDottedLine_ofLinesTowardsPlusButtonsAtSplineEnds);
+ Handles.DrawDottedLine(currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace(), posOf_plusButtonAtSplineStart_inUnitsOfGlobalSpace, dotLength_ofDottedLines);
+
+ bool buttonHasBeenClicked = InternalDXXL_BezierHandles.PlusButton(posOf_plusButtonAtSplineStart_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.handleSizeOf_plusButtons, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, sceneViewCamForward_normalized, sceneViewCamUp_normalized, sceneViewCamRight_normalized, plusSymbolIcon);
+ if (buttonHasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CreateNewControlPoint_atSplineStart();
+ }
+ }
+ }
+
+ void DrawPlusButtonsForAddingNewControlPoints_atSplineEnd(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.IsLastControlPoint(i))
+ {
+ InternalDXXL_BezierControlPointTriplet currControlPointTriplet = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ Vector3 currentLastControlPoint_to_newlyCreatableControlPoint_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_previouslyLastControlPoint_to_newlyCreatedControlPointAtSplineEnd_inUnitsOfGlobalSpace_normalized(currControlPointTriplet);
+ if (UtilitiesDXXL_Math.CheckIfNormalizationFailed_meaningLineStayedTooShort(currentLastControlPoint_to_newlyCreatableControlPoint_inUnitsOfGlobalSpace_normalized))
+ {
+ currentLastControlPoint_to_newlyCreatableControlPoint_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_forward_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized();
+ }
+ float distanceToCurrentLastControlPoint_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.Get_distance_from_prevLastControlPoint_to_newlyCreatedControlPoint_inUnitsOfGlobalSpace();
+ Vector3 posOf_plusButtonAtSplineEnd_inUnitsOfGlobalSpace = currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace() + currentLastControlPoint_to_newlyCreatableControlPoint_inUnitsOfGlobalSpace_normalized * distanceToCurrentLastControlPoint_inUnitsOfGlobalSpace;
+
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, alphaOfSolidBackgroundLine_ofLinesTowardsPlusButtonsAtSplineEnds);
+ Handles.DrawLine(currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace(), posOf_plusButtonAtSplineEnd_inUnitsOfGlobalSpace);
+ Handles.color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints, alphaOfDottedLine_ofLinesTowardsPlusButtonsAtSplineEnds);
+ Handles.DrawDottedLine(currControlPointTriplet.anchorPoint.GetPos_inUnitsOfGlobalSpace(), posOf_plusButtonAtSplineEnd_inUnitsOfGlobalSpace, dotLength_ofDottedLines);
+
+ bool buttonHasBeenClicked = InternalDXXL_BezierHandles.PlusButton(posOf_plusButtonAtSplineEnd_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.handleSizeOf_plusButtons, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, sceneViewCamForward_normalized, sceneViewCamUp_normalized, sceneViewCamRight_normalized, plusSymbolIcon);
+ if (buttonHasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CreateNewControlPoint_atSplineEnd();
+ }
+ }
+ }
+
+ void DrawPlusButtonsForAddingNewControlPoints_somewhereOnUpcomingSplineSegment(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showHandleFor_plusButtons_insideSegments)
+ {
+ InternalDXXL_BezierControlPointTriplet concernedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ if (bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed || concernedControlPoint.IsLastControlPoint() == false)
+ {
+ float pos0to1_insideSegment_ofPlusButton_beforeDrag = concernedControlPoint.progress0to1_ofPlusButtonPosition_inUpcomingBezierSegment;
+ Vector3 posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace = concernedControlPoint.GetPosAtPlusButton_onUpcomingBezierSegment_inUnitsOfGlobalSpace();
+ Vector3 directionOfConeForShifting_inUnitsOfGlobalSpace_normalized = concernedControlPoint.GetTangentAtPlusButton_onUpcomingBezierSegment_inUnitsOfGlobalSpace(true);
+ float handleSize = bezierSplineDrawer_unserializedMonoB.handleSizeOf_plusButtons * HandleUtility.GetHandleSize(posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace);
+
+ Handles.color = bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints;
+ Quaternion rotation_ofForwardCone = Quaternion.LookRotation(directionOfConeForShifting_inUnitsOfGlobalSpace_normalized, Vector3.zero);
+ Quaternion rotation_ofBackwardCone = Quaternion.LookRotation(-directionOfConeForShifting_inUnitsOfGlobalSpace_normalized, Vector3.zero);
+ Get_posOfPlusButtonCones(out Vector3 posOf_forwardCone_beforeDrag_inUnitsOfGlobalSpace, out Vector3 posOf_backwardCone_beforeDrag_inUnitsOfGlobalSpace, posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace, directionOfConeForShifting_inUnitsOfGlobalSpace_normalized, handleSize);
+
+ Start_handlesChangeCheck();
+ float pos0to1_insideSegment_ofPlusButton_afterDragOfForwardCone = InternalDXXL_BezierHandles.ValueSliderAlongCurve(pos0to1_insideSegment_ofPlusButton_beforeDrag, posOf_forwardCone_beforeDrag_inUnitsOfGlobalSpace, rotation_ofForwardCone, directionOfConeForShifting_inUnitsOfGlobalSpace_normalized, handleSize, Handles.ConeHandleCap, 1.0f);
+ bool forwardCone_hasChanged = End_handlesChangeCheck("Shift Button on Spline", i, false);
+
+ Start_handlesChangeCheck();
+ float pos0to1_insideSegment_ofPlusButton_afterDragOfBackwardCone = InternalDXXL_BezierHandles.ValueSliderAlongCurve(pos0to1_insideSegment_ofPlusButton_beforeDrag, posOf_backwardCone_beforeDrag_inUnitsOfGlobalSpace, rotation_ofBackwardCone, directionOfConeForShifting_inUnitsOfGlobalSpace_normalized, handleSize, Handles.ConeHandleCap, 1.0f);
+ bool backwardCone_hasChanged = End_handlesChangeCheck("Shift Button on Spline", i, false);
+
+ if (forwardCone_hasChanged) { Update_progress0to1_ofPlusButtonPosition_inUpcomingBezierSegment(pos0to1_insideSegment_ofPlusButton_afterDragOfForwardCone, concernedControlPoint); }
+ if (backwardCone_hasChanged) { Update_progress0to1_ofPlusButtonPosition_inUpcomingBezierSegment(pos0to1_insideSegment_ofPlusButton_afterDragOfBackwardCone, concernedControlPoint); }
+
+ bool buttonHasBeenClicked = InternalDXXL_BezierHandles.PlusButton(posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.handleSizeOf_plusButtons, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, sceneViewCamForward_normalized, sceneViewCamUp_normalized, sceneViewCamRight_normalized, plusSymbolIcon);
+ if (buttonHasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CreateNewControlPoint_somewhereOnUpcomingSplineSegment(i);
+ }
+ }
+ }
+ }
+
+ void Get_posOfPlusButtonCones(out Vector3 posOf_forwardCone_beforeDrag_inUnitsOfGlobalSpace, out Vector3 posOf_backwardCone_beforeDrag_inUnitsOfGlobalSpace, Vector3 posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace, Vector3 directionOfConeForShifting_inUnitsOfGlobalSpace_normalized, float handleSize)
+ {
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out Vector3 unused1, out Vector3 unused2, out Vector3 unused3, out Vector3 sceneViewCam_to_plusButton, posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace, DrawBasics.CameraForAutomaticOrientation.sceneViewCamera);
+ float acuteAngleDeg0to90_betweenObserverViewDir_andCurveTangent = UtilitiesDXXL_Math.AcuteAngle_0to90(sceneViewCam_to_plusButton, directionOfConeForShifting_inUnitsOfGlobalSpace_normalized);
+ acuteAngleDeg0to90_betweenObserverViewDir_andCurveTangent = Mathf.Max(acuteAngleDeg0to90_betweenObserverViewDir_andCurveTangent, 15.0f);
+
+ float offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton = 1.0f / Mathf.Sin(acuteAngleDeg0to90_betweenObserverViewDir_andCurveTangent * Mathf.Deg2Rad);
+ float offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofForwardConeHandle;
+ float offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofBackwardConeHandle;
+
+ bool curveDirectionGoesAwayFromSceneViewCamera = (Vector3.Dot(sceneViewCam_to_plusButton, directionOfConeForShifting_inUnitsOfGlobalSpace_normalized) > 0.0f);
+ if (curveDirectionGoesAwayFromSceneViewCamera)
+ {
+ offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofForwardConeHandle = 1.0f;
+ offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofBackwardConeHandle = offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton;
+ }
+ else
+ {
+ offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofForwardConeHandle = offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton;
+ offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofBackwardConeHandle = 1.0f;
+ }
+
+ float relConeOffset_ifObservingCamViesPerp = 0.75f;
+ float offsetOfForwardConeHandle = handleSize * relConeOffset_ifObservingCamViesPerp * offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofForwardConeHandle;
+ float offsetOfBackwardConeHandle = handleSize * relConeOffset_ifObservingCamViesPerp * offsetFactor_toCompensateViewAngle_andMakeConesStillPeekOutBehindPlusButton_ofBackwardConeHandle;
+
+ posOf_forwardCone_beforeDrag_inUnitsOfGlobalSpace = posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace + directionOfConeForShifting_inUnitsOfGlobalSpace_normalized * offsetOfForwardConeHandle;
+ posOf_backwardCone_beforeDrag_inUnitsOfGlobalSpace = posOfPlusButton_beforeDrag_inUnitsOfGlobalSpace - directionOfConeForShifting_inUnitsOfGlobalSpace_normalized * offsetOfBackwardConeHandle;
+ }
+
+ void Update_progress0to1_ofPlusButtonPosition_inUpcomingBezierSegment(float pos0to1_insideSegment_ofPlusButton_afterDrag, InternalDXXL_BezierControlPointTriplet concernedControlPoint)
+ {
+ pos0to1_insideSegment_ofPlusButton_afterDrag = Mathf.Clamp(pos0to1_insideSegment_ofPlusButton_afterDrag, 0.05f, 0.95f);
+ concernedControlPoint.progress0to1_ofPlusButtonPosition_inUpcomingBezierSegment = pos0to1_insideSegment_ofPlusButton_afterDrag;
+ }
+
+ public enum PartOfTripleHandleCompound { center, forward, backward }
+ PartOfTripleHandleCompound nearest_anchorSubHandle;
+ PartOfTripleHandleCompound middle_anchorSubHandle;
+ PartOfTripleHandleCompound farest_anchorSubHandle;
+
+ void DrawCustomHandlesAtSubPoints(int i)
+ {
+ Determine_nearestMiddleFarestSubHandle(i);
+
+ DrawCustomHandleAtASubPoint(farest_anchorSubHandle, i);
+ DrawCustomHandleAtASubPoint(middle_anchorSubHandle, i);
+ DrawCustomHandleAtASubPoint(nearest_anchorSubHandle, i);
+ }
+
+ void Determine_nearestMiddleFarestSubHandle(int i)
+ {
+ float dotProduct_camViewDir_directionOfForwardCone = Vector3.Dot(sceneViewCam_to_anchorPoint, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized);
+ float dotProduct_camViewDir_directionOfBackwardCone = Vector3.Dot(sceneViewCam_to_anchorPoint, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized);
+
+ if ((dotProduct_camViewDir_directionOfForwardCone > 0.0f) && (dotProduct_camViewDir_directionOfBackwardCone > 0.0f))
+ {
+ nearest_anchorSubHandle = PartOfTripleHandleCompound.center;
+ if (dotProduct_camViewDir_directionOfForwardCone > dotProduct_camViewDir_directionOfBackwardCone)
+ {
+ middle_anchorSubHandle = PartOfTripleHandleCompound.backward;
+ farest_anchorSubHandle = PartOfTripleHandleCompound.forward;
+ }
+ else
+ {
+ middle_anchorSubHandle = PartOfTripleHandleCompound.forward;
+ farest_anchorSubHandle = PartOfTripleHandleCompound.backward;
+ }
+ }
+ else
+ {
+ if ((dotProduct_camViewDir_directionOfForwardCone < 0.0f) && (dotProduct_camViewDir_directionOfBackwardCone < 0.0f))
+ {
+ farest_anchorSubHandle = PartOfTripleHandleCompound.center;
+ if (dotProduct_camViewDir_directionOfForwardCone < dotProduct_camViewDir_directionOfBackwardCone)
+ {
+ nearest_anchorSubHandle = PartOfTripleHandleCompound.forward;
+ middle_anchorSubHandle = PartOfTripleHandleCompound.backward;
+ }
+ else
+ {
+ nearest_anchorSubHandle = PartOfTripleHandleCompound.backward;
+ middle_anchorSubHandle = PartOfTripleHandleCompound.forward;
+ }
+ }
+ else
+ {
+ middle_anchorSubHandle = PartOfTripleHandleCompound.center;
+ if (dotProduct_camViewDir_directionOfForwardCone < 0.0f)
+ {
+ nearest_anchorSubHandle = PartOfTripleHandleCompound.forward;
+ farest_anchorSubHandle = PartOfTripleHandleCompound.backward;
+ }
+ else
+ {
+ nearest_anchorSubHandle = PartOfTripleHandleCompound.backward;
+ farest_anchorSubHandle = PartOfTripleHandleCompound.forward;
+ }
+ }
+ }
+ }
+
+ void DrawCustomHandleAtASubPoint(PartOfTripleHandleCompound subHandleToDraw, int i)
+ {
+ switch (subHandleToDraw)
+ {
+ case PartOfTripleHandleCompound.center:
+ DrawAnchorPointsCustomHandle(i);
+ break;
+ case PartOfTripleHandleCompound.forward:
+ DrawAHelperPointHandle(i, true);
+ break;
+ case PartOfTripleHandleCompound.backward:
+ DrawAHelperPointHandle(i, false);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawAnchorPointsCustomHandle(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_anchorPoints)
+ {
+ Handles.color = bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints;
+
+ float size_ofAnchorPointsCustomHandle = bezierSplineDrawer_unserializedMonoB.handleSizeOf_customHandle_atAnchors * HandleUtility.GetHandleSize(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace());
+
+ bool drawForwardCone_ofAnchorPointsCustomHandle = CheckIf_drawForwardCone_ofAnchorPointsCustomHandle(i);
+ bool drawBackwardCone_ofAnchorPointsCustomHandle = CheckIf_drawBackwardCone_ofAnchorPointsCustomHandle(i);
+
+ if (drawForwardCone_ofAnchorPointsCustomHandle) { TryRecalcHandleDirectionOfForwardConeOnAnchorHandle(i); }
+ if (drawBackwardCone_ofAnchorPointsCustomHandle) { TryRecalcHandleDirectionOfBackwardConeOnAnchorHandle(i); }
+
+ bool flipBackwardCone_dueToIsLastControlPointOfNonClosedSpline = FlipDirectionOfAnchorPointsCustomHandleBackwardCone(i);
+ if (flipBackwardCone_dueToIsLastControlPointOfNonClosedSpline)
+ {
+ //-> "forward cone" (whichever of the three handles it may be) is always skipped here
+ //-> so this just flips the draw order of the remaining two subHandles: sphere and the backward cone
+ DrawASubHandle_ofAnchorPointsCustomHandle(nearest_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ DrawASubHandle_ofAnchorPointsCustomHandle(middle_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ DrawASubHandle_ofAnchorPointsCustomHandle(farest_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ }
+ else
+ {
+ DrawASubHandle_ofAnchorPointsCustomHandle(farest_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ DrawASubHandle_ofAnchorPointsCustomHandle(middle_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ DrawASubHandle_ofAnchorPointsCustomHandle(nearest_anchorSubHandle, i, drawForwardCone_ofAnchorPointsCustomHandle, drawBackwardCone_ofAnchorPointsCustomHandle, size_ofAnchorPointsCustomHandle);
+ }
+ }
+ }
+
+ bool CheckIf_drawForwardCone_ofAnchorPointsCustomHandle(int i)
+ {
+ if ((bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed == false) && bezierSplineDrawer_unserializedMonoB.IsLastControlPoint(i))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ void TryRecalcHandleDirectionOfForwardConeOnAnchorHandle(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_forwardCone_duringNextOnSceneGUI)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.isUsed)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.Get_direction_toForward_inUnitsOfGlobalSpace_normalized();
+ }
+ else
+ {
+ InternalDXXL_BezierControlSubPoint nextUsedNonSuperimposedSubPointAlongSplineDir = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetNextUsedNonSuperimposedSubPointAlongSplineDir(false);
+ if (nextUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized = (nextUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace() - bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace()).normalized;
+ }
+ else
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_forward_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized();
+ }
+ }
+ }
+ }
+
+ bool CheckIf_drawBackwardCone_ofAnchorPointsCustomHandle(int i)
+ {
+ if ((bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed == false) && (bezierSplineDrawer_unserializedMonoB.IsFirstControlPoint(i)))
+ {
+ return false;
+ }
+
+ //note 1: for non-kinked juncture types the backwardHelper cannot be disabled (meaning "isUsed == true" is always guaranteed). Therefore the backward direction cone is always redundant and can be skipped, because it is the same as the forward direction.
+ //note 2: the one case, where no forward direction for non-kinked juncture-types would be possible is the splineEnd of non-closed splines. But such spline end points are always forced to "juncture=kinked", and therefore don't need special treatment here
+ return (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.junctureType == InternalDXXL_BezierControlAnchorSubPoint.JunctureType.kinked);
+ }
+
+ void TryRecalcHandleDirectionOfBackwardConeOnAnchorHandle(int i)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_backwardCone_duringNextOnSceneGUI)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.isUsed)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.Get_direction_toBackward_inUnitsOfGlobalSpace_normalized();
+ }
+ else
+ {
+ InternalDXXL_BezierControlSubPoint previousUsedNonSuperimposedSubPointAlongSplineDir = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPreviousUsedNonSuperimposedSubPointAlongSplineDir(false);
+ if (previousUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized = (previousUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace() - bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace()).normalized;
+ }
+ else
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized = (-bezierSplineDrawer_unserializedMonoB.Get_forward_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized());
+ }
+ }
+ }
+ }
+
+ void DrawASubHandle_ofAnchorPointsCustomHandle(PartOfTripleHandleCompound subHandleToDraw, int i, bool drawForwardCone_ofAnchorPointsCustomHandle, bool drawBackwardCone_ofAnchorPointsCustomHandle, float size_ofAnchorPointsCustomHandle)
+ {
+ switch (subHandleToDraw)
+ {
+ case PartOfTripleHandleCompound.center:
+ DrawAnchorPointsCustomHandles_freeMoveSubHandle(i, size_ofAnchorPointsCustomHandle);
+ break;
+ case PartOfTripleHandleCompound.forward:
+ if (drawForwardCone_ofAnchorPointsCustomHandle) { DrawAnchorPointsCustomHandles_forwardConeSubHandle(i, size_ofAnchorPointsCustomHandle); }
+ break;
+ case PartOfTripleHandleCompound.backward:
+ if (drawBackwardCone_ofAnchorPointsCustomHandle) { DrawAnchorPointsCustomHandles_backwardConeSubHandle(i, size_ofAnchorPointsCustomHandle); }
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawAnchorPointsCustomHandles_freeMoveSubHandle(int i, float size_ofAnchorPointsCustomHandle)
+ {
+ Start_handlesChangeCheck();
+#if UNITY_2022_1_OR_NEWER
+ var fmh_813_318_639186733279200821 = Quaternion.identity; Vector3 pos_shiftedByFreeMoveHandle_inUnitsOfGlobalSpace = Handles.FreeMoveHandle(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.controlID_ofCustomHandles_sphere, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace(), size_ofAnchorPointsCustomHandle, Vector3.one, Handles.SphereHandleCap);
+#else
+ Vector3 pos_shiftedByFreeMoveHandle_inUnitsOfGlobalSpace = Handles.FreeMoveHandle(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace(), Quaternion.identity, size_ofAnchorPointsCustomHandle, Vector3.one, Handles.SphereHandleCap);
+#endif
+ bool hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ if (hasChanged)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.SetPos_inUnitsOfGlobalSpace(pos_shiftedByFreeMoveHandle_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+
+ void DrawAnchorPointsCustomHandles_forwardConeSubHandle(int i, float size_ofAnchorPointsCustomHandle)
+ {
+ Vector3 posOffset_fromAnchorPoint_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized * size_ofAnchorPointsCustomHandle;
+ Vector3 pos_ofForwardCone_beforeDrag_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace() + posOffset_fromAnchorPoint_inUnitsOfGlobalSpace;
+
+ Start_handlesChangeCheck();
+ Vector3 pos_ofForwardCone_afterDrag_inUnitsOfGlobalSpace = Handles.Slider(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.controlID_ofCustomHandles_forwardCone, pos_ofForwardCone_beforeDrag_inUnitsOfGlobalSpace, bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_forwardCone_inUnitsOfGlobalSpace_normalized, size_ofAnchorPointsCustomHandle, Handles.ConeHandleCap, 1.0f);
+ bool hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ if (hasChanged)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_forwardCone_duringNextOnSceneGUI = false; //Without this there is strange flickering behaviour, see notes at "recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = false"
+ Vector3 posDifference_inUnitsOfGlobalSpace = pos_ofForwardCone_afterDrag_inUnitsOfGlobalSpace - pos_ofForwardCone_beforeDrag_inUnitsOfGlobalSpace;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.AddPosOffset_inUnitsOfGlobalSpace(posDifference_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+
+ void DrawAnchorPointsCustomHandles_backwardConeSubHandle(int i, float size_ofAnchorPointsCustomHandle)
+ {
+ bool flipDirectionOfCone = FlipDirectionOfAnchorPointsCustomHandleBackwardCone(i);
+ Vector3 posOffset_fromAnchorPoint_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized * size_ofAnchorPointsCustomHandle;
+ if (flipDirectionOfCone) { posOffset_fromAnchorPoint_inUnitsOfGlobalSpace = -posOffset_fromAnchorPoint_inUnitsOfGlobalSpace; }
+ Vector3 pos_ofBackwardCone_beforeDrag_inUnitsOfGlobalSpace = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.GetPos_inUnitsOfGlobalSpace() + posOffset_fromAnchorPoint_inUnitsOfGlobalSpace;
+ Vector3 usedDirection_inUnitsOfGlobalSpace = flipDirectionOfCone ? (-bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized) : bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.directionForHandles_backwardCone_inUnitsOfGlobalSpace_normalized;
+
+ Start_handlesChangeCheck();
+ Vector3 pos_ofBackwardCone_afterDrag_inUnitsOfGlobalSpace = Handles.Slider(bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.controlID_ofCustomHandles_backwardCone, pos_ofBackwardCone_beforeDrag_inUnitsOfGlobalSpace, usedDirection_inUnitsOfGlobalSpace, size_ofAnchorPointsCustomHandle, Handles.ConeHandleCap, 1.0f);
+ bool hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ if (hasChanged)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_backwardCone_duringNextOnSceneGUI = false; //Without this there is strange flickering behaviour, see notes at "recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = false"
+ Vector3 posDifference_inUnitsOfGlobalSpace = pos_ofBackwardCone_afterDrag_inUnitsOfGlobalSpace - pos_ofBackwardCone_beforeDrag_inUnitsOfGlobalSpace;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.AddPosOffset_inUnitsOfGlobalSpace(posDifference_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+
+ bool FlipDirectionOfAnchorPointsCustomHandleBackwardCone(int i)
+ {
+ //-> this is only for visual continuity (because the default case is that the conesAtAnchorHandles point along forwardOfSpline).
+ if (bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed == false)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.IsLastControlPoint(i))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public enum PartOfHelperPointsCustomHandle { sphere, coneAlongHelperDirFromAnchor, coneAlongToNeighborsHelperDir, cylinderAlongHelperDirFromAnchor, cylinderAlongToNeighborsHelperDir }
+ PartOfHelperPointsCustomHandle nearest_helperSubHandle;
+ PartOfHelperPointsCustomHandle secondNearest_helperSubHandle;
+ PartOfHelperPointsCustomHandle middle_helperSubHandle;
+ PartOfHelperPointsCustomHandle secondFarest_helperSubHandle;
+ PartOfHelperPointsCustomHandle farest_helperSubHandle;
+ bool nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints;
+ bool secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints;
+ bool secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints;
+ bool farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints;
+ void DrawAHelperPointHandle(int i, bool helperHandleToDraw_isForwardNotBackward)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showCustomHandleFor_helperPoints)
+ {
+ InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetAHelperPoint(helperHandleToDraw_isForwardNotBackward);
+ if (concernedHelperPoint.isUsed)
+ {
+ Handles.color = bezierSplineDrawer_unserializedMonoB.color_ofHelperPoints;
+
+ bool draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor = CheckIf_draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor(i, concernedHelperPoint);
+ bool draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir = CheckIf_draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir(i, concernedHelperPoint);
+
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out Vector3 observerCamForward_normalized, out Vector3 observerCamUp_normalized, out Vector3 observerCamRight_normalized, out Vector3 cam_to_helperPosition, concernedHelperPoint.GetPos_inUnitsOfGlobalSpace(), DrawBasics.CameraForAutomaticOrientation.sceneViewCamera);
+
+ TryRecalc_directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized(concernedHelperPoint);
+ TryRecalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized(i, concernedHelperPoint);
+ TryRecalc_camPlane_inclinedIntoHandlesDir_inUnitsOfGlobalSpace(concernedHelperPoint);
+
+ Determine_nearestMiddleAndFarestSubHandles_ofHelperPointsCustomHandle(concernedHelperPoint, cam_to_helperPosition);
+
+ DrawASubHandle_ofHelperPointsCustomHandle(farest_helperSubHandle, farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, i, draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, concernedHelperPoint);
+ DrawASubHandle_ofHelperPointsCustomHandle(secondFarest_helperSubHandle, secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, i, draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, concernedHelperPoint);
+ DrawASubHandle_ofHelperPointsCustomHandle(middle_helperSubHandle, false, i, draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, concernedHelperPoint);
+ DrawASubHandle_ofHelperPointsCustomHandle(secondNearest_helperSubHandle, secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, i, draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, concernedHelperPoint);
+ DrawASubHandle_ofHelperPointsCustomHandle(nearest_helperSubHandle, nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, i, draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, concernedHelperPoint);
+ }
+ }
+ }
+
+ bool CheckIf_draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor(int i, InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint)
+ {
+ if (concernedHelperPoint.GetMountingAnchorPoint().junctureType == InternalDXXL_BezierControlAnchorSubPoint.JunctureType.mirrored)
+ {
+ return false;
+ }
+ else
+ {
+ return (concernedHelperPoint.GetOppositeHelperPoint().isUsed);
+ }
+ }
+
+ bool CheckIf_draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir(int i, InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint)
+ {
+ InternalDXXL_BezierControlPointTriplet neighboringControlPoint = concernedHelperPoint.Get_neighboringControlPoint(false);
+ if (neighboringControlPoint != null)
+ {
+ if (concernedHelperPoint.isForward_notBackward)
+ {
+ return neighboringControlPoint.backwardHelperPoint.isUsed;
+ }
+ else
+ {
+ return neighboringControlPoint.forwardHelperPoint.isUsed;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void TryRecalc_directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized(InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint)
+ {
+ if (concernedHelperPoint.recalc_directionForHandles_alongLineWithMountingAnchor_duringNextOnSceneGUI)
+ {
+ if (concernedHelperPoint.isForward_notBackward)
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = concernedHelperPoint.Get_direction_fromMountingAnchorToThisHelperPoint_inUnitsOfGlobalSpace_normalized();
+ }
+ else
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = -concernedHelperPoint.Get_direction_fromMountingAnchorToThisHelperPoint_inUnitsOfGlobalSpace_normalized();
+ }
+ }
+ }
+
+ void TryRecalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized(int i, InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint)
+ {
+ if (concernedHelperPoint.recalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_duringNextOnSceneGUI)
+ {
+ if (concernedHelperPoint.isForward_notBackward)
+ {
+ InternalDXXL_BezierControlSubPoint nextUsedNonSuperimposedSubPointAlongSplineDir = concernedHelperPoint.GetNextUsedNonSuperimposedSubPointAlongSplineDir(false);
+
+ if (nextUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = (nextUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace() - concernedHelperPoint.GetPos_inUnitsOfGlobalSpace()).normalized;
+ }
+ else
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_forward_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized();
+ }
+ }
+ else
+ {
+ InternalDXXL_BezierControlSubPoint previousUsedNonSuperimposedSubPointAlongSplineDir = concernedHelperPoint.GetPreviousUsedNonSuperimposedSubPointAlongSplineDir(false);
+ if (previousUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = (concernedHelperPoint.GetPos_inUnitsOfGlobalSpace() - previousUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace()).normalized;
+ }
+ else
+ {
+ concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_forward_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized();
+ }
+ }
+ }
+ }
+
+ void TryRecalc_camPlane_inclinedIntoHandlesDir_inUnitsOfGlobalSpace(InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint)
+ {
+ if (concernedHelperPoint.recalc_handlesPlanesThatShouldntBeRecalcedDuringDrag_duringNextOnSceneGUI)
+ {
+ Vector3 planePoint1 = concernedHelperPoint.GetPos_inUnitsOfGlobalSpace();
+ Vector3 planePoint1_to_planePoint2 = concernedHelperPoint.Get_direction_fromMountingAnchorToThisHelperPoint_inUnitsOfGlobalSpace_normalized();
+ Vector3 planePoint2 = planePoint1 + planePoint1_to_planePoint2;
+ Vector3 perpTo_handleDir_andTo_camViewDir = Vector3.Cross(planePoint1_to_planePoint2, sceneViewCam_to_anchorPoint);
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(perpTo_handleDir_andTo_camViewDir))
+ {
+ //-> handles direction is parallel to the view direction of the observing sceneViewCamera
+ concernedHelperPoint.camPlane_inclinedIntoHandlesDir_inUnitsOfGlobalSpace.Recreate(planePoint1, sceneViewCam_to_anchorPoint);
+ }
+ else
+ {
+ Vector3 planePoint3 = planePoint1 + perpTo_handleDir_andTo_camViewDir;
+ concernedHelperPoint.camPlane_inclinedIntoHandlesDir_inUnitsOfGlobalSpace.Recreate(planePoint1, planePoint2, planePoint3);
+ }
+ }
+ }
+
+ void Determine_nearestMiddleAndFarestSubHandles_ofHelperPointsCustomHandle(InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint, Vector3 cam_to_helperPosition)
+ {
+ middle_helperSubHandle = PartOfHelperPointsCustomHandle.sphere;
+
+ float dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor = Vector3.Dot(cam_to_helperPosition, concernedHelperPoint.directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized);
+ float dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir = Vector3.Dot(cam_to_helperPosition, concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized);
+ if ((dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor > 0.0f) && (dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir > 0.0f))
+ {
+ //both dirs point AWAY from camera:
+ if (dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor > dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir)
+ {
+ //"dirAlongLineWithAnchor" points STEEPER away from camera than "dir_toNeighborOfNeighbor":
+ nearest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ secondNearest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ secondFarest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ farest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ }
+ else
+ {
+ //"dir_toNeighborOfNeighbor" points STEEPER away from camera than "dirAlongLineWithAnchor":
+ nearest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ secondNearest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ secondFarest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ farest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ }
+ }
+ else
+ {
+ if ((dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor < 0.0f) && (dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir < 0.0f))
+ {
+ //both dirs point TOWARDS camera:
+ if (dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor < dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir)
+ {
+ //"dirAlongLineWithAnchor" points STEEPER towards camera than "dir_toNeighborOfNeighbor":
+ nearest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ secondNearest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ secondFarest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ farest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ }
+ else
+ {
+ //"dir_toNeighborOfNeighbor" points STEEPER towards camera than "dirAlongLineWithAnchor":
+ nearest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ secondNearest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ secondFarest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ farest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ }
+ }
+ else
+ {
+ if ((dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor > 0.0f) && (dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir < 0.0f))
+ {
+ //"dirAlongLineWithAnchor" points AWAY from camera, "dir_toNeighborOfNeighbor" points TOWARDS camera:
+ float abs_dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir = -dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir;
+ if (dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor > abs_dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir)
+ {
+ //"dirAlongLineWithAnchor" points STEEPER away from camera than "(cylinder)dir_toNeighborOfNeighbor":
+ nearest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ secondNearest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ secondFarest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ farest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ }
+ else
+ {
+ //"(cylinder)dir_toNeighborOfNeighbor" points STEEPER away from camera than "dirAlongLineWithAnchor":
+ nearest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ secondNearest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ secondFarest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ farest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ }
+ }
+ else
+ {
+ //"dirAlongLineWithAnchor" points TOWARDS camera, "dir_toNeighborOfNeighbor" points AWAY from camera:
+ float abs_dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor = -dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor;
+ if (abs_dotProduct_camViewDir_directionOfConeAlongHelperDirFromAnchor > dotProduct_camViewDir_directionOfConeAlongToNeighborsHelperDir)
+ {
+ //"(cylinder)dirAlongLineWithAnchor" points STEEPER away from camera than "dir_toNeighborOfNeighbor":
+ nearest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ secondNearest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ secondFarest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+ farest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ }
+ else
+ {
+ //"dir_toNeighborOfNeighbor" points STEEPER away from camera than "(cylinder)dirAlongLineWithAnchor":
+ nearest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir;
+ secondNearest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor;
+ secondFarest_helperSubHandle = PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor;
+ farest_helperSubHandle = PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir;
+
+ nearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ secondNearest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ secondFarest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = true;
+ farest_helperSubHandle_belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints = false;
+ }
+ }
+ }
+ }
+ }
+
+ public static float scaleFactor_forCylinderHandles = 0.75f;
+ public static float offsetFactor_forCylinderHandles = 1.2f;
+ void DrawASubHandle_ofHelperPointsCustomHandle(PartOfHelperPointsCustomHandle subHandleToDraw, bool belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, int i, bool draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor, bool draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir, InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint)
+ {
+ float handleSize_unmodified = bezierSplineDrawer_unserializedMonoB.handleSizeOf_customHandle_atHelpers * HandleUtility.GetHandleSize(concernedHelperPoint.GetPos_inUnitsOfGlobalSpace());
+ switch (subHandleToDraw)
+ {
+ case PartOfHelperPointsCustomHandle.sphere:
+ DrawHelperPointsCustomHandles_sphereHandle(i, concernedHelperPoint.controlID_ofCustomHandles_sphere, concernedHelperPoint, handleSize_unmodified);
+ break;
+ case PartOfHelperPointsCustomHandle.coneAlongHelperDirFromAnchor:
+ DrawAnUnidirectionalSubHandle_ofHelperPointsCustomHandle(i, concernedHelperPoint.controlID_ofCustomHandles_coneAlongLineWithAnchor, concernedHelperPoint, 1.0f, handleSize_unmodified, Handles.ConeHandleCap, belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, true, false, false);
+ break;
+ case PartOfHelperPointsCustomHandle.coneAlongToNeighborsHelperDir:
+ DrawAnUnidirectionalSubHandle_ofHelperPointsCustomHandle(i, concernedHelperPoint.controlID_ofCustomHandles_coneAlongLineWithNeighborsHelper, concernedHelperPoint, 1.0f, handleSize_unmodified, Handles.ConeHandleCap, belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, false, false, false);
+ break;
+ case PartOfHelperPointsCustomHandle.cylinderAlongHelperDirFromAnchor:
+ if (draw_helperPointsCustomHandles_cylinderAlongHelperDirFromAnchor)
+ {
+ DrawAnUnidirectionalSubHandle_ofHelperPointsCustomHandle(i, concernedHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithAnchor, concernedHelperPoint, -1.0f * offsetFactor_forCylinderHandles, scaleFactor_forCylinderHandles * handleSize_unmodified, Handles.CylinderHandleCap, belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, false, true, false);
+ }
+ break;
+ case PartOfHelperPointsCustomHandle.cylinderAlongToNeighborsHelperDir:
+ if (draw_helperPointsCustomHandles_cylinderAlongToNeighborsHelperDir)
+ {
+ DrawAnUnidirectionalSubHandle_ofHelperPointsCustomHandle(i, concernedHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithNeighborsHelper, concernedHelperPoint, -1.0f * offsetFactor_forCylinderHandles, scaleFactor_forCylinderHandles * handleSize_unmodified, Handles.CylinderHandleCap, belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, false, false, true);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawHelperPointsCustomHandles_sphereHandle(int i, int controlID_ofHandle, InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint, float handleSize)
+ {
+ Start_handlesChangeCheck();
+#if UNITY_2022_1_OR_NEWER
+ var fmh_1188_188_639186733279248814 = Quaternion.identity; Vector3 posOfSphereHandle_afterDrag_shifedInsideCamPlane_inUnitsOfGlobalSpace = Handles.FreeMoveHandle(controlID_ofHandle, concernedHelperPoint.GetPos_inUnitsOfGlobalSpace(), handleSize, Vector3.one, Handles.SphereHandleCap);
+#else
+ Vector3 posOfSphereHandle_afterDrag_shifedInsideCamPlane_inUnitsOfGlobalSpace = Handles.FreeMoveHandle(concernedHelperPoint.GetPos_inUnitsOfGlobalSpace(), Quaternion.identity, handleSize, Vector3.one, Handles.SphereHandleCap);
+#endif
+ bool hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ if (hasChanged)
+ {
+ concernedHelperPoint.recalc_handlesPlanesThatShouldntBeRecalcedDuringDrag_duringNextOnSceneGUI = false;
+
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out Vector3 observerCamForward_normalized, out Vector3 observerCamUp_normalized, out Vector3 observerCamRight_normalized, out Vector3 cam_to_posOfSphereHandleAfterDragShifedInsideCamPlane, posOfSphereHandle_afterDrag_shifedInsideCamPlane_inUnitsOfGlobalSpace, DrawBasics.CameraForAutomaticOrientation.sceneViewCamera);
+ Vector3 posOfSphereHandle_afterDrag_shifedInsideHandlesPlane_inUnitsOfGlobalSpace = concernedHelperPoint.camPlane_inclinedIntoHandlesDir_inUnitsOfGlobalSpace.Get_projectionOfPointOnPlane_alongCustomDir(posOfSphereHandle_afterDrag_shifedInsideCamPlane_inUnitsOfGlobalSpace, cam_to_posOfSphereHandleAfterDragShifedInsideCamPlane);
+ concernedHelperPoint.SetPos_inUnitsOfGlobalSpace(posOfSphereHandle_afterDrag_shifedInsideHandlesPlane_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+
+ void DrawAnUnidirectionalSubHandle_ofHelperPointsCustomHandle(int i, int controlID_ofHandle, InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint, float handlePosOffsetFactorAlongDir, float handleSize, Handles.CapFunction capFunction, bool belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints, bool tryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint, bool mirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint, bool mirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint)
+ {
+ Vector3 dragDirection_inUnitsOfGlobalSpace_normalized = belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints ? concernedHelperPoint.directionForHandles_alongLineWithMountingAnchor_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized : concernedHelperPoint.directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_toForwardDirOfWholeSpline_inUnitsOfGlobalSpace_normalized;
+ Vector3 handleOffset = dragDirection_inUnitsOfGlobalSpace_normalized * handleSize * handlePosOffsetFactorAlongDir;
+ Vector3 posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace = concernedHelperPoint.GetPos_inUnitsOfGlobalSpace();
+ Vector3 posOfConeHandle_beforeDrag_inUnitsOfGlobalSpace = posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace + handleOffset;
+
+ Start_handlesChangeCheck();
+ Vector3 posOfConeHandle_afterDrag_inUnitsOfGlobalSpace = Handles.Slider(controlID_ofHandle, posOfConeHandle_beforeDrag_inUnitsOfGlobalSpace, dragDirection_inUnitsOfGlobalSpace_normalized, handleSize, capFunction, 1.0f);
+ bool hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ if (hasChanged)
+ {
+ if (belongsTo_lineFromAnchor_notTo_lineBetweenNeighboringHelperPoints)
+ {
+ concernedHelperPoint.recalc_directionForHandles_alongLineWithMountingAnchor_duringNextOnSceneGUI = false;
+ }
+ else
+ {
+ concernedHelperPoint.recalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_duringNextOnSceneGUI = false;
+ }
+
+ Vector3 shiftOffset_throughDragSlider_inUnitsOfGlobalSpace = posOfConeHandle_afterDrag_inUnitsOfGlobalSpace - posOfConeHandle_beforeDrag_inUnitsOfGlobalSpace;
+ Vector3 posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace = posOfConeHandle_afterDrag_inUnitsOfGlobalSpace - handleOffset;
+
+ TryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint(concernedHelperPoint, tryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint, posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace, posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace);
+
+ float absDistanceToMountingAnchorPoint_beforeDrag_inUnitsOfGlobalSpace = concernedHelperPoint.Get_absDistanceToAnchorPoint_inUnitsOfGlobalSpace();
+ concernedHelperPoint.SetPos_inUnitsOfGlobalSpace(posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace, true, null);
+ float absDistanceToMountingAnchorPoint_afterDrag_inUnitsOfGlobalSpace = concernedHelperPoint.Get_absDistanceToAnchorPoint_inUnitsOfGlobalSpace();
+
+ TryMirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint(concernedHelperPoint, mirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint, absDistanceToMountingAnchorPoint_beforeDrag_inUnitsOfGlobalSpace, absDistanceToMountingAnchorPoint_afterDrag_inUnitsOfGlobalSpace);
+ TryMirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint(i, concernedHelperPoint, mirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint, shiftOffset_throughDragSlider_inUnitsOfGlobalSpace);
+ }
+ }
+
+ void TryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint(InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint, bool tryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint, Vector3 posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace, Vector3 posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace)
+ {
+ if (tryChangeStateOf_helperPointsAreOnSameSide_afterPassingTheAnchorPoint)
+ {
+ if (concernedHelperPoint.isUsed && concernedHelperPoint.GetOppositeHelperPoint().isUsed)
+ {
+ if (concernedHelperPoint.GetMountingAnchorPoint().junctureType == InternalDXXL_BezierControlAnchorSubPoint.JunctureType.aligned)
+ {
+ Vector3 anchor_to_helperPosBeforeDrag = posOfHelperPoint_beforeDrag_inUnitsOfGlobalSpace - concernedHelperPoint.GetMountingAnchorPoint().GetPos_inUnitsOfGlobalSpace();
+ Vector3 anchor_to_helperPosAfterDrag = posOfHelperPoint_afterDrag_inUnitsOfGlobalSpace - concernedHelperPoint.GetMountingAnchorPoint().GetPos_inUnitsOfGlobalSpace();
+ float dotProduct_ofDirectionFromAnchorToConcernedHelper_beforeAndAfterDrag = Vector3.Dot(anchor_to_helperPosBeforeDrag, anchor_to_helperPosAfterDrag);
+ bool coneSliderPassedTheMountingAnchorPoint = (dotProduct_ofDirectionFromAnchorToConcernedHelper_beforeAndAfterDrag < 0.0f);
+ if (coneSliderPassedTheMountingAnchorPoint)
+ {
+ concernedHelperPoint.Get_controlPointTriplet_thisSubPointIsPartOf().Invert_alignedHelperPoints_areOnTheSameSideOfTheAnchor();
+ }
+ }
+ }
+ }
+ }
+
+ void TryMirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint(InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint, bool mirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint, float absDistanceToMountingAnchorPoint_beforeDrag_inUnitsOfGlobalSpace, float absDistanceToMountingAnchorPoint_afterDrag_inUnitsOfGlobalSpace)
+ {
+ if (mirrorDistanceChangeRatio_ontoOtherHelperPointOfSameControlPoint)
+ {
+ float absChangeRatio_ofDistance_throughSliderDrag = absDistanceToMountingAnchorPoint_afterDrag_inUnitsOfGlobalSpace / absDistanceToMountingAnchorPoint_beforeDrag_inUnitsOfGlobalSpace;
+ if (UtilitiesDXXL_Math.FloatIsValid(absChangeRatio_ofDistance_throughSliderDrag))
+ {
+ float newAbsDistanceToAnchorPoint_ofOppositeHelperPoint_inUnitsOfGlobalSpace = concernedHelperPoint.GetOppositeHelperPoint().Get_absDistanceToAnchorPoint_inUnitsOfGlobalSpace() * absChangeRatio_ofDistance_throughSliderDrag;
+ concernedHelperPoint.GetOppositeHelperPoint().Set_absDistanceToAnchorPoint_inUnitsOfGlobalSpace(newAbsDistanceToAnchorPoint_ofOppositeHelperPoint_inUnitsOfGlobalSpace, true, null); //-> oppositeHelperPoint is guaranteed "isUsed = true" here
+ //bool cylinderSliderPassedTheMountingAnchorPoint -> No further action required because "concernedHelperPoint.SetPos_inUnitsOfGlobalSpace()" already executed the "flip" of the other helper side.
+ }
+ }
+ }
+
+ void TryMirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint(int i, InternalDXXL_BezierControlHelperSubPoint concernedHelperPoint, bool mirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint, Vector3 shiftOffset_throughDragSlider_inUnitsOfGlobalSpace)
+ {
+ if (mirrorPosChange_ontoNeighboringHelperPointOfNeighboringControlPoint)
+ {
+ InternalDXXL_BezierControlHelperSubPoint neighboringHelperPoint_ofNeighboringControlPoint = concernedHelperPoint.Get_neighboringHelperPoint_ofNeighboringControlPoint(false);
+ if (neighboringHelperPoint_ofNeighboringControlPoint != null)
+ {
+ neighboringHelperPoint_ofNeighboringControlPoint.AddPosOffset_inUnitsOfGlobalSpace(-shiftOffset_throughDragSlider_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+ }
+
+ void DrawUnitysBuildInHandlesAtSubPoints(int i)
+ {
+ //Cannot draw these handles in "back-to-front"-order as "DrawCustomHandlesAtSubPoints()" does, because the control_ID's of these handles are created automatically by Unity in the order of calling. The control_ID's change if the order of calling changes.
+ //If during a handle drag one of the handles here "overtakes" another handle in the race for "camera nearness", then the control_ID's change and the handle focus suddenly jumps to another handle, which from then on takes the rest of the mouse drag delta.
+ //It could be improved in Unity2022, because there are further overloads of "Handles.PositionHandle" and "Handles.RotationHandle" available where the control_ID can be explicitly defined
+ InternalDXXL_BezierControlPointTriplet concernedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ TryDrawAUnityRotationHandle(i);
+ TryDrawAUnityPositionHandle(i, concernedControlPoint.backwardHelperPoint);
+ TryDrawAUnityPositionHandle(i, concernedControlPoint.forwardHelperPoint);
+ TryDrawAUnityPositionHandle(i, concernedControlPoint.anchorPoint);
+ }
+
+ void TryDrawAUnityPositionHandle(int i, InternalDXXL_BezierControlSubPoint concernedSubPoint)
+ {
+ if (CheckIf_drawPositionHandle(concernedSubPoint))
+ {
+ if (concernedSubPoint.recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI) { Recalc_globalRotation_ofPositionHandle(concernedSubPoint); }
+
+ float handleSize = (concernedSubPoint.subPointType == InternalDXXL_BezierControlSubPoint.SubPointType.anchor) ? bezierSplineDrawer_unserializedMonoB.handleSizeFor_position_atAnchors : bezierSplineDrawer_unserializedMonoB.handleSizeFor_position_atHelpers;
+ Matrix4x4 matrix_identityButScaled = Matrix4x4.Scale(handleSize * Vector3.one);
+ Handles.matrix = matrix_identityButScaled;
+
+ Start_handlesChangeCheck();
+ Vector3 pos_shiftedByPositionHandle_inUnitsOfGlobalSpace = handleSize * Handles.PositionHandle(concernedSubPoint.GetPos_inUnitsOfGlobalSpace() / handleSize, concernedSubPoint.globalRotation_ofPositionHandle);
+ bool hasChanged = End_handlesChangeCheck("Position of Bezier Point", i, true);
+
+ Handles.matrix = Matrix4x4.identity;
+
+ if (hasChanged)
+ {
+ concernedSubPoint.recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = false; //Without this there is strange flickering behaviour, maybe due to some internals of how "Handles.PositionHandle()" works. The flickering appears for "Editor.pivotMode=local" when you grab a the position handle that points to the neighboring control point and then get nearer towards this other control point.
+ concernedSubPoint.SetPos_inUnitsOfGlobalSpace(pos_shiftedByPositionHandle_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+ }
+
+ bool CheckIf_drawPositionHandle(InternalDXXL_BezierControlSubPoint concernedSubPoint)
+ {
+ if (concernedSubPoint.subPointType == InternalDXXL_BezierControlSubPoint.SubPointType.anchor)
+ {
+ return (bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atAnchors && concernedSubPoint.isUsed);
+ }
+ else
+ {
+ return (bezierSplineDrawer_unserializedMonoB.showHandleFor_position_atHelpers && concernedSubPoint.isUsed);
+ }
+ }
+
+ void Recalc_globalRotation_ofPositionHandle(InternalDXXL_BezierControlSubPoint concernedSubPoint)
+ {
+ switch (Tools.pivotRotation)
+ {
+ case PivotRotation.Local:
+ concernedSubPoint.SetBoolOf_boundGameobjectInclConnectionComponent_isAssignedActiveAndEnabled();
+ if (concernedSubPoint.boundGameobjectInclConnectionComponent_isAssignedActiveAndEnabled && (concernedSubPoint.subPointType == InternalDXXL_BezierControlSubPoint.SubPointType.anchor))
+ {
+ concernedSubPoint.globalRotation_ofPositionHandle = concernedSubPoint.boundGameobject.transform.rotation;
+ }
+ else
+ {
+ Recalc_globalRotation_ofPositionHandle_caseLocalPivotWithoutBoundGameobject(concernedSubPoint);
+ }
+ break;
+ case PivotRotation.Global:
+ Recalc_globalRotation_ofPositionHandle_caseGlobalPivot(concernedSubPoint);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void Recalc_globalRotation_ofPositionHandle_caseLocalPivotWithoutBoundGameobject(InternalDXXL_BezierControlSubPoint concernedSubPoint)
+ {
+ Vector3 posOfConcernedSubPoint_inUnitsOfGlobalSpace = concernedSubPoint.GetPos_inUnitsOfGlobalSpace();
+ Vector3 posOfNextNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace = posOfConcernedSubPoint_inUnitsOfGlobalSpace;
+ Vector3 posOfPreviousNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace = posOfConcernedSubPoint_inUnitsOfGlobalSpace;
+ bool the3MountingPointsLieOnALine_soThePlaneIsUndefined = false;
+
+ InternalDXXL_BezierControlSubPoint nextUsedNonSuperimposedSubPointAlongSplineDir = concernedSubPoint.GetNextUsedNonSuperimposedSubPointAlongSplineDir(false);
+ if (nextUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ posOfNextNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace = nextUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace();
+ }
+ else
+ {
+ the3MountingPointsLieOnALine_soThePlaneIsUndefined = true;
+ }
+
+ InternalDXXL_BezierControlSubPoint previousUsedNonSuperimposedSubPointAlongSplineDir = concernedSubPoint.GetPreviousUsedNonSuperimposedSubPointAlongSplineDir(false);
+ if (previousUsedNonSuperimposedSubPointAlongSplineDir != null)
+ {
+ posOfPreviousNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace = previousUsedNonSuperimposedSubPointAlongSplineDir.GetPos_inUnitsOfGlobalSpace();
+ }
+ else
+ {
+ the3MountingPointsLieOnALine_soThePlaneIsUndefined = true;
+ }
+
+ Vector3 normalOfPlane_inUnitsOfGlobalSpace_notNormalized = Vector3.forward;
+ if (the3MountingPointsLieOnALine_soThePlaneIsUndefined == false)
+ {
+ Vector3 planeMountingVector1_inUnitsOfGlobalSpace = posOfConcernedSubPoint_inUnitsOfGlobalSpace - posOfNextNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace;
+ Vector3 planeMountingVector2_inUnitsOfGlobalSpace = posOfConcernedSubPoint_inUnitsOfGlobalSpace - posOfPreviousNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace;
+ normalOfPlane_inUnitsOfGlobalSpace_notNormalized = Vector3.Cross(planeMountingVector1_inUnitsOfGlobalSpace, planeMountingVector2_inUnitsOfGlobalSpace);
+
+ the3MountingPointsLieOnALine_soThePlaneIsUndefined = (UtilitiesDXXL_Math.GetBiggestAbsComponent(normalOfPlane_inUnitsOfGlobalSpace_notNormalized) < 0.001f);
+ }
+
+ if (the3MountingPointsLieOnALine_soThePlaneIsUndefined)
+ {
+ Vector3 forwardDirectionPreferablyAlongHandleAxis_inUnitsOfGlobalSpace = concernedSubPoint.GetDirectionAlongSplineForwardBasedOnNeighborPoints_inUnitsOfGlobalSpace();
+ if (UtilitiesDXXL_Math.ApproximatelyZero(forwardDirectionPreferablyAlongHandleAxis_inUnitsOfGlobalSpace))
+ {
+ Recalc_globalRotation_ofPositionHandle_caseGlobalPivot(concernedSubPoint);
+ }
+ else
+ {
+ Vector3 up_ofActiveDrawSpace_normalized = bezierSplineDrawer_unserializedMonoB.Get_up_ofActiveDrawSpace_inUnitsOfGlobalSpace_normalized();
+ Vector3 up_ofCreatedRotation = Vector3.Cross(forwardDirectionPreferablyAlongHandleAxis_inUnitsOfGlobalSpace, up_ofActiveDrawSpace_normalized);
+ concernedSubPoint.globalRotation_ofPositionHandle = Quaternion.LookRotation(forwardDirectionPreferablyAlongHandleAxis_inUnitsOfGlobalSpace, up_ofCreatedRotation);
+ }
+ }
+ else
+ {
+ Vector3 rotation_forward = normalOfPlane_inUnitsOfGlobalSpace_notNormalized;
+ Vector3 rotation_up = posOfNextNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace - posOfPreviousNonSuperimposedSubPointAlongSpline_inUnitsOfGlobalSpace;
+ concernedSubPoint.globalRotation_ofPositionHandle = Quaternion.LookRotation(rotation_forward, rotation_up);
+ }
+ }
+
+ void Recalc_globalRotation_ofPositionHandle_caseGlobalPivot(InternalDXXL_BezierControlSubPoint concernedSubPoint)
+ {
+ switch (bezierSplineDrawer_unserializedMonoB.drawSpace)
+ {
+ case BezierSplineDrawer.DrawSpace.global:
+ concernedSubPoint.globalRotation_ofPositionHandle = Quaternion.identity;
+ break;
+ case BezierSplineDrawer.DrawSpace.localDefinedByThisGameobject:
+ Recalc_globalRotation_ofPositionHandle_caseGlobalPivotButLocalDrawSpace(concernedSubPoint);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void Recalc_globalRotation_ofPositionHandle_caseGlobalPivotButLocalDrawSpace(InternalDXXL_BezierControlSubPoint concernedSubPoint)
+ {
+ switch (bezierSplineDrawer_unserializedMonoB.positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal)
+ {
+ case BezierSplineDrawer.PositionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal.localDrawSpace:
+ concernedSubPoint.globalRotation_ofPositionHandle = bezierSplineDrawer_unserializedMonoB.transform.rotation;
+ break;
+ case BezierSplineDrawer.PositionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal.globalSpace:
+ concernedSubPoint.globalRotation_ofPositionHandle = Quaternion.identity;
+ break;
+ default:
+ break;
+ }
+ }
+
+ void TryDrawAUnityRotationHandle(int i)
+ {
+ InternalDXXL_BezierControlPointTriplet concernedControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i];
+ if (CheckIf_drawRotationHandle(concernedControlPoint))
+ {
+ //-> In case of "junctureType == kinked" the FORWARD direction is connected to the rotation handle. The BACKWARD direction then can only be set indirectly via positionChange of the backwardHelperSubPoint. (Exception: if the forward helper is not available then it controls the backward direction as fallback)
+
+ InternalDXXL_BezierControlAnchorSubPoint concernedAnchorPoint = concernedControlPoint.anchorPoint;
+
+ if (concernedAnchorPoint.recalc_rotation_ofRotationHandleDuringRotationDragPhases_duringNextOnSceneGUI) { Calc_rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace(concernedAnchorPoint); }
+
+ Matrix4x4 matrix_identityButScaled = Matrix4x4.Scale(bezierSplineDrawer_unserializedMonoB.handleSizeFor_rotation * Vector3.one);
+ Handles.matrix = matrix_identityButScaled;
+
+ Start_handlesChangeCheck();
+ Quaternion rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace = Handles.RotationHandle(concernedAnchorPoint.rotation_ofRotationHandleDuringRotationDragPhases, concernedAnchorPoint.GetPos_inUnitsOfGlobalSpace() / bezierSplineDrawer_unserializedMonoB.handleSizeFor_rotation);
+ bool hasChanged = End_handlesChangeCheck("Rotation of Bezier Point", i, true);
+
+ Handles.matrix = Matrix4x4.identity;
+
+ if (hasChanged)
+ {
+ concernedAnchorPoint.recalc_rotation_ofRotationHandleDuringRotationDragPhases_duringNextOnSceneGUI = false;
+ Set_rotation_afterChangeThroughRotationHandle(rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, concernedAnchorPoint.rotation_ofRotationHandleDuringRotationDragPhases, concernedAnchorPoint);
+ concernedAnchorPoint.rotation_ofRotationHandleDuringRotationDragPhases = rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace;
+ }
+ }
+ }
+
+ bool CheckIf_drawRotationHandle(InternalDXXL_BezierControlPointTriplet concernedControlPoint)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.showHandleFor_rotation)
+ {
+ return (concernedControlPoint.forwardHelperPoint.isUsed || concernedControlPoint.backwardHelperPoint.isUsed);
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void Calc_rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace(InternalDXXL_BezierControlAnchorSubPoint concernedAnchorPoint)
+ {
+ switch (Tools.pivotRotation)
+ {
+ case PivotRotation.Local:
+ concernedAnchorPoint.rotation_ofRotationHandleDuringRotationDragPhases = Get_rotation_ofRotationHandle_beforeRotate_caseLocalPivot(concernedAnchorPoint);
+ break;
+ case PivotRotation.Global:
+ concernedAnchorPoint.rotation_ofRotationHandleDuringRotationDragPhases = concernedAnchorPoint.rotation_ofRotationHandle_thatIsIndependentFromSplineDir_butDefinedByDrawSpaceOrientation;
+ break;
+ default:
+ concernedAnchorPoint.rotation_ofRotationHandleDuringRotationDragPhases = Quaternion.identity;
+ break;
+ }
+ }
+
+ Quaternion Get_rotation_ofRotationHandle_beforeRotate_caseLocalPivot(InternalDXXL_BezierControlAnchorSubPoint concernedAnchorPoint)
+ {
+ if (concernedAnchorPoint.CheckIf_boundGameobjectInfluencesRotation())
+ {
+ return concernedAnchorPoint.boundGameobject.transform.rotation;
+ }
+ else
+ {
+ return Get_rotation_ofRotationHandle_beforeRotate_caseLocalPivotAndIndependenFromBoundGameobject(concernedAnchorPoint);
+ }
+ }
+
+ Quaternion Get_rotation_ofRotationHandle_beforeRotate_caseLocalPivotAndIndependenFromBoundGameobject(InternalDXXL_BezierControlAnchorSubPoint concernedAnchorPoint)
+ {
+ Vector3 forwardDir_ofCreatedRotation_inUnitsOfGlobalSpace; //-> although the name is similar the "forward" here doesn't have to correspondend with the "forward" in "forwardHelper.direction"
+ if (concernedAnchorPoint.GetForwardHelperPoint().isUsed)
+ {
+ forwardDir_ofCreatedRotation_inUnitsOfGlobalSpace = concernedAnchorPoint.Get_direction_toForward_inUnitsOfGlobalSpace_normalized();
+ }
+ else
+ {
+ forwardDir_ofCreatedRotation_inUnitsOfGlobalSpace = concernedAnchorPoint.Get_direction_toBackward_inUnitsOfGlobalSpace_normalized();
+ }
+ return Quaternion.LookRotation(forwardDir_ofCreatedRotation_inUnitsOfGlobalSpace, Vector3.zero);
+ }
+
+ void Set_rotation_afterChangeThroughRotationHandle(Quaternion rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, Quaternion rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, InternalDXXL_BezierControlAnchorSubPoint concernedAnchorPoint)
+ {
+ switch (Tools.pivotRotation)
+ {
+ case PivotRotation.Local:
+ Set_rotation_afterChangeThroughRotationHandle_caseLocalPivot(rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, concernedAnchorPoint);
+ break;
+ case PivotRotation.Global:
+ Set_rotation_afterChangeThroughRotationHandle_caseGlobalPivot(rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, concernedAnchorPoint);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void Set_rotation_afterChangeThroughRotationHandle_caseLocalPivot(Quaternion rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, Quaternion rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, InternalDXXL_BezierControlAnchorSubPoint concernedAnchorPoint)
+ {
+ if (concernedAnchorPoint.CheckIf_boundGameobjectInfluencesRotation())
+ {
+ Set_rotation_afterChangeThroughRotationHandle_caseLocalPivotAndRotIsDependentFromBoundGameobject(rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, concernedAnchorPoint);
+ }
+ else
+ {
+ Set_rotation_afterChangeThroughRotationHandle_caseLocalPivotAndIndependenFromBoundGameobject(rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, concernedAnchorPoint);
+ }
+ }
+
+ void Set_rotation_afterChangeThroughRotationHandle_caseLocalPivotAndRotIsDependentFromBoundGameobject(Quaternion rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, Quaternion rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, InternalDXXL_BezierControlAnchorSubPoint concernedAnchorPoint)
+ {
+ concernedAnchorPoint.boundGameobject.transform.rotation = rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace;
+ if (concernedAnchorPoint.connectionComponent_onBoundGameobject != null)
+ {
+ concernedAnchorPoint.connectionComponent_onBoundGameobject.Transfer_aTransformDirection_fromBoundGameobject_toSpline();
+
+ //also update helperSides that are independent from a boundGameobject:
+ if (concernedAnchorPoint.junctureType == InternalDXXL_BezierControlAnchorSubPoint.JunctureType.kinked)
+ {
+ if (concernedAnchorPoint.GetBackwardHelperPoint().isUsed)
+ {
+ if (concernedAnchorPoint.GetBackwardHelperPoint().sourceOf_directionFromAnchorToThisHelper_caseKinkedJuncture == InternalDXXL_BezierControlAnchorSubPoint.SourceOf_directionToHelper.independentFromGameobject)
+ {
+ Quaternion rotationIncrement = GetRotationIncrement(rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace);
+ concernedAnchorPoint.AddRotation_toBackwardDirection(rotationIncrement, true, null);
+ }
+ }
+
+ if (concernedAnchorPoint.GetForwardHelperPoint().isUsed)
+ {
+ if (concernedAnchorPoint.GetForwardHelperPoint().sourceOf_directionFromAnchorToThisHelper_caseKinkedJuncture == InternalDXXL_BezierControlAnchorSubPoint.SourceOf_directionToHelper.independentFromGameobject)
+ {
+ Quaternion rotationIncrement = GetRotationIncrement(rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace);
+ concernedAnchorPoint.AddRotation_toForwardDirection(rotationIncrement, true, null);
+ }
+ }
+ }
+ }
+ else
+ {
+ UtilitiesDXXL_Log.PrintErrorCode("49");
+ }
+ }
+
+ void Set_rotation_afterChangeThroughRotationHandle_caseLocalPivotAndIndependenFromBoundGameobject(Quaternion rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, Quaternion rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, InternalDXXL_BezierControlAnchorSubPoint concernedAnchorPoint)
+ {
+ Vector3 forwardDirection_ofRotationHandleAfterRotate_inUnitsOfGlobalSpace = rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace * Vector3.forward; //-> see comment inside "Get_rotation_ofRotationHandle_beforeRotate_caseLocalPivotAndIndependenFromBoundGameobject()" -> this doesn't have to be the same as "forwardHelper.direction"
+ if (concernedAnchorPoint.GetForwardHelperPoint().isUsed)
+ {
+ concernedAnchorPoint.Set_direction_toForward_inUnitsOfGlobalSpace_normalized(forwardDirection_ofRotationHandleAfterRotate_inUnitsOfGlobalSpace, true, null);
+ if (concernedAnchorPoint.junctureType == InternalDXXL_BezierControlAnchorSubPoint.JunctureType.kinked)
+ {
+ if (concernedAnchorPoint.GetBackwardHelperPoint().isUsed)
+ {
+ Quaternion rotationIncrement = GetRotationIncrement(rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace);
+ concernedAnchorPoint.AddRotation_toBackwardDirection(rotationIncrement, true, null);
+ }
+ }
+ }
+ else
+ {
+ if (concernedAnchorPoint.GetBackwardHelperPoint().isUsed)
+ {
+ concernedAnchorPoint.Set_direction_toBackward_inUnitsOfGlobalSpace_normalized(forwardDirection_ofRotationHandleAfterRotate_inUnitsOfGlobalSpace, true, null);
+ }
+ }
+ }
+
+ void Set_rotation_afterChangeThroughRotationHandle_caseGlobalPivot(Quaternion rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace, Quaternion rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, InternalDXXL_BezierControlAnchorSubPoint concernedAnchorPoint)
+ {
+ concernedAnchorPoint.rotation_ofRotationHandle_thatIsIndependentFromSplineDir_butDefinedByDrawSpaceOrientation = rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace;
+ Quaternion rotationIncrement = GetRotationIncrement(rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace);
+
+ if (concernedAnchorPoint.junctureType == InternalDXXL_BezierControlAnchorSubPoint.JunctureType.kinked)
+ {
+ if (concernedAnchorPoint.GetBackwardHelperPoint().isUsed)
+ {
+ concernedAnchorPoint.AddRotation_toBackwardDirection(rotationIncrement, true, null);
+ }
+
+ if (concernedAnchorPoint.GetForwardHelperPoint().isUsed)
+ {
+ concernedAnchorPoint.AddRotation_toForwardDirection(rotationIncrement, true, null);
+ }
+ }
+ else
+ {
+ if (concernedAnchorPoint.GetForwardHelperPoint().isUsed)
+ {
+ concernedAnchorPoint.AddRotation_toForwardDirection(rotationIncrement, true, null);
+ }
+ else
+ {
+ if (concernedAnchorPoint.GetBackwardHelperPoint().isUsed)
+ {
+ concernedAnchorPoint.AddRotation_toBackwardDirection(rotationIncrement, true, null);
+ }
+ }
+ }
+ }
+
+ Quaternion GetRotationIncrement(Quaternion rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace, Quaternion rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace)
+ {
+ Quaternion rotationIncrement = rotation_ofRotationHandle_afterRotate_inUnitsOfGlobalSpace * Quaternion.Inverse(rotation_ofRotationHandle_beforeRotate_inUnitsOfGlobalSpace);
+ rotationIncrement.Normalize(); //-> the quaternion difference multiplication seems to introduce non-normalized quaternions somehow, therefore normalizing here.
+ return rotationIncrement;
+ }
+
+ void Reset_recalculationFlags_duringNoHandleClickedOrDraggedPhases(int i)
+ {
+ if (GUIUtility.hotControl == 0) //-> no handle is selcted or dragged = mouse button is not held down
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_forwardCone_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_directionForHandles_backwardCone_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_rotation_ofRotationHandleDuringRotationDragPhases_duringNextOnSceneGUI = true;
+
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.recalc_directionForHandles_alongLineWithMountingAnchor_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.recalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.recalc_handlesPlanesThatShouldntBeRecalcedDuringDrag_duringNextOnSceneGUI = true;
+
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.recalc_directionForHandles_alongLineWithMountingAnchor_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.recalc_directionForHandles_alongLineWithNeighboringHelperOfNeighboringControlPoint_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.recalc_handlesPlanesThatShouldntBeRecalcedDuringDrag_duringNextOnSceneGUI = true;
+
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint.recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint.recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = true;
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint.recalc_globalRotation_ofPositionHandle_duringNextOnSceneGUI = true;
+ }
+ }
+
+ void ResetUndoRegistrationFlag_duringNoInteractionPhases()
+ {
+ if (GUIUtility.hotControl == 0) //-> no handle is selcted or dragged = mouse button is not held down
+ {
+ hasRegisteredUndo_sinceMouseDown = false;
+ }
+ }
+
+ void Start_handlesChangeCheck()
+ {
+ EditorGUI.BeginChangeCheck();
+ }
+
+ bool End_handlesChangeCheck(string nameOfUndoEntry, int i_controlPointWithInteraction, bool markConcernedControlPoint_asSelected)
+ {
+ bool hasChanged = EditorGUI.EndChangeCheck();
+ if (hasChanged)
+ {
+ TryRegisterStateForUndo(nameOfUndoEntry, true, false);
+ if (markConcernedControlPoint_asSelected)
+ {
+ bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i_controlPointWithInteraction);
+ }
+ }
+ return hasChanged;
+ }
+
+ void TryRegisterStateForUndo(string nameOfUndoEntry, bool includeTransformsOfAllBoundGameobjects, bool includeConnectionComponentsOfAllBoundGameobjects)
+ {
+ if (hasRegisteredUndo_sinceMouseDown == false)
+ {
+ bezierSplineDrawer_unserializedMonoB.RegisterStateForUndo(nameOfUndoEntry, includeTransformsOfAllBoundGameobjects, includeConnectionComponentsOfAllBoundGameobjects);
+ hasRegisteredUndo_sinceMouseDown = true;
+ }
+ }
+
+ void TrySetSelectedListSlot_dueToHandlesInteraction(int i)
+ {
+ InternalDXXL_BezierControlAnchorSubPoint anchorPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].anchorPoint;
+ InternalDXXL_BezierControlHelperSubPoint forwardHelperPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].forwardHelperPoint;
+ InternalDXXL_BezierControlHelperSubPoint backwardHelperPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].backwardHelperPoint;
+
+ if (anchorPoint.controlID_ofCustomHandles_sphere == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (anchorPoint.controlID_ofCustomHandles_forwardCone == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (anchorPoint.controlID_ofCustomHandles_backwardCone == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+
+ if (forwardHelperPoint.controlID_ofCustomHandles_sphere == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (forwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithAnchor == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (forwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithNeighborsHelper == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (forwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithAnchor == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (forwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithNeighborsHelper == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+
+ if (backwardHelperPoint.controlID_ofCustomHandles_sphere == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (backwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithAnchor == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (backwardHelperPoint.controlID_ofCustomHandles_coneAlongLineWithNeighborsHelper == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (backwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithAnchor == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ if (backwardHelperPoint.controlID_ofCustomHandles_cylinderAlongLineWithNeighborsHelper == GUIUtility.hotControl) { bezierSplineDrawer_unserializedMonoB.SetSelectedListSlot(i); }
+ }
+
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+
+ serializedObject.Update();
+
+ float allowedConsumedLines_0to1 = DrawConsumedLines("spline curve");
+ TryDrawInfoTextHowToReducedDrawnLines(allowedConsumedLines_0to1);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color"));
+
+ SerializedProperty sP_lineWidth = serializedObject.FindProperty("lineWidth");
+ EditorGUILayout.PropertyField(sP_lineWidth, new GUIContent("Width"));
+ sP_lineWidth.floatValue = Mathf.Max(sP_lineWidth.floatValue, 0.0f);
+
+ SerializedProperty sP_straightSubDivisionsPerSegment = serializedObject.FindProperty("straightSubDivisionsPerSegment");
+ EditorGUILayout.PropertyField(sP_straightSubDivisionsPerSegment, new GUIContent("Resolution (=straight lines per bezier segment)"));
+ sP_straightSubDivisionsPerSegment.intValue = Mathf.Max(sP_straightSubDivisionsPerSegment.intValue, 3);
+
+ DrawCloseRingToggle();
+ DrawDrawSpaceSection();
+ DrawHandlesSection();
+ DrawControlPointsSection();
+ DrawTextInputInclMarkupHelper();
+ DrawCheckboxFor_drawOnlyIfSelected("Spline curve");
+ DrawCheckboxFor_hiddenByNearerObjects("Spline curve");
+
+ serializedObject.ApplyModifiedProperties();
+ ResetUndoRegistrationFlag_duringNoInteractionPhases();
+
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void TryDrawInfoTextHowToReducedDrawnLines(float allowedConsumedLines_0to1)
+ {
+ if (GUIUtility.hotControl == 0) //-> no handle is selcted or dragged = mouse button is not held down. Otherwise the warning box would disappear while the user drags the mentioned "Width"- or "Resolution"-field, which results in unconvenient line jumps.
+ {
+ if (allowedConsumedLines_0to1 > 0.5f)
+ {
+ if (UtilitiesDXXL_Math.ApproximatelyZero(serializedObject.FindProperty("lineWidth").floatValue) == false)
+ {
+ if (serializedObject.FindProperty("straightSubDivisionsPerSegment").intValue > 20)
+ {
+ manyDrawnLinesWarningState = ManyDrawnLinesWarningState.reduceWidthAndResolution;
+ }
+ else
+ {
+ manyDrawnLinesWarningState = ManyDrawnLinesWarningState.reduceWidth;
+ }
+ }
+ else
+ {
+ if (serializedObject.FindProperty("straightSubDivisionsPerSegment").intValue > 10)
+ {
+ manyDrawnLinesWarningState = ManyDrawnLinesWarningState.reduceResolution;
+ }
+ else
+ {
+ manyDrawnLinesWarningState = ManyDrawnLinesWarningState.noWarning;
+ }
+ }
+ }
+ else
+ {
+ manyDrawnLinesWarningState = ManyDrawnLinesWarningState.noWarning;
+ }
+ }
+
+ switch (manyDrawnLinesWarningState)
+ {
+ case ManyDrawnLinesWarningState.noWarning:
+ break;
+ case ManyDrawnLinesWarningState.reduceWidthAndResolution:
+ EditorGUILayout.HelpBox("Many drawn lines could be saved if 'Width' would be set to 0. Another option is to decrease the 'Resolution'.", MessageType.Info, true);
+ break;
+ case ManyDrawnLinesWarningState.reduceWidth:
+ EditorGUILayout.HelpBox("Many drawn lines could be saved if 'Width' would be set to 0.", MessageType.Info, true);
+ break;
+ case ManyDrawnLinesWarningState.reduceResolution:
+ EditorGUILayout.HelpBox("To save drawn lines it may help to decrease the 'Resolution'.", MessageType.Info, true);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawDrawSpaceSection() //two times "Draw" in the name is in meant this way
+ {
+ SerializedProperty sP_drawSpaceSection_isOutfolded = serializedObject.FindProperty("drawSpaceSection_isOutfolded");
+ sP_drawSpaceSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_drawSpaceSection_isOutfolded.boolValue, "Draw Space", true);
+ if (sP_drawSpaceSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ DrawDrawSpaceEnum();
+
+ SerializedProperty sP_keepWorldPos_duringDrawSpaceChange = serializedObject.FindProperty("keepWorldPos_duringDrawSpaceChange");
+ sP_keepWorldPos_duringDrawSpaceChange.boolValue = EditorGUILayout.ToggleLeft(new GUIContent("Keep world position during space change", "If this is selected then the global position and shape of the spline will stay the same when the draw space gets changed." + Environment.NewLine + Environment.NewLine + "If it is unselected then the spline will keep it's shape but will be scaled and rotated to fit the new draw space."), sP_keepWorldPos_duringDrawSpaceChange.boolValue);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void DrawDrawSpaceEnum() //two times "Draw" in the name is in meant this way
+ {
+ serializedObject.ApplyModifiedProperties();
+
+ if (bezierSplineDrawer_unserializedMonoB.drawSpace == BezierSplineDrawer.DrawSpace.localDefinedByThisGameobject)
+ {
+ if (UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale(bezierSplineDrawer_unserializedMonoB.transform))
+ {
+ EditorGUILayout.HelpBox("The transform of this gameobject or of a parent has a non-uniform scale. This may lead to wrong or weird results, when drawing in local space.", MessageType.Warning, true);
+ }
+ }
+
+ BezierSplineDrawer.DrawSpace drawSpace_after = (BezierSplineDrawer.DrawSpace)EditorGUILayout.EnumPopup(GUIContent.none, bezierSplineDrawer_unserializedMonoB.drawSpace);
+ if (drawSpace_after != bezierSplineDrawer_unserializedMonoB.drawSpace)
+ {
+ bezierSplineDrawer_unserializedMonoB.RegisterStateForUndo("Change Spline Space", true, false);
+ bezierSplineDrawer_unserializedMonoB.ChangeDrawSpace(drawSpace_after);
+ }
+
+ serializedObject.Update();
+ }
+
+ void DrawCloseRingToggle()
+ {
+ serializedObject.ApplyModifiedProperties();
+
+ bool closeGapState_after = EditorGUILayout.Toggle(new GUIContent("Close ring from end to start"), bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed);
+ if (closeGapState_after != bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed)
+ {
+ bezierSplineDrawer_unserializedMonoB.ChangeCloseGapState(closeGapState_after);
+ }
+
+ serializedObject.Update();
+ }
+
+ void DrawControlPointsSection()
+ {
+ SerializedProperty sP_controlPointsList_isOutfolded = serializedObject.FindProperty("controlPointsList_isOutfolded");
+ sP_controlPointsList_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_controlPointsList_isOutfolded.boolValue, "Control Points", true);
+ if (sP_controlPointsList_isOutfolded.boolValue)
+ {
+ DrawNonSerializedControlPointsList();
+ DrawSectionWithDefaultValuesOfNewlyCreatedPoints();
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void DrawNonSerializedControlPointsList()
+ {
+ //-> exceptionally: no indent here to have more display space for the list
+
+ serializedObject.ApplyModifiedProperties();
+
+ bezierSplineDrawer_unserializedMonoB.TryResheduleSceneViewRepaint();
+
+ Rect firstControlPointRect = default;
+ bool firstControlPointRect_hasBeenFilled = false;
+
+ for (int i = 0; i < bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count; i++)
+ {
+ float height_ofCurrentControlPoint = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].GetPropertyHeightForInspectorList();
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].inspectorRect_reservedForThisTriplet = EditorGUILayout.GetControlRect(true, height_ofCurrentControlPoint);
+
+ if (firstControlPointRect_hasBeenFilled == false)
+ {
+ firstControlPointRect = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].inspectorRect_reservedForThisTriplet;
+ firstControlPointRect_hasBeenFilled = true;
+ }
+ }
+
+ float height_ofEmptyControlPointHoldingOnlyPlusButton = InternalDXXL_BezierControlPointTriplet.GetPropertyHeightForEmptyControlPointHoldingOnlyAPlusButtonAndFoldAllButtons();
+ Rect rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons = EditorGUILayout.GetControlRect(true, height_ofEmptyControlPointHoldingOnlyPlusButton);
+
+ if (firstControlPointRect_hasBeenFilled == false)
+ {
+ firstControlPointRect = rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons;
+ }
+
+ float y_ofListsLowerEnd = rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons.y + rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons.height;
+ float heightOfListBackground = y_ofListsLowerEnd - firstControlPointRect.y;
+ Rect space_ofBackgroundColorRect = new Rect(firstControlPointRect.x, firstControlPointRect.y, firstControlPointRect.width, heightOfListBackground);
+ Rect space_ofBackgroundColorRectFrame = new Rect(space_ofBackgroundColorRect.x - 1.0f, space_ofBackgroundColorRect.y - 1.0f, space_ofBackgroundColorRect.width + 2.0f, space_ofBackgroundColorRect.height + 2.0f);
+ EditorGUI.DrawRect(space_ofBackgroundColorRectFrame, BezierSplineDrawer.color_ofControlPointListBackgroundFrameInInspecor);
+ EditorGUI.DrawRect(space_ofBackgroundColorRect, BezierSplineDrawer.color_ofControlPointListBackgroundInInspecor);
+
+ for (int i = 0; i < bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count; i++)
+ {
+ bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].DrawValuesToInspector();
+ }
+
+ for (int i = 0; i < bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count; i++)
+ {
+ if (bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].minusButtonAtThisListItem_hasBeenClickedInInspector)
+ {
+ bezierSplineDrawer_unserializedMonoB.TryDeleteControlPoint_dueToMinusButtonAtControlPointListItemHasBeenClicked(i);
+ bezierSplineDrawer_unserializedMonoB.SheduleSceneViewRepaint();
+ break; //-> only one change at a time
+ }
+
+ bool didChangeSomething = bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets[i].TryApplyChangesAfterInspectorInput();
+ if (didChangeSomething)
+ {
+ bezierSplineDrawer_unserializedMonoB.SheduleSceneViewRepaint();
+ break; //-> only one change at a time
+ }
+ }
+
+ DrawEmptyControlPointBelowControlPointsList_thatHoldsOnlyAPlusButtonAndFoldAllButtons(rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons);
+
+ serializedObject.Update();
+ }
+
+ void DrawEmptyControlPointBelowControlPointsList_thatHoldsOnlyAPlusButtonAndFoldAllButtons(Rect rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons)
+ {
+ bool greyOutBothFoldAllButtons = ((bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count == 0) || ((bezierSplineDrawer_unserializedMonoB.listOfControlPointTriplets.Count == 1) && (bezierSplineDrawer_unserializedMonoB.gapFromEndToStart_isClosed == false)));
+ bool greyOutUnfoldAllButton = greyOutBothFoldAllButtons || bezierSplineDrawer_unserializedMonoB.CheckIf_allFoldableHelperPoints_areUnfolded_inTheInspectorList();
+ bool greyOutCollapseAllButton = greyOutBothFoldAllButtons || bezierSplineDrawer_unserializedMonoB.CheckIf_allFoldableHelperPoints_areCollapsed_inTheInspectorList();
+
+ InternalDXXL_BezierControlPointTriplet.DrawEmptyControlPointHoldingOnlyAPlusButton_forInspector(out bool plusButtonBelowListOfControlPoints_hasBeenClicked, out bool unfoldAllWeightsBelowListOfControlPoints_hasBeenClicked, out bool collapseAllWeightsBelowListOfControlPoints_hasBeenClicked, rect_ofEmptyControlPointHoldingOnlyPlusButtonAndFoldAllButtons, bezierSplineDrawer_unserializedMonoB.color_ofAnchorPoints, plusSymbolIcon, greyOutUnfoldAllButton, greyOutCollapseAllButton);
+ if (plusButtonBelowListOfControlPoints_hasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CreateNewControlPoint_dueToPlusButtonBelowControlPointsListHasBeenClicked();
+ bezierSplineDrawer_unserializedMonoB.SheduleSceneViewRepaint();
+ }
+
+ if (unfoldAllWeightsBelowListOfControlPoints_hasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.UnfoldAllHelperPointInTheInspectorList();
+ }
+
+ if (collapseAllWeightsBelowListOfControlPoints_hasBeenClicked)
+ {
+ bezierSplineDrawer_unserializedMonoB.CollapseAllHelperPointInTheInspectorList();
+ }
+ }
+
+ void DrawSectionWithDefaultValuesOfNewlyCreatedPoints()
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_defaultPosRotWeightOffsetOfNewlyCreatedPoints_section_isOutfolded = serializedObject.FindProperty("defaultPosRotWeightOffsetOfNewlyCreatedPoints_section_isOutfolded");
+ sP_defaultPosRotWeightOffsetOfNewlyCreatedPoints_section_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_defaultPosRotWeightOffsetOfNewlyCreatedPoints_section_isOutfolded.boolValue, "Default values of newly created control points", true);
+ if (sP_defaultPosRotWeightOffsetOfNewlyCreatedPoints_section_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ DrawSectionWithDefaultOffsetOfNewlyCreatedPoints();
+ DrawSectionWithDefaultOrientationOfNewlyCreatedPoints();
+ DrawSectionWithDefaultWeightDistancesOfNewlyCreatedPoints();
+ DrawSectionWithDefaultJunctureTypeOfNewlyCreatedPoints();
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawSectionWithDefaultOffsetOfNewlyCreatedPoints()
+ {
+ SerializedProperty sP_defaultPosOffsetOfNewlyCreatedPoints_subSection_isOutfolded = serializedObject.FindProperty("defaultPosOffsetOfNewlyCreatedPoints_subSection_isOutfolded");
+ sP_defaultPosOffsetOfNewlyCreatedPoints_subSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_defaultPosOffsetOfNewlyCreatedPoints_subSection_isOutfolded.boolValue, "Default Position Offset", true);
+ if (sP_defaultPosOffsetOfNewlyCreatedPoints_subSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_definitionType_ofDefaultPosOffset = serializedObject.FindProperty("definitionType_ofDefaultPosOffset");
+ EditorGUILayout.PropertyField(sP_definitionType_ofDefaultPosOffset, new GUIContent("Offset source"));
+ switch (sP_definitionType_ofDefaultPosOffset.enumValueIndex)
+ {
+ case (int)BezierSplineDrawer.DefinitionType_ofDefaultPosOffset.straightExtentionOfCurveEnd:
+ SerializedProperty sP_distanceBetweenTriplets_forNewlyCreatedTriplets_caseOf_straightExtentionOfCurveEnd_inUnitsOfActiveDrawSpace = serializedObject.FindProperty("distanceBetweenTriplets_forNewlyCreatedTriplets_caseOf_straightExtentionOfCurveEnd_inUnitsOfActiveDrawSpace");
+ EditorGUILayout.PropertyField(sP_distanceBetweenTriplets_forNewlyCreatedTriplets_caseOf_straightExtentionOfCurveEnd_inUnitsOfActiveDrawSpace, new GUIContent("Distance"));
+ sP_distanceBetweenTriplets_forNewlyCreatedTriplets_caseOf_straightExtentionOfCurveEnd_inUnitsOfActiveDrawSpace.floatValue = Mathf.Max(sP_distanceBetweenTriplets_forNewlyCreatedTriplets_caseOf_straightExtentionOfCurveEnd_inUnitsOfActiveDrawSpace.floatValue, 0.0f);
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ break;
+ case (int)BezierSplineDrawer.DefinitionType_ofDefaultPosOffset.customOffset:
+ DrawSpecificationOf_customVector3_1("Custom offset value", false, null, false, false, true, false);
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawSectionWithDefaultOrientationOfNewlyCreatedPoints()
+ {
+ SerializedProperty sP_defaultRotOfNewlyCreatedPoints_subSection_isOutfolded = serializedObject.FindProperty("defaultRotOfNewlyCreatedPoints_subSection_isOutfolded");
+ sP_defaultRotOfNewlyCreatedPoints_subSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_defaultRotOfNewlyCreatedPoints_subSection_isOutfolded.boolValue, "Default Initial Orientation", true);
+ if (sP_defaultRotOfNewlyCreatedPoints_subSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_definitionType_ofDefaultRot = serializedObject.FindProperty("definitionType_ofDefaultRot");
+ EditorGUILayout.PropertyField(sP_definitionType_ofDefaultRot, new GUIContent("Orientation source"));
+ switch (sP_definitionType_ofDefaultRot.enumValueIndex)
+ {
+ case (int)BezierSplineDrawer.DefinitionType_ofDefaultRot.sameAsCurveEnd:
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ break;
+ case (int)BezierSplineDrawer.DefinitionType_ofDefaultRot.customOrientation:
+ DrawSpecificationOf_customVector3_2("Custom forward vector that defines the orientation", false, null, true, false, true, false);
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawSectionWithDefaultWeightDistancesOfNewlyCreatedPoints()
+ {
+ SerializedProperty sP_defaultWeightsOfNewlyCreatedPoints_subSection_isOutfolded = serializedObject.FindProperty("defaultWeightsOfNewlyCreatedPoints_subSection_isOutfolded");
+ sP_defaultWeightsOfNewlyCreatedPoints_subSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_defaultWeightsOfNewlyCreatedPoints_subSection_isOutfolded.boolValue, "Default Initial Weight Distances", true);
+ if (sP_defaultWeightsOfNewlyCreatedPoints_subSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_forwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace = serializedObject.FindProperty("forwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace");
+ EditorGUILayout.PropertyField(sP_forwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace, new GUIContent("Forward"));
+ sP_forwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace.floatValue = Mathf.Max(sP_forwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace.floatValue, 0.0f);
+
+ SerializedProperty sP_backwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace = serializedObject.FindProperty("backwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace");
+ EditorGUILayout.PropertyField(sP_backwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace, new GUIContent("Backward"));
+ sP_backwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace.floatValue = Mathf.Max(sP_backwardWeightDistance_ofNewlyCreatedPoints_inUnitsOfActiveDrawSpace.floatValue, 0.0f);
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawSectionWithDefaultJunctureTypeOfNewlyCreatedPoints()
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("junctureType_ofNewlyCreatedPoints"), new GUIContent("Default Juncture Type"));
+ }
+
+ void DrawHandlesSection()
+ {
+ SerializedProperty sP_handlesSection_isOutfolded = serializedObject.FindProperty("handlesSection_isOutfolded");
+ SerializedProperty sP_hideAllHandles = serializedObject.FindProperty("hideAllHandles");
+
+ Rect rect_ofHandlesHeadline = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight);
+ Rect rect_ofHandlesHeadlineFoldout = new Rect(rect_ofHandlesHeadline.x, rect_ofHandlesHeadline.y, EditorGUIUtility.singleLineHeight, rect_ofHandlesHeadline.height);
+ Rect rect_ofHandlesHeadlineTextWithCheckbox = new Rect(rect_ofHandlesHeadline.x, rect_ofHandlesHeadline.y, rect_ofHandlesHeadline.width, rect_ofHandlesHeadline.height);
+
+ sP_hideAllHandles.boolValue = !EditorGUI.ToggleLeft(rect_ofHandlesHeadlineTextWithCheckbox, new GUIContent("Handles"), !sP_hideAllHandles.boolValue);
+ sP_handlesSection_isOutfolded.boolValue = EditorGUI.Foldout(rect_ofHandlesHeadlineFoldout, sP_handlesSection_isOutfolded.boolValue, GUIContent.none, true);
+
+ if (sP_handlesSection_isOutfolded.boolValue == true)
+ {
+ EditorGUI.BeginDisabledGroup(sP_hideAllHandles.boolValue);
+ DrawHandlesSection_outfoldedPart();
+ EditorGUI.EndDisabledGroup();
+ }
+ }
+
+ void DrawHandlesSection_outfoldedPart()
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ GUIStyle labelStyle_withRichtext = new GUIStyle();
+
+ DrawPositionHandlesSection(labelStyle_withRichtext);
+ DrawRotationHandlesSection(labelStyle_withRichtext);
+ DrawCustomHandlesSection(labelStyle_withRichtext);
+ DrawPlusButtonHandleSection(labelStyle_withRichtext);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawPositionHandlesSection(GUIStyle labelStyle_withRichtext)
+ {
+ EditorGUILayout.LabelField("Move Position Handle (Unity style)", labelStyle_withRichtext);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_showHandleFor_position_atAnchors = serializedObject.FindProperty("showHandleFor_position_atAnchors");
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_showHandleFor_position_atAnchors, new GUIContent("At Anchor Points (show/size)"));
+ EditorGUI.BeginDisabledGroup(!sP_showHandleFor_position_atAnchors.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeFor_position_atAnchors"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ SerializedProperty sP_showHandleFor_position_atHelpers = serializedObject.FindProperty("showHandleFor_position_atHelpers");
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_showHandleFor_position_atHelpers, new GUIContent("At Helper Points (show/size)"));
+ EditorGUI.BeginDisabledGroup(!sP_showHandleFor_position_atHelpers.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeFor_position_atHelpers"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ bool drawSpaceIsLocal = (serializedObject.FindProperty("drawSpace").enumValueIndex == (int)BezierSplineDrawer.DrawSpace.localDefinedByThisGameobject);
+ bool positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal_chooserIsAvailable = (Tools.pivotRotation == PivotRotation.Global) && drawSpaceIsLocal;
+ string positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal_displayName = "Global orientation in local draw space";
+ if (positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal_chooserIsAvailable)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal"), new GUIContent(positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal_displayName, "If your Editor tool handle rotation is set to 'global' orientation, but you work in a local draw space for a spline then the question arises which space should be considered as 'global' in den local draw space and accordingly how the position handle should be displayed." + Environment.NewLine + Environment.NewLine + "Chose 'global space' if you want the position handles aligned with the global world space." + Environment.NewLine + Environment.NewLine + "Chose 'local draw space' if you want the position handles aligned with the local draw space."));
+ }
+ else
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal"), new GUIContent(positionHandleOrientation_forEditorPivotIsGlobal_butDrawSpaceIsLocal_displayName, "Only available if Editor tool handle rotation is set to 'global' and if draw space is 'local'."));
+ EditorGUI.EndDisabledGroup();
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+
+ void DrawRotationHandlesSection(GUIStyle labelStyle_withRichtext)
+ {
+ EditorGUILayout.LabelField("Rotate Handle (Unity style)", labelStyle_withRichtext);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_showHandleFor_rotation = serializedObject.FindProperty("showHandleFor_rotation");
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_showHandleFor_rotation, new GUIContent("Show / Size"));
+ EditorGUI.BeginDisabledGroup(!sP_showHandleFor_rotation.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeFor_rotation"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+
+ void DrawCustomHandlesSection(GUIStyle labelStyle_withRichtext)
+ {
+ EditorGUILayout.LabelField("Spline Custom Handles", labelStyle_withRichtext);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUILayout.LabelField("At Anchor Points");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ SerializedProperty sP_showCustomHandleFor_anchorPoints = serializedObject.FindProperty("showCustomHandleFor_anchorPoints");
+ EditorGUILayout.PropertyField(sP_showCustomHandleFor_anchorPoints, new GUIContent("Show"));
+ EditorGUI.BeginDisabledGroup(!sP_showCustomHandleFor_anchorPoints.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeOf_customHandle_atAnchors"), new GUIContent("Size"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_ofAnchorPoints"), new GUIContent("Color"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("At Helper Points");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ SerializedProperty sP_showCustomHandleFor_helperPoints = serializedObject.FindProperty("showCustomHandleFor_helperPoints");
+ EditorGUILayout.PropertyField(sP_showCustomHandleFor_helperPoints, new GUIContent("Show"));
+ EditorGUI.BeginDisabledGroup(!sP_showCustomHandleFor_helperPoints.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeOf_customHandle_atHelpers"), new GUIContent("Size"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_ofHelperPoints"), new GUIContent("Color"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+
+ void DrawPlusButtonHandleSection(GUIStyle labelStyle_withRichtext)
+ {
+ EditorGUILayout.LabelField("Add Point Buttons ('+')", labelStyle_withRichtext);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_showHandleFor_plusButtons_atSplineStartAndEnd = serializedObject.FindProperty("showHandleFor_plusButtons_atSplineStartAndEnd");
+ SerializedProperty sP_showHandleFor_plusButtons_insideSegments = serializedObject.FindProperty("showHandleFor_plusButtons_insideSegments");
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_showHandleFor_plusButtons_atSplineStartAndEnd, new GUIContent("At Start/End"));
+ EditorGUILayout.PropertyField(sP_showHandleFor_plusButtons_insideSegments, new GUIContent("Inside Curve"));
+ GUILayout.EndHorizontal();
+
+ bool atLeastOnePlusButtonOption_isChecked = (sP_showHandleFor_plusButtons_atSplineStartAndEnd.boolValue || sP_showHandleFor_plusButtons_insideSegments.boolValue);
+ EditorGUI.BeginDisabledGroup(!atLeastOnePlusButtonOption_isChecked);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("handleSizeOf_plusButtons"), new GUIContent("Size"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/BezierSplineDrawerInspector.cs.meta b/Editor/DrawDebugLibrary/BezierSplineDrawerInspector.cs.meta
new file mode 100644
index 0000000..27cbe97
--- /dev/null
+++ b/Editor/DrawDebugLibrary/BezierSplineDrawerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b691e94b05b382f4f81ba347a6cdc463
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/BoundsVisualizerInspector.cs b/Editor/DrawDebugLibrary/BoundsVisualizerInspector.cs
new file mode 100644
index 0000000..42b95cc
--- /dev/null
+++ b/Editor/DrawDebugLibrary/BoundsVisualizerInspector.cs
@@ -0,0 +1,80 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(BoundsVisualizer))]
+ [CanEditMultipleObjects]
+ public class BoundsVisualizerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("bounds");
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("global"), new GUIContent("Global"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("local"), new GUIContent("Local"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("includeChildren"), new GUIContent("Include children"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineWidth"), new GUIContent("Line width"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color"));
+
+ DrawTextSpecs();
+ DrawCheckboxFor_drawOnlyIfSelected("bounds");
+ DrawCheckboxFor_hiddenByNearerObjects("bounds");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+
+ void DrawTextSpecs()
+ {
+ //-> this fakes the appearance of beeing inside the parents text specification foldout
+ bool emptyLineAtEndIfOutfolded = false;
+ DrawTextInputInclMarkupHelper(true, false, null, emptyLineAtEndIfOutfolded);
+
+ if (serializedObject.FindProperty("textSection_isOutfolded").boolValue == true)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ DrawTextSizeContentChooser();
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawTextSizeContentChooser()
+ {
+ EditorGUILayout.LabelField("Text Size");
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_attachedTextsizeReferenceContext = serializedObject.FindProperty("attachedTextsizeReferenceContext");
+ EditorGUILayout.PropertyField(sP_attachedTextsizeReferenceContext, new GUIContent("Relative to"));
+
+ switch (sP_attachedTextsizeReferenceContext.enumValueIndex)
+ {
+ case (int)BoundsVisualizer.AttachedTextsizeReferenceContext.extentOfBounds:
+ break;
+ case (int)BoundsVisualizer.AttachedTextsizeReferenceContext.globalSpace:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value"), new GUIContent("Size per letter", "Text size in world units"));
+ break;
+ case (int)BoundsVisualizer.AttachedTextsizeReferenceContext.sceneViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value_relToScreen"), new GUIContent("Size per letter", "Text size relative to Scene View window size."));
+ break;
+ case (int)BoundsVisualizer.AttachedTextsizeReferenceContext.gameViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value_relToScreen"), new GUIContent("Size per letter", "Text size relative to Game View window size."));
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/BoundsVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/BoundsVisualizerInspector.cs.meta
new file mode 100644
index 0000000..02856ad
--- /dev/null
+++ b/Editor/DrawDebugLibrary/BoundsVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3611eb08e76a83842b6187c3a4685787
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/CameraGridVisualizerInspector.cs b/Editor/DrawDebugLibrary/CameraGridVisualizerInspector.cs
new file mode 100644
index 0000000..8728822
--- /dev/null
+++ b/Editor/DrawDebugLibrary/CameraGridVisualizerInspector.cs
@@ -0,0 +1,35 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(CameraGridVisualizer))]
+ [CanEditMultipleObjects]
+ public class CameraGridVisualizerInspector : VisualizerScreenspaceParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("camera grid");
+ if (DrawCameraChooser(false))
+ {
+ GUILayout.Space(0.75f * EditorGUIUtility.singleLineHeight);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("linesWidth_relToViewportHeight"), new GUIContent("Lines width", "This is relative to the viewport height."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawTenthLines"), new GUIContent("Lines at Tenth"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawHundredthLines"), new GUIContent("Lines at Hundredth"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("gridScreenspaceMode"), new GUIContent("Mode"));
+ DrawCheckboxFor_drawOnlyIfSelected("camera grid");
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/CameraGridVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/CameraGridVisualizerInspector.cs.meta
new file mode 100644
index 0000000..708e394
--- /dev/null
+++ b/Editor/DrawDebugLibrary/CameraGridVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e93c9ee53e4716946ada024cdba5e0bb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/CameraVisualizerInspector.cs b/Editor/DrawDebugLibrary/CameraVisualizerInspector.cs
new file mode 100644
index 0000000..98c26da
--- /dev/null
+++ b/Editor/DrawDebugLibrary/CameraVisualizerInspector.cs
@@ -0,0 +1,156 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(CameraVisualizer))]
+ [CanEditMultipleObjects]
+ public class CameraVisualizerInspector : VisualizerScreenspaceParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("camera");
+ if (DrawCameraChooser(false))
+ {
+ GUILayout.Space(0.75f * EditorGUIUtility.singleLineHeight);
+
+ DrawCameraSpecs();
+ DrawFrustumSpecs();
+
+ DrawTextSpecs();
+ DrawCheckboxFor_drawOnlyIfSelected("camera");
+ DrawCheckboxFor_hiddenByNearerObjects("camera");
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawCameraSpecs()
+ {
+ SerializedProperty sP_drawCamera = serializedObject.FindProperty("drawCamera");
+ EditorGUILayout.PropertyField(sP_drawCamera, new GUIContent("Draw camera"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUI.BeginDisabledGroup(!sP_drawCamera.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("linesWidth_camera"), new GUIContent("Lines width"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_ofCamera_enabledCam"), new GUIContent("Color (enabled)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_ofCamera_disabledCam"), new GUIContent("Color (disabled)"));
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.75f * EditorGUIUtility.singleLineHeight);
+ }
+
+ void DrawFrustumSpecs()
+ {
+ SerializedProperty sP_drawFrustum = serializedObject.FindProperty("drawFrustum");
+ EditorGUILayout.PropertyField(sP_drawFrustum, new GUIContent("Draw frustum"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUI.BeginDisabledGroup(!sP_drawFrustum.boolValue);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("linesWidth_frustum"), new GUIContent("Lines width (edges)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_ofFrustum_enabledCam"), new GUIContent("Color (enabled)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_ofFrustum_disabledCam"), new GUIContent("Color (disabled)"));
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("Boundary planes:");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("alphaFactor_forBoundarySurfaceLines"), new GUIContent("Alpha factor"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("linesPerBoundarySurface"), new GUIContent("Thin Lines (per plane)"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ DrawSectionFor_additionalFlexibleHighlighterPlane();
+
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.75f * EditorGUIUtility.singleLineHeight);
+ }
+
+
+ void DrawSectionFor_additionalFlexibleHighlighterPlane()
+ {
+ EditorGUILayout.LabelField("Additional flexible highlighted Plane:");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_highlightedPlaneDefintionType = serializedObject.FindProperty("highlightedPlaneDefintionType");
+ EditorGUILayout.PropertyField(sP_highlightedPlaneDefintionType, GUIContent.none);
+
+ switch (sP_highlightedPlaneDefintionType.enumValueIndex)
+ {
+ case (int)CameraVisualizer.HighlightedPlaneDefintionType.disabled:
+ break;
+ case (int)CameraVisualizer.HighlightedPlaneDefintionType.definedByDistanceFromCamera:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("distanceOfHighlightedPlane"), new GUIContent("Distance", "The additional flexible highlighted plane is only drawn if its 'Distance' is at least the cameras near clip plane distance."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawFrustumsHighlightedPlaneAlsoIfFarerThanFarClipPlane"), new GUIContent("Draw if farer than far clip plane", "This specifies whether the flexible plane should also be drawn if it is farer than the cameras far clip plane."));
+ DrawChooserLineFor_overwriteColorForFrustumsHighlightedPlane();
+ break;
+ case (int)CameraVisualizer.HighlightedPlaneDefintionType.definedByAPosition:
+ SerializedProperty sP_highlightedPlaneViaPosDefintionType = serializedObject.FindProperty("highlightedPlaneViaPosDefintionType");
+ EditorGUILayout.PropertyField(sP_highlightedPlaneViaPosDefintionType, new GUIContent("Plane Anchor Source"));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ switch (sP_highlightedPlaneViaPosDefintionType.enumValueIndex)
+ {
+ case (int)CameraVisualizer.HighlightedPlaneViaPosDefintionType.fixedPosition:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("vector3_thatSpecifiesThePosOfTheAdditionalFrustumPlane"),new GUIContent("Position that the flexible plane should contain", "This doesn't have to be inside the frustum itself, but the flexible plane will only be drawn if this position is not behind the near clip plane of the camera."));
+ break;
+ case (int)CameraVisualizer.HighlightedPlaneViaPosDefintionType.gameobject:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("gameobject_thatSpecifiesThePosOfTheAdditionalFrustumPlane"), new GUIContent("Gameobject that the flexible plane should contain", "This doesn't have to be inside the frustum itself, but the flexible plane will only be drawn if this position is not behind the near clip plane of the camera."));
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("distanceOfHighlightedPlane_offsetFromPosition"), new GUIContent("Additional offset along Cameras View Direction", "This shifts the plane to farer or nearer relative to the position. The additional flexible highlighted plane is only drawn if the final distance is at least the cameras near clip plane distance."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawFrustumsHighlightedPlaneAlsoIfFarerThanFarClipPlane"), new GUIContent("Draw if farer than far clip plane", "This specifies whether the flexible plane should also be drawn if it is farer than the cameras far clip plane."));
+ DrawChooserLineFor_overwriteColorForFrustumsHighlightedPlane();
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawChooserLineFor_overwriteColorForFrustumsHighlightedPlane()
+ {
+ EditorGUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("doOverwriteColorForFrustumsHighlightedPlane"), new GUIContent("Custom Plane Color", "The default color of highlighted planes is the frustum color, but with an adjusted brightness. Though you can overwrite the color here."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColorForFrustumsHighlightedPlane"), GUIContent.none);
+ EditorGUILayout.EndHorizontal();
+ }
+
+ void DrawTextSpecs()
+ {
+ //-> this fakes the appearance of beeing inside the parents text specification foldout
+ bool emptyLineAtEndIfOutfolded = false;
+ DrawTextInputInclMarkupHelper(true, false, null, emptyLineAtEndIfOutfolded);
+
+ if (serializedObject.FindProperty("textSection_isOutfolded").boolValue == true)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forceTextOnNearPlaneUnmirroredTowardsCam"), new GUIContent("Force text to be unmirrored towards visualized camera", "This overwrites the global behaviour where text always appear unmirrored in the observer camera, which could e.g. be the Scene view camera instead of the herewith visualized camera."));
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/CameraVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/CameraVisualizerInspector.cs.meta
new file mode 100644
index 0000000..299b926
--- /dev/null
+++ b/Editor/DrawDebugLibrary/CameraVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3c16326d74184b34b99f4bd7b7c16424
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/Charts.meta b/Editor/DrawDebugLibrary/Charts.meta
new file mode 100644
index 0000000..5a9d34a
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 35fad28634e0421408fbf6e31f9b06d4
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/Charts/DrawXXL-chart-editor.asmref b/Editor/DrawDebugLibrary/Charts/DrawXXL-chart-editor.asmref
new file mode 100644
index 0000000..6d1f4ce
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/DrawXXL-chart-editor.asmref
@@ -0,0 +1,3 @@
+{
+ "reference": "GUID:4cba057b890ab8f49bdbfaa6f02fc72c"
+}
\ No newline at end of file
diff --git a/Editor/DrawDebugLibrary/Charts/DrawXXL-chart-editor.asmref.meta b/Editor/DrawDebugLibrary/Charts/DrawXXL-chart-editor.asmref.meta
new file mode 100644
index 0000000..831aec7
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/DrawXXL-chart-editor.asmref.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: fb976d5e51c5a1f448390889bfdabc47
+AssemblyDefinitionReferenceImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/Charts/DrawXXLChartInspector_Inspector.cs b/Editor/DrawDebugLibrary/Charts/DrawXXLChartInspector_Inspector.cs
new file mode 100644
index 0000000..c825646
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/DrawXXLChartInspector_Inspector.cs
@@ -0,0 +1,588 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(DrawXXLChartInspector))]
+ public class DrawXXLChartInspector_Inspector : Editor
+ {
+ DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB;
+
+ GUIContent checkmarkSymbol;
+ GUIContent crossSymbol;
+ GUIContent magnifierGlassSymbol_atXAxis;
+ GUIContent magnifierGlassSymbol_atYAxis;
+ GUIContent magnifierGlassSymbol_forBothAxes;
+ GUIContent handSymbol_atXAxis;
+ GUIContent handSymbol_atYAxis;
+ GUIContent handSymbol_forBothAxes;
+
+ float travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_zoomXAxisHandle = 0.0f;
+ float travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_zoomYAxisHandle = 0.0f;
+ float travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_forZoomBothAxesHandle = 0.0f;
+ float travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_dragXAxisHandle = 0.0f;
+ float travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_dragYAxisHandle = 0.0f;
+ float travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown_for_unifiedDragHandle = 0.0f;
+ float travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown_for_unifiedDragHandle = 0.0f;
+
+ float sizeFactor_forBacksnappingConeCaps = 1.0f;
+ float sizeFactor_forBacksnappingCylinderCaps = 0.8f;
+ float sizeFactor_forBacksnappingSphereCaps = 1.0f;
+
+ float distanceFromAnchorPosFactor_forBacksnappingConeCaps = -0.5f;
+ float distanceFromAnchorPosFactor_forBacksnappingCylinderCaps = -1.7f;
+
+ float sizeFactor_forCheckmarkIcon = 0.5f;
+ float sizeFactor_forCrossIcon = 0.5f;
+ float sizeFactor_forHandIcon_onConesAndSpheres = 0.42f;
+ float sizeFactor_forMagnifierGlassIcons_onCylinders = 0.5f;
+
+ void OnEnable()
+ {
+ theDrawXXLChartInspector_unserializedMonoB = (DrawXXLChartInspector)target;
+
+ //credits to https://github.com/Zxynine/UnityEditorIcons
+ string tooltip_forCheckbox = "If this is selected then the axis scaling will be automatically updated, so that all active lines are always fully displayed, also if new values are added." + Environment.NewLine + Environment.NewLine + "This setting gets auto-deactivated as soon as you drag one of the manual scale sliders.";
+ checkmarkSymbol = EditorGUIUtility.IconContent("FilterSelectedOnly@2x", tooltip_forCheckbox);
+ crossSymbol = EditorGUIUtility.IconContent("winbtn_win_close@2x", tooltip_forCheckbox);
+ magnifierGlassSymbol_atXAxis = EditorGUIUtility.IconContent("ViewToolZoom@2x", "Drag this to zoom only the X axis.");
+ magnifierGlassSymbol_atYAxis = EditorGUIUtility.IconContent("ViewToolZoom@2x", "Drag this to zoom only the Y axis.");
+ magnifierGlassSymbol_forBothAxes = EditorGUIUtility.IconContent("ViewToolZoom@2x", "Drag this to zoom both axes.");
+ handSymbol_atXAxis = EditorGUIUtility.IconContent("ViewToolMove@2x", "Drag this to scroll only the X axis.");
+ handSymbol_atYAxis = EditorGUIUtility.IconContent("ViewToolMove@2x", "Drag this to scroll only the Y axis.");
+ handSymbol_forBothAxes = EditorGUIUtility.IconContent("ViewToolMove@2x", "Drag this to scroll both axes.");
+ }
+
+ public void OnSceneGUI()
+ {
+ if (theDrawXXLChartInspector_unserializedMonoB.hideHandles_andInsteadUseInspectorSlidersForZoomAndScroll == false)
+ {
+ theDrawXXLChartInspector_unserializedMonoB.TryNote_chartWorldSpacePosRotScale_beforeChangingItToScreenspace();
+ try
+ {
+ if (theDrawXXLChartInspector_unserializedMonoB.theChartIsDrawnInScreenspace) { UtilitiesDXXL_ChartDrawing.SetPosRotScaleOfChart_toScreenspace(theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo, theDrawXXLChartInspector_unserializedMonoB.screenSpaceTargetCamera, theDrawXXLChartInspector_unserializedMonoB.chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight, true); }
+
+ DrawCursorSliders();
+ float sizeOfHandleCaps = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.xAxis.Get_fixedConeLength_forBothAxisVectors();
+ DrawScrollSliderAsConeAtXAxis(sizeOfHandleCaps);
+ DrawScrollSliderAsConeAtYAxis(sizeOfHandleCaps);
+ DrawScrollSliderAsSphereAtUnifiedAxis(sizeOfHandleCaps);
+ DrawZoomSliderAsCylinderAtXAxis(sizeOfHandleCaps);
+ DrawZoomSliderAsCylinderAtYAxis(sizeOfHandleCaps);
+ DrawZoomSliderAsCylinderAtUnifiedAxis(sizeOfHandleCaps);
+ DrawCheckboxFor_showAllValues(sizeOfHandleCaps);
+ }
+ catch { }
+ theDrawXXLChartInspector_unserializedMonoB.TrySetBack_chartWorldSpacePosRotScale_afterUsingItInScreenspace();
+ }
+ }
+
+ void DrawCursorSliders()
+ {
+ DrawACursorSlider(true, true);
+ }
+
+ void DrawACursorSlider(bool isAtLowerEndOfCursorsVertLine_notAtUpperEnd, bool tryOtherCursorSlider_ifThisCursorSliderDoesntReportAnyChange)
+ {
+ float worldSpaceDistanceAlongXAxis_measuredFromYAxis_beforeDrag = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Width_inWorldSpace * theDrawXXLChartInspector_unserializedMonoB.curr_cursorPosition_as0to1OfChartWidth;
+
+ EditorGUI.BeginChangeCheck();
+ float worldSpaceDistanceAlongXAxis_measuredFromYAxis_afterDrag = InternalDXXL_ChartHandles.CursorSlider(isAtLowerEndOfCursorsVertLine_notAtUpperEnd, worldSpaceDistanceAlongXAxis_measuredFromYAxis_beforeDrag, theDrawXXLChartInspector_unserializedMonoB);
+ bool hasChanged = EditorGUI.EndChangeCheck();
+
+ if (hasChanged)
+ {
+ UpdateCursorPos0to1(worldSpaceDistanceAlongXAxis_measuredFromYAxis_afterDrag);
+ }
+ else
+ {
+ if (tryOtherCursorSlider_ifThisCursorSliderDoesntReportAnyChange)
+ {
+ DrawACursorSlider(!isAtLowerEndOfCursorsVertLine_notAtUpperEnd, false);
+ }
+ }
+ }
+
+ void UpdateCursorPos0to1(float worldSpaceDistanceAlongXAxis_measuredFromYAxis_afterDrag)
+ {
+ float new_cursorPosition_as0to1OfChartWidth = worldSpaceDistanceAlongXAxis_measuredFromYAxis_afterDrag / theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Width_inWorldSpace;
+ theDrawXXLChartInspector_unserializedMonoB.ForceCursorSliders_toFitGiven0to1XPos(new_cursorPosition_as0to1OfChartWidth);
+ }
+
+ void DrawScrollSliderAsConeAtXAxis(float sizeOfHandleCaps)
+ {
+ float distanceFromAnchorPos = distanceFromAnchorPosFactor_forBacksnappingConeCaps * sizeOfHandleCaps;
+ Vector3 sliderDirection_worldSpace_normalized = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.xAxis.AxisVector_normalized_inWorldSpace;
+ Vector3 restingPosition = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Position_worldspace + theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.xAxis.AxisVector_inWorldSpace + sliderDirection_worldSpace_normalized * distanceFromAnchorPos;
+ Handles.CapFunction capFunction = Handles.ConeHandleCap;
+ float capSizeScaleFactor = sizeFactor_forBacksnappingConeCaps;
+ GUIContent icon = handSymbol_atXAxis;
+ float iconSizeFactor = sizeFactor_forHandIcon_onConesAndSpheres;
+ Vector2 iconPositionOffset_inScreenspace_relToHandleCapSize = new Vector2(-0.45f, 0.2f); //-> manually shifting the icon, so it appears centered over the handle cap.
+
+ EditorGUI.BeginChangeCheck();
+ travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_dragXAxisHandle = InternalDXXL_ChartHandles.OneDirectionalBacksnapSlider(travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_dragXAxisHandle, restingPosition, theDrawXXLChartInspector_unserializedMonoB, sliderDirection_worldSpace_normalized, capFunction, capSizeScaleFactor, icon, iconSizeFactor, iconPositionOffset_inScreenspace_relToHandleCapSize, false, false);
+ bool hasChanged = EditorGUI.EndChangeCheck();
+
+ if (hasChanged)
+ {
+ theDrawXXLChartInspector_unserializedMonoB.alwaysEncapsulateAllValues = false;
+ theDrawXXLChartInspector_unserializedMonoB.scrollSinceMouseDown_fromOnlyXDimHandleSlider_asTravelledWorldSpaceDistanceAlongSliderDirection = travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_dragXAxisHandle;
+ }
+ else
+ {
+ if (GUIUtility.hotControl == 0)
+ {
+ travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_dragXAxisHandle = 0.0f;
+ theDrawXXLChartInspector_unserializedMonoB.scrollSinceMouseDown_fromOnlyXDimHandleSlider_asTravelledWorldSpaceDistanceAlongSliderDirection = 0.0f;
+ }
+ }
+
+ }
+
+ void DrawScrollSliderAsConeAtYAxis(float sizeOfHandleCaps)
+ {
+ float distanceFromAnchorPos = distanceFromAnchorPosFactor_forBacksnappingConeCaps * sizeOfHandleCaps;
+ Vector3 sliderDirection_worldSpace_normalized = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.yAxis.AxisVector_normalized_inWorldSpace;
+ Vector3 restingPosition = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Position_worldspace + theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.yAxis.AxisVector_inWorldSpace + sliderDirection_worldSpace_normalized * distanceFromAnchorPos;
+ Handles.CapFunction capFunction = Handles.ConeHandleCap;
+ float capSizeScaleFactor = sizeFactor_forBacksnappingConeCaps;
+ GUIContent icon = handSymbol_atYAxis;
+ float iconSizeFactor = sizeFactor_forHandIcon_onConesAndSpheres;
+ Vector2 iconPositionOffset_inScreenspace_relToHandleCapSize = new Vector2(-0.23f, 0.0f); //-> manually shifting the icon, so it appears centered over the handle cap.
+
+ EditorGUI.BeginChangeCheck();
+ travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_dragYAxisHandle = InternalDXXL_ChartHandles.OneDirectionalBacksnapSlider(travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_dragYAxisHandle, restingPosition, theDrawXXLChartInspector_unserializedMonoB, sliderDirection_worldSpace_normalized, capFunction, capSizeScaleFactor, icon, iconSizeFactor, iconPositionOffset_inScreenspace_relToHandleCapSize, false, false);
+ bool hasChanged = EditorGUI.EndChangeCheck();
+
+ if (hasChanged)
+ {
+ theDrawXXLChartInspector_unserializedMonoB.alwaysEncapsulateAllValues = false;
+ theDrawXXLChartInspector_unserializedMonoB.scrollSinceMouseDown_fromOnlyYDimHandleSlider_asTravelledWorldSpaceDistanceAlongSliderDirection = travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_dragYAxisHandle;
+ }
+ else
+ {
+ if (GUIUtility.hotControl == 0)
+ {
+ travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_dragYAxisHandle = 0.0f;
+ theDrawXXLChartInspector_unserializedMonoB.scrollSinceMouseDown_fromOnlyYDimHandleSlider_asTravelledWorldSpaceDistanceAlongSliderDirection = 0.0f;
+ }
+ }
+ }
+
+ void DrawScrollSliderAsSphereAtUnifiedAxis(float sizeOfHandleCaps)
+ {
+ float distanceFromAnchorPos = 2.3f * sizeOfHandleCaps;
+ Vector3 unified45degAxis_forHandleSliders_normalized = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Get_unified45degAxis_forHandleSliders_normalized();
+ Vector3 restingPosition = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Position_worldspace + unified45degAxis_forHandleSliders_normalized * distanceFromAnchorPos;
+ float capSizeScaleFactor = sizeFactor_forBacksnappingSphereCaps;
+ GUIContent icon = handSymbol_forBothAxes;
+ float iconSizeFactor = sizeFactor_forMagnifierGlassIcons_onCylinders;
+ Vector2 iconPositionOffset_inScreenspace_relToHandleCapSize = new Vector2(-0.25f, 0.25f); //-> manually shifting the icon, so it appears centered over the handle cap.
+
+ EditorGUI.BeginChangeCheck();
+ InternalDXXL_ChartHandles.TwoDirectionalBacksnapSlider(ref travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown_for_unifiedDragHandle, ref travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown_for_unifiedDragHandle, restingPosition, theDrawXXLChartInspector_unserializedMonoB, capSizeScaleFactor, icon, iconSizeFactor, iconPositionOffset_inScreenspace_relToHandleCapSize);
+ bool hasChanged = EditorGUI.EndChangeCheck();
+
+ if (hasChanged)
+ {
+ theDrawXXLChartInspector_unserializedMonoB.alwaysEncapsulateAllValues = false;
+ theDrawXXLChartInspector_unserializedMonoB.scrollSinceMouseDown_fromUnifiedHandleSlider_asTravelledWorldSpaceDistanceAlongChartsXDirection = travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown_for_unifiedDragHandle;
+ theDrawXXLChartInspector_unserializedMonoB.scrollSinceMouseDown_fromUnifiedHandleSlider_asTravelledWorldSpaceDistanceAlongChartsYDirection = travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown_for_unifiedDragHandle;
+ }
+ else
+ {
+ if (GUIUtility.hotControl == 0)
+ {
+ travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown_for_unifiedDragHandle = 0.0f;
+ travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown_for_unifiedDragHandle = 0.0f;
+ theDrawXXLChartInspector_unserializedMonoB.scrollSinceMouseDown_fromUnifiedHandleSlider_asTravelledWorldSpaceDistanceAlongChartsXDirection = 0.0f;
+ theDrawXXLChartInspector_unserializedMonoB.scrollSinceMouseDown_fromUnifiedHandleSlider_asTravelledWorldSpaceDistanceAlongChartsYDirection = 0.0f;
+ }
+ }
+ }
+
+ void DrawZoomSliderAsCylinderAtXAxis(float sizeOfHandleCaps)
+ {
+ float distanceFromAnchorPos = distanceFromAnchorPosFactor_forBacksnappingCylinderCaps * sizeOfHandleCaps;
+ Vector3 sliderDirection_worldSpace_normalized = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.xAxis.AxisVector_normalized_inWorldSpace;
+ Vector3 restingPosition = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Position_worldspace + theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.xAxis.AxisVector_inWorldSpace + sliderDirection_worldSpace_normalized * distanceFromAnchorPos;
+ Handles.CapFunction capFunction = Handles.CylinderHandleCap;
+ float capSizeScaleFactor = sizeFactor_forBacksnappingCylinderCaps;
+ GUIContent icon = magnifierGlassSymbol_atXAxis;
+ float iconSizeFactor = sizeFactor_forHandIcon_onConesAndSpheres;
+ Vector2 iconPositionOffset_inScreenspace_relToHandleCapSize = new Vector2(-0.22f, 0.2f); //-> manually shifting the icon, so it appears centered over the handle cap.
+
+ EditorGUI.BeginChangeCheck();
+ travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_zoomXAxisHandle = InternalDXXL_ChartHandles.OneDirectionalBacksnapSlider(travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_zoomXAxisHandle, restingPosition, theDrawXXLChartInspector_unserializedMonoB, sliderDirection_worldSpace_normalized, capFunction, capSizeScaleFactor, icon, iconSizeFactor, iconPositionOffset_inScreenspace_relToHandleCapSize, false, true);
+ bool hasChanged = EditorGUI.EndChangeCheck();
+
+ if (hasChanged)
+ {
+ theDrawXXLChartInspector_unserializedMonoB.alwaysEncapsulateAllValues = false;
+ float zoomWeight_m1_to_p1 = travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_zoomXAxisHandle / theDrawXXLChartInspector_unserializedMonoB.GetBacksnapSliderReferenceLength_inWorldspaceUnits();
+ theDrawXXLChartInspector_unserializedMonoB.xAxisZoomSinceMouseDown_fromHandleSlider_m1_to_p1 = zoomWeight_m1_to_p1;
+ }
+ else
+ {
+ if (GUIUtility.hotControl == 0)
+ {
+ travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_zoomXAxisHandle = 0.0f;
+ theDrawXXLChartInspector_unserializedMonoB.xAxisZoomSinceMouseDown_fromHandleSlider_m1_to_p1 = 0.0f;
+ }
+ }
+ }
+
+ void DrawZoomSliderAsCylinderAtYAxis(float sizeOfHandleCaps)
+ {
+ float distanceFromAnchorPos = distanceFromAnchorPosFactor_forBacksnappingCylinderCaps * sizeOfHandleCaps;
+ Vector3 sliderDirection_worldSpace_normalized = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.yAxis.AxisVector_normalized_inWorldSpace;
+ Vector3 restingPosition = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Position_worldspace + theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.yAxis.AxisVector_inWorldSpace + sliderDirection_worldSpace_normalized * distanceFromAnchorPos;
+ Handles.CapFunction capFunction = Handles.CylinderHandleCap;
+ float capSizeScaleFactor = sizeFactor_forBacksnappingCylinderCaps;
+ GUIContent icon = magnifierGlassSymbol_atYAxis;
+ float iconSizeFactor = sizeFactor_forMagnifierGlassIcons_onCylinders;
+ Vector2 iconPositionOffset_inScreenspace_relToHandleCapSize = new Vector2(-0.23f, 0.24f); //-> manually shifting the icon, so it appears centered over the handle cap.
+
+ EditorGUI.BeginChangeCheck();
+ travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_zoomYAxisHandle = InternalDXXL_ChartHandles.OneDirectionalBacksnapSlider(travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_zoomYAxisHandle, restingPosition, theDrawXXLChartInspector_unserializedMonoB, sliderDirection_worldSpace_normalized, capFunction, capSizeScaleFactor, icon, iconSizeFactor, iconPositionOffset_inScreenspace_relToHandleCapSize, false, true);
+ bool hasChanged = EditorGUI.EndChangeCheck();
+
+ if (hasChanged)
+ {
+ theDrawXXLChartInspector_unserializedMonoB.alwaysEncapsulateAllValues = false;
+ float zoomWeight_m1_to_p1 = travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_zoomYAxisHandle / theDrawXXLChartInspector_unserializedMonoB.GetBacksnapSliderReferenceLength_inWorldspaceUnits();
+ theDrawXXLChartInspector_unserializedMonoB.yAxisZoomSinceMouseDown_fromHandleSlider_m1_to_p1 = zoomWeight_m1_to_p1;
+ }
+ else
+ {
+ if (GUIUtility.hotControl == 0)
+ {
+ travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_zoomYAxisHandle = 0.0f;
+ theDrawXXLChartInspector_unserializedMonoB.yAxisZoomSinceMouseDown_fromHandleSlider_m1_to_p1 = 0.0f;
+ }
+ }
+ }
+
+ void DrawZoomSliderAsCylinderAtUnifiedAxis(float sizeOfHandleCaps)
+ {
+ float distanceFromAnchorPos = 1.0f * sizeOfHandleCaps;
+ Vector3 sliderDirection_worldSpace_normalized = -theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Get_unified45degAxis_forHandleSliders_normalized();
+ Vector3 restingPosition = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Position_worldspace - sliderDirection_worldSpace_normalized * distanceFromAnchorPos;
+ Handles.CapFunction capFunction = Handles.CylinderHandleCap;
+ float capSizeScaleFactor = sizeFactor_forBacksnappingCylinderCaps;
+ GUIContent icon = magnifierGlassSymbol_forBothAxes;
+ float iconSizeFactor = sizeFactor_forMagnifierGlassIcons_onCylinders;
+ Vector2 iconPositionOffset_inScreenspace_relToHandleCapSize = new Vector2(-0.25f, 0.25f); //-> manually shifting the icon, so it appears centered over the handle cap.
+
+ EditorGUI.BeginChangeCheck();
+ travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_forZoomBothAxesHandle = InternalDXXL_ChartHandles.OneDirectionalBacksnapSlider(travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_forZoomBothAxesHandle, restingPosition, theDrawXXLChartInspector_unserializedMonoB, sliderDirection_worldSpace_normalized, capFunction, capSizeScaleFactor, icon, iconSizeFactor, iconPositionOffset_inScreenspace_relToHandleCapSize, false, true);
+ bool hasChanged = EditorGUI.EndChangeCheck();
+
+ if (hasChanged)
+ {
+ theDrawXXLChartInspector_unserializedMonoB.alwaysEncapsulateAllValues = false;
+ float zoomWeight_m1_to_p1 = travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_forZoomBothAxesHandle / theDrawXXLChartInspector_unserializedMonoB.GetBacksnapSliderReferenceLength_inWorldspaceUnits();
+ theDrawXXLChartInspector_unserializedMonoB.bothAxesZoomSinceMouseDown_fromHandleSlider_m1_to_p1 = zoomWeight_m1_to_p1;
+ }
+ else
+ {
+ if (GUIUtility.hotControl == 0)
+ {
+ travelledWorldSpaceDistanceAlongSliderDirection_sinceMouseDown_for_forZoomBothAxesHandle = 0.0f;
+ theDrawXXLChartInspector_unserializedMonoB.bothAxesZoomSinceMouseDown_fromHandleSlider_m1_to_p1 = 0.0f;
+ }
+ }
+ }
+
+ void DrawCheckboxFor_showAllValues(float sizeOfHandleCaps)
+ {
+ float distanceFromAnchorPos = 3.6f * sizeOfHandleCaps;
+ Vector3 unified45degAxis_forHandleSliders_normalized = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Get_unified45degAxis_forHandleSliders_normalized();
+ Vector3 position = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Position_worldspace + unified45degAxis_forHandleSliders_normalized * distanceFromAnchorPos;
+ Vector2 checkmarkIconPositionOffset_inScreenspace_relToHandleCapSize = new Vector2(-0.25f, 0.25f); //-> manually shifting the icon, so it appears centered over the handle cap.
+ Vector2 crossIconPositionOffset_inScreenspace_relToHandleCapSize = new Vector2(-0.25f, 0.25f); //-> manually shifting the icon, so it appears centered over the handle cap.
+
+ bool checkmarkState_before = theDrawXXLChartInspector_unserializedMonoB.alwaysEncapsulateAllValues;
+ bool checkmarkState_after = InternalDXXL_ChartHandles.ShowAllButton(checkmarkState_before, position, theDrawXXLChartInspector_unserializedMonoB, sizeFactor_forBacksnappingSphereCaps, checkmarkSymbol, crossSymbol, sizeFactor_forCheckmarkIcon, sizeFactor_forCrossIcon, checkmarkIconPositionOffset_inScreenspace_relToHandleCapSize, crossIconPositionOffset_inScreenspace_relToHandleCapSize);
+ theDrawXXLChartInspector_unserializedMonoB.alwaysEncapsulateAllValues = checkmarkState_after;
+ }
+
+ public override void OnInspectorGUI()
+ {
+ if (theDrawXXLChartInspector_unserializedMonoB.CheckIfReferencedChartGotLost())
+ {
+ EditorGUILayout.HelpBox("The ChartDrawing that should be displayed with this component got lost for some reason, which normally leads to the automatic deletion of the whole gameobject." + Environment.NewLine + Environment.NewLine + "This gameobject has not been automatically deleted though, because it seems to host other components or has childs or parents attached." + Environment.NewLine + Environment.NewLine + "You can delete this component if you don't need it anymore. If you want to continue inspecting the chart then create a new chart inspector component via 'chartThatYouWantToInspect.CreateChartInspectionGameobject()'.", MessageType.Info, true);
+ }
+ else
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ GUIStyle style_forFoldoutWithBoldText = new GUIStyle(EditorStyles.foldout);
+ style_forFoldoutWithBoldText.fontStyle = FontStyle.Bold;
+
+ DrawConsumedLines();
+ DrawHandles_andOptionallyZoomAndAxisScaling(style_forFoldoutWithBoldText);
+ DrawSection_sceneViewCamera(style_forFoldoutWithBoldText);
+ DrawSection_other(style_forFoldoutWithBoldText);
+ DrawSection_lines();
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+ }
+
+ void DrawConsumedLines()
+ {
+ SerializedProperty sP_drawnLinesPerPass = serializedObject.FindProperty("drawnSmallStraightLines_duringLastDrawRun");
+ GUIStyle style_ofConsumedLinesLabel = new GUIStyle();
+ style_ofConsumedLinesLabel.richText = true;
+ float allowedConsumedLines_0to1 = (float)sP_drawnLinesPerPass.intValue / (float)DrawBasics.MaxAllowedDrawnLinesPerFrame;
+ float hueValueOfColor = 0.33333f * (1.0f - allowedConsumedLines_0to1);
+ Color color_visualizingWarningForTooManyLines = SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(hueValueOfColor, 0.5f, 1.0f);
+ string coloredLineNumber = "" + sP_drawnLinesPerPass.intValue + "";
+ string tooltipForBoth = "This chart is drawn with single small straight lines (like from 'Debug.DrawLine()'). If too many of these straight lines are drawn it may hit the Editor execution performance." + Environment.NewLine + Environment.NewLine + "The color becomes more red as the number reaches a critical area." + Environment.NewLine + Environment.NewLine + "(see also 'DrawXXL.DrawBasics.MaxAllowedDrawnLinesPerFrame')";
+ GUIContent drawnLinesWord = new GUIContent("Drawn small straight lines:", tooltipForBoth);
+ GUIContent drawnLinesNumber = new GUIContent(coloredLineNumber, tooltipForBoth);
+ EditorGUILayout.LabelField(drawnLinesWord, drawnLinesNumber, style_ofConsumedLinesLabel);
+ }
+
+ void DrawSection_sceneViewCamera(GUIStyle style_forFoldoutWithBoldText)
+ {
+ SerializedProperty serializedProperty_sceneViewCamSection_isExpanded = serializedObject.FindProperty("sceneViewCamSection_isExpanded");
+ serializedProperty_sceneViewCamSection_isExpanded.boolValue = EditorGUILayout.Foldout(serializedProperty_sceneViewCamSection_isExpanded.boolValue, "Scene view camera", true, style_forFoldoutWithBoldText);
+ if (serializedProperty_sceneViewCamSection_isExpanded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty serializedProperty_forceSceneViewCamToFollowChart = serializedObject.FindProperty("forceSceneViewCamToFollowChart");
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(15.0f);
+ GUIContent guiContent_forbutton_setToChart = new GUIContent("Set to chart", "Set the Scene view camera position so that it looks at the chart.");
+ EditorGUI.BeginDisabledGroup(serializedProperty_forceSceneViewCamToFollowChart.boolValue);
+ if (GUILayout.Button(guiContent_forbutton_setToChart))
+ {
+ theDrawXXLChartInspector_unserializedMonoB.TrySetSceneViewCamToChart_dueToButtonClick();
+ }
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ //The feature "Checkbox: Stay at chart" is disabled. Reason:
+ //-> The risk is too high, that a user activates "Scene View Camera - Stay at Chart"
+ //-> and then changes the GameObject
+ //-> and then looses track why his SceneView Camera is fixed and he cannot navigate anymore with his camera through the Scene.
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawHandles_andOptionallyZoomAndAxisScaling(GUIStyle style_forFoldoutWithBoldText)
+ {
+ SerializedProperty sP_hideHandles_andInsteadUseInspectorSlidersForZoomAndScroll = serializedObject.FindProperty("hideHandles_andInsteadUseInspectorSlidersForZoomAndScroll");
+ sP_hideHandles_andInsteadUseInspectorSlidersForZoomAndScroll.boolValue = EditorGUILayout.ToggleLeft(new GUIContent("Hide handles and use inspector sliders instead", "This may be helpful if the handles cover important information." + Environment.NewLine + Environment.NewLine + "When hiding handles you can still zoom and scroll the chart via sliders here in the inspector."), sP_hideHandles_andInsteadUseInspectorSlidersForZoomAndScroll.boolValue);
+
+ if (sP_hideHandles_andInsteadUseInspectorSlidersForZoomAndScroll.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ DrawSection_cursor(style_forFoldoutWithBoldText);
+ DrawSection_axesScaling(style_forFoldoutWithBoldText);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawSection_cursor(GUIStyle style_forFoldoutWithBoldText)
+ {
+ SerializedProperty serializedProperty_cursorSection_isExpanded = serializedObject.FindProperty("cursorSection_isExpanded");
+ serializedProperty_cursorSection_isExpanded.boolValue = EditorGUILayout.Foldout(serializedProperty_cursorSection_isExpanded.boolValue, "Cursor", true, style_forFoldoutWithBoldText);
+
+ if (serializedProperty_cursorSection_isExpanded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty serializedProperty_curr_cursorPosition_inChartspaceUnits = serializedObject.FindProperty("curr_cursorPosition_inChartspaceUnits");
+ EditorGUILayout.PropertyField(serializedProperty_curr_cursorPosition_inChartspaceUnits, new GUIContent("Position"));
+
+ GUILayout.Space(0.3f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("cursorPos0to1_raw"), new GUIContent("Slide 0-1", "Move the cursor between the left end of the chart (0) and the right end of the chart (1)."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("cursorPos0to1_finetune"), new GUIContent("Finetune", "Add fine offset to the cursor slide position."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("cursorPos0to1_superFinetune"), new GUIContent("Super Finetune", "Add very fine offset to the cursor slide position."));
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawSection_axesScaling(GUIStyle style_forFoldoutWithBoldText)
+ {
+ SerializedProperty sP_zoomForBothAxesToApply_fromInspectorSlider_m1_to_p1 = serializedObject.FindProperty("zoomForBothAxesToApply_fromInspectorSlider_m1_to_p1");
+ SerializedProperty sP_xAxisZoomToApply_fromInspectorSlider_m1_to_p1 = serializedObject.FindProperty("xAxisZoomToApply_fromInspectorSlider_m1_to_p1");
+ SerializedProperty sP_xAxisScrollToApply_fromInspectorSlider_m1_to_p1 = serializedObject.FindProperty("xAxisScrollToApply_fromInspectorSlider_m1_to_p1");
+ SerializedProperty sP_yAxisZoomToApply_fromInspectorSlider_m1_to_p1 = serializedObject.FindProperty("yAxisZoomToApply_fromInspectorSlider_m1_to_p1");
+ SerializedProperty sP_yAxisScrollToApply_fromInspectorSlider_m1_to_p1 = serializedObject.FindProperty("yAxisScrollToApply_fromInspectorSlider_m1_to_p1");
+
+ SerializedProperty serializedProperty_axesSection_isExpanded = serializedObject.FindProperty("axesSection_isExpanded");
+ serializedProperty_axesSection_isExpanded.boolValue = EditorGUILayout.Foldout(serializedProperty_axesSection_isExpanded.boolValue, "Axes Scaling", true, style_forFoldoutWithBoldText);
+
+ if (serializedProperty_axesSection_isExpanded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ GUILayout.Space(0.3f * EditorGUIUtility.singleLineHeight);
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(15.0f);
+ GUIContent guiContent_forbutton_showEverything = new GUIContent("Show everything", "Set the axis scaling so that all datapoints of all non-hidden lines are visible.");
+ if (GUILayout.Button(guiContent_forbutton_showEverything, GUILayout.Width(150)))
+ {
+ theDrawXXLChartInspector_unserializedMonoB.ResetAxesScalingTo_encapsulateAllValues();
+ }
+
+ SerializedProperty serializedProperty_alwaysEncapsulateAllValues = serializedObject.FindProperty("alwaysEncapsulateAllValues");
+ GUIContent guiContent_alwaysEncapsulateAllValues = new GUIContent("Always", "This continuously overwrites the axis scaling so that always all datapoints are visible.");
+ serializedProperty_alwaysEncapsulateAllValues.boolValue = GUILayout.Toggle(serializedProperty_alwaysEncapsulateAllValues.boolValue, guiContent_alwaysEncapsulateAllValues);
+ GUILayout.EndHorizontal();
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(15.0f);
+ GUIContent guiContent_forbutton_revertChanges = new GUIContent("Revert changes", "Set the axis scaling to as it was in the moment where the chart was frozen for inspection.");
+ if (GUILayout.Button(guiContent_forbutton_revertChanges, GUILayout.Width(150)))
+ {
+ theDrawXXLChartInspector_unserializedMonoB.ResetAxesScalingTo_stateInMomentOfComponentCreation();
+ }
+ GUILayout.EndHorizontal();
+
+ EditorGUI.BeginDisabledGroup(serializedProperty_alwaysEncapsulateAllValues.boolValue);
+
+ GUILayout.Space(0.3f * EditorGUIUtility.singleLineHeight);
+ EditorGUILayout.PropertyField(sP_zoomForBothAxesToApply_fromInspectorSlider_m1_to_p1, new GUIContent("Zoom"));
+
+ GUILayout.Space(0.7f * EditorGUIUtility.singleLineHeight);
+ EditorGUILayout.PropertyField(sP_xAxisZoomToApply_fromInspectorSlider_m1_to_p1, new GUIContent("Zoom X"));
+ EditorGUILayout.PropertyField(sP_xAxisScrollToApply_fromInspectorSlider_m1_to_p1, new GUIContent("Scroll X"));
+
+ GUILayout.Space(0.7f * EditorGUIUtility.singleLineHeight);
+ EditorGUILayout.PropertyField(sP_yAxisZoomToApply_fromInspectorSlider_m1_to_p1, new GUIContent("Zoom Y"));
+ EditorGUILayout.PropertyField(sP_yAxisScrollToApply_fromInspectorSlider_m1_to_p1, new GUIContent("Scroll Y"));
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ if (EditorGUIUtility.hotControl == 0)
+ {
+ //This resets the sliders to their zero position in the middle if they are not clicked or dragged
+ //-> It fakes an "Event.MouseUp" event
+ sP_zoomForBothAxesToApply_fromInspectorSlider_m1_to_p1.floatValue = 0.0f;
+ sP_xAxisZoomToApply_fromInspectorSlider_m1_to_p1.floatValue = 0.0f;
+ sP_xAxisScrollToApply_fromInspectorSlider_m1_to_p1.floatValue = 0.0f;
+ sP_yAxisZoomToApply_fromInspectorSlider_m1_to_p1.floatValue = 0.0f;
+ sP_yAxisScrollToApply_fromInspectorSlider_m1_to_p1.floatValue = 0.0f;
+ }
+ }
+
+ void DrawSection_other(GUIStyle style_forFoldoutWithBoldText)
+ {
+ SerializedProperty serializedProperty_otherSection_isExpanded = serializedObject.FindProperty("otherSection_isExpanded");
+ serializedProperty_otherSection_isExpanded.boolValue = EditorGUILayout.Foldout(serializedProperty_otherSection_isExpanded.boolValue, "Other", true, style_forFoldoutWithBoldText);
+ if (serializedProperty_otherSection_isExpanded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ DrawSection_csvExport();
+ DrawSection_clearLineValues();
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("sizeOfDatapointVisualization"), new GUIContent("Size (cursor values)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("curr_luminanceOfLineColors_accordingToSlider"), new GUIContent("Luminance (line colors)", "Changing this can improve the readability of the lines in front of different background brightness."));
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineNamePositions"), new GUIContent("Line names position"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineNames_sizeScaleFactor"), new GUIContent("Size (line names)"));
+
+ int new_maxDisplayedPointOfInterestTextBoxesPerSide = EditorGUILayout.IntField(new GUIContent("Maximum number of Text Boxes (for Points of Interest)", "Some Points of Interest display a text box with explantion text in the top corners of the chart. In some unforeseen situation, for example if many invalid float values are added as data points, the number of text boxes that notify you of these invalid float values can rapidly grow and as a result slow down the Editor performance."), theDrawXXLChartInspector_unserializedMonoB.Get_maxDisplayedPointOfInterestTextBoxesPerSide());
+ if (new_maxDisplayedPointOfInterestTextBoxesPerSide != theDrawXXLChartInspector_unserializedMonoB.Get_maxDisplayedPointOfInterestTextBoxesPerSide())
+ {
+ theDrawXXLChartInspector_unserializedMonoB.Set_maxDisplayedPointOfInterestTextBoxesPerSide(new_maxDisplayedPointOfInterestTextBoxesPerSide);
+ }
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ else
+ {
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void DrawSection_csvExport()
+ {
+ SerializedProperty serializedProperty_csvExportSection_isExpanded = serializedObject.FindProperty("csvExportSection_isExpanded");
+ serializedProperty_csvExportSection_isExpanded.boolValue = EditorGUILayout.Foldout(serializedProperty_csvExportSection_isExpanded.boolValue, "CSV file export", true);
+ if (serializedProperty_csvExportSection_isExpanded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.HelpBox("The file is written into the Assets folder of your project. Existing files with the same name will not be overwritten but a sequential number will be added to the new file name.", MessageType.None, true);
+
+ SerializedProperty serializedProperty_csvFileName = serializedObject.FindProperty("csvFileName");
+ serializedProperty_csvFileName.stringValue = EditorGUILayout.TextField("File name", serializedProperty_csvFileName.stringValue);
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(30.0f);
+ if (GUILayout.Button("Export"))
+ {
+ theDrawXXLChartInspector_unserializedMonoB.ExportCSVFile(serializedProperty_csvFileName.stringValue);
+ }
+ GUILayout.EndHorizontal();
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawSection_clearLineValues()
+ {
+ SerializedProperty serializedProperty_clearButtonSection_isExpanded = serializedObject.FindProperty("clearButtonSection_isExpanded");
+ serializedProperty_clearButtonSection_isExpanded.boolValue = EditorGUILayout.Foldout(serializedProperty_clearButtonSection_isExpanded.boolValue, "Clear Line Data", true);
+ if (serializedProperty_clearButtonSection_isExpanded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.HelpBox("No 'Undo' possible.", MessageType.Warning, true);
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(30.0f);
+ if (GUILayout.Button(new GUIContent("Clear all Line Data Values", "This deletes all data points of all lines of this chart, so you can start with a fresh unfilled chart." + Environment.NewLine + Environment.NewLine + "Be cautious, because this cannot be undone.")))
+ {
+ theDrawXXLChartInspector_unserializedMonoB.ClearLineData();
+ }
+ GUILayout.EndHorizontal();
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawSection_lines()
+ {
+ GUIStyle boldFontStyle = new GUIStyle();
+ boldFontStyle.fontStyle = FontStyle.Bold;
+
+ GUILayout.Label("Lines:", boldFontStyle);
+ SerializedProperty serializedProperty_specsForInspectorForEachDrawnLine = serializedObject.FindProperty("specsForInspector_forEachDrawnLine");
+ for (int i = 0; i < serializedProperty_specsForInspectorForEachDrawnLine.arraySize; i++)
+ {
+ EditorGUILayout.PropertyField(serializedProperty_specsForInspectorForEachDrawnLine.GetArrayElementAtIndex(i));
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/Charts/DrawXXLChartInspector_Inspector.cs.meta b/Editor/DrawDebugLibrary/Charts/DrawXXLChartInspector_Inspector.cs.meta
new file mode 100644
index 0000000..b2723b8
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/DrawXXLChartInspector_Inspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5688d1000cb135347840e17b11efe57b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/Charts/LineSpecsForInspectorDrawer.cs b/Editor/DrawDebugLibrary/Charts/LineSpecsForInspectorDrawer.cs
new file mode 100644
index 0000000..5406493
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/LineSpecsForInspectorDrawer.cs
@@ -0,0 +1,196 @@
+namespace DrawXXL
+{
+ using System;
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomPropertyDrawer(typeof(InternalDXXL_LineSpecsForChartInspector))]
+ public class LineSpecsForInspectorDrawer : PropertyDrawer
+ {
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
+ {
+ float currYOffset = 0.0f;
+
+ SerializedProperty serializedProperty_currentHideLineState = property.FindPropertyRelative("currentHideLineState");
+ Rect space_ofMainLineHideCheckboxToggle = new Rect(position.x + 0.4f * EditorGUIUtility.singleLineHeight, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ serializedProperty_currentHideLineState.boolValue = !EditorGUI.Toggle(space_ofMainLineHideCheckboxToggle, !serializedProperty_currentHideLineState.boolValue);
+
+ SerializedProperty serializedProperty_lineSection_isExpanded = property.FindPropertyRelative("lineSection_isExpanded");
+ Rect space_ofMainFoldout = new Rect(position.x, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ serializedProperty_lineSection_isExpanded.boolValue = EditorGUI.Foldout(space_ofMainFoldout, serializedProperty_lineSection_isExpanded.boolValue, GUIContent.none, true, EditorStyles.foldout);
+
+ SerializedProperty serializedProperty_lineColor = property.FindPropertyRelative("lineColor");
+ SerializedProperty serializedProperty_linesCompoundName = property.FindPropertyRelative("linesCompoundName");
+
+ GUIStyle richtextEnabled_fontStyle = new GUIStyle();
+ richtextEnabled_fontStyle.richText = true;
+ float indent_ofColoredLineName = 50;
+ Rect space_ofColoredLineName = new Rect(position.x + 1.6f * EditorGUIUtility.singleLineHeight, position.y + currYOffset, position.width - indent_ofColoredLineName, position.height);
+ EditorGUI.LabelField(space_ofColoredLineName, "Line: " + serializedProperty_linesCompoundName.stringValue + "", richtextEnabled_fontStyle);
+
+ if (serializedProperty_lineSection_isExpanded.boolValue)
+ {
+ int previousIndent = EditorGUI.indentLevel;
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ currYOffset = currYOffset + (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
+ Rect space_ofColorPicker = new Rect(position.x, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.PropertyField(space_ofColorPicker, serializedProperty_lineColor, new GUIContent("Color"));
+
+ currYOffset = currYOffset + (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
+ SerializedProperty serializedProperty_currentHideCursorXState_duringComponentInspectionPhase = property.FindPropertyRelative("currentHideCursorXState_duringComponentInspectionPhase");
+ Rect space_ofHideCursorXToggle = new Rect(position.x, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ serializedProperty_currentHideCursorXState_duringComponentInspectionPhase.boolValue = !EditorGUI.Toggle(space_ofHideCursorXToggle, "Draw X value", !serializedProperty_currentHideCursorXState_duringComponentInspectionPhase.boolValue);
+
+ currYOffset = currYOffset + (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
+ SerializedProperty serializedProperty_currentHideCursorYState_duringComponentInspectionPhase = property.FindPropertyRelative("currentHideCursorYState_duringComponentInspectionPhase");
+ Rect space_ofHideCursorYToggle = new Rect(position.x, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ serializedProperty_currentHideCursorYState_duringComponentInspectionPhase.boolValue = !EditorGUI.Toggle(space_ofHideCursorYToggle, "Draw Y value", !serializedProperty_currentHideCursorYState_duringComponentInspectionPhase.boolValue);
+
+ DrawXXLChartInspector theDrawXXLChartInspector = (DrawXXLChartInspector)property.serializedObject.targetObject;
+ bool thisLineIsTheOnlyOneOfTheChart = theDrawXXLChartInspector.ContainsOnly1Line_hiddenOrUnhidden();
+
+ currYOffset = currYOffset + (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
+ EditorGUI.BeginDisabledGroup(thisLineIsTheOnlyOneOfTheChart);
+ SerializedProperty serializedProperty_i_ofThisLineSpec_insideChartInspectorsLinesSpecsArray = property.FindPropertyRelative("i_ofThisLineSpec_insideChartInspectorsLinesSpecsArray");
+ Rect space_ofButton_hideAllOtherLines = new Rect(position.x + 15.0f, position.y + currYOffset, 150.0f, EditorGUIUtility.singleLineHeight);
+ if (theDrawXXLChartInspector.AllOtherLinesAreHidden(serializedProperty_i_ofThisLineSpec_insideChartInspectorsLinesSpecsArray.intValue))
+ {
+ if (GUI.Button(space_ofButton_hideAllOtherLines, "Unhide all lines "))
+ {
+ theDrawXXLChartInspector.UnhideAllLines();
+ }
+ }
+ else
+ {
+ if (GUI.Button(space_ofButton_hideAllOtherLines, "Hide all other lines "))
+ {
+ theDrawXXLChartInspector.HideAllOtherLines(serializedProperty_i_ofThisLineSpec_insideChartInspectorsLinesSpecsArray.intValue);
+ }
+ }
+
+ currYOffset = currYOffset + (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
+ Rect space_ofButton_hideAllOtherCursors = new Rect(position.x + 15.0f, position.y + currYOffset, 150.0f, EditorGUIUtility.singleLineHeight);
+ if (theDrawXXLChartInspector.AllOtherCursorsAreHidden(serializedProperty_i_ofThisLineSpec_insideChartInspectorsLinesSpecsArray.intValue))
+ {
+ if (GUI.Button(space_ofButton_hideAllOtherCursors, "Unhide all cursors"))
+ {
+ theDrawXXLChartInspector.UnhideAllCursors(serializedProperty_i_ofThisLineSpec_insideChartInspectorsLinesSpecsArray.intValue);
+ }
+ }
+ else
+ {
+ if (GUI.Button(space_ofButton_hideAllOtherCursors, "Hide all other cursors"))
+ {
+ theDrawXXLChartInspector.HideAllOtherCursors(serializedProperty_i_ofThisLineSpec_insideChartInspectorsLinesSpecsArray.intValue);
+ }
+ }
+ EditorGUI.EndDisabledGroup();
+
+ currYOffset = currYOffset + (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
+ SerializedProperty serializedProperty_alpha_ofVertFillLines = property.FindPropertyRelative("alpha_ofVertFillLines");
+ GUIContent guiContent_for_alpha_ofVertFillLines = new GUIContent("Fill area (alpha)");
+ Rect space_of_alpha_ofVertFillLines = new Rect(position.x, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.PropertyField(space_of_alpha_ofVertFillLines, serializedProperty_alpha_ofVertFillLines, guiContent_for_alpha_ofVertFillLines);
+ if (serializedProperty_alpha_ofVertFillLines.floatValue < 0.001f) { serializedProperty_alpha_ofVertFillLines.floatValue = 0.0f; } //-> prenting float calculation uncertainty errors to accidentaly activate the many drawn lines for fillVerticalSpace
+
+ currYOffset = currYOffset + (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
+ SerializedProperty serializedProperty_lineWidth = property.FindPropertyRelative("lineWidth");
+ GUIContent guiContent_forWidthSlider = new GUIContent("Width", "This is relative to the chart height." + Environment.NewLine + Environment.NewLine + "Performance warning: Setting this to values other than 0 can significantly increase the number of drawn lines.");
+ Rect space_ofWidthSlider = new Rect(position.x, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.PropertyField(space_ofWidthSlider, serializedProperty_lineWidth, guiContent_forWidthSlider);
+ if (serializedProperty_lineWidth.floatValue < 0.00005f) { serializedProperty_lineWidth.floatValue = 0.0f; } //-> prenting float calculation uncertainty errors to accidentaly activate the many drawn lines for non-zeroWidth-lines
+
+ currYOffset = currYOffset + (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
+ Rect space_of_connectionsType = new Rect(position.x, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.PropertyField(space_of_connectionsType, property.FindPropertyRelative("connectionsType"), new GUIContent("Connection style"));
+
+ currYOffset = currYOffset + (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
+ Rect space_of_dataPointVisualization = new Rect(position.x, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.PropertyField(space_of_dataPointVisualization, property.FindPropertyRelative("dataPointVisualization"), new GUIContent("Points style"));
+
+ bool datapointVisualizerOfLineAreInvisible = theDrawXXLChartInspector.DatapointVisualizerOfLineAreInvisible(serializedProperty_i_ofThisLineSpec_insideChartInspectorsLinesSpecsArray.intValue);
+ EditorGUI.BeginDisabledGroup(datapointVisualizerOfLineAreInvisible);
+ currYOffset = currYOffset + (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
+ Rect space_of_dataPointVisualization_size = new Rect(position.x, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.PropertyField(space_of_dataPointVisualization_size, property.FindPropertyRelative("dataPointVisualization_size"), new GUIContent("Points size"));
+ EditorGUI.EndDisabledGroup();
+
+ currYOffset = currYOffset + (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
+ GUIStyle style_forDatapointValuesHeadline = new GUIStyle(EditorStyles.foldout);
+ style_forDatapointValuesHeadline.richText = true;
+ SerializedProperty serializedProperty_datapointValuesSection_isExpanded = property.FindPropertyRelative("datapointValuesSection_isExpanded");
+ Rect space_ofDatapointArrayFoldout = new Rect(position.x, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ serializedProperty_datapointValuesSection_isExpanded.boolValue = EditorGUI.Foldout(space_ofDatapointArrayFoldout, serializedProperty_datapointValuesSection_isExpanded.boolValue, "Datapoint Values (read only)", true, style_forDatapointValuesHeadline);
+
+ if (serializedProperty_datapointValuesSection_isExpanded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty arrayOfNeighboringDatapoints = property.FindPropertyRelative("neighboringDatapointValues");
+ int arraySize = arrayOfNeighboringDatapoints.arraySize;
+
+ currYOffset = currYOffset + 1.5f * EditorGUIUtility.singleLineHeight;
+ Rect space_ofArrayLengthChooser = new Rect(position.x, position.y + currYOffset, position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.PropertyField(space_ofArrayLengthChooser, property.FindPropertyRelative("numberOfDisplayedDatapointsInArray"), new GUIContent("Listed values"));
+
+ currYOffset = currYOffset + 1.5f * EditorGUIUtility.singleLineHeight;
+ int i_insideShortenedForInspectorArray_markingTheValueAtCursor = property.FindPropertyRelative("i_insideShortenedForInspectorArray_markingTheValueAtCursor").intValue;
+ for (int i = 0; i < arraySize; i++)
+ {
+ SerializedProperty datapointValuesOfCurrentSlot = arrayOfNeighboringDatapoints.GetArrayElementAtIndex(i);
+ string slotName = GetArraySlotName(i, i_insideShortenedForInspectorArray_markingTheValueAtCursor);
+ Rect space_ofCurrDataPoint = new Rect(position.x, position.y + (currYOffset + (i * (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing))), position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.PropertyField(space_ofCurrDataPoint, datapointValuesOfCurrentSlot, new GUIContent(slotName));
+ }
+ }
+
+ EditorGUI.indentLevel = previousIndent;
+ }
+
+ }
+
+ string GetArraySlotName(int i, int i_insideShortenedForInspectorArray_markingTheValueAtCursor)
+ {
+ int indexesDistance_toCursor = i - i_insideShortenedForInspectorArray_markingTheValueAtCursor;
+ if (indexesDistance_toCursor == 0)
+ {
+ return ("At Cursor");
+ }
+ else
+ {
+ if (indexesDistance_toCursor < 0)
+ {
+ return ("Cursor -" + Mathf.Abs(indexesDistance_toCursor));
+ }
+ else
+ {
+ return ("Cursor +" + Mathf.Abs(indexesDistance_toCursor));
+ }
+ }
+ }
+
+ public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
+ {
+ if (property.FindPropertyRelative("lineSection_isExpanded").boolValue)
+ {
+ if (property.FindPropertyRelative("datapointValuesSection_isExpanded").boolValue)
+ {
+ int displayedDatapointValues = property.FindPropertyRelative("neighboringDatapointValues").arraySize;
+ return (EditorGUIUtility.singleLineHeight) * (15.0f + displayedDatapointValues) + (EditorGUIUtility.standardVerticalSpacing) * (13.0f + displayedDatapointValues);
+ }
+ else
+ {
+ return (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing) * 13.0f;
+ }
+ }
+ else
+ {
+ return EditorGUIUtility.singleLineHeight;
+ }
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/Charts/LineSpecsForInspectorDrawer.cs.meta b/Editor/DrawDebugLibrary/Charts/LineSpecsForInspectorDrawer.cs.meta
new file mode 100644
index 0000000..d0c2cde
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/LineSpecsForInspectorDrawer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9784fcad8f2d38947a80c2a6124dd623
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/Charts/NeighboringDatapointForInspectorDrawer.cs b/Editor/DrawDebugLibrary/Charts/NeighboringDatapointForInspectorDrawer.cs
new file mode 100644
index 0000000..c598f13
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/NeighboringDatapointForInspectorDrawer.cs
@@ -0,0 +1,47 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomPropertyDrawer(typeof(InternalDXXL_NeighboringDatapointForChartInspector))]
+ public class NeighboringDatapointForInspectorDrawer : PropertyDrawer
+ {
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
+ {
+ GUIStyle labelStyle = new GUIStyle(EditorStyles.label);
+ labelStyle.richText = true;
+ EditorGUI.LabelField(position, label, labelStyle);
+
+ float previousLabelWidth = EditorGUIUtility.labelWidth;
+
+ float xStartPos = position.x + 0.25f * position.width;
+ float width_allThree = position.width - xStartPos + EditorGUIUtility.singleLineHeight;
+ float xWidth = width_allThree * 0.28f;
+ EditorGUIUtility.labelWidth = 40.0f;
+ Rect space_ofX = new Rect(xStartPos, position.y, xWidth + 1.3f * EditorGUIUtility.singleLineHeight, position.height);
+ EditorGUI.PropertyField(space_ofX, property.FindPropertyRelative("x"), new GUIContent("X"));
+
+ float yStartPos = xStartPos + xWidth;
+ float yWidth = width_allThree * 0.28f;
+ EditorGUIUtility.labelWidth = 40.0f;
+ Rect space_ofY = new Rect(yStartPos, position.y, yWidth + 1.3f * EditorGUIUtility.singleLineHeight, position.height);
+ EditorGUI.PropertyField(space_ofY, property.FindPropertyRelative("y"), new GUIContent("Y"));
+
+ float dStartPos = yStartPos + yWidth;
+ float dWidth = width_allThree * 0.44f;
+ EditorGUIUtility.labelWidth = 72.0f;
+ Rect space_ofDelta = new Rect(dStartPos, position.y, dWidth, position.height);
+ EditorGUI.PropertyField(space_ofDelta, property.FindPropertyRelative("deltaSincePrecedingY"), new GUIContent("delta Y"));
+
+ EditorGUIUtility.labelWidth = previousLabelWidth;
+ }
+
+ public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
+ {
+ return EditorGUIUtility.singleLineHeight;
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/Charts/NeighboringDatapointForInspectorDrawer.cs.meta b/Editor/DrawDebugLibrary/Charts/NeighboringDatapointForInspectorDrawer.cs.meta
new file mode 100644
index 0000000..96d789a
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/NeighboringDatapointForInspectorDrawer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 14f2c736c6c47e84796c3b4ed6761626
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/Charts/line charts.meta b/Editor/DrawDebugLibrary/Charts/line charts.meta
new file mode 100644
index 0000000..6442cc9
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/line charts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ba836645a0c573c4e8f0411c1cc6afad
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/Charts/line charts/internal utilities.meta b/Editor/DrawDebugLibrary/Charts/line charts/internal utilities.meta
new file mode 100644
index 0000000..9ecd517
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/line charts/internal utilities.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 7248b4bbde31bdc48bc0544ecf731e81
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/Charts/line charts/internal utilities/InternalDXXL_ChartHandles.cs b/Editor/DrawDebugLibrary/Charts/line charts/internal utilities/InternalDXXL_ChartHandles.cs
new file mode 100644
index 0000000..d525137
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/line charts/internal utilities/InternalDXXL_ChartHandles.cs
@@ -0,0 +1,437 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+ using DrawXXL;
+
+ public class InternalDXXL_ChartHandles
+ {
+ static float valueToSlide_duringMouseDown;
+ static Vector2 currentMousePosition;
+ static Vector2 mousePosition_duringMouseDown;
+ static Vector3 sliderPosition_worldSpace_duringMouseDown;
+
+ public static float CursorSlider(bool isAtLowerEndOfCursorsVertLine_notAtUpperEnd, float valueToSlide, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB)
+ {
+ int control_ID = GUIUtility.GetControlID(FocusType.Passive);
+ Event currentEvent = Event.current;
+ Vector3 current_sliderPosition_worldSpace = Get_current_cursorSliderPosition_worldSpace(isAtLowerEndOfCursorsVertLine_notAtUpperEnd, theDrawXXLChartInspector_unserializedMonoB);
+ switch (currentEvent.GetTypeForControl(control_ID))
+ {
+ case EventType.MouseDown:
+ if ((HandleUtility.nearestControl == control_ID) && (currentEvent.button == 0) && (currentEvent.alt == false))
+ {
+ GUIUtility.hotControl = control_ID;
+ valueToSlide_duringMouseDown = valueToSlide;
+ mousePosition_duringMouseDown = currentEvent.mousePosition;
+ currentMousePosition = currentEvent.mousePosition;
+ sliderPosition_worldSpace_duringMouseDown = current_sliderPosition_worldSpace;
+ currentEvent.Use();
+ EditorGUIUtility.SetWantsMouseJumping(1);
+ }
+ break;
+ case EventType.MouseUp:
+ if (GUIUtility.hotControl == control_ID)
+ {
+ GUIUtility.hotControl = 0;
+ currentEvent.Use();
+ EditorGUIUtility.SetWantsMouseJumping(0);
+ }
+ break;
+ case EventType.MouseDrag:
+ if (GUIUtility.hotControl == control_ID)
+ {
+ currentMousePosition = currentMousePosition + currentEvent.delta;
+ Vector3 cursorSlideDirection = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.xAxis.AxisVector_normalized_inWorldSpace;
+ float travelledDistance_sinceMouseDown = HandleUtility.CalcLineTranslation(mousePosition_duringMouseDown, currentMousePosition, sliderPosition_worldSpace_duringMouseDown, cursorSlideDirection);
+ valueToSlide = valueToSlide_duringMouseDown + travelledDistance_sinceMouseDown;
+ GUI.changed = true;
+ currentEvent.Use();
+ }
+ break;
+ case EventType.Repaint:
+ Color color_before = Handles.color;
+ TrySetColorDuringMouseInteraction(control_ID, theDrawXXLChartInspector_unserializedMonoB, currentEvent);
+ DrawConeCap(isAtLowerEndOfCursorsVertLine_notAtUpperEnd, control_ID, theDrawXXLChartInspector_unserializedMonoB, EventType.Repaint);
+ Handles.color = color_before;
+ break;
+ case EventType.Layout:
+ DrawConeCap(isAtLowerEndOfCursorsVertLine_notAtUpperEnd, control_ID, theDrawXXLChartInspector_unserializedMonoB, EventType.Layout);
+ break;
+ default:
+ break;
+ }
+ return valueToSlide;
+ }
+
+ static Vector3 Get_current_cursorSliderPosition_worldSpace(bool isAtLowerEndOfCursorsVertLine_notAtUpperEnd, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB)
+ {
+ return (isAtLowerEndOfCursorsVertLine_notAtUpperEnd ? theDrawXXLChartInspector_unserializedMonoB.GetCursorPosOnLowerEndOfChart() : theDrawXXLChartInspector_unserializedMonoB.GetCursorPosOnHigherEndOfChart());
+ }
+
+ static void DrawConeCap(bool isAtLowerEndOfCursorsVertLine_notAtUpperEnd, int control_ID, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB, EventType eventType)
+ {
+ Matrix4x4 matrix_before = Handles.matrix;
+
+ float sizeOfCursorHandleCone = theDrawXXLChartInspector_unserializedMonoB.GetHeightOfCursorPyramid();
+ Vector3 position_ofCustomMatrixSpace = Get_current_cursorSliderPosition_worldSpace(isAtLowerEndOfCursorsVertLine_notAtUpperEnd, theDrawXXLChartInspector_unserializedMonoB);
+ Vector3 positionOfCone_insideCustomMatrixSpace = Vector3.forward * (0.5f * sizeOfCursorHandleCone);//-> shifting the cone, so that his base it at the "position_ofCustomMatrixSpace", and not his center
+ Vector3 forwardOfCustomMatrixSpace = isAtLowerEndOfCursorsVertLine_notAtUpperEnd ? (theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.yAxis.AxisVector_normalized_inWorldSpace) : (-theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.yAxis.AxisVector_normalized_inWorldSpace);
+ Quaternion rotation_ofCustomMatrixSpace = Quaternion.LookRotation(forwardOfCustomMatrixSpace);
+ Quaternion rotationOfCone_insideCustomMatrixSpace = Quaternion.identity; //-> no rotation inside the custom matrix space. The cone rotation is already done by rotation the whole custom matrix space.
+ float coneBase_scaleFactor = 3.0f;
+ Vector3 scale_ofCustomMatrixSpace = new Vector3(coneBase_scaleFactor, coneBase_scaleFactor, 1.0f); //-> This is the reason for the whole custom matrix: Warping the cone shape, so that appears less pointy
+ Matrix4x4 warpedMatrix_oriniatingAtConeBase = Matrix4x4.TRS(position_ofCustomMatrixSpace, rotation_ofCustomMatrixSpace, scale_ofCustomMatrixSpace);
+
+ Handles.matrix = warpedMatrix_oriniatingAtConeBase;
+ Handles.ConeHandleCap(control_ID, positionOfCone_insideCustomMatrixSpace, rotationOfCone_insideCustomMatrixSpace, sizeOfCursorHandleCone, eventType);
+ Handles.matrix = matrix_before;
+ }
+
+ public static float OneDirectionalBacksnapSlider(float travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, Vector3 restingPosition, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB, Vector3 sliderDirection_worldSpace_normalized, Handles.CapFunction capFunction, float capSizeScaleFactor, GUIContent icon, float iconSizeFactor, Vector2 iconPositionOffset_inScreenspace_relToHandleCapSize, bool clampTravelledDistance_inThePositiveDirection, bool drawSpiralSpring)
+ {
+ //-> see "HandlesExamples.AnalogJoystickSlider()" for a more generic version of this function
+
+ int control_ID = GUIUtility.GetControlID(FocusType.Passive);
+ Event currentEvent = Event.current;
+ switch (currentEvent.GetTypeForControl(control_ID))
+ {
+ case EventType.MouseDown:
+ if ((HandleUtility.nearestControl == control_ID) && (currentEvent.button == 0) && (currentEvent.alt == false))
+ {
+ GUIUtility.hotControl = control_ID;
+ mousePosition_duringMouseDown = currentEvent.mousePosition;
+ currentMousePosition = currentEvent.mousePosition;
+ theDrawXXLChartInspector_unserializedMonoB.SaveZoomAndScrollState_onMouseDown();
+ currentEvent.Use();
+ EditorGUIUtility.SetWantsMouseJumping(1);
+ }
+ break;
+ case EventType.MouseUp:
+ if (GUIUtility.hotControl == control_ID)
+ {
+ travelledWorldSpaceDistanceAlongDirection_sinceMouseDown = 0.0f;
+ GUIUtility.hotControl = 0;
+ currentEvent.Use();
+ EditorGUIUtility.SetWantsMouseJumping(0);
+ }
+ break;
+ case EventType.MouseDrag:
+ if (GUIUtility.hotControl == control_ID)
+ {
+ currentMousePosition = currentMousePosition + currentEvent.delta;
+ travelledWorldSpaceDistanceAlongDirection_sinceMouseDown = HandleUtility.CalcLineTranslation(mousePosition_duringMouseDown, currentMousePosition, restingPosition, sliderDirection_worldSpace_normalized);
+ travelledWorldSpaceDistanceAlongDirection_sinceMouseDown = TryClampTravelledDistanceInThePositiveDirection(clampTravelledDistance_inThePositiveDirection, travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, theDrawXXLChartInspector_unserializedMonoB);
+ GUI.changed = true;
+ currentEvent.Use();
+ }
+ break;
+ case EventType.Repaint:
+ Color color_before = Handles.color;
+ TrySetColorDuringMouseInteraction(control_ID, theDrawXXLChartInspector_unserializedMonoB, currentEvent);
+ TryDrawSpiralSpring(control_ID, drawSpiralSpring, travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, restingPosition, theDrawXXLChartInspector_unserializedMonoB, sliderDirection_worldSpace_normalized);
+ DrawOneDimensionalBacksnapSliderCap(control_ID, travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, restingPosition, theDrawXXLChartInspector_unserializedMonoB, sliderDirection_worldSpace_normalized, capFunction, capSizeScaleFactor, EventType.Repaint);
+ Handles.color = color_before;
+ break;
+ case EventType.Layout:
+ DrawOneDimensionalBacksnapSliderCap(control_ID, travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, restingPosition, theDrawXXLChartInspector_unserializedMonoB, sliderDirection_worldSpace_normalized, capFunction, capSizeScaleFactor, EventType.Layout);
+ break;
+ default:
+ break;
+ }
+
+ DrawIcon_onOneDimensionalBacksnapSlider(travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, restingPosition, theDrawXXLChartInspector_unserializedMonoB, sliderDirection_worldSpace_normalized, icon, iconSizeFactor, iconPositionOffset_inScreenspace_relToHandleCapSize);
+ return travelledWorldSpaceDistanceAlongDirection_sinceMouseDown;
+ }
+
+ static float TryClampTravelledDistanceInThePositiveDirection(bool clampTravelledDistance_inThePositiveDirection, float travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB)
+ {
+ if (clampTravelledDistance_inThePositiveDirection)
+ {
+ if (travelledWorldSpaceDistanceAlongDirection_sinceMouseDown > 0.0f)
+ {
+ return Mathf.Min(travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, theDrawXXLChartInspector_unserializedMonoB.GetBacksnapSliderReferenceLength_inWorldspaceUnits());
+ }
+ }
+ return travelledWorldSpaceDistanceAlongDirection_sinceMouseDown;
+ }
+
+ static void TryDrawSpiralSpring(int control_ID, bool drawSpiralSpring, float travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, Vector3 restingPosition, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB, Vector3 sliderDirection_worldSpace_normalized)
+ {
+ if (drawSpiralSpring)
+ {
+ if (GUIUtility.hotControl == control_ID)
+ {
+ HandlesExamples.ConfigureDrawXXLsGlobalSettingsForDrawingHandles();
+
+ //Generated via code snippet/live template:
+ Vector3 start_of_spiral = restingPosition;
+ Vector3 end_of_spiral = Get_currentPosition_ofOneDimensionalBacksnapSlider(travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, restingPosition, sliderDirection_worldSpace_normalized);
+ float relaxedLength_of_spiral = theDrawXXLChartInspector_unserializedMonoB.GetBacksnapSliderReferenceLength_inWorldspaceUnits();
+ Color relaxedColor_of_spiral = Handles.color;
+ DrawBasics.LineStyle style_of_spiral = DrawBasics.LineStyle.spiral;
+ float stretchFactor_forStretchedTensionColor_of_spiral = 2.0f;
+ Color color_forStretchedTension_of_spiral = Handles.color;
+ float stretchFactor_forSqueezedTensionColor_of_spiral = 0.0f;
+ Color color_forSqueezedTension_of_spiral = Handles.color;
+ float width_of_spiral = 0.0f;
+ string text_of_spiral = null;
+ float alphaOfReferenceLengthDisplay_of_spiral = 0.5f;
+ float stylePatternScaleFactor_of_spiral = 0.7f * (theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Width_inWorldSpace + theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.Height_inWorldSpace);
+ Vector3 customAmplitudeAndTextDir_of_spiral = default(Vector3);
+ bool flattenThickRoundLineIntoAmplitudePlane_of_spiral = false;
+ float endPlates_size_of_spiral = 0.0f;
+ float enlargeSmallTextToThisMinTextSize_of_spiral = 0.0f;
+ float durationInSec_of_spiral = 0.0f;
+ bool hiddenByNearerObjects_of_spiral = true;
+ bool skipPatternEnlargementForLongLines_of_spiral = true;
+ bool skipPatternEnlargementForShortLines_of_spiral = true;
+
+ float stylePatternScaleFactor_alongLineDir_ignoringAmplitude_before = DrawBasics.StylePatternScaleFactor_alongLineDir_ignoringAmplitude;
+ DrawBasics.StylePatternScaleFactor_alongLineDir_ignoringAmplitude = 0.6f; //-> Instruct Draw XXL how to use this style scaling for all following draw operations
+ DrawBasics.LineUnderTension(start_of_spiral, end_of_spiral, relaxedLength_of_spiral, relaxedColor_of_spiral, style_of_spiral, stretchFactor_forStretchedTensionColor_of_spiral, color_forStretchedTension_of_spiral, stretchFactor_forSqueezedTensionColor_of_spiral, color_forSqueezedTension_of_spiral, width_of_spiral, text_of_spiral, alphaOfReferenceLengthDisplay_of_spiral, stylePatternScaleFactor_of_spiral, customAmplitudeAndTextDir_of_spiral, flattenThickRoundLineIntoAmplitudePlane_of_spiral, endPlates_size_of_spiral, enlargeSmallTextToThisMinTextSize_of_spiral, durationInSec_of_spiral, hiddenByNearerObjects_of_spiral, skipPatternEnlargementForLongLines_of_spiral, skipPatternEnlargementForShortLines_of_spiral);
+ DrawBasics.StylePatternScaleFactor_alongLineDir_ignoringAmplitude = stylePatternScaleFactor_alongLineDir_ignoringAmplitude_before; //-> Revert the Draw XXL setting to what it was before
+
+ //Generated via code snippet/live template:
+ Vector3 position_of_dot = restingPosition;
+ float radius_of_dot = 0.003f * stylePatternScaleFactor_of_spiral;
+ Vector3 normal_of_dot = default(Vector3); //-> this will automatically point to the Scene View Camera, because "DrawShapes.automaticOrientationOfFlatShapes" has been set accordingly inside "HandlesExamples.ConfigureDrawXXLsGlobalSettingsForDrawingHandles()"
+ Color color_of_dot = Handles.color;
+ string text_of_dot = null;
+ float density_of_dot = 1.0f;
+ float durationInSec_of_dot = 0.0f;
+ bool hiddenByNearerObjects_of_dot = true;
+ DrawBasics.Dot(position_of_dot, radius_of_dot, normal_of_dot, color_of_dot, text_of_dot, density_of_dot, durationInSec_of_dot, hiddenByNearerObjects_of_dot);
+
+ HandlesExamples.RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore();
+ }
+ }
+ }
+
+ static void DrawOneDimensionalBacksnapSliderCap(int control_ID, float travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, Vector3 restingPosition, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB, Vector3 sliderDirection_worldSpace_normalized, Handles.CapFunction capFunction, float capSizeScaleFactor, EventType eventType)
+ {
+ Vector3 currentPosition_ofBacksnapSlider = Get_currentPosition_ofOneDimensionalBacksnapSlider(travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, restingPosition, sliderDirection_worldSpace_normalized);
+ float size = GetSizeOfButtonCaps_withoutWeightFactorFromCapTypeApplied(theDrawXXLChartInspector_unserializedMonoB) * capSizeScaleFactor;
+ Quaternion rotation = Quaternion.LookRotation(sliderDirection_worldSpace_normalized);
+ capFunction(control_ID, currentPosition_ofBacksnapSlider, rotation, size, eventType);
+ }
+
+ static void DrawIcon_onOneDimensionalBacksnapSlider(float travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, Vector3 restingPosition, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB, Vector3 sliderDirection_worldSpace_normalized, GUIContent icon, float iconSizeFactor, Vector2 iconPositionOffset_inScreenspace_relToHandleCapSize)
+ {
+ if (SceneView.lastActiveSceneView != null)
+ {
+ float handleCapSize_inWorldSpace = GetSizeOfButtonCaps_withoutWeightFactorFromCapTypeApplied(theDrawXXLChartInspector_unserializedMonoB);
+
+ Vector3 worldSpaceOffset_thatShiftsTheIconAlongScreenspaceXDir = SceneView.lastActiveSceneView.camera.transform.right * handleCapSize_inWorldSpace * iconPositionOffset_inScreenspace_relToHandleCapSize.x;
+ Vector3 worldSpaceOffset_thatShiftsTheIconAlongScreenspaceYDir = SceneView.lastActiveSceneView.camera.transform.up * handleCapSize_inWorldSpace * iconPositionOffset_inScreenspace_relToHandleCapSize.y;
+ Vector3 iconPosition = Get_currentPosition_ofOneDimensionalBacksnapSlider(travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, restingPosition, sliderDirection_worldSpace_normalized) + worldSpaceOffset_thatShiftsTheIconAlongScreenspaceXDir + worldSpaceOffset_thatShiftsTheIconAlongScreenspaceYDir;
+ float iconSize_asFloat_inWorldSpace = handleCapSize_inWorldSpace * iconSizeFactor;
+ Vector2 iconSize_inPixels_asVector2 = ConvertIconSize_fromWorldspaceSize_toPixelSize(iconSize_asFloat_inWorldSpace, iconPosition);
+
+ Vector2 iconSize_before = EditorGUIUtility.GetIconSize();
+ EditorGUIUtility.SetIconSize(iconSize_inPixels_asVector2);
+ Handles.Label(iconPosition, icon);
+ EditorGUIUtility.SetIconSize(iconSize_before);
+ }
+ }
+
+ static Vector3 Get_currentPosition_ofOneDimensionalBacksnapSlider(float travelledWorldSpaceDistanceAlongDirection_sinceMouseDown, Vector3 restingPosition, Vector3 sliderDirection_worldSpace_normalized)
+ {
+ return (restingPosition + sliderDirection_worldSpace_normalized * travelledWorldSpaceDistanceAlongDirection_sinceMouseDown);
+ }
+
+ public static void TwoDirectionalBacksnapSlider(ref float travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown, ref float travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown, Vector3 restingPosition, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB, float capSizeScaleFactor, GUIContent icon, float iconSizeFactor, Vector2 iconPositionOffset_inScreenspace_relToHandleCapSize)
+ {
+ int control_ID = GUIUtility.GetControlID(FocusType.Passive);
+ Event currentEvent = Event.current;
+ switch (currentEvent.GetTypeForControl(control_ID))
+ {
+ case EventType.MouseDown:
+ if ((HandleUtility.nearestControl == control_ID) && (currentEvent.button == 0) && (currentEvent.alt == false))
+ {
+ GUIUtility.hotControl = control_ID;
+ mousePosition_duringMouseDown = currentEvent.mousePosition;
+ currentMousePosition = currentEvent.mousePosition;
+ theDrawXXLChartInspector_unserializedMonoB.SaveZoomAndScrollState_onMouseDown();
+ currentEvent.Use();
+ EditorGUIUtility.SetWantsMouseJumping(1);
+ }
+ break;
+ case EventType.MouseUp:
+ if (GUIUtility.hotControl == control_ID)
+ {
+ travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown = 0.0f;
+ travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown = 0.0f;
+ GUIUtility.hotControl = 0;
+ currentEvent.Use();
+ EditorGUIUtility.SetWantsMouseJumping(0);
+ }
+ break;
+ case EventType.MouseDrag:
+ if (GUIUtility.hotControl == control_ID)
+ {
+ currentMousePosition = currentMousePosition + currentEvent.delta;
+ travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown = HandleUtility.CalcLineTranslation(mousePosition_duringMouseDown, currentMousePosition, restingPosition, theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.xAxis.AxisVector_normalized_inWorldSpace);
+ travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown = HandleUtility.CalcLineTranslation(mousePosition_duringMouseDown, currentMousePosition, restingPosition, theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.yAxis.AxisVector_normalized_inWorldSpace);
+ GUI.changed = true;
+ currentEvent.Use();
+ }
+ break;
+ case EventType.Repaint:
+ Color color_before = Handles.color;
+ TrySetColorDuringMouseInteraction(control_ID, theDrawXXLChartInspector_unserializedMonoB, currentEvent);
+ DrawTwoDimensionalBacksnapSliderCap(control_ID, travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown, travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown, restingPosition, theDrawXXLChartInspector_unserializedMonoB, capSizeScaleFactor, EventType.Repaint);
+ Handles.color = color_before;
+ break;
+ case EventType.Layout:
+ DrawTwoDimensionalBacksnapSliderCap(control_ID, travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown, travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown, restingPosition, theDrawXXLChartInspector_unserializedMonoB, capSizeScaleFactor, EventType.Layout);
+ break;
+ default:
+ break;
+ }
+
+ DrawIcon_onTwoDimensionalBacksnapSlider(travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown, travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown, restingPosition, theDrawXXLChartInspector_unserializedMonoB, icon, iconSizeFactor, iconPositionOffset_inScreenspace_relToHandleCapSize);
+ }
+
+ static void DrawTwoDimensionalBacksnapSliderCap(int control_ID, float travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown, float travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown, Vector3 restingPosition, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB, float capSizeScaleFactor, EventType eventType)
+ {
+ Vector3 currentPosition_ofBacksnapSlider = Get_currentPosition_ofTwoDimensionalBacksnapSlider(travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown, travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown, restingPosition, theDrawXXLChartInspector_unserializedMonoB);
+ float size = GetSizeOfButtonCaps_withoutWeightFactorFromCapTypeApplied(theDrawXXLChartInspector_unserializedMonoB) * capSizeScaleFactor;
+ Handles.SphereHandleCap(control_ID, currentPosition_ofBacksnapSlider, Quaternion.identity, size, eventType);
+ }
+
+ static float GetSizeOfButtonCaps_withoutWeightFactorFromCapTypeApplied(DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB)
+ {
+ return theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.xAxis.Get_fixedConeLength_forBothAxisVectors();
+ }
+
+ static void DrawIcon_onTwoDimensionalBacksnapSlider(float travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown, float travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown, Vector3 restingPosition, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB, GUIContent icon, float iconSizeFactor, Vector2 iconPositionOffset_inScreenspace_relToHandleCapSize)
+ {
+ if (SceneView.lastActiveSceneView != null)
+ {
+ float handleCapSize_inWorldSpace = GetSizeOfButtonCaps_withoutWeightFactorFromCapTypeApplied(theDrawXXLChartInspector_unserializedMonoB);
+
+ Vector3 worldSpaceOffset_thatShiftsTheIconAlongScreenspaceXDir = SceneView.lastActiveSceneView.camera.transform.right * handleCapSize_inWorldSpace * iconPositionOffset_inScreenspace_relToHandleCapSize.x;
+ Vector3 worldSpaceOffset_thatShiftsTheIconAlongScreenspaceYDir = SceneView.lastActiveSceneView.camera.transform.up * handleCapSize_inWorldSpace * iconPositionOffset_inScreenspace_relToHandleCapSize.y;
+ Vector3 iconPosition = Get_currentPosition_ofTwoDimensionalBacksnapSlider(travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown, travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown, restingPosition, theDrawXXLChartInspector_unserializedMonoB) + worldSpaceOffset_thatShiftsTheIconAlongScreenspaceXDir + worldSpaceOffset_thatShiftsTheIconAlongScreenspaceYDir;
+ float iconSize_asFloat_inWorldSpace = handleCapSize_inWorldSpace * iconSizeFactor;
+ Vector2 iconSize_inPixels_asVector2 = ConvertIconSize_fromWorldspaceSize_toPixelSize(iconSize_asFloat_inWorldSpace, iconPosition);
+
+ Vector2 iconSize_before = EditorGUIUtility.GetIconSize();
+ EditorGUIUtility.SetIconSize(iconSize_inPixels_asVector2);
+ Handles.Label(iconPosition, icon);
+ EditorGUIUtility.SetIconSize(iconSize_before);
+ }
+ }
+
+ static Vector3 Get_currentPosition_ofTwoDimensionalBacksnapSlider(float travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown, float travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown, Vector3 restingPosition, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB)
+ {
+ Vector3 dragOffset_alongXAxis = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.xAxis.AxisVector_normalized_inWorldSpace * travelledWorldSpaceDistanceAlongChartsXDirection_sinceMouseDown;
+ Vector3 dragOffset_alongYAxis = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.yAxis.AxisVector_normalized_inWorldSpace * travelledWorldSpaceDistanceAlongChartsYDirection_sinceMouseDown;
+ return (restingPosition + dragOffset_alongXAxis + dragOffset_alongYAxis);
+ }
+
+
+ static Vector2 ConvertIconSize_fromWorldspaceSize_toPixelSize(float iconSize_asFloat_inWorldSpace, Vector3 iconPosition)
+ {
+ float iconSize_asFloat_inScreenspace0to1 = UtilitiesDXXL_Screenspace.WorldSpaceExtent_to_viewportSpaceExtentRelToScreenHeight(SceneView.lastActiveSceneView.camera, iconPosition, iconSize_asFloat_inWorldSpace);
+ float iconSize_inPixels = iconSize_asFloat_inScreenspace0to1 * SceneView.lastActiveSceneView.camera.pixelHeight;
+ return new Vector2(iconSize_inPixels, iconSize_inPixels);
+ }
+
+ static void TrySetColorDuringMouseInteraction(int control_ID, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB, Event currentEvent)
+ {
+ if (control_ID == GUIUtility.hotControl)
+ {
+ Handles.color = Handles.selectedColor;
+ }
+ else
+ {
+ if (IsHovering(control_ID, currentEvent))
+ {
+ Handles.color = Handles.preselectionColor;
+ }
+ else
+ {
+ Handles.color = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.color;
+ }
+ }
+ }
+
+ static bool IsHovering(int control_ID, Event currentEvent)
+ {
+ return ((GUIUtility.hotControl == 0) && (control_ID == HandleUtility.nearestControl) && (currentEvent.alt == false));
+ }
+
+ public static bool ShowAllButton(bool checkmarkState, Vector3 position, DrawXXLChartInspector theDrawXXLChartInspector_unserializedMonoB, float sizeScaleFactor, GUIContent checkmarkSymbol, GUIContent crossSymbol, float sizeFactor_forCheckmarkIcon, float sizeFactor_forCrossIcon, Vector2 checkmarkIconPositionOffset_inScreenspace_relToHandleCapSize, Vector2 crossIconPositionOffset_inScreenspace_relToHandleCapSize)
+ {
+ if (SceneView.lastActiveSceneView == null)
+ {
+ return checkmarkState;
+ }
+ else
+ {
+ Color handlesColor_before = Handles.color;
+
+ float size_withoutWeightFactorFromCapTypeApplied = GetSizeOfButtonCaps_withoutWeightFactorFromCapTypeApplied(theDrawXXLChartInspector_unserializedMonoB);
+ float size_withWeightFactorFromCapTypeAlreadyApplied = size_withoutWeightFactorFromCapTypeApplied * sizeScaleFactor;
+ float radius_ofButton = 0.5f * size_withWeightFactorFromCapTypeAlreadyApplied;//"0.5f" factor because "Handles.CircleHandleCap" as a 2D cap seems to interpret the specified size as "radius" differently form the 3D caps that interpret it as "diameter".
+ Handles.color = theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.color;
+ Vector3 normalOfSolidDisc = (-SceneView.lastActiveSceneView.camera.transform.forward);
+ Handles.DrawSolidDisc(position, normalOfSolidDisc, radius_ofButton);
+
+ GUIContent displayedIcon;
+ Vector3 worldSpaceOffset_thatShiftsTheIconAlongScreenspaceXDir;
+ Vector3 worldSpaceOffset_thatShiftsTheIconAlongScreenspaceYDir;
+ float iconSize_asFloat_inWorldSpace;
+ if (checkmarkState == true)
+ {
+ worldSpaceOffset_thatShiftsTheIconAlongScreenspaceXDir = SceneView.lastActiveSceneView.camera.transform.right * size_withoutWeightFactorFromCapTypeApplied * checkmarkIconPositionOffset_inScreenspace_relToHandleCapSize.x;
+ worldSpaceOffset_thatShiftsTheIconAlongScreenspaceYDir = SceneView.lastActiveSceneView.camera.transform.up * size_withoutWeightFactorFromCapTypeApplied * checkmarkIconPositionOffset_inScreenspace_relToHandleCapSize.y;
+ displayedIcon = checkmarkSymbol;
+ iconSize_asFloat_inWorldSpace = size_withoutWeightFactorFromCapTypeApplied * sizeFactor_forCheckmarkIcon;
+ }
+ else
+ {
+ worldSpaceOffset_thatShiftsTheIconAlongScreenspaceXDir = SceneView.lastActiveSceneView.camera.transform.right * size_withoutWeightFactorFromCapTypeApplied * crossIconPositionOffset_inScreenspace_relToHandleCapSize.x;
+ worldSpaceOffset_thatShiftsTheIconAlongScreenspaceYDir = SceneView.lastActiveSceneView.camera.transform.up * size_withoutWeightFactorFromCapTypeApplied * crossIconPositionOffset_inScreenspace_relToHandleCapSize.y;
+ displayedIcon = crossSymbol;
+ iconSize_asFloat_inWorldSpace = size_withoutWeightFactorFromCapTypeApplied * sizeFactor_forCrossIcon;
+ }
+ Vector3 posOfDisplayedIcon = position + worldSpaceOffset_thatShiftsTheIconAlongScreenspaceXDir + worldSpaceOffset_thatShiftsTheIconAlongScreenspaceYDir;
+ Vector2 iconSize_inPixels_asVector2 = ConvertIconSize_fromWorldspaceSize_toPixelSize(iconSize_asFloat_inWorldSpace, posOfDisplayedIcon);
+
+ Vector2 iconSize_before = EditorGUIUtility.GetIconSize();
+ EditorGUIUtility.SetIconSize(iconSize_inPixels_asVector2);
+ Handles.Label(posOfDisplayedIcon, displayedIcon);
+ EditorGUIUtility.SetIconSize(iconSize_before);
+
+ GUIStyle styleFor_showAllText = new GUIStyle();
+ float textSize_asFloat_inScreenspace0to1 = UtilitiesDXXL_Screenspace.WorldSpaceExtent_to_viewportSpaceExtentRelToScreenHeight(SceneView.lastActiveSceneView.camera, position, 0.7f * size_withoutWeightFactorFromCapTypeApplied);
+ float textSize_inPixels = textSize_asFloat_inScreenspace0to1 * SceneView.lastActiveSceneView.camera.pixelHeight;
+ styleFor_showAllText.fontSize = (int)textSize_inPixels;
+ //styleFor_showAllText.alignment = TextAnchor.UpperCenter; //-> is this a bug in Unity? All anchors with "right" behave as it would be "left". Also "Center" is not really the center, but slightly shifted. I place the text at a manually shifted position as a fallback.
+ string showAll_labelText = DrawText.MarkupColor("Show all", theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.color);
+ Vector3 positionOfText = position - SceneView.lastActiveSceneView.camera.transform.right * 3.4f * size_withWeightFactorFromCapTypeAlreadyApplied+ SceneView.lastActiveSceneView.camera.transform.up * 0.4f * size_withWeightFactorFromCapTypeAlreadyApplied;
+ Handles.Label(positionOfText, showAll_labelText, styleFor_showAllText);
+
+ Handles.color = UtilitiesDXXL_Colors.GetSimilarColorWithOtherBrightnessValue(theDrawXXLChartInspector_unserializedMonoB.chart_thisInspectorIsAttachedTo.color);
+ Quaternion rotation_ofButton = Quaternion.LookRotation(normalOfSolidDisc);
+ bool buttonHasBeenClicked = Handles.Button(position, rotation_ofButton, radius_ofButton, radius_ofButton, Handles.CircleHandleCap);
+ if (buttonHasBeenClicked)
+ {
+ checkmarkState = !checkmarkState;
+ }
+
+ Handles.color = handlesColor_before;
+
+ return checkmarkState;
+ }
+ }
+
+ }
+
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/Charts/line charts/internal utilities/InternalDXXL_ChartHandles.cs.meta b/Editor/DrawDebugLibrary/Charts/line charts/internal utilities/InternalDXXL_ChartHandles.cs.meta
new file mode 100644
index 0000000..0a82174
--- /dev/null
+++ b/Editor/DrawDebugLibrary/Charts/line charts/internal utilities/InternalDXXL_ChartHandles.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: acd864c428f8f6748ba54e9411c29224
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/CoordinateAxesGizmoVisualizerInspector.cs b/Editor/DrawDebugLibrary/CoordinateAxesGizmoVisualizerInspector.cs
new file mode 100644
index 0000000..47c7587
--- /dev/null
+++ b/Editor/DrawDebugLibrary/CoordinateAxesGizmoVisualizerInspector.cs
@@ -0,0 +1,67 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(CoordinateAxesGizmoVisualizer))]
+ [CanEditMultipleObjects]
+ public class CoordinateAxesGizmoVisualizerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("gizmo");
+
+ SerializedProperty sP_visualizedSpace = serializedObject.FindProperty("visualizedSpace");
+ EditorGUILayout.PropertyField(sP_visualizedSpace, new GUIContent("Visualized space"));
+ bool visualizedSpace_isTheGlobalSpace = sP_visualizedSpace.enumValueIndex == (int)CoordinateAxesGizmoVisualizer.VisualizedSpace.global;
+ bool isFallback_fromParentSpace_toGlobalSpace = false;
+ if (sP_visualizedSpace.enumValueIndex == (int)CoordinateAxesGizmoVisualizer.VisualizedSpace.localDefinedByParent)
+ {
+ if (transform_onVisualizerObject.parent == null)
+ {
+ EditorGUILayout.HelpBox("No parent available. Fallback to visualizing global space.", MessageType.None, true);
+ isFallback_fromParentSpace_toGlobalSpace = true;
+ }
+ }
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawXYZchars"), new GUIContent("Draw 'X', 'Y' and 'Z' chars"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("skipConeDrawing"), new GUIContent("Hide cones"));
+
+ SerializedProperty sP_forceAllAxesLength = serializedObject.FindProperty("forceAllAxesLength");
+ string label_for_forceAllAxesLength = "Force fixed axis length";
+ if (visualizedSpace_isTheGlobalSpace || isFallback_fromParentSpace_toGlobalSpace)
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.Toggle(new GUIContent(label_for_forceAllAxesLength, "This is only available in local space."), true);
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(sP_forceAllAxesLength, new GUIContent(label_for_forceAllAxesLength));
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ bool lengthChooser_isGreyedOut = (visualizedSpace_isTheGlobalSpace == false) && (isFallback_fromParentSpace_toGlobalSpace == false) && (sP_forceAllAxesLength.boolValue == false);
+ EditorGUI.BeginDisabledGroup(lengthChooser_isGreyedOut);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forceAllAxesLength_lengthValue"), new GUIContent("Forced length (global units)"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineWidth"), new GUIContent("Line width"));
+
+ Draw_DrawPosition3DOffset();
+ DrawTextInputInclMarkupHelper();
+ DrawCheckboxFor_drawOnlyIfSelected("gizmo");
+ DrawCheckboxFor_hiddenByNearerObjects("gizmo");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/CoordinateAxesGizmoVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/CoordinateAxesGizmoVisualizerInspector.cs.meta
new file mode 100644
index 0000000..aa5b7ba
--- /dev/null
+++ b/Editor/DrawDebugLibrary/CoordinateAxesGizmoVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 32753fd1601f35a4998ad62d08fdc489
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/CrossProductVisualizerInspector.cs b/Editor/DrawDebugLibrary/CrossProductVisualizerInspector.cs
new file mode 100644
index 0000000..e20e10b
--- /dev/null
+++ b/Editor/DrawDebugLibrary/CrossProductVisualizerInspector.cs
@@ -0,0 +1,79 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(CrossProductVisualizer))]
+ [CanEditMultipleObjects]
+ public class CrossProductVisualizerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("cross product");
+
+ SerializedProperty sP_colorOfVector1_forCrossProduct = serializedObject.FindProperty("colorOfVector1_forCrossProduct");
+ SerializedProperty sP_colorOfVector2_forCrossProduct = serializedObject.FindProperty("colorOfVector2_forCrossProduct");
+ SerializedProperty sP_colorOfResultVector_forCrossProduct = serializedObject.FindProperty("colorOfResultVector_forCrossProduct");
+
+ DrawSpecificationOf_customVector3_1("Input Vector 1 lhs (thumb of left hand)", false, null, false, false, true, false);
+ DrawSpecificationOf_customVector3_2("Input Vector 2 rhs (index finger of left hand)", false, null, false, false, true, false);
+
+ GUIStyle style_ofResultHeadline = new GUIStyle();
+ style_ofResultHeadline.richText = true;
+ EditorGUILayout.LabelField("Cross Product Result (middle finger of left hand)", style_ofResultHeadline);
+
+ EditorGUI.indentLevel++;
+
+ Vector3 vector1_lhs_leftThumb = visualizerParentMonoBehaviour_unserialized.Get_customVector3_1_inGlobalSpaceUnits();
+ Vector3 vector2_rhs_leftIndexFinger = visualizerParentMonoBehaviour_unserialized.Get_customVector3_2_inGlobalSpaceUnits();
+ Vector3 crossProductResult = Vector3.Cross(vector1_lhs_leftThumb, vector2_rhs_leftIndexFinger);
+ EditorGUILayout.Vector3Field(GUIContent.none, crossProductResult);
+
+ EditorGUI.indentLevel--;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ DrawColorSection(sP_colorOfVector1_forCrossProduct, sP_colorOfVector2_forCrossProduct, sP_colorOfResultVector_forCrossProduct);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("linesWidth"), new GUIContent("Lines width"));
+
+ Draw_DrawPosition3DOffset();
+ DrawCheckboxFor_drawOnlyIfSelected("cross product");
+ DrawCheckboxFor_hiddenByNearerObjects("cross product");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawColorSection(SerializedProperty sP_colorOfVector1_forCrossProduct, SerializedProperty sP_colorOfVector2_forCrossProduct, SerializedProperty sP_colorOfResultVector_forCrossProduct)
+ {
+ SerializedProperty sP_colorSection_isOutfolded = serializedObject.FindProperty("colorSection_isOutfolded");
+ sP_colorSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_colorSection_isOutfolded.boolValue, "Colors", true);
+ if (sP_colorSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel++;
+
+ SerializedProperty sP_colorOfAngle_forCrossProduct = serializedObject.FindProperty("colorOfAngle_forCrossProduct");
+ SerializedProperty sP_colorOfResultText_forCrossProduct = serializedObject.FindProperty("colorOfResultText_forCrossProduct");
+ SerializedProperty sP_colorOfResultPlane_forCrossProduct = serializedObject.FindProperty("colorOfResultPlane_forCrossProduct");
+
+ EditorGUILayout.PropertyField(sP_colorOfVector1_forCrossProduct, new GUIContent("Input Vector 1 (lhs)"));
+ EditorGUILayout.PropertyField(sP_colorOfVector2_forCrossProduct, new GUIContent("Input Vector 2 (rhs)"));
+ EditorGUILayout.PropertyField(sP_colorOfResultVector_forCrossProduct, new GUIContent("Result Vector"));
+ EditorGUILayout.PropertyField(sP_colorOfResultText_forCrossProduct, new GUIContent("Result Text"));
+ EditorGUILayout.PropertyField(sP_colorOfResultPlane_forCrossProduct, new GUIContent("Result Plane"));
+ EditorGUILayout.PropertyField(sP_colorOfAngle_forCrossProduct, new GUIContent("Angle"));
+
+ EditorGUI.indentLevel--;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/CrossProductVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/CrossProductVisualizerInspector.cs.meta
new file mode 100644
index 0000000..9459747
--- /dev/null
+++ b/Editor/DrawDebugLibrary/CrossProductVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0fded1b9a9789ca4cb83052837eb70cd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/DotProductVisualizerInspector.cs b/Editor/DrawDebugLibrary/DotProductVisualizerInspector.cs
new file mode 100644
index 0000000..4d11bc5
--- /dev/null
+++ b/Editor/DrawDebugLibrary/DotProductVisualizerInspector.cs
@@ -0,0 +1,74 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(DotProductVisualizer))]
+ [CanEditMultipleObjects]
+ public class DotProductVisualizerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("dot product");
+
+ SerializedProperty sP_colorOfVector1_forDotProduct = serializedObject.FindProperty("colorOfVector1_forDotProduct");
+ SerializedProperty sP_colorOfVector2_forDotProduct = serializedObject.FindProperty("colorOfVector2_forDotProduct");
+
+ DrawSpecificationOf_customVector3_1("Input Vector 1 lhs", false, null, false, false, true, false);
+ DrawSpecificationOf_customVector3_2("Input Vector 2 rhs", false, null, false, false, true, false);
+
+ GUIStyle style_ofResultHeadline = new GUIStyle();
+ style_ofResultHeadline.fontStyle = FontStyle.Bold;
+ EditorGUILayout.LabelField("Dot Product Result", style_ofResultHeadline);
+
+ EditorGUI.indentLevel++;
+
+ Vector3 vector1_lhs = visualizerParentMonoBehaviour_unserialized.Get_customVector3_1_inGlobalSpaceUnits();
+ Vector3 vector2_rhs = visualizerParentMonoBehaviour_unserialized.Get_customVector3_2_inGlobalSpaceUnits();
+ float dotProductResult = Vector3.Dot(vector1_lhs, vector2_rhs);
+ EditorGUILayout.FloatField(dotProductResult);
+
+ EditorGUI.indentLevel--;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ DrawColorSection(sP_colorOfVector1_forDotProduct, sP_colorOfVector2_forDotProduct);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("linesWidth"), new GUIContent("Lines width"));
+
+ Draw_DrawPosition3DOffset();
+ DrawCheckboxFor_drawOnlyIfSelected("dot product");
+ DrawCheckboxFor_hiddenByNearerObjects("dot product");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawColorSection(SerializedProperty sP_colorOfVector1_forDotProduct, SerializedProperty sP_colorOfVector2_forDotProduct)
+ {
+ SerializedProperty sP_colorSection_isOutfolded = serializedObject.FindProperty("colorSection_isOutfolded");
+ sP_colorSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_colorSection_isOutfolded.boolValue, "Colors", true);
+ if (sP_colorSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel++;
+
+ SerializedProperty sP_colorOfAngle_forDotProduct = serializedObject.FindProperty("colorOfAngle_forDotProduct");
+ SerializedProperty sP_colorOfResult_forDotProduct = serializedObject.FindProperty("colorOfResult_forDotProduct");
+
+ EditorGUILayout.PropertyField(sP_colorOfVector1_forDotProduct, new GUIContent("Input Vector 1 (lhs)"));
+ EditorGUILayout.PropertyField(sP_colorOfVector2_forDotProduct, new GUIContent("Input Vector 2 (rhs)"));
+ EditorGUILayout.PropertyField(sP_colorOfResult_forDotProduct, new GUIContent("Result Text"));
+ EditorGUILayout.PropertyField(sP_colorOfAngle_forDotProduct, new GUIContent("Angle"));
+
+ EditorGUI.indentLevel--;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/DotProductVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/DotProductVisualizerInspector.cs.meta
new file mode 100644
index 0000000..f57613f
--- /dev/null
+++ b/Editor/DrawDebugLibrary/DotProductVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6f42cc1005d171c459996aa0f929ec3e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/DrawXXLSpline2DConnectionInspector.cs b/Editor/DrawDebugLibrary/DrawXXLSpline2DConnectionInspector.cs
new file mode 100644
index 0000000..d4e8704
--- /dev/null
+++ b/Editor/DrawDebugLibrary/DrawXXLSpline2DConnectionInspector.cs
@@ -0,0 +1,34 @@
+namespace DrawXXL
+{
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(DrawXXLSpline2DConnection))]
+ public class DrawXXLSpline2DConnectionInspector : Editor
+ {
+ DrawXXLSpline2DConnection drawXXLSplineConnection_unserializedMonoB;
+
+ void OnEnable()
+ {
+ drawXXLSplineConnection_unserializedMonoB = (DrawXXLSpline2DConnection)target;
+ }
+
+ public override void OnInspectorGUI()
+ {
+ string helpBoxString;
+ if ((drawXXLSplineConnection_unserializedMonoB != null) && (drawXXLSplineConnection_unserializedMonoB.bezierSplineDrawer_thatHasReferencedThisGameobject != null))
+ {
+ helpBoxString = "This component handles the connection of this gameobject to the 2D-spline at " + drawXXLSplineConnection_unserializedMonoB.bezierSplineDrawer_thatHasReferencedThisGameobject.gameObject.name + ", specifically to the " + InternalDXXL_BezierControlSubPoint.GetSubPointTypeAsString(drawXXLSplineConnection_unserializedMonoB.subPointType_whereThisGameobjectIsBoundTo) + " of control point " + drawXXLSplineConnection_unserializedMonoB.i_ofControlPointTriplet_thisGameobjectIsBoundTo + " there." + Environment.NewLine + "It was automatically created and will get automatically deleted if it is not used anymore." + Environment.NewLine + "You can end the assignment in the spline inspector or simply by deleting this component.";
+ }
+ else
+ {
+ helpBoxString = "This component handles the connection of this gameobject to a 2D-spline, but it seems that the spline reference got lost.";
+ }
+ EditorGUILayout.HelpBox(helpBoxString, MessageType.Info, true);
+ }
+ }
+#endif
+
+}
\ No newline at end of file
diff --git a/Editor/DrawDebugLibrary/DrawXXLSpline2DConnectionInspector.cs.meta b/Editor/DrawDebugLibrary/DrawXXLSpline2DConnectionInspector.cs.meta
new file mode 100644
index 0000000..16a384c
--- /dev/null
+++ b/Editor/DrawDebugLibrary/DrawXXLSpline2DConnectionInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 401001f9fd33e2848bd96d4260d9c31b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/DrawXXLSplineConnectionInspector.cs b/Editor/DrawDebugLibrary/DrawXXLSplineConnectionInspector.cs
new file mode 100644
index 0000000..b005c30
--- /dev/null
+++ b/Editor/DrawDebugLibrary/DrawXXLSplineConnectionInspector.cs
@@ -0,0 +1,34 @@
+namespace DrawXXL
+{
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(DrawXXLSplineConnection))]
+ public class DrawXXLSplineConnectionInspector : Editor
+ {
+ DrawXXLSplineConnection drawXXLSplineConnection_unserializedMonoB;
+
+ void OnEnable()
+ {
+ drawXXLSplineConnection_unserializedMonoB = (DrawXXLSplineConnection)target;
+ }
+
+ public override void OnInspectorGUI()
+ {
+ string helpBoxString;
+ if ((drawXXLSplineConnection_unserializedMonoB != null) && (drawXXLSplineConnection_unserializedMonoB.bezierSplineDrawer_thatHasReferencedThisGameobject != null))
+ {
+ helpBoxString = "This component handles the connection of this gameobject to the spline at " + drawXXLSplineConnection_unserializedMonoB.bezierSplineDrawer_thatHasReferencedThisGameobject.gameObject.name + ", specifically to the " + InternalDXXL_BezierControlSubPoint.GetSubPointTypeAsString(drawXXLSplineConnection_unserializedMonoB.subPointType_whereThisGameobjectIsBoundTo) + " of control point " + drawXXLSplineConnection_unserializedMonoB.i_ofControlPointTriplet_thisGameobjectIsBoundTo + " there." + Environment.NewLine + "It was automatically created and will get automatically deleted if it is not used anymore." + Environment.NewLine + "You can end the assignment in the spline inspector or simply by deleting this component.";
+ }
+ else
+ {
+ helpBoxString = "This component handles the connection of this gameobject to a spline, but it seems that the spline reference got lost.";
+ }
+ EditorGUILayout.HelpBox(helpBoxString, MessageType.Info, true);
+ }
+ }
+#endif
+
+}
\ No newline at end of file
diff --git a/Editor/DrawDebugLibrary/DrawXXLSplineConnectionInspector.cs.meta b/Editor/DrawDebugLibrary/DrawXXLSplineConnectionInspector.cs.meta
new file mode 100644
index 0000000..1913ae1
--- /dev/null
+++ b/Editor/DrawDebugLibrary/DrawXXLSplineConnectionInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 901b6c442d03f8549a094a8cd268a0c4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/DrawXXL_LinesManagerInspector.cs b/Editor/DrawDebugLibrary/DrawXXL_LinesManagerInspector.cs
new file mode 100644
index 0000000..4601d6d
--- /dev/null
+++ b/Editor/DrawDebugLibrary/DrawXXL_LinesManagerInspector.cs
@@ -0,0 +1,27 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(DrawXXL_LinesManager))]
+ public class DrawXXL_LinesManagerInspector : Editor
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ EditorGUILayout.HelpBox("The checkbox below has this effect:" + Environment.NewLine + Environment.NewLine + "Outside of Playmode the Scene View window and Game View window do not ongoingly refresh themselfes as they do in playmode. Instead they just repaint on certain occasions, e.g. when a gameobject with a mesh is moved. When drawing in Edit mode from code this creates the problem that what you see on screen in the Scene or Game View doesn't neccessarily represent what you are currently drawing from code. For example if you draw a 'BoolDisplayer' to debug a changing bool value the display on screen may be wrong and still display an old value." + Environment.NewLine + "The Gizmo Line Count Manager Component here can fix this and let the display always show the most current value by continuously repainting the Scene and Game view. The downside of this fix is that it costs performance. Disabling it may make sense if you know that the things you are drawing anyway only change if a visible object in the Scene changes, e.g. when the player model changes its position or rotation." + Environment.NewLine + Environment.NewLine + "A disabled checkbox here may have no effect if other components are already continuously repainting the windows, like 'Draw XXL Chart Inspector' or 'Line Drawer' (with animated lines).", MessageType.None, true);
+
+ SerializedProperty sP_gizmoLineCountManagerAutomaticallyRepaintsRendering = serializedObject.FindProperty("gizmoLineCountManagerAutomaticallyRepaintsRendering");
+ sP_gizmoLineCountManagerAutomaticallyRepaintsRendering.boolValue = EditorGUILayout.ToggleLeft(new GUIContent("Continuous Repaint in Edit Mode"), sP_gizmoLineCountManagerAutomaticallyRepaintsRendering.boolValue);
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/DrawXXL_LinesManagerInspector.cs.meta b/Editor/DrawDebugLibrary/DrawXXL_LinesManagerInspector.cs.meta
new file mode 100644
index 0000000..e874ca3
--- /dev/null
+++ b/Editor/DrawDebugLibrary/DrawXXL_LinesManagerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3394f803bdab16d4686e5575563401c7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/GridVisualizerInspector.cs b/Editor/DrawDebugLibrary/GridVisualizerInspector.cs
new file mode 100644
index 0000000..b77e698
--- /dev/null
+++ b/Editor/DrawDebugLibrary/GridVisualizerInspector.cs
@@ -0,0 +1,243 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(GridVisualizer))]
+ [CanEditMultipleObjects]
+ public class GridVisualizerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("grid");
+
+ SerializedProperty sP_spaceType = serializedObject.FindProperty("spaceType");
+ EditorGUILayout.PropertyField(sP_spaceType, new GUIContent("Visualized space"));
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ SerializedProperty sP_xGridType = serializedObject.FindProperty("xGridType");
+ SerializedProperty sP_yGridType = serializedObject.FindProperty("yGridType");
+ SerializedProperty sP_zGridType = serializedObject.FindProperty("zGridType");
+
+ EditorGUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_xGridType, new GUIContent("X"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForX"), GUIContent.none);
+ EditorGUILayout.EndHorizontal();
+
+ EditorGUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_yGridType, new GUIContent("Y"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForY"), GUIContent.none);
+ EditorGUILayout.EndHorizontal();
+
+ EditorGUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_zGridType, new GUIContent("Z"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForZ"), GUIContent.none);
+ EditorGUILayout.EndHorizontal();
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ GUIStyle style_forFoldoutLine = new GUIStyle(EditorStyles.foldout);
+ style_forFoldoutLine.fontStyle = FontStyle.Bold;
+
+ GUIStyle style_ofHeadlines = new GUIStyle();
+ style_ofHeadlines.fontStyle = FontStyle.Bold;
+
+ DrawOrdersOfMagnitudeSection(style_forFoldoutLine);
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ bool noDimensionIsDisplayed_asPlane = ((sP_xGridType.enumValueIndex != (int)GridVisualizer.XGridType.planes) && (sP_yGridType.enumValueIndex != (int)GridVisualizer.YGridType.planes) && (sP_zGridType.enumValueIndex != (int)GridVisualizer.ZGridType.planes));
+ bool planesSection_isDisabled = noDimensionIsDisplayed_asPlane;
+ EditorGUI.BeginDisabledGroup(planesSection_isDisabled);
+ EditorGUILayout.LabelField(planesSection_isDisabled ? "Planes details (no planes are activated, see above at X, Y and Z)" : "Planes details", style_ofHeadlines);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_coveredGridUnits_rel_forGridPlanes = serializedObject.FindProperty("coveredGridUnits_rel_forGridPlanes");
+ sP_coveredGridUnits_rel_forGridPlanes.floatValue = EditorGUILayout.FloatField(new GUIContent("Covered grid units", "This is relative to the biggest drawn order of magnitude." + Environment.NewLine + Environment.NewLine + "The minimum value is 2.5"), sP_coveredGridUnits_rel_forGridPlanes.floatValue);
+ sP_coveredGridUnits_rel_forGridPlanes.floatValue = Mathf.Max(sP_coveredGridUnits_rel_forGridPlanes.floatValue, 2.5f);
+
+ SerializedProperty sP_extentOfEachGridPlane_rel = serializedObject.FindProperty("extentOfEachGridPlane_rel");
+ EditorGUILayout.PropertyField(sP_extentOfEachGridPlane_rel, new GUIContent("Size", "This is relative to the smallest drawn order of magnitude." + Environment.NewLine + Environment.NewLine + "The minimum value is 0.1"));
+ sP_extentOfEachGridPlane_rel.floatValue = Mathf.Max(sP_extentOfEachGridPlane_rel.floatValue, 0.1f);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawDensity"), new GUIContent("Density"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ EditorGUI.EndDisabledGroup();
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ bool noDimensionIsDisplayed_asLine = ((sP_xGridType.enumValueIndex != (int)GridVisualizer.XGridType.linesAlongY) && (sP_xGridType.enumValueIndex != (int)GridVisualizer.XGridType.linesAlongZ) && (sP_yGridType.enumValueIndex != (int)GridVisualizer.YGridType.linesAlongX) && (sP_yGridType.enumValueIndex != (int)GridVisualizer.YGridType.linesAlongZ) && (sP_zGridType.enumValueIndex != (int)GridVisualizer.ZGridType.linesAlongX) && (sP_zGridType.enumValueIndex != (int)GridVisualizer.ZGridType.linesAlongY));
+ EditorGUI.BeginDisabledGroup(noDimensionIsDisplayed_asLine);
+ EditorGUILayout.LabelField(noDimensionIsDisplayed_asLine ? "Lines details (no lines are activated, see above at X, Y and Z)" : "Lines details", style_ofHeadlines);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_coveredGridUnits_rel = serializedObject.FindProperty("coveredGridUnits_rel");
+ EditorGUILayout.PropertyField(sP_coveredGridUnits_rel, new GUIContent("Covered grid units", "This is relative to the biggest drawn order of magnitude." + Environment.NewLine + Environment.NewLine + "The minimum value is 2.5"));
+ sP_coveredGridUnits_rel.floatValue = Mathf.Max(sP_coveredGridUnits_rel.floatValue, 2.5f);
+
+ SerializedProperty sP_lengthOfEachGridLine_rel = serializedObject.FindProperty("lengthOfEachGridLine_rel");
+ EditorGUILayout.PropertyField(sP_lengthOfEachGridLine_rel, new GUIContent("Length", "This is relative to the smallest drawn order of magnitude." + Environment.NewLine + Environment.NewLine + "The minimum value is 0.1"));
+ sP_lengthOfEachGridLine_rel.floatValue = Mathf.Max(sP_lengthOfEachGridLine_rel.floatValue, 0.1f);
+
+ DrawLineWidth();
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ EditorGUI.EndDisabledGroup();
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ DrawCoordinateDisplaySection(sP_spaceType);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("show_positionAroundWhichToDraw_forGrids"), new GUIContent("Visualize Position"));
+
+ SerializedProperty sP_show_distanceDisplay_forGrids = serializedObject.FindProperty("show_distanceDisplay_forGrids");
+ EditorGUILayout.PropertyField(sP_show_distanceDisplay_forGrids, new GUIContent("Visualize Distance of Position to Grid"));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUI.BeginDisabledGroup(!sP_show_distanceDisplay_forGrids.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("offsetForDistanceDisplays_inGrids"), new GUIContent("Offset for Distance Display"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ Draw_DrawPosition3DOffset();
+ DrawCheckboxFor_drawOnlyIfSelected("grid");
+ DrawCheckboxFor_hiddenByNearerObjects("grid");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawOrdersOfMagnitudeSection(GUIStyle style_forFoldoutLine)
+ {
+ SerializedProperty sP_magnitudeOrderSection_isOutfolded = serializedObject.FindProperty("magnitudeOrderSection_isOutfolded");
+ sP_magnitudeOrderSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_magnitudeOrderSection_isOutfolded.boolValue, "Drawn orders of magnitude", true, style_forFoldoutLine);
+ if (sP_magnitudeOrderSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("draw1000grid"), new GUIContent("1000"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("draw100grid"), new GUIContent("100"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("draw10grid"), new GUIContent("10"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("draw1grid"), new GUIContent("1"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("draw0p1grid"), new GUIContent("0.1"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("draw0p01grid"), new GUIContent("0.01"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("draw0p001grid"), new GUIContent("0.001"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawLineWidth()
+ {
+ SerializedProperty sP_lineWidthMode = serializedObject.FindProperty("lineWidthMode");
+ SerializedProperty sP_linesWidth_alongVisualizedAxis = serializedObject.FindProperty("linesWidth_alongVisualizedAxis");
+ SerializedProperty sP_linesWidth_perpendicularToVisualizedAxis = serializedObject.FindProperty("linesWidth_perpendicularToVisualizedAxis");
+
+ EditorGUILayout.PropertyField(sP_lineWidthMode, new GUIContent("Line width direction"));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ if (sP_lineWidthMode.enumValueIndex == (int)GridVisualizer.LineWidthMode.growAlongVisualizedAxis)
+ {
+ EditorGUI.BeginChangeCheck();
+ EditorGUILayout.PropertyField(sP_linesWidth_alongVisualizedAxis, new GUIContent("Line width", "This is relative to the concerned order of magnitude."));
+ bool hasChanged = EditorGUI.EndChangeCheck();
+
+ if (hasChanged)
+ {
+ sP_linesWidth_perpendicularToVisualizedAxis.floatValue = sP_linesWidth_alongVisualizedAxis.floatValue;
+ }
+ }
+ else
+ {
+ EditorGUI.BeginChangeCheck();
+ EditorGUILayout.PropertyField(sP_linesWidth_perpendicularToVisualizedAxis, new GUIContent("Line width", "This is relative to the concerned order of magnitude."));
+ sP_linesWidth_perpendicularToVisualizedAxis.floatValue = Mathf.Max(sP_linesWidth_perpendicularToVisualizedAxis.floatValue, 0.0f);
+ bool hasChanged = EditorGUI.EndChangeCheck();
+
+ if (hasChanged)
+ {
+ sP_linesWidth_alongVisualizedAxis.floatValue = sP_linesWidth_perpendicularToVisualizedAxis.floatValue;
+ sP_linesWidth_alongVisualizedAxis.floatValue = Mathf.Min(sP_linesWidth_alongVisualizedAxis.floatValue, GridVisualizer.max_linesWidth_alongVisualizedAxis);
+ }
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawCoordinateDisplaySection(SerializedProperty sP_spaceType)
+ {
+ SerializedProperty sP_repeatingCoordsTextVariant = serializedObject.FindProperty("repeatingCoordsTextVariant");
+ EditorGUILayout.PropertyField(sP_repeatingCoordsTextVariant, new GUIContent("Coordiantes Display"));
+
+ switch (sP_repeatingCoordsTextVariant.enumValueIndex)
+ {
+ case (int)GridVisualizer.RepeatingCoordsTextVariant.repeatAfterDistance:
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_distanceBetweenRepeatingCoordsTexts_relToGridDistance = serializedObject.FindProperty("distanceBetweenRepeatingCoordsTexts_relToGridDistance");
+ EditorGUILayout.PropertyField(sP_distanceBetweenRepeatingCoordsTexts_relToGridDistance, new GUIContent("Text distance between repeating coordinates", "This is relative to the grid distance." + Environment.NewLine + "The minimum value is 5." + Environment.NewLine + "You may see changes only if the length/extent of the lines/planes is long enough."));
+ sP_distanceBetweenRepeatingCoordsTexts_relToGridDistance.floatValue = Mathf.Max(sP_distanceBetweenRepeatingCoordsTexts_relToGridDistance.floatValue, UtilitiesDXXL_Grid.min_distanceBetweenRepeatingCoordsTexts_relToGridDistance);
+ DrawSharedFieldsOfNonDisabledCoordinateTextModes( sP_spaceType);
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ case (int)GridVisualizer.RepeatingCoordsTextVariant.displayOnlyOnce:
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ DrawSharedFieldsOfNonDisabledCoordinateTextModes( sP_spaceType);
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ break;
+ case (int)GridVisualizer.RepeatingCoordsTextVariant.noDisplay:
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawSharedFieldsOfNonDisabledCoordinateTextModes(SerializedProperty sP_spaceType)
+ {
+ GUIContent coordinateTextOffset_GUIContent = new GUIContent("Text Position", "This is relative to the containing order of magnitude.");
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("offsetForCoordinateTextDisplays_inGrids"), coordinateTextOffset_GUIContent);
+
+ GUIContent textSize_GUIContent = new GUIContent("Text Size", "This is relative to the containing order of magnitude.");
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("sizeScalingForCoordinateTexts_inGrids"), textSize_GUIContent);
+
+ GUIContent skipXYZAxisIdentifier_GUIContent = new GUIContent("Skip 'X/Y/Z =' prefix", "This can save performance for large grid displays." + Environment.NewLine + Environment.NewLine + "The initial value of created components for this can be defined via 'DrawEngineBasics.skipXYZAxisIdentifier_inCoordinateTextsOnGridAxes'.");
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("skipXYZAxisIdentifier_inCoordinateTextsOnGridAxes"), skipXYZAxisIdentifier_GUIContent);
+
+ if (GridDisplaysALocalSpace(sP_spaceType))
+ {
+ GUIContent skipLocalPrefix_GUIContent = new GUIContent("Skip 'local' prefix", "This can save performance for large grid displays." + Environment.NewLine + Environment.NewLine + "The initial value of created components for this can be defined via 'DrawEngineBasics.skipLocalPrefix_inCoordinateTextsOnGridAxes'.");
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("skipLocalPrefix_inCoordinateTextsOnGridAxes"), skipLocalPrefix_GUIContent);
+ }
+ }
+
+ bool GridDisplaysALocalSpace(SerializedProperty sP_spaceType)
+ {
+ switch (sP_spaceType.enumValueIndex)
+ {
+ case (int)GridVisualizer.SpaceType.global:
+ return false;
+ case (int)GridVisualizer.SpaceType.localDefinedByParent:
+ return true;
+ case (int)GridVisualizer.SpaceType.localDefinedByThisGameobject:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/GridVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/GridVisualizerInspector.cs.meta
new file mode 100644
index 0000000..b6e2b0a
--- /dev/null
+++ b/Editor/DrawDebugLibrary/GridVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 82494d6c58341c1489793e19c128e441
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/HandlesExamples.cs b/Editor/DrawDebugLibrary/HandlesExamples.cs
new file mode 100644
index 0000000..a79937d
--- /dev/null
+++ b/Editor/DrawDebugLibrary/HandlesExamples.cs
@@ -0,0 +1,773 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+#endif
+
+ public class HandlesExamples
+ {
+#if UNITY_EDITOR
+ //use Draw XXL draw operations only from inside "OnSceneGUI()" after you have set "DrawBasics.usedUnityLineDrawingMethod" to "handlesLines" (as it happens in "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()").
+ //-> This also ensures that the function calls will be automatically stripped from the code when building, which prevents build errors, since the functions inside this HandlesExamples-class are not present outside of the Editor.
+
+ //Analyzing the code in this class probably only be useful for you if you are already familiar with using custom Handles/Unitys Handles class. If not, this blog post provides good insights on the way of thinking behind it: https://blog.unity.com/technology/going-deep-with-imgui-and-editor-customization
+
+ static DrawBasics.UsedUnityLineDrawingMethod usedLineDrawingMethod_before;
+ static DrawText.AutomaticTextOrientation automaticTextOrientation_before;
+ static DrawBasics.CameraForAutomaticOrientation cameraForAutomaticOrientation_before;
+ static DrawShapes.AutomaticOrientationOfFlatShapes automaticOrientationOfFlatShapes_before;
+ public static void ConfigureDrawXXLsGlobalSettingsForDrawingHandles()
+ {
+ //-> "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()" is setting some global Draw XXL settings so that drawing with Handles can be done with less thinking. The affected settings are "DrawBasics.usedLineDrawingMethod", "DrawText.automaticTextOrientation" and "DrawBasics.cameraForAutomaticOrientation". Moreover the settings as they were before get saved, so they can be easily restored afterwards by "RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore()". This ensures that these settings don't interfere with other code that draws with Draw XXL, e.g. from within "Update()".
+ //-> This function is recommended to be used in conjunction with the "RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ //-> When drawing with Draw XXL inside "OnSceneGUI()" the recommended pattern is to call "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()", then use the Draw XXL drawing functions to draw whatever you like, and then calling "RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore()"
+
+ //Saving the settings as the were before:
+ usedLineDrawingMethod_before = DrawBasics.usedUnityLineDrawingMethod;
+ automaticTextOrientation_before = DrawText.automaticTextOrientation;
+ cameraForAutomaticOrientation_before = DrawBasics.cameraForAutomaticOrientation;
+ automaticOrientationOfFlatShapes_before = DrawShapes.automaticOrientationOfFlatShapes;
+
+ //Instructing Draw XXL which configuration to use for the current Handle drawing:
+ DrawBasics.usedUnityLineDrawingMethod = DrawBasics.UsedUnityLineDrawingMethod.handlesLines; //-> this cannot interfere with the automatic fallback of "usedUnityLineDrawingMethod" to "mesh" in builds, since the whole "HandlesExamples" class is stripped in builds.
+ DrawText.automaticTextOrientation = DrawText.AutomaticTextOrientation.screen;
+ DrawBasics.cameraForAutomaticOrientation = DrawBasics.CameraForAutomaticOrientation.sceneViewCamera;
+ DrawShapes.automaticOrientationOfFlatShapes = DrawShapes.AutomaticOrientationOfFlatShapes.screen;
+
+ }
+
+ public static void RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore()
+ {
+ //-> This funciton reverts the global Draw XXL settings which "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()" has adjusted to what they were before.
+ //-> This function should only be used in conjunction with the "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ //-> When drawing with Draw XXL inside "OnSceneGUI()" the recommended pattern is to call "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()", then use the Draw XXL drawing functions to draw whatever you like, and then calling "RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore()"
+
+ //Reverting the global configuration values that have been set before by "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()":
+ DrawBasics.usedUnityLineDrawingMethod = usedLineDrawingMethod_before; //-> this cannot interfere with the automatic fallback of "usedUnityLineDrawingMethod" to "wireMesh" in builds, since the whole "HandlesExamples" class is stripped in builds.
+ DrawText.automaticTextOrientation = automaticTextOrientation_before;
+ DrawBasics.cameraForAutomaticOrientation = cameraForAutomaticOrientation_before;
+ DrawShapes.automaticOrientationOfFlatShapes = automaticOrientationOfFlatShapes_before;
+ }
+
+ public static void DrawLine(Vector3 start, Vector3 end, float thickness = 0.0f, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, string text = null)
+ {
+ //This funcion is like "Handles.DrawLine()" but with two additinal optional parameters that can change the style of the line and add a text along the line.
+ if (Event.current.type == EventType.Repaint) //-> Draw with Draw XXL only inside the "Repaint"-event, otherwise the "DrawBasics.MaxAllowedDrawnLinesPerFrame"-mechanic will get confused and restricts the drawing earlier than neccessary.
+ {
+ Vector3 theMiddleOfTheLine = 0.5f * (start + end);
+ float screenSizeThatAHandleWouldHaveAtTheLine = HandleUtility.GetHandleSize(theMiddleOfTheLine);
+ float stylePatternScaleFactor = 5.0f * screenSizeThatAHandleWouldHaveAtTheLine; //-> this lets the line style pattern appear approximately constant in screenspace, no matter how far the line is away from the camera, which may be desired if the line is part of a handle whose size is constant in screenspace.
+ float width_worldSpace = 0.01f * thickness * screenSizeThatAHandleWouldHaveAtTheLine; //-> converting the width to be constant in screenspace, though here in somehow arbitrary units.
+ Color color = Handles.color; //-> When Draw XXL draws with Unitys Handles-Lines it doesn't automatically detect the "Handles.color", but instead takes the color that is specified as parameter argument in the draw function, or else falls back to "DrawBasics.defaultColor"
+
+ ConfigureDrawXXLsGlobalSettingsForDrawingHandles(); //-> This function is recommended to be used in conjunction with the "RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ DrawBasics.Line(start, end, color, width_worldSpace, text, style, stylePatternScaleFactor);
+ RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore(); //-> This function should be used in conjunction with the "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ }
+ }
+
+ static Vector3 sliderPosition_duringMouseDown;
+ public static Vector3 SliderWithOffsetDisplay(Vector3 position, Vector3 direction)
+ {
+ return SliderWithOffsetDisplay(position, direction, HandleUtility.GetHandleSize(position), Handles.ArrowHandleCap, -1.0f);
+ }
+
+ public static Vector3 SliderWithOffsetDisplay(Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction, float snap)
+ {
+ //this is like Unitys "Handles.Slider" function, but additionally the dragged offset value is displayed together with a green or red arrow that indicates if the value change is positive or negative
+ //Sidenote: As can be seen in Unitys Editor source code (link zu https://github.com/Unity-Technologies/UnityCsReference/blob/2022.2/Editor/Mono/Handles.cs ) starting with Unity2022.2 Unitys "Handles" class has an additional overload for the "PositionHandle()" function, that takes the "PositionHandleIds ids"-parameter. This opens the possibility to extend this "SliderWithOffsetDisplay()" function to the whole position handle with all of it's three axes, without having to recreate the whole position handle by yourself.
+
+ Event currentEvent = Event.current;
+
+ if (currentEvent.type == EventType.MouseDown) //-> Detect the "MouseDown"-event BEFORE it gets eaten via "event.Use()" inside "Handles.Slider()". It will not be there anymore if this code is placed BELOW the "Handles.Slider" function call.
+ {
+ sliderPosition_duringMouseDown = position;
+ }
+
+ int controlID = GUIUtility.GetControlID(FocusType.Passive);
+ Vector3 returnedPositionFromUnitysBuildInSlider = Handles.Slider(controlID, position, direction, size, capFunction, snap);
+
+ if (currentEvent.type == EventType.Repaint) //-> Draw with Draw XXL only inside the "Repaint"-event, otherwise the "DrawBasics.MaxAllowedDrawnLinesPerFrame"-mechanic will get confused and restricts the drawing earlier than neccessary.
+ {
+ bool sliderIsCurrentlyGrabbedByTheMouse = (GUIUtility.hotControl == controlID);
+ if (sliderIsCurrentlyGrabbedByTheMouse)
+ {
+ ConfigureDrawXXLsGlobalSettingsForDrawingHandles(); //-> This function is recommended to be used in conjunction with the "RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ DrawOffsetValueAsText_viaDrawXXL(returnedPositionFromUnitysBuildInSlider, direction, size, capFunction);
+ RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore(); //-> This function should be used in conjunction with the "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ }
+ }
+
+ return returnedPositionFromUnitysBuildInSlider;
+ }
+
+ static void DrawOffsetValueAsText_viaDrawXXL(Vector3 currentPositionOfSlider, Vector3 direction, float size, Handles.CapFunction capFunction)
+ {
+ string displayedText = GetDisplayedText(currentPositionOfSlider, direction, capFunction);
+ Vector3 textPosition;
+ DrawText.TextAnchorDXXL textAnchor;
+ if (capFunction == Handles.ArrowHandleCap) //-> this is the default handle cap if none is specified
+ {
+ textPosition = currentPositionOfSlider + direction.normalized * (1.2f * size);
+ textAnchor = Direction_goesFromLeftToRight_insideSceneViewScreen(direction) ? DrawText.TextAnchorDXXL.MiddleLeft : DrawText.TextAnchorDXXL.MiddleRight;
+ }
+ else
+ {
+ textPosition = currentPositionOfSlider;
+ textAnchor = DrawText.TextAnchorDXXL.LowerLeft;
+ }
+
+ Color textColor = Handles.selectedColor; //-> When Draw XXL draws with Unitys Handles-Lines it doesn't automatically detect the "Handles.color", but instead takes the color that is specified as parameter argument in the draw function, or else falls back to "DrawBasics.defaultColor"
+ float textSize = 0.2f * size;
+ Vector3 textDirection = Direction_goesFromLeftToRight_insideSceneViewScreen(direction) ? direction : (-direction);
+ bool autoFlipTheTextToPreventMirrorInvertedDisplay = true;
+ UtilitiesDXXL_Text.WriteFramed(displayedText, textPosition, textColor, textSize, textDirection, default(Vector3), textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, autoFlipTheTextToPreventMirrorInvertedDisplay, 0.0f, true);
+ }
+
+ static string GetDisplayedText(Vector3 currentPositionOfSlider, Vector3 direction, Handles.CapFunction capFunction)
+ {
+ string displayedText;
+
+ float absoluteDraggedDistancesSinceMouseDown = (sliderPosition_duringMouseDown - currentPositionOfSlider).magnitude;
+ if (currentPositionOfSlider == sliderPosition_duringMouseDown)
+ {
+ displayedText = "" + absoluteDraggedDistancesSinceMouseDown;
+ }
+ else
+ {
+ Vector3 initialPosition_to_currentPosition = currentPositionOfSlider - sliderPosition_duringMouseDown;
+ bool valueChangeIsPositive = Vector3.Dot(initialPosition_to_currentPosition, direction) >= 0.0f;
+ string stringThatWillAppearAsGreenOrRedArrowInTheFinalTextDisplay = DrawText.MarkupBoolArrow(valueChangeIsPositive);
+ displayedText = stringThatWillAppearAsGreenOrRedArrowInTheFinalTextDisplay + absoluteDraggedDistancesSinceMouseDown;
+ }
+
+ if (capFunction != Handles.ArrowHandleCap)
+ {
+ string emptySpaceBetweenTextAndHandleCap = DrawText.MarkupCustomHeightEmptyLine(2); //-> shifting the text away from the handle cap, so they don't occlude each other
+ displayedText = displayedText + emptySpaceBetweenTextAndHandleCap;
+ }
+
+ return displayedText;
+ }
+
+ static Vector2 mousePositionInScreenspace_duringMouseDown;
+ static Vector2 current_mousePositionInScreenspace;
+ static float relativeSizeOfPercentageSliderCap = 0.2f;
+ static float valueToSlide_duringMouseDown;
+
+ public static float PercentageSlider(float valueToSlide, float valueThatDefines100percent, Vector3 position, Vector3 direction)
+ {
+ return PercentageSlider(valueToSlide, valueThatDefines100percent, position, direction, HandleUtility.GetHandleSize(position), Handles.CylinderHandleCap, -1.0f);
+ }
+
+ public static float PercentageSlider(float valueToSlide, float valueThatDefines100percent, Vector3 position, Vector3 direction, DrawBasics.IconType icon)
+ {
+ return PercentageSlider(valueToSlide, valueThatDefines100percent, position, direction, HandleUtility.GetHandleSize(position), Handles.CylinderHandleCap, -1.0f, icon);
+ }
+
+ public static float PercentageSlider(float valueToSlide, float valueThatDefines100percent, Vector3 position, Vector3 direction, string text)
+ {
+ return PercentageSlider(valueToSlide, valueThatDefines100percent, position, direction, HandleUtility.GetHandleSize(position), Handles.CylinderHandleCap, -1.0f, text);
+ }
+
+ public static float PercentageSlider(float valueToSlide, float valueThatDefines100percent, Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction, float snap, DrawBasics.IconType icon)
+ {
+ float iconSizeScaleFactor = 5.0f;
+ int boldStrokeWidth_asPPMofSize = 25000;
+ string textThatConsistsOfOnlyOneLetterWhichIsTheIconItself = DrawText.MarkupIcon(icon);
+ string textThatConsistsOfOnlyOneLetterWhichIsTheIconItself_withBolderFont = DrawText.MarkupStrokeWidth(textThatConsistsOfOnlyOneLetterWhichIsTheIconItself, boldStrokeWidth_asPPMofSize);
+ string textThatConsistsOfOnlyOneLetterWhichIsTheIconItself_withBolderFont_andScaledBigger = DrawText.MarkupSize(textThatConsistsOfOnlyOneLetterWhichIsTheIconItself_withBolderFont, iconSizeScaleFactor);
+ return PercentageSlider(valueToSlide, valueThatDefines100percent, position, direction, size, capFunction, snap, textThatConsistsOfOnlyOneLetterWhichIsTheIconItself_withBolderFont_andScaledBigger);
+ }
+
+ public static float PercentageSlider(float valueToSlide, float valueThatDefines100percent, Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction, float snap, string text = null)
+ {
+ //This is similar to Unitys "Handles.ScaleSlider" function, but the handle doesn't snap back after the mouse drag ended and it adds a percentage value display. Moreover an optional text can be added.
+
+ if (Mathf.Approximately(valueThatDefines100percent, 0.0f))
+ {
+ Debug.LogError("Cannot display 'PercentageSlider' if 'valueThatDefines100percent' is 0.");
+ return valueToSlide;
+ }
+
+ Event currentEvent = Event.current;
+
+ if (currentEvent.type == EventType.MouseDown) //-> Detect the "MouseDown"-event BEFORE it gets eaten via "event.Use()" inside "Handles.Slider()". It will not be there anymore if this code is placed BELOW the "Handles.Slider" function call.
+ {
+ valueToSlide_duringMouseDown = valueToSlide;
+ valueToSlide_duringMouseDown = ForceAwayFromZero(valueToSlide_duringMouseDown, valueThatDefines100percent); //-> Preventing slider deadlock at "valueToSlide == 0"
+ mousePositionInScreenspace_duringMouseDown = currentEvent.mousePosition;
+ current_mousePositionInScreenspace = currentEvent.mousePosition;
+ }
+
+ float valueToSlide_asPercentageFrom0to1 = valueToSlide / valueThatDefines100percent;
+ float magnifiedSize = 1.5f * size; //-> Displaying the percentage slider bigger than Unitys default display of Handles
+ Vector3 direction_normalized = direction.normalized;
+ Vector3 currentOffsetOfHandleCap = direction_normalized * magnifiedSize * valueToSlide_asPercentageFrom0to1;
+ Vector3 positionOfHandleCap = position + currentOffsetOfHandleCap;
+ float sizeOfHandleCap = relativeSizeOfPercentageSliderCap * size;
+
+ int controlID = GUIUtility.GetControlID(FocusType.Passive);
+ bool sliderIsCurrentlyGrabbedByTheMouse = (GUIUtility.hotControl == controlID);
+
+ DrawPercentageElements_viaDrawXXL(valueToSlide, valueThatDefines100percent, position, direction_normalized, size, text, sliderIsCurrentlyGrabbedByTheMouse, positionOfHandleCap, magnifiedSize);
+ Handles.Slider(controlID, positionOfHandleCap, direction, sizeOfHandleCap, capFunction, snap); //-> Draw the Handle cap with Unitys build-in Handles
+
+ if (sliderIsCurrentlyGrabbedByTheMouse)
+ {
+ return GetScaledValue(valueThatDefines100percent, position, direction_normalized, size);
+ }
+ else
+ {
+ return valueToSlide;
+ }
+ }
+
+ static void DrawPercentageElements_viaDrawXXL(float valueToSlide, float valueThatDefines100percent, Vector3 position, Vector3 direction_normalized, float size, string text, bool sliderIsCurrentlyGrabbedByTheMouse, Vector3 positionOfHandleCap, float magnifiedSize)
+ {
+ Event currentEvent = Event.current;
+ if (currentEvent.type == EventType.Repaint) //-> Draw with Draw XXL only inside the "Repaint"-event, otherwise the "DrawBasics.MaxAllowedDrawnLinesPerFrame"-mechanic will get confused and restricts the drawing earlier than neccessary.
+ {
+ float worldSpaceLength_of100percentSpan = magnifiedSize;
+ Vector3 endPosition_of100percentSpan = position + direction_normalized * worldSpaceLength_of100percentSpan;
+ Color colorOfSpring_independentFromStretchTension = sliderIsCurrentlyGrabbedByTheMouse ? Handles.selectedColor : Handles.color; //-> When Draw XXL draws with Unitys Handles-Lines it doesn't automatically detect the "Handles.color", but instead takes the color that is specified as parameter argument in the draw function, or else falls back to "DrawBasics.defaultColor"
+
+ ConfigureDrawXXLsGlobalSettingsForDrawingHandles(); //-> This function is recommended to be used in conjunction with the "RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ Draw100percentReferenceLengthDisplay_viaDrawXXL(position, endPosition_of100percentSpan, colorOfSpring_independentFromStretchTension); //-> This draws the 100percent-stretch-reference-display manually instead of using the "alphaOfReferenceLengthDisplay" parameter of the "DrawBasics.LineUnderTension()" below (inside "DrawPercentageValueSpiral_viaDrawXXL()"), because the "alphaOfReferenceLengthDisplay" parameter is not fit for negative values.
+ DrawPercentageValueSpiral_viaDrawXXL(position, positionOfHandleCap, worldSpaceLength_of100percentSpan, colorOfSpring_independentFromStretchTension);
+ DrawPercentageValueDisplayText_viaDrawXXL(valueToSlide, valueThatDefines100percent, endPosition_of100percentSpan, direction_normalized, size, colorOfSpring_independentFromStretchTension, text);
+ RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore(); //-> This function should be used in conjunction with the "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ }
+ }
+
+ static void Draw100percentReferenceLengthDisplay_viaDrawXXL(Vector3 positionOfTheHandle, Vector3 endPosition_of100percentSpan, Color colorOfSpring_independentFromStretchTension)
+ {
+ Color color_ofReferenceLengthDisplay = colorOfSpring_independentFromStretchTension; //-> When Draw XXL draws with Unitys Handles-Lines it doesn't automatically detect the "Handles.color", but instead takes the color that is specified as parameter argument in the draw function, or else falls back to "DrawBasics.defaultColor"
+ float alphaOf100percentReferenceLengthDisplay = 0.5f;
+ color_ofReferenceLengthDisplay.a = alphaOf100percentReferenceLengthDisplay;
+ bool flattenThickRoundLineIntoAmplitudePlane = true;
+ float endPlates_size = 0.1f;
+
+ DrawBasics.LengthInterpretation endPlates_sizeInterpretation_before = DrawBasics.endPlates_sizeInterpretation;
+ DrawBasics.endPlates_sizeInterpretation = DrawBasics.LengthInterpretation.relativeToLineLength; //-> Instruct Draw XXL how to interpret the "endPlates_size" parameter for all following draw operations
+ DrawBasics.Line(positionOfTheHandle, endPosition_of100percentSpan, color_ofReferenceLengthDisplay, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, default(Vector3), flattenThickRoundLineIntoAmplitudePlane, endPlates_size);
+ DrawBasics.endPlates_sizeInterpretation = endPlates_sizeInterpretation_before; //-> Revert the Draw XXL setting to what it was before
+ }
+
+ static void DrawPercentageValueSpiral_viaDrawXXL(Vector3 positionOfTheHandle, Vector3 positionOfHandleCap, float worldSpaceLength_of100percentSpan, Color colorOfSpring_independentFromStretchTension)
+ {
+ DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.spiral;
+ float relaxedLength = worldSpaceLength_of100percentSpan;
+ Vector3 theMiddleOfTheLine = 0.5f * (positionOfTheHandle + positionOfHandleCap);
+ float sizeOfTheHandleInScreenspace = HandleUtility.GetHandleSize(theMiddleOfTheLine);
+ float stylePatternScaleFactor = 5.0f * sizeOfTheHandleInScreenspace; //-> this lets the line style pattern appear approximately constant in screenspace, no matter how far the line is away from the camera.
+ float stretchFactor_forStretchedTensionColor = 2.0f; //-> this is unused, since the color does not depend on the stretch tension
+ float stretchFactor_forSqueezedTensionColor = 0.0f; //-> this is unused, since the color does not depend on the stretch tension
+ string text_ofStretchedSpring = null;
+ float width_worldSpace = 0.0f; //-> If a width other than 0 is wanted: The width value is in world space units, in contrast to the "Handles.DrawLine(thickness)" paramter, which is in UI points. For a suggestion how to convert it: See "HandlesExamples.DrawLine()"
+ float alphaOfReferenceLengthDisplay = 0.0f; //-> this is disabled here, since it already has been drawn separately further up
+
+ float stylePatternScaleFactor_alongLineDir_ignoringAmplitude_before = DrawBasics.StylePatternScaleFactor_alongLineDir_ignoringAmplitude;
+ DrawBasics.StylePatternScaleFactor_alongLineDir_ignoringAmplitude = 0.5f; //-> Instruct Draw XXL how to use this style scaling for all following draw operations
+ DrawBasics.LineUnderTension(positionOfTheHandle, positionOfHandleCap, relaxedLength, colorOfSpring_independentFromStretchTension, lineStyle, stretchFactor_forStretchedTensionColor, colorOfSpring_independentFromStretchTension, stretchFactor_forSqueezedTensionColor, colorOfSpring_independentFromStretchTension, width_worldSpace, text_ofStretchedSpring, alphaOfReferenceLengthDisplay, stylePatternScaleFactor);
+ DrawBasics.StylePatternScaleFactor_alongLineDir_ignoringAmplitude = stylePatternScaleFactor_alongLineDir_ignoringAmplitude_before; //-> Revert the Draw XXL setting to what it was before
+ }
+
+ static void DrawPercentageValueDisplayText_viaDrawXXL(float valueToSlide, float valueThatDefines100percent, Vector3 endPosition_of100percentSpan, Vector3 direction_normalized, float size, Color colorOfSpring_independentFromStretchTension, string text)
+ {
+ float percentageOfCurrentSlidedValue = 100.0f * (valueToSlide / valueThatDefines100percent);
+ int percentageOfCurrentSlidedValue_rounded = Mathf.RoundToInt(percentageOfCurrentSlidedValue);
+ string emptyTextSpaceBelowText_soThatTheTextIsNotOccludedByTheHandleCapOrTheSpring = DrawText.MarkupCustomHeightEmptyLine(3);
+ string displayedText = text + "
" + percentageOfCurrentSlidedValue_rounded + "%" + emptyTextSpaceBelowText_soThatTheTextIsNotOccludedByTheHandleCapOrTheSpring;
+ Vector3 textPosition = endPosition_of100percentSpan;
+ float textSize = 0.1f * size;
+ Vector3 textDirection = Direction_goesFromLeftToRight_insideSceneViewScreen(direction_normalized) ? direction_normalized : (-direction_normalized);
+ Color textColor = colorOfSpring_independentFromStretchTension; //-> When Draw XXL draws with Unitys Handles-Lines it doesn't automatically detect the "Handles.color", but instead takes the color that is specified as parameter argument in the draw function, or else falls back to "DrawBasics.defaultColor"
+ DrawText.TextAnchorDXXL textAnchor = DrawText.TextAnchorDXXL.LowerCenter;
+ UtilitiesDXXL_Text.WriteFramed(displayedText, textPosition, textColor, textSize, textDirection, default(Vector3), textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, true, 0.0f, true);
+ }
+
+ static float ForceAwayFromZero(float valueToSlide_duringMouseDown, float valueThatDefines100percent)
+ {
+ float smallestAllowedPercentage_duringMouseDown = 0.001f;
+ float valueToSlide_duringMouseDown_absolute = Mathf.Abs(valueToSlide_duringMouseDown);
+ float valueThatDefines100percent_absolute = Mathf.Abs(valueThatDefines100percent);
+ float smallestAllowedValue_absolute = smallestAllowedPercentage_duringMouseDown * valueThatDefines100percent_absolute;
+
+ if (valueToSlide_duringMouseDown_absolute < smallestAllowedValue_absolute)
+ {
+ return smallestAllowedValue_absolute;
+ }
+ else
+ {
+ return valueToSlide_duringMouseDown;
+ }
+ }
+
+ static float GetScaledValue(float valueThatDefines100percent, Vector3 position, Vector3 direction_normalized, float size)
+ {
+ //calculate the scaled value similar as "Handles.ScaleSlider()" does it:
+ Event currentEvent = Event.current;
+ float percentageValueToSlide_duringMouseDown_asPercentageFrom0to1 = valueToSlide_duringMouseDown / valueThatDefines100percent;
+ current_mousePositionInScreenspace += currentEvent.delta;
+ float divisor = size * percentageValueToSlide_duringMouseDown_asPercentageFrom0to1;
+ float distanceHowMuchTheHandleHasBeenDraggedWithTheMouse = relativeSizeOfPercentageSliderCap * HandleUtility.CalcLineTranslation(mousePositionInScreenspace_duringMouseDown, current_mousePositionInScreenspace, position, direction_normalized) / divisor;
+ float returnedScaleValue = valueToSlide_duringMouseDown * (1.0f + distanceHowMuchTheHandleHasBeenDraggedWithTheMouse);
+ return returnedScaleValue;
+ }
+
+ static float valueToShiftInsideRange_duringMouseDown;
+
+ public static float RangeSlider(float value, float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction)
+ {
+ return RangeSlider(value, lowerEndOfRange, upperEndOfRange, position, direction, HandleUtility.GetHandleSize(position), Handles.SphereHandleCap, -1.0f, null);
+ }
+
+ public static float RangeSlider(float value, float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction, DrawBasics.IconType icon)
+ {
+ return RangeSlider(value, lowerEndOfRange, upperEndOfRange, position, direction, HandleUtility.GetHandleSize(position), Handles.SphereHandleCap, -1.0f, icon);
+ }
+
+ public static float RangeSlider(float value, float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction, string text)
+ {
+ return RangeSlider(value, lowerEndOfRange, upperEndOfRange, position, direction, HandleUtility.GetHandleSize(position), Handles.SphereHandleCap, -1.0f, text);
+ }
+
+ public static float RangeSlider(float value, float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction, float snap, DrawBasics.IconType icon)
+ {
+ float iconSizeScaleFactor = 2.8f;
+ int boldStrokeWidth_asPPMofSize = 25000;
+ string textThatConsistsOfOnlyOneLetterWhichIsTheIconItself = DrawText.MarkupIcon(icon);
+ string textThatConsistsOfOnlyOneLetterWhichIsTheIconItself_withBolderFont = DrawText.MarkupStrokeWidth(textThatConsistsOfOnlyOneLetterWhichIsTheIconItself, boldStrokeWidth_asPPMofSize);
+ string textThatConsistsOfOnlyOneLetterWhichIsTheIconItself_withBolderFont_andScaledBigger = DrawText.MarkupSize(textThatConsistsOfOnlyOneLetterWhichIsTheIconItself_withBolderFont, iconSizeScaleFactor);
+ float relative_verticalTextPositionOffsetDistance_fromRangeLine = 1.25f;
+ return RangeSlider(value, lowerEndOfRange, upperEndOfRange, position, direction, size, capFunction, snap, textThatConsistsOfOnlyOneLetterWhichIsTheIconItself_withBolderFont_andScaledBigger, relative_verticalTextPositionOffsetDistance_fromRangeLine);
+ }
+
+ public static float RangeSlider(float value, float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction, float snap, string text = null)
+ {
+ float relative_verticalTextPositionOffsetDistance_fromRangeLine = 2.0f;
+ return RangeSlider(value, lowerEndOfRange, upperEndOfRange, position, direction, size, capFunction, snap, text, relative_verticalTextPositionOffsetDistance_fromRangeLine);
+ }
+
+ static float RangeSlider(float value, float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction, float snap, string text, float relative_verticalTextPositionOffsetDistance_fromRangeLine)
+ {
+ //A slider handle where the value is clamped inside an allowed range, as it is frequently seen in Unitys Inspector Window.
+ //"position": more precisely: it is the position of the lowerEndOfTheRange
+
+ if (Mathf.Approximately(lowerEndOfRange, upperEndOfRange))
+ {
+ Debug.LogError("Cannot display 'RangeSlider' with range span of 0.");
+ return value;
+ }
+
+ TryFlipValues_inCaseLowerEndIsBiggerThanUpperEnd(ref lowerEndOfRange, ref upperEndOfRange);
+ float value_clamped = Mathf.Clamp(value, lowerEndOfRange, upperEndOfRange);
+
+ Event currentEvent = Event.current;
+
+ if (currentEvent.type == EventType.MouseDown) //-> Detect the "MouseDown"-event BEFORE it gets eaten via "event.Use()" inside "Handles.Slider()". It will not be there anymore if this code is placed BELOW the "Handles.Slider" function call.
+ {
+ valueToShiftInsideRange_duringMouseDown = value_clamped;
+ mousePositionInScreenspace_duringMouseDown = currentEvent.mousePosition;
+ current_mousePositionInScreenspace = currentEvent.mousePosition;
+ }
+
+ float rangeSpan = upperEndOfRange - lowerEndOfRange;
+ float value_portionThatIsBiggerThanLowerEndOfRange = value_clamped - lowerEndOfRange;
+ float valueToSlide_as0to1insideRange = value_portionThatIsBiggerThanLowerEndOfRange / rangeSpan;
+ float magnifiedSize = 2.0f * size; //-> Displaying the range slider bigger than Unitys default display of Handles
+ Vector3 direction_normalized = direction.normalized;
+ Vector3 rangeStart_to_rangeEnd = direction_normalized * magnifiedSize;
+ Vector3 currentOffsetOfHandleCap = rangeStart_to_rangeEnd * valueToSlide_as0to1insideRange;
+ Vector3 positionOfHandleCap = position + currentOffsetOfHandleCap;
+ Vector3 positionOfRangeEnd = position + rangeStart_to_rangeEnd;
+ float sizeOfHandleCap = relativeSizeOfPercentageSliderCap * size;
+
+ int controlID = GUIUtility.GetControlID(FocusType.Passive);
+ bool sliderIsCurrentlyGrabbedByTheMouse = (GUIUtility.hotControl == controlID);
+
+ DrawRangeElements_viaDrawXXL(value_clamped, lowerEndOfRange, upperEndOfRange, positionOfHandleCap, position, positionOfRangeEnd, direction_normalized, size, magnifiedSize, sizeOfHandleCap, sliderIsCurrentlyGrabbedByTheMouse, text, relative_verticalTextPositionOffsetDistance_fromRangeLine);
+ Handles.Slider(controlID, positionOfHandleCap, direction, sizeOfHandleCap, capFunction, snap); //-> Draw the Handle cap with Unitys build-in Handles
+
+ if (sliderIsCurrentlyGrabbedByTheMouse)
+ {
+ return GetScaledValueInsideRange(lowerEndOfRange, upperEndOfRange, position, direction_normalized, size);
+ }
+ else
+ {
+ return value_clamped;
+ }
+ }
+
+ static void TryFlipValues_inCaseLowerEndIsBiggerThanUpperEnd(ref float lowerEndOfRange, ref float upperEndOfRange)
+ {
+ if (lowerEndOfRange > upperEndOfRange)
+ {
+ float clipboard = lowerEndOfRange;
+ lowerEndOfRange = upperEndOfRange;
+ upperEndOfRange = clipboard;
+ }
+ }
+
+ static void DrawRangeElements_viaDrawXXL(float value_clamped, float lowerEndOfRange, float upperEndOfRange, Vector3 positionOfHandleCap, Vector3 positionOfRangeStart, Vector3 positionOfRangeEnd, Vector3 direction_normalized, float size, float lenghtOfTheRangeLine, float sizeOfHandleCap, bool sliderIsCurrentlyGrabbedByTheMouse, string textFromUser, float relative_verticalTextPositionOffsetDistance_fromRangeLine)
+ {
+ Event currentEvent = Event.current;
+ if (currentEvent.type == EventType.Repaint) //-> Draw with Draw XXL only inside the "Repaint"-event, otherwise the "DrawBasics.MaxAllowedDrawnLinesPerFrame"-mechanic will get confused and restricts the drawing earlier than neccessary.
+ {
+ ConfigureDrawXXLsGlobalSettingsForDrawingHandles(); //-> This function is recommended to be used in conjunction with the "RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+
+ Color color = sliderIsCurrentlyGrabbedByTheMouse ? Handles.selectedColor : Handles.color; //-> When Draw XXL draws with Unitys Handles-Lines it doesn't automatically detect the "Handles.color", but instead takes the color that is specified as parameter argument in the draw function, or else falls back to "DrawBasics.defaultColor"
+ float half_sizeOfHandleCap = 0.5f * sizeOfHandleCap;
+ Vector3 position_ofRangeStartPlate = positionOfRangeStart - direction_normalized * half_sizeOfHandleCap;
+ Vector3 position_ofRangeEndPlate = positionOfRangeEnd + direction_normalized * half_sizeOfHandleCap;
+ float textSize = 0.15f * size;
+
+ DrawRangeLine_viaDrawXXL(position_ofRangeStartPlate, position_ofRangeEndPlate, color);
+ Vector3 usedTextDirection = DrawRangeValuesAsText_viaDrawXXL(value_clamped, lowerEndOfRange, upperEndOfRange, positionOfHandleCap, position_ofRangeStartPlate, position_ofRangeEndPlate, direction_normalized, textSize, color);
+ DrawRangeSliderName_viaDrawXXL(usedTextDirection, positionOfRangeStart, positionOfRangeEnd, direction_normalized, lenghtOfTheRangeLine, textFromUser, textSize, relative_verticalTextPositionOffsetDistance_fromRangeLine, color);
+
+ RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore(); //-> This function should be used in conjunction with the "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ }
+ }
+
+ static void DrawRangeLine_viaDrawXXL(Vector3 position_ofRangeStartPlate, Vector3 position_ofRangeEndPlate, Color color)
+ {
+ float width_worldSpace = 0.0f; //-> If a width other than 0 is wanted: The width value is in world space units, in contrast to the "Handles.DrawLine(thickness)" paramter, which is in UI points. For a suggestion how to convert it: See "HandlesExamples.DrawLine()"
+ DrawBasics.LineStyle style = DrawBasics.LineStyle.solid;
+ bool flattenThickRoundLineIntoAmplitudePlane = false; //-> "false" makes the endPlates to round discs, instead as flat lines
+ float endPlates_size = 0.1f;
+
+ DrawBasics.LengthInterpretation endPlates_sizeInterpretation_before = DrawBasics.endPlates_sizeInterpretation;
+ DrawBasics.endPlates_sizeInterpretation = DrawBasics.LengthInterpretation.relativeToLineLength; //-> Instruct Draw XXL how to interpret the "endPlates_size" parameter for all following draw operations
+ DrawBasics.Line(position_ofRangeStartPlate, position_ofRangeEndPlate, color, width_worldSpace, null, style, 1.0f, 0.0f, default(Vector3), flattenThickRoundLineIntoAmplitudePlane, endPlates_size);
+ DrawBasics.endPlates_sizeInterpretation = endPlates_sizeInterpretation_before; //-> Revert the Draw XXL setting to what it was before
+ }
+
+ static Vector3 DrawRangeValuesAsText_viaDrawXXL(float value_clamped, float lowerEndOfRange, float upperEndOfRange, Vector3 positionOfHandleCap, Vector3 position_ofRangeStartPlate, Vector3 position_ofRangeEndPlate, Vector3 direction_normalized, float textSize, Color color)
+ {
+ //-> Simple trick: Adding blank text space in front of the value to have some distance from the range line, so it doesn't intersect with the range line end plates or the handle cap. This works only if we specify the textAnchor to be on the left side, which we do below.
+ string lowerRangeEnd_asTextString = " " + lowerEndOfRange;
+ string upperRangeEnd_asTextString = " " + upperEndOfRange;
+ string currentValue_asTextString = " " + value_clamped;
+
+ int boldStrokeWidth_asPPMofSize = 60000;
+ string lowerRangeEnd_asTextString_inBoldText = DrawText.MarkupStrokeWidth(lowerRangeEnd_asTextString, boldStrokeWidth_asPPMofSize);
+ string upperRangeEnd_asTextString_inBoldText = DrawText.MarkupStrokeWidth(upperRangeEnd_asTextString, boldStrokeWidth_asPPMofSize);
+
+ Vector3 textUpward_forValueTexts = Direction_goesFromLeftToRight_insideSceneViewScreen(direction_normalized) ? (-direction_normalized) : direction_normalized;
+ Vector3 textDirection_forValueTexts = default(Vector3); //-> If a text orientation vector is not specified then Draw XXL will automatically try to align the text according to static global setting "DrawText.automaticTextOrientation". In this case only "textUp" is specified and constrains the text orientation, so that the text will be perpendicular to the range line.
+ DrawText.TextAnchorDXXL textAnchor_forValueTexts = DrawText.TextAnchorDXXL.MiddleLeft;
+ bool autoFlipTheTextToPreventMirrorInvertedDisplay = true;
+
+ UtilitiesDXXL_Text.WriteFramed(lowerRangeEnd_asTextString_inBoldText, position_ofRangeStartPlate, color, textSize, textDirection_forValueTexts, textUpward_forValueTexts, textAnchor_forValueTexts, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, autoFlipTheTextToPreventMirrorInvertedDisplay, 0.0f, true);
+ UtilitiesDXXL_Text.WriteFramed(upperRangeEnd_asTextString_inBoldText, position_ofRangeEndPlate, color, textSize, textDirection_forValueTexts, textUpward_forValueTexts, textAnchor_forValueTexts, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, autoFlipTheTextToPreventMirrorInvertedDisplay, 0.0f, true);
+ UtilitiesDXXL_Text.WriteFramed(currentValue_asTextString, positionOfHandleCap, color, textSize, textDirection_forValueTexts, textUpward_forValueTexts, textAnchor_forValueTexts, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, autoFlipTheTextToPreventMirrorInvertedDisplay, 0.0f, true);
+
+ Vector3 textDirectionOfTheValueTexts_thatHasBeenFinallyUsedByTheAutomaticTextOrientation_normalized = DrawText.parsedTextSpecs.used_textDirection_normalized; //-> After each call of "DrawText.Write()" some infos about the most currently written text can be accessed via the global static field "DrawText.parsedTextSpecs". In our case we request the "textDirection_forValueTexts", which we further up didn't specify by ourselfes to make use of Draw XXLs automatic text orientation. With that direction we can conveniently add an offset to the "textFromUser", which gets drawn in "DrawRangeSliderName_viaDrawXXL()".
+ return textDirectionOfTheValueTexts_thatHasBeenFinallyUsedByTheAutomaticTextOrientation_normalized;
+ }
+
+ static void DrawRangeSliderName_viaDrawXXL(Vector3 textDirectionOfTheValueTexts_normalized, Vector3 positionOfRangeStart, Vector3 positionOfRangeEnd, Vector3 direction_normalized, float lenghtOfTheRangeLine, string textFromUser, float textSize, float relative_verticalTextPositionOffsetDistance_fromRangeLine, Color color)
+ {
+ Vector3 centerPosition_ofTheRangeLine = 0.5f * (positionOfRangeStart + positionOfRangeEnd);
+ float textPositionOffsetDistance_fromRangeLine = relative_verticalTextPositionOffsetDistance_fromRangeLine * textSize;
+ Vector3 textPositionOffset_fromRangeLine = (-textDirectionOfTheValueTexts_normalized) * textPositionOffsetDistance_fromRangeLine;
+ Vector3 position_ofTextFromUser = centerPosition_ofTheRangeLine + textPositionOffset_fromRangeLine;
+ Vector3 textDirection_forTextFromUser = Direction_goesFromLeftToRight_insideSceneViewScreen(direction_normalized) ? direction_normalized : (-direction_normalized);
+ Vector3 textUp_forTextFromUser = default(Vector3); //-> If "textUp" is not specified, then it will be automatically aligned according to "DrawText.automaticTextOrientation". In this case only "textDirection_forTextFromUser" constrains the text orientation, while in "DrawRangeValuesAsText_viaDrawXXL()" only "textUp" constrains the text orientation.
+ DrawText.TextAnchorDXXL textAnchor_forTextFromUser = DrawText.TextAnchorDXXL.UpperCenter;
+ DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid;
+ float enclosingBox_lineWidth_relToTextSize = 0.0f;
+ float enclosingBox_paddingSize_relToTextSize = 0.3f;
+ float autoLineBreakWidth = lenghtOfTheRangeLine; //-> Ensure that text doesn't get bigger than the range span itself. This could also be achieved with the "forceRestrictTextBlockSizeToThisMaxTextWidth"-parameter, in which case the text doesn't make a line break, but becomes smaller to fit into the wanted size span.
+ bool autoFlipTheTextToPreventMirrorInvertedDisplay = true;
+ UtilitiesDXXL_Text.WriteFramed(textFromUser, position_ofTextFromUser, color, textSize, textDirection_forTextFromUser, textUp_forTextFromUser, textAnchor_forTextFromUser, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, 0.0f, 0.0f, autoLineBreakWidth, autoFlipTheTextToPreventMirrorInvertedDisplay, 0.0f, true);
+ }
+
+ static float GetScaledValueInsideRange(float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction_normalized, float size)
+ {
+ //calculate the scaled value similar as "Handles.ScaleSlider()" does it:
+ Event currentEvent = Event.current;
+ current_mousePositionInScreenspace += currentEvent.delta;
+ float distanceHowMuchTheHandleHasBeenDraggedWithTheMouse = relativeSizeOfPercentageSliderCap * HandleUtility.CalcLineTranslation(mousePositionInScreenspace_duringMouseDown, current_mousePositionInScreenspace, position, direction_normalized) / size;
+ float rangeSpan = upperEndOfRange - lowerEndOfRange;
+ float returnedValue = valueToShiftInsideRange_duringMouseDown + rangeSpan * distanceHowMuchTheHandleHasBeenDraggedWithTheMouse;
+ float returnedValue_clamped = Mathf.Clamp(returnedValue, lowerEndOfRange, upperEndOfRange);
+ return returnedValue_clamped;
+ }
+
+ static Vector3 startPosition_onDiscRadius;
+ static float discsTurnAngleInDegrees_sinceMouseDown;
+ public static Quaternion DiscWithAngleDisplay(Quaternion rotation, Vector3 position, Vector3 axis, float size, bool cutoffPlane, float snap)
+ {
+ //this is like Unitys "Handles.Disc" function, but additionally displays the changing angle as text.
+ //Sidenote: As can be seen in Unitys Editor source code(link zu https://github.com/Unity-Technologies/UnityCsReference/blob/2022.2/Editor/Mono/Handles.cs ) starting with Unity2022.2 Unitys "Handles" class has an additional overload for the "RotationHandle()" function, that takes the "RotationHandleIds ids"-parameter. This opens the possibility to extend this "DiscWithAngleDisplay()" function to the whole rotation handle with all of it's circles, without having to recreate the whole rotation handle by yourself.
+
+ Event currentEvent = Event.current;
+
+ if (currentEvent.type == EventType.MouseDown) //-> Detect the "MouseDown"-event BEFORE it gets eaten via "event.Use()" inside "Handles.Disc()". It will not be there anymore if this code is placed BELOW the "Handles.Disc" function call.
+ {
+ mousePositionInScreenspace_duringMouseDown = currentEvent.mousePosition;
+ current_mousePositionInScreenspace = currentEvent.mousePosition;
+ discsTurnAngleInDegrees_sinceMouseDown = 0.0f;
+ startPosition_onDiscRadius = Get_startPosition_onDiscRadius(position, axis, size, cutoffPlane);
+ }
+
+ int controlID = GUIUtility.GetControlID(FocusType.Passive);
+ bool discIsCurrentlyGrabbedByTheMouse = (GUIUtility.hotControl == controlID);
+
+ if (currentEvent.type == EventType.MouseDrag) //-> Detect the "MouseDrag"-event BEFORE it gets eaten via "event.Use()" inside "Handles.Disc()". It will not be there anymore if this code is placed BELOW the "Handles.Disc" function call.
+ {
+ discsTurnAngleInDegrees_sinceMouseDown = Get_discsTurnAngleInDegrees_sinceMouseDown(position, axis, size, discIsCurrentlyGrabbedByTheMouse);
+ }
+
+ Quaternion returnedQuaternion = Handles.Disc(controlID, rotation, position, axis, size, cutoffPlane, snap);
+
+ if (currentEvent.type == EventType.Repaint) //-> Draw with Draw XXL only inside the "Repaint"-event, otherwise the "DrawBasics.MaxAllowedDrawnLinesPerFrame"-mechanic will get confused and restricts the drawing earlier than neccessary.
+ {
+ if (discIsCurrentlyGrabbedByTheMouse)
+ {
+ ConfigureDrawXXLsGlobalSettingsForDrawingHandles(); //-> This function is recommended to be used in conjunction with the "RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ DrawAngleTextDisplay_viaDrawXXL(position, axis);
+ RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore(); //-> This function should be used in conjunction with the "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ }
+ }
+
+ return returnedQuaternion;
+
+ }
+
+ static Vector3 Get_startPosition_onDiscRadius(Vector3 position, Vector3 axis, float size, bool cutoffPlane)
+ {
+ if (cutoffPlane)
+ {
+ Vector3 forwardDirection_ofCurrentCamera = Camera.current != null ? Camera.current.transform.forward : Vector3.forward;
+ Vector3 aVectorInsideTheDiscPlane = Vector3.Cross(axis, forwardDirection_ofCurrentCamera).normalized;
+ return HandleUtility.ClosestPointToArc(position, axis, aVectorInsideTheDiscPlane, 180.0f, size);
+ }
+ else
+ {
+ return HandleUtility.ClosestPointToDisc(position, axis, size);
+ }
+ }
+
+ static float Get_discsTurnAngleInDegrees_sinceMouseDown(Vector3 position, Vector3 axis, float size, bool discIsCurrentlyGrabbedByTheMouse)
+ {
+ if (discIsCurrentlyGrabbedByTheMouse)
+ {
+ //calculate the angle in the same way as "Handles.Disc()" does it:
+ Event currentEvent = Event.current;
+ Vector3 direction_normalized = Vector3.Cross(axis, position - startPosition_onDiscRadius).normalized;
+ current_mousePositionInScreenspace += currentEvent.delta;
+ return HandleUtility.CalcLineTranslation(mousePositionInScreenspace_duringMouseDown, current_mousePositionInScreenspace, startPosition_onDiscRadius, direction_normalized) / size * 30.0f;
+ }
+ return 0.0f;
+ }
+
+ static void DrawAngleTextDisplay_viaDrawXXL(Vector3 position, Vector3 axis)
+ {
+ string textOnCircledVector = Mathf.Abs(discsTurnAngleInDegrees_sinceMouseDown) + "°";
+ string textOnCircledVector_enlarged = "" + textOnCircledVector + ""; //-> "size=11" is the default size, so this enlarges the text by a factor of 2.
+ Color colorOfCircledVectorAndText = Handles.selectedColor; //-> When Draw XXL draws with Unitys Handles-Lines it doesn't automatically detect the "Handles.color", but instead takes the color that is specified as parameter argument in the draw function, or else falls back to "DrawBasics.defaultColor"
+ float coneLength = 0.3f;
+ bool skipFallbackDisplayOfZeroAngles = true; //-> If this is be "false", then Draw XXL would display a fallback text for angles of zero or nearby. In the use case here this fallback is not wanted.
+ float minAngleDeg_withoutTextLineBreak = 120.0f; //-> If the angle is small, then the displayed text covers a bigger angle span than the angle itself. This would lead to automatic line breaks in the text display, which are prevented by setting this "minAngleDeg_withoutTextLineBreak" setting to a higher value.
+ DrawBasics.VectorCircled(startPosition_onDiscRadius, position, axis, -discsTurnAngleInDegrees_sinceMouseDown, colorOfCircledVectorAndText, 0.0f, textOnCircledVector_enlarged, coneLength, false, skipFallbackDisplayOfZeroAngles, true, minAngleDeg_withoutTextLineBreak, DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine);
+ }
+
+ public static float AnalogJoystickSlider(Vector3 position, Vector3 direction)
+ {
+ return AnalogJoystickSlider(position, direction, HandleUtility.GetHandleSize(position), Handles.SphereHandleCap);
+ }
+
+
+ static float travelledWorldSpaceDistance_sinceMouseDown;
+ public static float AnalogJoystickSlider(Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction)
+ {
+ //This simulates the behaviour of an one-dimensional analog joystick. You can click and drag the slider and it will return a value between -1 and 1, depending on how much you protrude it from the center. As soon as you lift the mouse the slider will snap back to the zero position.
+
+ int control_ID = GUIUtility.GetControlID(FocusType.Passive);
+ Event currentEvent = Event.current;
+
+ if (GUIUtility.hotControl == 0) { travelledWorldSpaceDistance_sinceMouseDown = 0.0f; }
+
+ Vector3 direction_normalized; //-> is only calculated later for some events, to save some performance
+ size = size * relativeSizeOfPercentageSliderCap;
+ float maximumProtrusion_inWorldSpaceUnits = 10.0f * size;
+
+ switch (currentEvent.GetTypeForControl(control_ID))
+ {
+ case EventType.MouseDown:
+ if ((HandleUtility.nearestControl == control_ID) && (currentEvent.button == 0) && (currentEvent.alt == false))
+ {
+ GUIUtility.hotControl = control_ID;
+ mousePositionInScreenspace_duringMouseDown = currentEvent.mousePosition;
+ current_mousePositionInScreenspace = currentEvent.mousePosition;
+ currentEvent.Use();
+ EditorGUIUtility.SetWantsMouseJumping(1);
+ }
+ break;
+ case EventType.MouseUp:
+ if (GUIUtility.hotControl == control_ID)
+ {
+ travelledWorldSpaceDistance_sinceMouseDown = 0.0f;
+ GUIUtility.hotControl = 0;
+ currentEvent.Use();
+ EditorGUIUtility.SetWantsMouseJumping(0);
+ }
+ break;
+ case EventType.MouseDrag:
+ if (GUIUtility.hotControl == control_ID)
+ {
+ current_mousePositionInScreenspace = current_mousePositionInScreenspace + currentEvent.delta;
+ travelledWorldSpaceDistance_sinceMouseDown = HandleUtility.CalcLineTranslation(mousePositionInScreenspace_duringMouseDown, current_mousePositionInScreenspace, position, direction.normalized); //-> It's undocumented, but "HandleUtility.CalcLineTranslation()" expects a NORMALIZED direction.
+ travelledWorldSpaceDistance_sinceMouseDown = Mathf.Clamp(travelledWorldSpaceDistance_sinceMouseDown, -maximumProtrusion_inWorldSpaceUnits, maximumProtrusion_inWorldSpaceUnits);
+ GUI.changed = true;
+ currentEvent.Use();
+ }
+ break;
+ case EventType.Repaint:
+ Color color_before = Handles.color;
+ TrySetColorDuringMouseInteraction(control_ID, currentEvent);
+ direction_normalized = CalculateDirectionNormalized_forJoystickSlider(control_ID, direction);
+
+ float radiusOfMountingPointDisc = 0.2f * size;
+ Handles.DrawSolidDisc(position, GetSceneViewCamerasForwardDirection(), radiusOfMountingPointDisc);
+ TryDrawJoystickSpiralSpring(control_ID, travelledWorldSpaceDistance_sinceMouseDown, position, direction_normalized, maximumProtrusion_inWorldSpaceUnits);
+ DrawJoystickSliderCap(control_ID, position, direction_normalized, size, capFunction, EventType.Repaint);
+
+ Handles.color = color_before;
+ break;
+ case EventType.Layout:
+ direction_normalized = CalculateDirectionNormalized_forJoystickSlider(control_ID, direction);
+ DrawJoystickSliderCap(control_ID, position, direction_normalized, size, capFunction, EventType.Layout);
+ break;
+ default:
+ break;
+ }
+
+ return (travelledWorldSpaceDistance_sinceMouseDown / maximumProtrusion_inWorldSpaceUnits);
+ }
+
+ static void TrySetColorDuringMouseInteraction(int control_ID, Event currentEvent)
+ {
+ if (control_ID == GUIUtility.hotControl)
+ {
+ Handles.color = Handles.selectedColor;
+ }
+ else
+ {
+ if (IsHovering(control_ID, currentEvent))
+ {
+ Handles.color = Handles.preselectionColor;
+ }
+ }
+ }
+
+ static bool IsHovering(int control_ID, Event currentEvent)
+ {
+ return ((GUIUtility.hotControl == 0) && (control_ID == HandleUtility.nearestControl) && (currentEvent.alt == false));
+ }
+
+ static Vector3 CalculateDirectionNormalized_forJoystickSlider(int control_ID, Vector3 direction)
+ {
+ if (control_ID == GUIUtility.hotControl)
+ {
+ return direction.normalized;
+ }
+ else
+ {
+ return direction; //-> is not required as normalized when the handle is not selected
+ }
+ }
+
+ static void DrawJoystickSliderCap(int control_ID, Vector3 position, Vector3 direction_normalized, float size, Handles.CapFunction capFunction, EventType eventType)
+ {
+ Vector3 currentPosition_ofJoystickSlider = Get_currentPosition_ofJoystickSlider(travelledWorldSpaceDistance_sinceMouseDown, position, direction_normalized);
+ Quaternion rotation = Quaternion.LookRotation(direction_normalized);
+ capFunction(control_ID, currentPosition_ofJoystickSlider, rotation, size, eventType);
+ }
+
+ static void TryDrawJoystickSpiralSpring(int control_ID, float travelledWorldSpaceDistance_sinceMouseDown, Vector3 position, Vector3 direction_normalized, float maximumProtrusion_inWorldSpaceUnits)
+ {
+ if (GUIUtility.hotControl == control_ID)
+ {
+ if (Mathf.Approximately(travelledWorldSpaceDistance_sinceMouseDown, 0.0f) == false)
+ {
+ DrawJoystickSpiralSpring(travelledWorldSpaceDistance_sinceMouseDown, position, direction_normalized, maximumProtrusion_inWorldSpaceUnits);
+ }
+ }
+ }
+
+ static void DrawJoystickSpiralSpring(float travelledWorldSpaceDistance_sinceMouseDown, Vector3 position, Vector3 direction_normalized, float maximumProtrusion_inWorldSpaceUnits)
+ {
+ ConfigureDrawXXLsGlobalSettingsForDrawingHandles(); //-> This function is recommended to be used in conjunction with the "RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+
+ //Generated via code snippet:
+ Vector3 start_of_spiral = position;
+ Vector3 end_of_spiral = Get_currentPosition_ofJoystickSlider(travelledWorldSpaceDistance_sinceMouseDown, position, direction_normalized);
+ float relaxedLength_of_spiral = maximumProtrusion_inWorldSpaceUnits;
+ Color relaxedColor_of_spiral = Handles.color;
+ DrawBasics.LineStyle style_of_spiral = DrawBasics.LineStyle.spiral;
+ float stretchFactor_forStretchedTensionColor_of_spiral = 2.0f;
+ Color color_forStretchedTension_of_spiral = Handles.color;
+ float stretchFactor_forSqueezedTensionColor_of_spiral = 0.0f;
+ Color color_forSqueezedTension_of_spiral = Handles.color;
+ float width_of_spiral = 0.0f;
+ string text_of_spiral = null;
+ float alphaOfReferenceLengthDisplay_of_spiral = 0.5f;
+ float stylePatternScaleFactor_of_spiral = 3.5f * maximumProtrusion_inWorldSpaceUnits;
+ Vector3 customAmplitudeAndTextDir_of_spiral = default(Vector3);
+ bool flattenThickRoundLineIntoAmplitudePlane_of_spiral = false;
+ float endPlates_size_of_spiral = 0.0f;
+ float enlargeSmallTextToThisMinTextSize_of_spiral = 0.0f;
+ float durationInSec_of_spiral = 0.0f;
+ bool hiddenByNearerObjects_of_spiral = true;
+ bool skipPatternEnlargementForLongLines_of_spiral = true;
+ bool skipPatternEnlargementForShortLines_of_spiral = true;
+
+ float stylePatternScaleFactor_alongLineDir_ignoringAmplitude_before = DrawBasics.StylePatternScaleFactor_alongLineDir_ignoringAmplitude;
+ DrawBasics.StylePatternScaleFactor_alongLineDir_ignoringAmplitude = 0.6f; //-> Instruct Draw XXL how to use this style scaling for all following draw operations
+ DrawBasics.LineUnderTension(start_of_spiral, end_of_spiral, relaxedLength_of_spiral, relaxedColor_of_spiral, style_of_spiral, stretchFactor_forStretchedTensionColor_of_spiral, color_forStretchedTension_of_spiral, stretchFactor_forSqueezedTensionColor_of_spiral, color_forSqueezedTension_of_spiral, width_of_spiral, text_of_spiral, alphaOfReferenceLengthDisplay_of_spiral, stylePatternScaleFactor_of_spiral, customAmplitudeAndTextDir_of_spiral, flattenThickRoundLineIntoAmplitudePlane_of_spiral, endPlates_size_of_spiral, enlargeSmallTextToThisMinTextSize_of_spiral, durationInSec_of_spiral, hiddenByNearerObjects_of_spiral, skipPatternEnlargementForLongLines_of_spiral, skipPatternEnlargementForShortLines_of_spiral);
+ DrawBasics.StylePatternScaleFactor_alongLineDir_ignoringAmplitude = stylePatternScaleFactor_alongLineDir_ignoringAmplitude_before; //-> Revert the Draw XXL setting to what it was before
+
+ RevertDrawXXLsGlobalHandleSettingsToWhatTheyWereBefore(); //-> This function should be used in conjunction with the "ConfigureDrawXXLsGlobalSettingsForDrawingHandles()" function, to "encapsulate" everything that Draw XXL draws for Handles.
+ }
+
+ static Vector3 Get_currentPosition_ofJoystickSlider(float travelledWorldSpaceDistance_sinceMouseDown, Vector3 position, Vector3 direction_normalized)
+ {
+ return (position + direction_normalized * travelledWorldSpaceDistance_sinceMouseDown);
+ }
+
+ static Vector3 GetSceneViewCamerasForwardDirection()
+ {
+ if (SceneView.lastActiveSceneView == null)
+ {
+ return Vector3.forward;
+ }
+ else
+ {
+ return SceneView.lastActiveSceneView.camera.transform.forward;
+ }
+ }
+
+ static bool Direction_goesFromLeftToRight_insideSceneViewScreen(Vector3 direction)
+ {
+ if (SceneView.lastActiveSceneView == null)
+ {
+ return false;
+ }
+ else
+ {
+ return (Vector3.Dot(direction, SceneView.lastActiveSceneView.camera.transform.right) > 0.0f);
+ }
+ }
+
+#endif
+
+ }
+
+}
diff --git a/Editor/DrawDebugLibrary/HandlesExamples.cs.meta b/Editor/DrawDebugLibrary/HandlesExamples.cs.meta
new file mode 100644
index 0000000..a4466e3
--- /dev/null
+++ b/Editor/DrawDebugLibrary/HandlesExamples.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7ecf32ddad5758149b7a2a98d2e09d1f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/InternalDXXL_TaggedScreenspaceObjectDrawer.cs b/Editor/DrawDebugLibrary/InternalDXXL_TaggedScreenspaceObjectDrawer.cs
new file mode 100644
index 0000000..6aba319
--- /dev/null
+++ b/Editor/DrawDebugLibrary/InternalDXXL_TaggedScreenspaceObjectDrawer.cs
@@ -0,0 +1,35 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomPropertyDrawer(typeof(InternalDXXL_TaggedScreenspaceObject))]
+ public class InternalDXXL_TaggedScreenspaceObjectDrawer : PropertyDrawer
+ {
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
+ {
+ SerializedProperty sP_gameobject = property.FindPropertyRelative("gameobject");
+ Rect space_ofGameobject = new Rect(position.x, position.y, 0.4f * position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.PropertyField(space_ofGameobject, sP_gameobject, GUIContent.none);
+
+ Rect space_ofTextLabel = new Rect(position.x + 0.4f * position.width, position.y, 0.2f * position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.LabelField(space_ofTextLabel, new GUIContent("Text:", "You can insert insert line breaks by typing
inside the text."));
+
+ SerializedProperty sP_text = property.FindPropertyRelative("text");
+ Rect space_ofText = new Rect(position.x + 0.50f * position.width, position.y, 0.3f * position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.PropertyField(space_ofText, sP_text, GUIContent.none);
+
+ SerializedProperty sP_color = property.FindPropertyRelative("color");
+ Rect space_ofColor = new Rect(position.x + 0.8f * position.width, position.y, 0.2f * position.width, EditorGUIUtility.singleLineHeight);
+ EditorGUI.PropertyField(space_ofColor, sP_color, GUIContent.none);
+ }
+
+ public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
+ {
+ return EditorGUIUtility.singleLineHeight;
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/InternalDXXL_TaggedScreenspaceObjectDrawer.cs.meta b/Editor/DrawDebugLibrary/InternalDXXL_TaggedScreenspaceObjectDrawer.cs.meta
new file mode 100644
index 0000000..ef0cdcb
--- /dev/null
+++ b/Editor/DrawDebugLibrary/InternalDXXL_TaggedScreenspaceObjectDrawer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f4dab1b285fe724498fe779c8b261dac
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/LineDrawer2DInspector.cs b/Editor/DrawDebugLibrary/LineDrawer2DInspector.cs
new file mode 100644
index 0000000..c029b80
--- /dev/null
+++ b/Editor/DrawDebugLibrary/LineDrawer2DInspector.cs
@@ -0,0 +1,139 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(LineDrawer2D))]
+ [CanEditMultipleObjects]
+ public class LineDrawer2DInspector : LineDrawerInspector
+ {
+ void OnEnable()
+ {
+ OnEnable_base();
+ OnEnable_base_atLineDrawer();
+ }
+
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("line2D");
+
+ SerializedProperty sP_lineType = serializedObject.FindProperty("lineType");
+ EditorGUILayout.PropertyField(sP_lineType, new GUIContent("Line type"));
+
+ SerializedProperty sP_lineDefinitionMode = serializedObject.FindProperty("lineDefinitionMode");
+ EditorGUILayout.PropertyField(sP_lineDefinitionMode, new GUIContent("Line definition mode"));
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ Draw_startPos_endPos_lineDirection_definingSection(sP_lineDefinitionMode);
+ TryDrawTensionSpecs(sP_lineType);
+ DrawColors(sP_lineType);
+ DrawWidthAndDependentParameters(sP_lineType);
+ TryDrawExtentionLength(sP_lineType);
+ TryDrawLineStyleAndDependentParameters(sP_lineType);
+ TryDrawAnimationSection(sP_lineType);
+
+ if (sP_lineType.enumValueIndex != (int)LineDrawer.LineType.vectorWithExtention)
+ {
+ TryDrawConeConfig(sP_lineType);
+ Draw_endPlatesConfig();
+ TryDrawAlphaFadeOut(sP_lineType);
+ }
+
+ TryDrawNormalizedMarkerCheckBox(sP_lineType);
+
+ DrawZPosChooserFor2D();
+ DrawTextSpecs(sP_lineType, true);
+ DrawCheckboxFor_drawOnlyIfSelected("line");
+ DrawCheckboxFor_hiddenByNearerObjects("line");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ public override void Draw_startPositionSection(SerializedProperty sP_lineDefinitionSection1_isOutfolded, GUIStyle style_ofFoldoutWithRichtext)
+ {
+ sP_lineDefinitionSection1_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_lineDefinitionSection1_isOutfolded.boolValue, "Start Position", true, style_ofFoldoutWithRichtext);
+ if (sP_lineDefinitionSection1_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_positionDefinitionOption_ofStartPos = serializedObject.FindProperty("positionDefinitionOption_ofStartPos");
+ EditorGUILayout.PropertyField(sP_positionDefinitionOption_ofStartPos, new GUIContent("Position Definition"));
+ switch (sP_positionDefinitionOption_ofStartPos.enumValueIndex)
+ {
+ case (int)LineDrawer.PositionDefinitionOption.positionOfThisGameobjectPlusOffset:
+ Draw_DrawPosition2DOffset(false, null, "Global Offset", "Local Offset", true);
+ break;
+ case (int)LineDrawer.PositionDefinitionOption.positionOfOtherGameobjectPlusOffset:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("partnerGameobject"), new GUIContent("Other Gameobject"));
+ Draw_DrawPosition2DOffset_ofPartnerGameobject(false, null, "Global Offset", "Local Offset", true);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("coordinateSpaceForLocalOffsetOnOtherGameobject_forStartPos"), new GUIContent("Local Offset Space"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ case (int)LineDrawer.PositionDefinitionOption.chooseFree:
+ DrawSpecificationOf_customVector2_3(null, false, null, false, false, false, false, true, false);
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public override void Draw_endPositionSection(SerializedProperty sP_lineDefinitionSection2_isOutfolded, GUIStyle style_ofFoldoutWithRichtext)
+ {
+ sP_lineDefinitionSection2_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_lineDefinitionSection2_isOutfolded.boolValue, "End Position", true, style_ofFoldoutWithRichtext);
+ if (sP_lineDefinitionSection2_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_positionDefinitionOption_ofEndPos = serializedObject.FindProperty("positionDefinitionOption_ofEndPos");
+ EditorGUILayout.PropertyField(sP_positionDefinitionOption_ofEndPos, new GUIContent("Position Definition"));
+ switch (sP_positionDefinitionOption_ofEndPos.enumValueIndex)
+ {
+ case (int)LineDrawer.PositionDefinitionOption.positionOfThisGameobjectPlusOffset:
+ Draw_DrawPosition2DOffset_independentAlternativeValue(false, null, "Global Offset", "Local Offset", true);
+ break;
+ case (int)LineDrawer.PositionDefinitionOption.positionOfOtherGameobjectPlusOffset:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("partnerGameobject_independentAlternativeValue"), new GUIContent("Other Gameobject"));
+ Draw_DrawPosition2DOffset_ofPartnerGameobject_independentAlternativeValue(false, null, "Global Offset", "Local Offset", true);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("coordinateSpaceForLocalOffsetOnOtherGameobject_forEndPos"), new GUIContent("Local Offset Space"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ case (int)LineDrawer.PositionDefinitionOption.chooseFree:
+ DrawSpecificationOf_customVector2_4(null, false, null, false, false, false, false, true, false);
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public override void Draw_lineVectorSection(SerializedProperty sP_lineDefinitionSection_isOutfolded, string headline, GUIStyle style_ofFoldoutWithRichtext)
+ {
+ sP_lineDefinitionSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_lineDefinitionSection_isOutfolded.boolValue, headline, true, style_ofFoldoutWithRichtext);
+ if (sP_lineDefinitionSection_isOutfolded.boolValue)
+ {
+ DrawSpecificationOf_customVector2_1(null, false, null, false, false, false, false, true);
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/LineDrawer2DInspector.cs.meta b/Editor/DrawDebugLibrary/LineDrawer2DInspector.cs.meta
new file mode 100644
index 0000000..8e9ff61
--- /dev/null
+++ b/Editor/DrawDebugLibrary/LineDrawer2DInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a39f78e0e4bdf2543a7639d1b1308787
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/LineDrawerInspector.cs b/Editor/DrawDebugLibrary/LineDrawerInspector.cs
new file mode 100644
index 0000000..79ab939
--- /dev/null
+++ b/Editor/DrawDebugLibrary/LineDrawerInspector.cs
@@ -0,0 +1,536 @@
+namespace DrawXXL
+{
+ using System;
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(LineDrawer))]
+ [CanEditMultipleObjects]
+ public class LineDrawerInspector : VisualizerParentInspector
+ {
+ LineDrawer lineDrawerMonoBehaviour_unserialized;
+
+ void OnEnable()
+ {
+ OnEnable_base();
+ OnEnable_base_atLineDrawer();
+ }
+
+ public void OnEnable_base_atLineDrawer()
+ {
+ lineDrawerMonoBehaviour_unserialized = (LineDrawer)target;
+ }
+
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("line");
+
+ SerializedProperty sP_lineType = serializedObject.FindProperty("lineType");
+ EditorGUILayout.PropertyField(sP_lineType, new GUIContent("Line type"));
+
+ SerializedProperty sP_lineDefinitionMode = serializedObject.FindProperty("lineDefinitionMode");
+ EditorGUILayout.PropertyField(sP_lineDefinitionMode, new GUIContent("Line definition mode"));
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ Draw_startPos_endPos_lineDirection_definingSection(sP_lineDefinitionMode);
+ TryDrawTensionSpecs(sP_lineType);
+ DrawColors(sP_lineType);
+ DrawWidthAndDependentParameters(sP_lineType);
+ TryDrawExtentionLength(sP_lineType);
+ TryDrawLineStyleAndDependentParameters(sP_lineType);
+ TryDrawAnimationSection(sP_lineType);
+
+ if (sP_lineType.enumValueIndex != (int)LineDrawer.LineType.vectorWithExtention)
+ {
+ TryDrawFlatLineSection(sP_lineType);
+ TryDrawConeConfig(sP_lineType);
+ Draw_endPlatesConfig();
+ TryDrawAlphaFadeOut(sP_lineType);
+ }
+
+ TryDrawNormalizedMarkerCheckBox(sP_lineType);
+
+ DrawTextSpecs(sP_lineType, false);
+ DrawCheckboxFor_drawOnlyIfSelected("line");
+ DrawCheckboxFor_hiddenByNearerObjects("line");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ public void Draw_startPos_endPos_lineDirection_definingSection(SerializedProperty sP_lineDefinitionMode)
+ {
+ SerializedProperty sP_lineDefinitionSection1_isOutfolded = serializedObject.FindProperty("lineDefinitionSection1_isOutfolded");
+ SerializedProperty sP_lineDefinitionSection2_isOutfolded = serializedObject.FindProperty("lineDefinitionSection2_isOutfolded");
+
+ GUIStyle style_ofFoldoutWithRichtext = new GUIStyle(EditorStyles.foldout);
+ style_ofFoldoutWithRichtext.richText = true;
+ string headline_of_directionVectorChooserSections = "Vector to End Position";
+ switch (sP_lineDefinitionMode.enumValueIndex)
+ {
+ case (int)LineDrawer.LineDefinitionMode.startPositionAndEndPosition:
+ Draw_startPositionSection(sP_lineDefinitionSection1_isOutfolded, style_ofFoldoutWithRichtext);
+ Draw_endPositionSection(sP_lineDefinitionSection2_isOutfolded, style_ofFoldoutWithRichtext);
+ break;
+ case (int)LineDrawer.LineDefinitionMode.startPositionAndDirectionVectorToEndPosition:
+ Draw_startPositionSection(sP_lineDefinitionSection1_isOutfolded, style_ofFoldoutWithRichtext);
+ Draw_lineVectorSection(sP_lineDefinitionSection2_isOutfolded, headline_of_directionVectorChooserSections, style_ofFoldoutWithRichtext);
+ break;
+ case (int)LineDrawer.LineDefinitionMode.endPositionAndDirectionVectorToIt:
+ Draw_lineVectorSection(sP_lineDefinitionSection1_isOutfolded, headline_of_directionVectorChooserSections, style_ofFoldoutWithRichtext);
+ Draw_endPositionSection(sP_lineDefinitionSection2_isOutfolded, style_ofFoldoutWithRichtext);
+ break;
+ default:
+ break;
+ }
+
+ if (sP_lineDefinitionSection2_isOutfolded.boolValue == false)
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public virtual void Draw_startPositionSection(SerializedProperty sP_lineDefinitionSection1_isOutfolded, GUIStyle style_ofFoldoutWithRichtext)
+ {
+ sP_lineDefinitionSection1_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_lineDefinitionSection1_isOutfolded.boolValue, "Start Position", true, style_ofFoldoutWithRichtext);
+ if (sP_lineDefinitionSection1_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_positionDefinitionOption_ofStartPos = serializedObject.FindProperty("positionDefinitionOption_ofStartPos");
+ EditorGUILayout.PropertyField(sP_positionDefinitionOption_ofStartPos, new GUIContent("Position Definition"));
+ switch (sP_positionDefinitionOption_ofStartPos.enumValueIndex)
+ {
+ case (int)LineDrawer.PositionDefinitionOption.positionOfThisGameobjectPlusOffset:
+ Draw_DrawPosition3DOffset(false, null, "Global Offset", "Local Offset", true);
+ break;
+ case (int)LineDrawer.PositionDefinitionOption.positionOfOtherGameobjectPlusOffset:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("partnerGameobject"), new GUIContent("Other Gameobject"));
+ Draw_DrawPosition3DOffset_ofPartnerGameobject(false, null, "Global Offset", "Local Offset", true);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("coordinateSpaceForLocalOffsetOnOtherGameobject_forStartPos"), new GUIContent("Local Offset Space"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ case (int)LineDrawer.PositionDefinitionOption.chooseFree:
+ DrawSpecificationOf_customVector3_3(null, false, null, false, false, false, false, true, false);
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public virtual void Draw_endPositionSection(SerializedProperty sP_lineDefinitionSection2_isOutfolded, GUIStyle style_ofFoldoutWithRichtext)
+ {
+ sP_lineDefinitionSection2_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_lineDefinitionSection2_isOutfolded.boolValue, "End Position", true, style_ofFoldoutWithRichtext);
+ if (sP_lineDefinitionSection2_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_positionDefinitionOption_ofEndPos = serializedObject.FindProperty("positionDefinitionOption_ofEndPos");
+ EditorGUILayout.PropertyField(sP_positionDefinitionOption_ofEndPos, new GUIContent("Position Definition"));
+ switch (sP_positionDefinitionOption_ofEndPos.enumValueIndex)
+ {
+ case (int)LineDrawer.PositionDefinitionOption.positionOfThisGameobjectPlusOffset:
+ Draw_DrawPosition3DOffset_independentAlternativeValue(false, null, "Global Offset", "Local Offset", true);
+ break;
+ case (int)LineDrawer.PositionDefinitionOption.positionOfOtherGameobjectPlusOffset:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("partnerGameobject_independentAlternativeValue"), new GUIContent("Other Gameobject"));
+ Draw_DrawPosition3DOffset_ofPartnerGameobject_independentAlternativeValue(false, null, "Global Offset", "Local Offset", true);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("coordinateSpaceForLocalOffsetOnOtherGameobject_forEndPos"), new GUIContent("Local Offset Space"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ case (int)LineDrawer.PositionDefinitionOption.chooseFree:
+ DrawSpecificationOf_customVector3_4(null, false, null, false, false, false, false, true, false);
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public virtual void Draw_lineVectorSection(SerializedProperty sP_lineDefinitionSection_isOutfolded, string headline, GUIStyle style_ofFoldoutWithRichtext)
+ {
+ sP_lineDefinitionSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_lineDefinitionSection_isOutfolded.boolValue, headline, true, style_ofFoldoutWithRichtext);
+ if (sP_lineDefinitionSection_isOutfolded.boolValue)
+ {
+ DrawSpecificationOf_customVector3_1(null, false, null, false, false, false, false, true);
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public void TryDrawTensionSpecs(SerializedProperty sP_lineType)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineUnderTension)
+ {
+ SerializedProperty sP_relaxedLength = serializedObject.FindProperty("relaxedLength");
+ float lineLength = lineDrawerMonoBehaviour_unserialized.GetLineLength();
+
+ EditorGUILayout.PropertyField(sP_relaxedLength, new GUIContent("Relaxed Length", "This is the reference length for how the tension appears. If the line has a length of this value, then it appears with its relaxed color and the line style isn't stretched or squeezed. Other line lengths will stretch and squeeze the line style and change the color, as if the line is under tension like a spring."));
+ sP_relaxedLength.floatValue = Mathf.Max(sP_relaxedLength.floatValue, 0.001f);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.FloatField(new GUIContent("Current Line Length"), lineLength);
+ EditorGUILayout.FloatField(new GUIContent("Current Stretch Factor"), lineLength / sP_relaxedLength.floatValue);
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("alphaOfReferenceLengthDisplay"), new GUIContent("Alpha of reference length display"));
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ public void DrawColors(SerializedProperty sP_lineType)
+ {
+ if (sP_lineType.enumValueIndex != (int)LineDrawer.LineType.lineUnderTension)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("startColor"), new GUIContent("Color"));
+ }
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.standardLine)
+ {
+ GUILayout.BeginHorizontal();
+ SerializedProperty sP_useDifferentEndColor = serializedObject.FindProperty("useDifferentEndColor");
+ EditorGUILayout.PropertyField(sP_useDifferentEndColor, new GUIContent("End Color"));
+ EditorGUI.BeginDisabledGroup(!sP_useDifferentEndColor.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("endColor"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+ }
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.blinkingLine)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("blinkColor"), new GUIContent("Blink Color"));
+ }
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineUnderTension)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("relaxedColor"), new GUIContent("Relaxed Color"));
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_forStretchedTension"), new GUIContent("Stretched Color"));
+ SerializedProperty sP_stretchFactor_forStretchedTensionColor = serializedObject.FindProperty("stretchFactor_forStretchedTensionColor");
+ EditorGUILayout.PropertyField(sP_stretchFactor_forStretchedTensionColor, new GUIContent("appearing at stretch factor of"));
+ sP_stretchFactor_forStretchedTensionColor.floatValue = Mathf.Max(sP_stretchFactor_forStretchedTensionColor.floatValue, 1.001f);
+ GUILayout.EndHorizontal();
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_forSqueezedTension"), new GUIContent("Squeezed Color"));
+ SerializedProperty sP_stretchFactor_forSqueezedTensionColor = serializedObject.FindProperty("stretchFactor_forSqueezedTensionColor");
+ EditorGUILayout.PropertyField(sP_stretchFactor_forSqueezedTensionColor, new GUIContent("appearing at stretch factor of"));
+ sP_stretchFactor_forSqueezedTensionColor.floatValue = Mathf.Max(sP_stretchFactor_forSqueezedTensionColor.floatValue, 0.0f);
+ sP_stretchFactor_forSqueezedTensionColor.floatValue = Mathf.Min(sP_stretchFactor_forSqueezedTensionColor.floatValue, 0.999f);
+ GUILayout.EndHorizontal();
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineWithAlternatingColors)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("alternatingColor"), new GUIContent("Alternating Color"));
+ }
+ }
+
+ public void DrawWidthAndDependentParameters(SerializedProperty sP_lineType)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.movingArrowsLine)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineWidth_ofMovingArrowsLine"), new GUIContent("Width"));
+
+ string autoRoundingExplanationTooltip = "Very small (or very big) values may get rounded up (down) internally to prevent an explosive raise of drawn lines, see also 'DrawXXL.DrawBasics.MaxAllowedDrawnLinesPerFrame'." + Environment.NewLine + Environment.NewLine + "This automatic rounding has interdepency with 'Width' and ";
+
+ SerializedProperty sP_distanceBetweenArrows = serializedObject.FindProperty("distanceBetweenArrows");
+ SerializedProperty sP_lengthOfArrows = serializedObject.FindProperty("lengthOfArrows");
+
+ EditorGUILayout.PropertyField(sP_distanceBetweenArrows, new GUIContent("Distance between arrows", autoRoundingExplanationTooltip + "'Length of Arrows'."));
+ sP_distanceBetweenArrows.floatValue = Mathf.Max(sP_distanceBetweenArrows.floatValue, 0.002f);
+
+ EditorGUILayout.PropertyField(sP_lengthOfArrows, new GUIContent("Length of Arrows", autoRoundingExplanationTooltip + "'Distance between arrows'."));
+ sP_lengthOfArrows.floatValue = Mathf.Max(sP_lengthOfArrows.floatValue, 0.001f);
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineWidth"), new GUIContent("Width"));
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineWithAlternatingColors)
+ {
+ SerializedProperty sP_lengthOfStripes = serializedObject.FindProperty("lengthOfStripes");
+ EditorGUILayout.PropertyField(sP_lengthOfStripes, new GUIContent("Length of Stripes", "This may get rounded internally to prevent an explosive raise of drawn lines, see also 'DrawXXL.DrawBasics.MaxAllowedDrawnLinesPerFrame'." + Environment.NewLine + "It also may get raised automatically for larger line widths."));
+ sP_lengthOfStripes.floatValue = Mathf.Max(sP_lengthOfStripes.floatValue, UtilitiesDXXL_DrawBasics.min_lengthOfStripes_ofAlternatingColorLine);
+ }
+ }
+ }
+
+ public void TryDrawExtentionLength(SerializedProperty sP_lineType)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.vectorWithExtention)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("extentionLength"), new GUIContent("Extention length"));
+
+ GUILayout.BeginHorizontal();
+ SerializedProperty sP_forceFixedConeLength = serializedObject.FindProperty("forceFixedConeLength");
+ EditorGUILayout.PropertyField(sP_forceFixedConeLength, new GUIContent("Fixed cone length (in world units)", "Makes the cone length independent from the vector length."));
+ EditorGUI.BeginDisabledGroup(!sP_forceFixedConeLength.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forceFixedConeLength_value"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+ }
+ }
+
+ public void TryDrawLineStyleAndDependentParameters(SerializedProperty sP_lineType)
+ {
+ if ((sP_lineType.enumValueIndex == (int)LineDrawer.LineType.standardLine) || (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.blinkingLine) || (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineUnderTension))
+ {
+ SerializedProperty sP_lineStyle;
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineUnderTension)
+ {
+ sP_lineStyle = serializedObject.FindProperty("lineStyle_underTension");
+ }
+ else
+ {
+ sP_lineStyle = serializedObject.FindProperty("lineStyle");
+ }
+
+ EditorGUILayout.PropertyField(sP_lineStyle, new GUIContent("Style"));
+
+ bool lineStyle_usesPatternScaling = UtilitiesDXXL_LineStyles.CheckIfLineStyleUsesPatternScaling((DrawBasics.LineStyle)sP_lineStyle.enumValueIndex);
+ if (lineStyle_usesPatternScaling)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_stylePatternScaleFactor = serializedObject.FindProperty("stylePatternScaleFactor");
+ EditorGUILayout.PropertyField(sP_stylePatternScaleFactor, new GUIContent("Style Pattern Scaling", "This may sometimes get automatically rounded up for line widths that are bigger than 0. See also the 'Skip automatic pattern enlargement for * lines'-fields."));
+ sP_stylePatternScaleFactor.floatValue = Mathf.Max(sP_stylePatternScaleFactor.floatValue, UtilitiesDXXL_LineStyles.minStylePatternScaleFactor);
+
+ DrawSkipPatternEnlargementCheckBoxes();
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineWithAlternatingColors)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ DrawSkipPatternEnlargementCheckBoxes();
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawSkipPatternEnlargementCheckBoxes()
+ {
+ SerializedProperty sP_skipPatternEnlargementForLongLines = serializedObject.FindProperty("skipPatternEnlargementForLongLines");
+ sP_skipPatternEnlargementForLongLines.boolValue = EditorGUILayout.ToggleLeft(new GUIContent("Skip automatic pattern enlargement for long lines", "For long lines the style pattern is automatically enlarged. Otherwise there would be a higher risk of Editor performance slowdown, because a single long styled line could accidentally use up many small straight lines, from which it is composed." + Environment.NewLine + Environment.NewLine + "You can skip this automatic enlargement at your own risk. 'DrawXXL.DrawBasics.MaxAllowedDrawnLinesPerFrame' will still protect you from Editor freeze."), sP_skipPatternEnlargementForLongLines.boolValue);
+
+ SerializedProperty sP_skipPatternEnlargementForShortLines = serializedObject.FindProperty("skipPatternEnlargementForShortLines");
+ sP_skipPatternEnlargementForShortLines.boolValue = EditorGUILayout.ToggleLeft(new GUIContent("Skip automatic pattern enlargement for short lines", "The style pattern of some lines gets automatically enlarged when the line becomes very short or for large line widths. This reduces the risk of Editor performance slowdown, because a single styled line could accidentally use up many small straight lines, from which it is composed, mainly when 'Style Pattern Scaling' has a very small value." + Environment.NewLine + "It also keeps the style patterns recognizable when a large line width would let 'dashes' appear as 'dots'." + Environment.NewLine + Environment.NewLine + "This enlargement only affects line styles with gaps, like 'dotted' or 'dashed'. It also only affects lines whose width is bigger than zero." + Environment.NewLine + Environment.NewLine + "You can skip this automatic enlargement at your own risk. 'DrawXXL.DrawBasics.MaxAllowedDrawnLinesPerFrame' will still protect you from Editor freeze."), sP_skipPatternEnlargementForShortLines.boolValue);
+ }
+
+ public void TryDrawAnimationSection(SerializedProperty sP_lineType)
+ {
+ bool lineIsAnimatable = lineDrawerMonoBehaviour_unserialized.DrawnLineUsesAnimation(false);
+ if (lineIsAnimatable)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.movingArrowsLine)
+ {
+ DrawAnimationSpeed(serializedObject.FindProperty("animationSpeed_ofMovingArrowsLine"), new GUIContent("Animation speed"));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("backwardAnimationFlipsArrowDirection"), new GUIContent("Flip arrows during backward animation", "This has only effect if 'Animation speed' is negative. If it is disabled then the arrows are always forced to point towards the line end and they appear to move backwards."));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ if ((sP_lineType.enumValueIndex == (int)LineDrawer.LineType.standardLine) || (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineWithAlternatingColors))
+ {
+ DrawAnimationSpeed(serializedObject.FindProperty("animationSpeed"), new GUIContent("Animation speed"));
+ }
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.blinkingLine)
+ {
+ SerializedProperty sP_blinkDurationInSec = serializedObject.FindProperty("blinkDurationInSec");
+ DrawAnimationSpeed(sP_blinkDurationInSec, new GUIContent("Blink duration", "In seconds"));
+ sP_blinkDurationInSec.floatValue = Mathf.Max(sP_blinkDurationInSec.floatValue, UtilitiesDXXL_DrawBasics.min_blinkDurationInSec);
+ }
+ }
+ }
+
+ void DrawAnimationSpeed(SerializedProperty sP_used_animationSpeedField, GUIContent displayName)
+ {
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_used_animationSpeedField, displayName);
+ if (Application.isPlaying == false)
+ {
+ SerializedProperty sP_animationDuringEditMode = serializedObject.FindProperty("animationDuringEditMode");
+ sP_animationDuringEditMode.boolValue = EditorGUILayout.ToggleLeft(new GUIContent("Also in Edit Mode", "Animation ouside playmode is convenient, but forces the Editor Windows to continuously redraw, which may have a negative effect on the Editor performance." + Environment.NewLine + Environment.NewLine + "Note: The setting here may be without effect if a 'Draw XXL Gizmo Line Count Manager' component already redraws the Scene and Game view."), sP_animationDuringEditMode.boolValue);
+ }
+ GUILayout.EndHorizontal();
+ }
+
+ void TryDrawFlatLineSection(SerializedProperty sP_lineType)
+ {
+ bool lineCanBeAffectedByFlattenBool = lineDrawerMonoBehaviour_unserialized.CheckIf_lineCanBeAffectedByFlattenBool();
+ GUIContent guiContent_ofFlatToggle;
+ if (lineCanBeAffectedByFlattenBool)
+ {
+ guiContent_ofFlatToggle = new GUIContent("Flat", "This makes the line flat instead of round. It only affects lines with a width that is bigger than zero, or if 'end plates' or 'end cones' are used.");
+ }
+ else
+ {
+ guiContent_ofFlatToggle = new GUIContent("Flat", "This only has effect if the line width is bigger than zero, or if 'end plates' or 'end cones' are used.");
+ }
+
+ bool lineIsFlat;
+ EditorGUI.BeginDisabledGroup(!lineCanBeAffectedByFlattenBool);
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.movingArrowsLine)
+ {
+ SerializedProperty sP_flattenThickRoundLineIntoAmplitudePlane_ofMovingArrowsLine = serializedObject.FindProperty("flattenThickRoundLineIntoAmplitudePlane_ofMovingArrowsLine");
+ EditorGUILayout.PropertyField(sP_flattenThickRoundLineIntoAmplitudePlane_ofMovingArrowsLine, guiContent_ofFlatToggle);
+ lineIsFlat = sP_flattenThickRoundLineIntoAmplitudePlane_ofMovingArrowsLine.boolValue;
+ }
+ else
+ {
+ SerializedProperty sP_flattenThickRoundLineIntoAmplitudePlane = serializedObject.FindProperty("flattenThickRoundLineIntoAmplitudePlane");
+ EditorGUILayout.PropertyField(sP_flattenThickRoundLineIntoAmplitudePlane, guiContent_ofFlatToggle);
+ lineIsFlat = sP_flattenThickRoundLineIntoAmplitudePlane.boolValue;
+ }
+ EditorGUI.EndDisabledGroup();
+
+ if (lineCanBeAffectedByFlattenBool)
+ {
+ if (lineIsFlat)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ DrawAmplitudeChooser("Alignment of flat line in 3D space", "Custom Flat Amplitude Direction");
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+ }
+
+ public void TryDrawConeConfig(SerializedProperty sP_lineType)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.vector)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("conesConfig"), new GUIContent("Cones"));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ Draw_coneLengthInclSpaceInterpretation_forStraightVectors();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public void Draw_endPlatesConfig()
+ {
+ SerializedProperty sP_endPlatesConfig = serializedObject.FindProperty("endPlatesConfig");
+ EditorGUILayout.PropertyField(sP_endPlatesConfig, new GUIContent("End Plates"));
+
+ if (sP_endPlatesConfig.enumValueIndex != (int)LineDrawer.EndPlatesConfig.disabled)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ Draw_endPlatesSizeInclSpaceInterpretation();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public void TryDrawAlphaFadeOut(SerializedProperty sP_lineType)
+ {
+ if ((sP_lineType.enumValueIndex == (int)LineDrawer.LineType.standardLine) || (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.blinkingLine) || (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineWithAlternatingColors))
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("alphaFadeOutLength_0to1"), new GUIContent("Fade Out Ends"));
+ }
+ }
+
+ public void TryDrawNormalizedMarkerCheckBox(SerializedProperty sP_lineType)
+ {
+ if ((sP_lineType.enumValueIndex == (int)LineDrawer.LineType.vector) || (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.vectorWithExtention))
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("addNormalizedMarkingText"), new GUIContent("Normalization Marker", "This adds the the text 'normalized' to the vector at the position where it is 1 unit long measured from the start position."));
+ }
+ }
+
+ public void DrawTextSpecs(SerializedProperty sP_lineType, bool is2D)
+ {
+ //-> this fakes the appearance of beeing inside the parents text specification foldout
+ bool emptyLineAtEndIfOutfolded = false;
+ bool displaySizeScalingStyleOption = false; //-> the text size markups don't work well for text on lines, since the text size anyway gets forced to a portion of the line length
+ DrawTextInputInclMarkupHelper(true, false, null, emptyLineAtEndIfOutfolded, displaySizeScalingStyleOption);
+
+ if (serializedObject.FindProperty("textSection_isOutfolded").boolValue == true)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("relSizeOfTextOnLines"), new GUIContent("Text Area Size", "This is relative to the line length."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("shiftTextPosOnLines_toNonIntersecting"), new GUIContent("Shift text upward till non-intersecting", "This only has effect if the text contains line breaks. In such cases it will force all text lines to be on the same side of the drawn line."));
+
+ GUILayout.BeginHorizontal();
+ SerializedProperty sP_enlargeSmallTextToThisMinTextSize = serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize");
+ EditorGUILayout.PropertyField(sP_enlargeSmallTextToThisMinTextSize, new GUIContent("Minimum Text Size", "Width per letter in world units." + Environment.NewLine + Environment.NewLine + "This is intended for cases where the line is so short that the text isn't well readable any more."));
+ EditorGUI.BeginDisabledGroup(!sP_enlargeSmallTextToThisMinTextSize.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize_value"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ if (sP_lineType.enumValueIndex != (int)LineDrawer.LineType.vectorWithExtention)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.vector)
+ {
+ string displayName_of_writeComponentValuesAsText = is2D ? "Add x/y length to text" : "Add x/y/z length to text";
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("writeComponentValuesAsText"), new GUIContent(displayName_of_writeComponentValuesAsText));
+ }
+
+ if (is2D)
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ else
+ {
+ DrawAmplitudeChooser("Alignment of text in 3D space", "Custom Text Upward Direction");
+ if (serializedObject.FindProperty("customVector3Configs.Array.data[1].picker_isOutfolded").boolValue == false)
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+ }
+ else
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawAmplitudeChooser(string alignmentSourceEnum_displayName, string vectorPicker_displayName)
+ {
+ SerializedProperty sP_amplitudeAndTextAlignment = serializedObject.FindProperty("amplitudeAndTextAlignment");
+ EditorGUILayout.PropertyField(sP_amplitudeAndTextAlignment, new GUIContent(alignmentSourceEnum_displayName));
+
+ if (sP_amplitudeAndTextAlignment.enumValueIndex == (int)LineDrawer.AmplitudeAndTextAlignment.customAmplitudeDirection)
+ {
+ DrawSpecificationOf_customVector3_2(vectorPicker_displayName, false, null, false, false, true, false);
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/LineDrawerInspector.cs.meta b/Editor/DrawDebugLibrary/LineDrawerInspector.cs.meta
new file mode 100644
index 0000000..323b4c3
--- /dev/null
+++ b/Editor/DrawDebugLibrary/LineDrawerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2392ea6e9e0aa8e4eab96afe1299a97e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/LineDrawerScreenspaceInspector.cs b/Editor/DrawDebugLibrary/LineDrawerScreenspaceInspector.cs
new file mode 100644
index 0000000..fbf2474
--- /dev/null
+++ b/Editor/DrawDebugLibrary/LineDrawerScreenspaceInspector.cs
@@ -0,0 +1,381 @@
+namespace DrawXXL
+{
+ using System;
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(LineDrawerScreenspace))]
+ [CanEditMultipleObjects]
+ public class LineDrawerScreenspaceInspector : VisualizerScreenspaceParentInspector
+ {
+ LineDrawerScreenspace lineDrawerScreenspaceMonoBehaviour_unserialized;
+ void OnEnable()
+ {
+ OnEnable_base();
+ OnEnable_ofScreenspaceParent();
+ OnEnable_ofLineDrawerScreenspaceInspector();
+ }
+
+ void OnEnable_ofLineDrawerScreenspaceInspector()
+ {
+ lineDrawerScreenspaceMonoBehaviour_unserialized = (LineDrawerScreenspace)target;
+ }
+
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("screenspace line");
+ if (DrawCameraChooser(true))
+ {
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ SerializedProperty sP_lineType = serializedObject.FindProperty("lineType");
+ EditorGUILayout.PropertyField(sP_lineType, new GUIContent("Line type"));
+
+ SerializedProperty sP_lineDefinitionMode = serializedObject.FindProperty("lineDefinitionMode");
+ EditorGUILayout.PropertyField(sP_lineDefinitionMode, new GUIContent("Line definition mode"));
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ Draw_startPos_endPos_lineDirection_definingSection(sP_lineDefinitionMode);
+ TryDrawTensionSpecs(sP_lineType);
+ DrawColors(sP_lineType);
+ DrawWidthAndDependentParameters(sP_lineType);
+ TryDrawExtendedLines_checkBoxForDistanceOutsideScreen(sP_lineType);
+ TryDrawLineStyleAndDependentParameters(sP_lineType);
+ TryDrawAnimationSection(sP_lineType);
+
+ if (sP_lineType.enumValueIndex != (int)LineDrawer.LineType.vectorWithExtention)
+ {
+ TryDrawConeConfig(sP_lineType);
+ Draw_endPlatesConfig();
+ TryDrawAlphaFadeOut(sP_lineType);
+ }
+
+ DrawTextSpecs(sP_lineType);
+ DrawCheckboxFor_drawOnlyIfSelected("screenspace line");
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void Draw_startPos_endPos_lineDirection_definingSection(SerializedProperty sP_lineDefinitionMode)
+ {
+ SerializedProperty sP_lineDefinitionSection1_isOutfolded = serializedObject.FindProperty("lineDefinitionSection1_isOutfolded");
+ SerializedProperty sP_lineDefinitionSection2_isOutfolded = serializedObject.FindProperty("lineDefinitionSection2_isOutfolded");
+
+ GUIStyle style_ofFoldoutWithRichtext = new GUIStyle(EditorStyles.foldout);
+ style_ofFoldoutWithRichtext.richText = true;
+ string headline_of_directionVectorChooserSections = "Vector to End Position";
+ switch (sP_lineDefinitionMode.enumValueIndex)
+ {
+ case (int)LineDrawer.LineDefinitionMode.startPositionAndEndPosition:
+ Draw_startPositionSection(sP_lineDefinitionSection1_isOutfolded, style_ofFoldoutWithRichtext);
+ Draw_endPositionSection(sP_lineDefinitionSection2_isOutfolded, style_ofFoldoutWithRichtext);
+ break;
+ case (int)LineDrawer.LineDefinitionMode.startPositionAndDirectionVectorToEndPosition:
+ Draw_startPositionSection(sP_lineDefinitionSection1_isOutfolded, style_ofFoldoutWithRichtext);
+ Draw_lineVectorSection(sP_lineDefinitionSection2_isOutfolded, headline_of_directionVectorChooserSections, style_ofFoldoutWithRichtext);
+ break;
+ case (int)LineDrawer.LineDefinitionMode.endPositionAndDirectionVectorToIt:
+ Draw_lineVectorSection(sP_lineDefinitionSection1_isOutfolded, headline_of_directionVectorChooserSections, style_ofFoldoutWithRichtext);
+ Draw_endPositionSection(sP_lineDefinitionSection2_isOutfolded, style_ofFoldoutWithRichtext);
+ break;
+ default:
+ break;
+ }
+
+ if (sP_lineDefinitionSection2_isOutfolded.boolValue == false)
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void Draw_startPositionSection(SerializedProperty sP_lineDefinitionSection1_isOutfolded, GUIStyle style_ofFoldoutWithRichtext)
+ {
+ sP_lineDefinitionSection1_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_lineDefinitionSection1_isOutfolded.boolValue, "Start Position", true, style_ofFoldoutWithRichtext);
+ if (sP_lineDefinitionSection1_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("positionInsideViewport0to1"), new GUIContent("Position (inside viewport)"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void Draw_endPositionSection(SerializedProperty sP_lineDefinitionSection2_isOutfolded, GUIStyle style_ofFoldoutWithRichtext)
+ {
+ sP_lineDefinitionSection2_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_lineDefinitionSection2_isOutfolded.boolValue, "End Position", true, style_ofFoldoutWithRichtext);
+ if (sP_lineDefinitionSection2_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("positionInsideViewport0to1_v2"), new GUIContent("Position (inside viewport)"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void Draw_lineVectorSection(SerializedProperty sP_lineDefinitionSection_isOutfolded, string headline, GUIStyle style_ofFoldoutWithRichtext)
+ {
+ sP_lineDefinitionSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_lineDefinitionSection_isOutfolded.boolValue, headline, true, style_ofFoldoutWithRichtext);
+ if (sP_lineDefinitionSection_isOutfolded.boolValue)
+ {
+ if (serializedObject.FindProperty("customVector2Configs.Array.data[0].source").enumValueIndex != (int)VisualizerParent.CustomVector2Source.rotationAroundZStartingFromRight)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("interpretDirectionAsUnwarped"), new GUIContent("Unwarped direction interpretation", "In most cases the viewport space from 0 to 1 is not a square but a rectangle with an uneven aspect ratio (since the display itself is mostly not a square). That means a vector like ( x=1 / y=1 ) does not raise with 45° but appears somehow warped to a different angle." + Environment.NewLine + Environment.NewLine + "You can activate this if you want the values here to be interpreted as if they would be in a square space, so the ( x=1 / y=1 ) vector will appear as a 45° line."));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ DrawSpecificationOf_customVector2_1(null, false, null, false, false, false, false, true, true, true);
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void TryDrawTensionSpecs(SerializedProperty sP_lineType)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineUnderTension)
+ {
+ SerializedProperty sP_relaxedLength_relToViewportHeight = serializedObject.FindProperty("relaxedLength_relToViewportHeight");
+ float lineLength_relToViewportHeight = lineDrawerScreenspaceMonoBehaviour_unserialized.GetLineLength_relToViewportHeight();
+
+ EditorGUILayout.PropertyField(sP_relaxedLength_relToViewportHeight, new GUIContent("Relaxed Length", tooltip_explaining_relativeToViewPortHeight + Environment.NewLine + Environment.NewLine + "This is the reference length for how the tension appears. If the line has a length of this value, then it appears with its relaxed color and the line style isn't stretched or squeezed. Other line lengths will stretch and squeeze the line style and change the color, as if the line is under tension like a spring."));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.FloatField(new GUIContent("Current Line Length", tooltip_explaining_relativeToViewPortHeight), lineLength_relToViewportHeight);
+ EditorGUILayout.FloatField(new GUIContent("Current Stretch Factor"), lineLength_relToViewportHeight / sP_relaxedLength_relToViewportHeight.floatValue);
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("alphaOfReferenceLengthDisplay"), new GUIContent("Alpha of reference length display"));
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawColors(SerializedProperty sP_lineType)
+ {
+ if (sP_lineType.enumValueIndex != (int)LineDrawer.LineType.lineUnderTension)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("startColor"), new GUIContent("Color"));
+ }
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.standardLine)
+ {
+ GUILayout.BeginHorizontal();
+ SerializedProperty sP_useDifferentEndColor = serializedObject.FindProperty("useDifferentEndColor");
+ EditorGUILayout.PropertyField(sP_useDifferentEndColor, new GUIContent("End Color"));
+ EditorGUI.BeginDisabledGroup(!sP_useDifferentEndColor.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("endColor"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+ }
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.blinkingLine)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("blinkColor"), new GUIContent("Blink Color"));
+ }
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineUnderTension)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("relaxedColor"), new GUIContent("Relaxed Color"));
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_forStretchedTension"), new GUIContent("Stretched Color"));
+ SerializedProperty sP_stretchFactor_forStretchedTensionColor = serializedObject.FindProperty("stretchFactor_forStretchedTensionColor");
+ EditorGUILayout.PropertyField(sP_stretchFactor_forStretchedTensionColor, new GUIContent("appearing at stretch factor of"));
+ sP_stretchFactor_forStretchedTensionColor.floatValue = Mathf.Max(sP_stretchFactor_forStretchedTensionColor.floatValue, 1.001f);
+ GUILayout.EndHorizontal();
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_forSqueezedTension"), new GUIContent("Squeezed Color"));
+ SerializedProperty sP_stretchFactor_forSqueezedTensionColor = serializedObject.FindProperty("stretchFactor_forSqueezedTensionColor");
+ EditorGUILayout.PropertyField(sP_stretchFactor_forSqueezedTensionColor, new GUIContent("appearing at stretch factor of"));
+ sP_stretchFactor_forSqueezedTensionColor.floatValue = Mathf.Max(sP_stretchFactor_forSqueezedTensionColor.floatValue, 0.0f);
+ sP_stretchFactor_forSqueezedTensionColor.floatValue = Mathf.Min(sP_stretchFactor_forSqueezedTensionColor.floatValue, 0.999f);
+ GUILayout.EndHorizontal();
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineWithAlternatingColors)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("alternatingColor"), new GUIContent("Alternating Color"));
+ }
+ }
+
+ void DrawWidthAndDependentParameters(SerializedProperty sP_lineType)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.movingArrowsLine)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineWidth_ofMovingArrowsLine_relToViewportHeight"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+
+ string autoRoundingExplanationTooltip = "Very small (or very big) values may get rounded up (down) internally to prevent an explosive raise of drawn lines, see also 'DrawXXL.DrawBasics.MaxAllowedDrawnLinesPerFrame'." + Environment.NewLine + Environment.NewLine + "This automatic rounding has interdepency with 'Width' and ";
+
+ SerializedProperty sP_distanceBetweenArrows_relToViewportHeight = serializedObject.FindProperty("distanceBetweenArrows_relToViewportHeight");
+ SerializedProperty sP_lengthOfArrows_relToViewportHeight = serializedObject.FindProperty("lengthOfArrows_relToViewportHeight");
+
+ EditorGUILayout.PropertyField(sP_distanceBetweenArrows_relToViewportHeight, new GUIContent("Distance between arrows", tooltip_explaining_relativeToViewPortHeight + Environment.NewLine + Environment.NewLine + autoRoundingExplanationTooltip + "'Length of Arrows'."));
+ EditorGUILayout.PropertyField(sP_lengthOfArrows_relToViewportHeight, new GUIContent("Length of Arrows", tooltip_explaining_relativeToViewPortHeight + Environment.NewLine + Environment.NewLine + autoRoundingExplanationTooltip + "'Distance between arrows'."));
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineWidth_relToViewportHeight"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineWithAlternatingColors)
+ {
+ SerializedProperty sP_lengthOfStripes_relToViewportHeight = serializedObject.FindProperty("lengthOfStripes_relToViewportHeight");
+ EditorGUILayout.PropertyField(sP_lengthOfStripes_relToViewportHeight, new GUIContent("Length of Stripes", tooltip_explaining_relativeToViewPortHeight + Environment.NewLine + Environment.NewLine + "This may get rounded internally to prevent an explosive raise of drawn lines, see also 'DrawXXL.DrawBasics.MaxAllowedDrawnLinesPerFrame'." + Environment.NewLine + "It also may get raised automatically for larger line widths."));
+ sP_lengthOfStripes_relToViewportHeight.floatValue = Mathf.Max(sP_lengthOfStripes_relToViewportHeight.floatValue, UtilitiesDXXL_DrawBasics.min_lengthOfStripes_ofAlternatingColorLine);
+ }
+ }
+ }
+
+ void TryDrawExtendedLines_checkBoxForDistanceOutsideScreen(SerializedProperty sP_lineType)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.vectorWithExtention)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("displayDistanceOutsideScreenBorder"), new GUIContent("Display distance if outside screen"));
+ }
+ }
+
+ void TryDrawLineStyleAndDependentParameters(SerializedProperty sP_lineType)
+ {
+ if ((sP_lineType.enumValueIndex == (int)LineDrawer.LineType.standardLine) || (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.blinkingLine))
+ {
+ SerializedProperty sP_lineStyle = serializedObject.FindProperty("lineStyle");
+ EditorGUILayout.PropertyField(sP_lineStyle, new GUIContent("Style"));
+
+ bool lineStyle_usesPatternScaling = UtilitiesDXXL_LineStyles.CheckIfLineStyleUsesPatternScaling((DrawBasics.LineStyle)sP_lineStyle.enumValueIndex);
+ if (lineStyle_usesPatternScaling)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("stylePatternScaleFactor"), new GUIContent("Style Pattern Scaling", "This may sometimes get automatically rounded up for line widths that are bigger than 0."));
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+ }
+
+ void TryDrawAnimationSection(SerializedProperty sP_lineType)
+ {
+ bool lineIsAnimatable = lineDrawerScreenspaceMonoBehaviour_unserialized.DrawnLineUsesAnimation(false);
+ if (lineIsAnimatable)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.movingArrowsLine)
+ {
+ DrawAnimationSpeed(serializedObject.FindProperty("animationSpeed_ofMovingArrowsLine"), new GUIContent("Animation speed"));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("backwardAnimationFlipsArrowDirection"), new GUIContent("Flip arrows during backward animation", "This has only effect if 'Animation speed' is negative. If it is disabled then the arrows are always forced to point towards the line end and they appear to move backwards."));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ if ((sP_lineType.enumValueIndex == (int)LineDrawer.LineType.standardLine) || (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineWithAlternatingColors))
+ {
+ DrawAnimationSpeed(serializedObject.FindProperty("animationSpeed"), new GUIContent("Animation speed"));
+ }
+
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.blinkingLine)
+ {
+ SerializedProperty sP_blinkDurationInSec = serializedObject.FindProperty("blinkDurationInSec");
+ DrawAnimationSpeed(sP_blinkDurationInSec, new GUIContent("Blink duration", "In seconds"));
+ sP_blinkDurationInSec.floatValue = Mathf.Max(sP_blinkDurationInSec.floatValue, UtilitiesDXXL_DrawBasics.min_blinkDurationInSec);
+ }
+ }
+ }
+
+ void DrawAnimationSpeed(SerializedProperty sP_used_animationSpeedField, GUIContent displayName)
+ {
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_used_animationSpeedField, displayName);
+ if (Application.isPlaying == false)
+ {
+ SerializedProperty sP_animationDuringEditMode = serializedObject.FindProperty("animationDuringEditMode");
+ sP_animationDuringEditMode.boolValue = EditorGUILayout.ToggleLeft(new GUIContent("Also in Edit Mode", "Animation ouside playmode is convenient, but forces the Editor Windows to continuously redraw, which may have a negative effect on the Editor performance." + Environment.NewLine + Environment.NewLine + "Note: The setting here may be without effect if a 'Draw XXL Gizmo Line Count Manager' component already redraws the Scene and Game view."), sP_animationDuringEditMode.boolValue);
+ }
+ GUILayout.EndHorizontal();
+ }
+
+ void TryDrawConeConfig(SerializedProperty sP_lineType)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.vector)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("conesConfig"), new GUIContent("Cones"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("coneLength_relToViewportHeight"), new GUIContent("Cone Length", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void Draw_endPlatesConfig()
+ {
+ SerializedProperty sP_endPlatesConfig = serializedObject.FindProperty("endPlatesConfig");
+ EditorGUILayout.PropertyField(sP_endPlatesConfig, new GUIContent("End Plates"));
+
+ if (sP_endPlatesConfig.enumValueIndex != (int)LineDrawer.EndPlatesConfig.disabled)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("endPlatesSize_relToViewportHeight"), new GUIContent("End Plates Size", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void TryDrawAlphaFadeOut(SerializedProperty sP_lineType)
+ {
+ if ((sP_lineType.enumValueIndex == (int)LineDrawer.LineType.standardLine) || (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.blinkingLine) || (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.lineWithAlternatingColors))
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("alphaFadeOutLength_0to1"), new GUIContent("Fade Out Ends"));
+ }
+ }
+
+ void DrawTextSpecs(SerializedProperty sP_lineType)
+ {
+ //-> this fakes the appearance of beeing inside the parents text specification foldout
+ bool emptyLineAtEndIfOutfolded = false;
+ bool displaySizeScalingStyleOption = false; //-> the text size markups don't work well for text on lines, since the text size anyway gets forced to a portion of the line length
+ DrawTextInputInclMarkupHelper(true, false, null, emptyLineAtEndIfOutfolded, displaySizeScalingStyleOption);
+
+ if (serializedObject.FindProperty("textSection_isOutfolded").boolValue == true)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("relSizeOfTextOnLines"), new GUIContent("Text Area Size", "This is relative to the line length."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("shiftTextPosOnLines_toNonIntersecting"), new GUIContent("Shift text upward till non-intersecting", "This only has effect if the text contains line breaks. In such cases it will force all text lines to be on the same side of the drawn line."));
+
+ if ((sP_lineType.enumValueIndex == (int)LineDrawer.LineType.standardLine) || (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.blinkingLine))
+ {
+ GUILayout.BeginHorizontal();
+ SerializedProperty sP_enlargeSmallTextToThisMinTextSize = serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize");
+ EditorGUILayout.PropertyField(sP_enlargeSmallTextToThisMinTextSize, new GUIContent("Minimum Text Size", "Width per letter in world units." + Environment.NewLine + Environment.NewLine + tooltip_explaining_relativeToViewPortHeight));
+ EditorGUI.BeginDisabledGroup(!sP_enlargeSmallTextToThisMinTextSize.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinRelTextSize_value"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+ }
+
+ if (sP_lineType.enumValueIndex != (int)LineDrawer.LineType.vectorWithExtention)
+ {
+ if (sP_lineType.enumValueIndex == (int)LineDrawer.LineType.vector)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("writeComponentValuesAsText"), new GUIContent("Add x/y length to text"));
+ }
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/LineDrawerScreenspaceInspector.cs.meta b/Editor/DrawDebugLibrary/LineDrawerScreenspaceInspector.cs.meta
new file mode 100644
index 0000000..44408e1
--- /dev/null
+++ b/Editor/DrawDebugLibrary/LineDrawerScreenspaceInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4f8c5e5b2bacc2e44945e5291b94e07e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/MeasurementVisualizer2DInspector.cs b/Editor/DrawDebugLibrary/MeasurementVisualizer2DInspector.cs
new file mode 100644
index 0000000..a5e68b8
--- /dev/null
+++ b/Editor/DrawDebugLibrary/MeasurementVisualizer2DInspector.cs
@@ -0,0 +1,326 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(MeasurementVisualizer2D))]
+ [CanEditMultipleObjects]
+ public class MeasurementVisualizer2DInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("measurement2D");
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ SerializedProperty sP_measurementType = serializedObject.FindProperty("measurementType");
+ SerializedProperty sP_angleUnitToDisplay = serializedObject.FindProperty("angleUnitToDisplay");
+ SerializedProperty sP_distanceThresholdType = serializedObject.FindProperty("distanceThresholdType");
+
+ EditorGUILayout.PropertyField(sP_measurementType, new GUIContent("Measured quantity"));
+ DrawResult(sP_measurementType, sP_angleUnitToDisplay);
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ Draw_geometrySpecification(sP_measurementType, sP_distanceThresholdType, sP_angleUnitToDisplay);
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ DrawAppearanceSection(sP_measurementType, sP_distanceThresholdType);
+
+ DrawZPosChooserFor2D();
+ DrawTextInputInclMarkupHelper();
+ DrawCheckboxFor_drawOnlyIfSelected("measurement2D");
+ DrawCheckboxFor_hiddenByNearerObjects("measurement2D");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawResult(SerializedProperty sP_measurementType, SerializedProperty sP_angleUnitToDisplay)
+ {
+ SerializedProperty sP_measuredResultValue = serializedObject.FindProperty("measuredResultValue");
+ string result_nameString = "";
+ switch (sP_measurementType.enumValueIndex)
+ {
+ case (int)MeasurementVisualizer2D.MeasurementType.distanceBetweenPoints:
+ result_nameString = MeasurementVisualizerInspector.Get_resultNameString_forDistance();
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.distanceThresholdBetweenPoints:
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.distanceFromPointToLine:
+ result_nameString = MeasurementVisualizerInspector.Get_resultNameString_forDistance();
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.angleBetweenVectors:
+ result_nameString = MeasurementVisualizerInspector.Get_resultNameString_forAngle(sP_angleUnitToDisplay);
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.angleFromLineToLine:
+ result_nameString = MeasurementVisualizerInspector.Get_resultNameString_forAngle(sP_angleUnitToDisplay);
+ break;
+ default:
+ break;
+ }
+
+ if (sP_measurementType.enumValueIndex != (int)MeasurementVisualizer2D.MeasurementType.distanceThresholdBetweenPoints)
+ {
+ EditorGUILayout.FloatField(new GUIContent(result_nameString, "read only"), sP_measuredResultValue.floatValue);
+ }
+ }
+
+ void Draw_geometrySpecification(SerializedProperty sP_measurementType, SerializedProperty sP_distanceThresholdType, SerializedProperty sP_angleUnitToDisplay)
+ {
+ switch (sP_measurementType.enumValueIndex)
+ {
+ case (int)MeasurementVisualizer2D.MeasurementType.distanceBetweenPoints:
+ Draw_specificationForTwoPoints("Start", "End", true, true);
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.distanceThresholdBetweenPoints:
+ Draw_specificationForTwoPoints("Start", "End", false, false);
+ EditorGUILayout.PropertyField(sP_distanceThresholdType, new GUIContent("Number of threshold distances"));
+ switch (sP_distanceThresholdType.enumValueIndex)
+ {
+ case (int)MeasurementVisualizer.DistanceThresholdType.one:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("smallerThresholdDistance"), new GUIContent("Threshold distance"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("exactlyOnThresholdBehaviour"), new GUIContent("Distances exactly on the threshold"));
+ break;
+ case (int)MeasurementVisualizer.DistanceThresholdType.two:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("smallerThresholdDistance"), new GUIContent("Small threshold distance"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("biggerThresholdDistance"), new GUIContent("Big threshold distance"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("exactlyOnThresholdBehaviour"), new GUIContent("Distances exactly on the threshold"));
+ break;
+ default:
+ break;
+ }
+
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.distanceFromPointToLine:
+ Draw_positionSpecificationForPointAtThisGameobject("Point", true);
+ Draw_lineAsGeoObject2_definedByPartnerGameobject("Line", true, serializedObject.FindProperty("minimumLineLength_forDistancePointToLine"));
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.angleBetweenVectors:
+ DrawAngleVectorsWithColor();
+ EditorGUILayout.PropertyField(sP_angleUnitToDisplay, new GUIContent("Unit"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("addTextForAlternativeAngleUnit"), new GUIContent("Show also other angle unit (rad/deg)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("useReflexAngleOver180deg"), new GUIContent("Draw reflex angle over 180°"));
+ Draw_DrawPosition2DOffset_independentAlternativeValue(true, null, null, null, false);
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.angleFromLineToLine:
+ Draw_lineAsGeoObject1_definedByThisGameobject("Line 1", serializedObject.FindProperty("minimumLineLength_forAngleLineToLine"));
+ Draw_lineAsGeoObject2_definedByPartnerGameobject("Line 2", false, serializedObject.FindProperty("minimumLineLength_forAngleLineToLine"));
+ EditorGUILayout.PropertyField(sP_angleUnitToDisplay, new GUIContent("Unit"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("addTextForAlternativeAngleUnit"), new GUIContent("Show also other angle unit (rad/deg)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("returnObtuseAngleOver90deg"), new GUIContent("Draw obtuse angle over 90°"));
+ break;
+ default:
+ break;
+ }
+ }
+
+ void GeoSpecsBlock_start(string name)
+ {
+ GUIStyle style_ofHeadline = new GUIStyle();
+ style_ofHeadline.fontStyle = FontStyle.Bold;
+ EditorGUILayout.LabelField(name, style_ofHeadline);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ }
+
+ void GeoSpecsBlock_end(bool skipEmptyLineAtEnd)
+ {
+ if (skipEmptyLineAtEnd == false)
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void Draw_specificationForTwoPoints(string nameOfFirstPoint, string nameOfSecondPoint, bool skipEmptyLineAtEnd, bool drawColorOfPoints)
+ {
+ Draw_positionSpecificationForPointAtThisGameobject(nameOfFirstPoint, drawColorOfPoints);
+ Draw_positionSpecificationForEndPointDefinedByPartnerGameobject(nameOfSecondPoint, skipEmptyLineAtEnd, drawColorOfPoints);
+ }
+
+ void Draw_positionSpecificationForPointAtThisGameobject(string blockHeadline, bool drawColorOfPoint)
+ {
+ GeoSpecsBlock_start(blockHeadline);
+ if (drawColorOfPoint) { EditorGUILayout.PropertyField(serializedObject.FindProperty("color1"), new GUIContent("Color")); }
+ EditorGUILayout.LabelField("Position: This gameobject plus offset");
+ Draw_DrawPosition2DOffset(true, "Additional offset");
+ GeoSpecsBlock_end(false);
+ }
+
+ void Draw_positionSpecificationForEndPointDefinedByPartnerGameobject(string blockHeadline, bool skipEmptyLineAtEnd, bool drawColorOfPoint)
+ {
+ GeoSpecsBlock_start(blockHeadline);
+ if (drawColorOfPoint) { EditorGUILayout.PropertyField(serializedObject.FindProperty("color2"), new GUIContent("Color")); }
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("partnerGameobject"), new GUIContent("Position"));
+ Draw_DrawPosition2DOffset_ofPartnerGameobject(true, "Additional offset");
+ GeoSpecsBlock_end(skipEmptyLineAtEnd);
+ }
+
+ void Draw_lineAsGeoObject1_definedByThisGameobject(string blockHeadline, SerializedProperty optionalLineLengthField)
+ {
+ GeoSpecsBlock_start(blockHeadline);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color1"), new GUIContent("Color"));
+ EditorGUILayout.LabelField("Origin: This gameobject plus offset");
+ Draw_DrawPosition2DOffset(true, "Additional offset for origin");
+ DrawSpecificationOf_customVector2_3("Direction", false, null, true, false, false, false);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("name_ofGeoObject1"), new GUIContent("Drawn name tag"));
+ TryDrawLineLength(optionalLineLengthField);
+ GeoSpecsBlock_end(false);
+ }
+
+ void Draw_lineAsGeoObject2_definedByPartnerGameobject(string blockHeadline, bool skipEmptyLineAtEnd, SerializedProperty optionalLineLengthField)
+ {
+ GeoSpecsBlock_start(blockHeadline);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color2"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("partnerGameobject"), new GUIContent("Origin position"));
+ EditorGUI.BeginDisabledGroup(visualizerParentMonoBehaviour_unserialized.partnerGameobject == null);
+ Draw_DrawPosition2DOffset_ofPartnerGameobject(true, "Additional offset for origin");
+ DrawSpecificationOf_customVector2ofPartnerGameobject("Direction", false, null, true, false, false, false);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("name_ofGeoObject2"), new GUIContent("Drawn name tag"));
+ TryDrawLineLength(optionalLineLengthField);
+ EditorGUI.EndDisabledGroup();
+ GeoSpecsBlock_end(skipEmptyLineAtEnd);
+ }
+
+ void TryDrawLineLength(SerializedProperty optionalLineLengthField)
+ {
+ if (optionalLineLengthField != null)
+ {
+ EditorGUILayout.PropertyField(optionalLineLengthField, new GUIContent("Line Length", "The length of the line is at least so big that it spans to all measurement participants. It can be further prolonged via this field here."));
+ }
+ }
+
+ void DrawAngleVectorsWithColor()
+ {
+ DrawSpecificationOf_customVector2_1("Vector 1", false, null, true, false, false, false);
+ if (serializedObject.FindProperty("customVector2Configs.Array.data[0].picker_isOutfolded").boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color1"), new GUIContent("Color"));
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ DrawSpecificationOf_customVector2_2("Vector 2", false, null, true, false, false, true);
+ if (serializedObject.FindProperty("customVector2Configs.Array.data[1].picker_isOutfolded").boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color2"), new GUIContent("Color"));
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawAppearanceSection(SerializedProperty sP_measurementType, SerializedProperty sP_distanceThresholdType)
+ {
+ SerializedProperty sP_appearanceBlock_isOutfolded = serializedObject.FindProperty("appearanceBlock_isOutfolded");
+ sP_appearanceBlock_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_appearanceBlock_isOutfolded.boolValue, "Appearance", true);
+ if (sP_appearanceBlock_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ string descriptionFor_enlargeSmallTextToThisMinTextSize = "Enlarge small text to this minimum textsize";
+ switch (sP_measurementType.enumValueIndex)
+ {
+ case (int)MeasurementVisualizer2D.MeasurementType.distanceBetweenPoints:
+ Draw_coneConfig_insideFoldout_forStraightVectors();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize"), new GUIContent(descriptionFor_enlargeSmallTextToThisMinTextSize));
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.distanceThresholdBetweenPoints:
+ switch (sP_distanceThresholdType.enumValueIndex)
+ {
+ case (int)MeasurementVisualizer.DistanceThresholdType.one:
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("Short lines");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColor_forNear_oneThresholdVersion"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteStyle_forNear"), new GUIContent("Style"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("Long lines");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColor_forFar_oneThresholdVersion"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteStyle_forFar"), new GUIContent("Style"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ break;
+ case (int)MeasurementVisualizer.DistanceThresholdType.two:
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("Short lines");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColor_forNear_twoThresholdsVersion"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteStyle_forNear"), new GUIContent("Style"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("Middle lines");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColor_forMiddle_twoThresholdsVersion"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteStyle_forMiddle"), new GUIContent("Style"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("Long lines");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColor_forFar_twoThresholdsVersion"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteStyle_forFar"), new GUIContent("Style"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ break;
+ default:
+ break;
+ }
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("displayDistanceAlsoAsText"), new GUIContent("Draw distance value"));
+ Draw_endPlatesConfig_insideFoldout();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize"), new GUIContent(descriptionFor_enlargeSmallTextToThisMinTextSize));
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.distanceFromPointToLine:
+ Draw_coneConfig_insideFoldout_forStraightVectors();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize"), new GUIContent(descriptionFor_enlargeSmallTextToThisMinTextSize));
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.angleBetweenVectors:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawBoundaryLines"), new GUIContent("Draw boundary lines"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forceRadius_value"), new GUIContent("Radius"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("pointerConfigOfAngleBetweenVectors"), new GUIContent("Pointers"));
+ Draw_coneLength_forCircledVectors();
+ break;
+ case (int)MeasurementVisualizer2D.MeasurementType.angleFromLineToLine:
+ Draw_coneLength_forCircledVectors();
+ break;
+ default:
+ break;
+ }
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("linesWidth"), new GUIContent("Lines width"));
+ if (sP_measurementType.enumValueIndex != (int)MeasurementVisualizer2D.MeasurementType.distanceThresholdBetweenPoints)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color"));
+ }
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/MeasurementVisualizer2DInspector.cs.meta b/Editor/DrawDebugLibrary/MeasurementVisualizer2DInspector.cs.meta
new file mode 100644
index 0000000..695e0fc
--- /dev/null
+++ b/Editor/DrawDebugLibrary/MeasurementVisualizer2DInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 994094d2c65cab14194c0282d3ae1263
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/MeasurementVisualizerInspector.cs b/Editor/DrawDebugLibrary/MeasurementVisualizerInspector.cs
new file mode 100644
index 0000000..214fbbb
--- /dev/null
+++ b/Editor/DrawDebugLibrary/MeasurementVisualizerInspector.cs
@@ -0,0 +1,423 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(MeasurementVisualizer))]
+ [CanEditMultipleObjects]
+ public class MeasurementVisualizerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("measurement");
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ SerializedProperty sP_measurementType = serializedObject.FindProperty("measurementType");
+ SerializedProperty sP_angleUnitToDisplay = serializedObject.FindProperty("angleUnitToDisplay");
+ SerializedProperty sP_distanceThresholdType = serializedObject.FindProperty("distanceThresholdType");
+
+ EditorGUILayout.PropertyField(sP_measurementType, new GUIContent("Measured quantity"));
+ DrawResult(sP_measurementType, sP_angleUnitToDisplay);
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ Draw_geometrySpecification(sP_measurementType, sP_distanceThresholdType, sP_angleUnitToDisplay);
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ DrawAppearanceSection(sP_measurementType, sP_distanceThresholdType);
+ DrawTextInputInclMarkupHelper();
+ DrawCheckboxFor_drawOnlyIfSelected("measurement");
+ DrawCheckboxFor_hiddenByNearerObjects("measurement");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawResult(SerializedProperty sP_measurementType, SerializedProperty sP_angleUnitToDisplay)
+ {
+ SerializedProperty sP_measuredResultValue = serializedObject.FindProperty("measuredResultValue");
+ string result_nameString = "";
+ switch (sP_measurementType.enumValueIndex)
+ {
+ case (int)MeasurementVisualizer.MeasurementType.distanceBetweenPoints:
+ result_nameString = Get_resultNameString_forDistance();
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceThresholdBetweenPoints:
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceFromPointToLine:
+ result_nameString = Get_resultNameString_forDistance();
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceFromLineToLine:
+ result_nameString = Get_resultNameString_forDistance();
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceFromPointToPlane:
+ result_nameString = Get_resultNameString_forDistance();
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceAlongOrthographicViewDir:
+ result_nameString = Get_resultNameString_forDistance();
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distancePerpendicularToOrthographicViewDir:
+ result_nameString = Get_resultNameString_forDistance();
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.angleBetweenVectors:
+ result_nameString = Get_resultNameString_forAngle(sP_angleUnitToDisplay);
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.angleFromLineToPlane:
+ result_nameString = Get_resultNameString_forAngle(sP_angleUnitToDisplay);
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.angleFromPlaneToPlane:
+ result_nameString = Get_resultNameString_forAngle(sP_angleUnitToDisplay);
+ break;
+ default:
+ break;
+ }
+
+ if (sP_measurementType.enumValueIndex != (int)MeasurementVisualizer.MeasurementType.distanceThresholdBetweenPoints)
+ {
+ EditorGUILayout.FloatField(new GUIContent(result_nameString, "read only"), sP_measuredResultValue.floatValue);
+ }
+ }
+
+ public static string Get_resultNameString_forDistance()
+ {
+ return "Result (distance)";
+ }
+
+ public static string Get_resultNameString_forAngle(SerializedProperty sP_angleUnitToDisplay)
+ {
+ if (sP_angleUnitToDisplay.enumValueIndex == (int)MeasurementVisualizer.AngleUnit.degree)
+ {
+ return "Result (angle [deg])";
+ }
+ else
+ {
+ return "Result (angle [rad])";
+ }
+ }
+
+ void Draw_geometrySpecification(SerializedProperty sP_measurementType, SerializedProperty sP_distanceThresholdType, SerializedProperty sP_angleUnitToDisplay)
+ {
+ switch (sP_measurementType.enumValueIndex)
+ {
+ case (int)MeasurementVisualizer.MeasurementType.distanceBetweenPoints:
+ Draw_specificationForTwoPoints("Start", "End", true, true);
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceThresholdBetweenPoints:
+ Draw_specificationForTwoPoints("Start", "End", false, false);
+ EditorGUILayout.PropertyField(sP_distanceThresholdType, new GUIContent("Number of threshold distances"));
+ switch (sP_distanceThresholdType.enumValueIndex)
+ {
+ case (int)MeasurementVisualizer.DistanceThresholdType.one:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("smallerThresholdDistance"), new GUIContent("Threshold distance"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("exactlyOnThresholdBehaviour"), new GUIContent("Distances exactly on the threshold"));
+ break;
+ case (int)MeasurementVisualizer.DistanceThresholdType.two:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("smallerThresholdDistance"), new GUIContent("Small threshold distance"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("biggerThresholdDistance"), new GUIContent("Big threshold distance"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("exactlyOnThresholdBehaviour"), new GUIContent("Distances exactly on the threshold"));
+ break;
+ default:
+ break;
+ }
+
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceFromPointToLine:
+ Draw_positionSpecificationForPointAtThisGameobject("Point", true);
+ Draw_lineAsGeoObject2_definedByPartnerGameobject("Line", true, serializedObject.FindProperty("minimumLineLength_forDistancePointToLine"));
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceFromLineToLine:
+ Draw_lineAsGeoObject1_definedByThisGameobject("Line 1", serializedObject.FindProperty("minimumLineLength_forDistanceLineToLine"));
+ Draw_lineAsGeoObject2_definedByPartnerGameobject("Line 2", true, serializedObject.FindProperty("minimumLineLength_forDistanceLineToLine"));
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceFromPointToPlane:
+ Draw_positionSpecificationForPointAtThisGameobject("Point", true);
+ Draw_planeAsGeoObject2_definedByPartnerGameobject("Plane", true);
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceAlongOrthographicViewDir:
+ DrawSpecificationOf_customVector3_1_forDistanceInOrthogrphicViewDir();
+ Draw_specificationForTwoPoints("Point 1", "Point 2", true, true);
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distancePerpendicularToOrthographicViewDir:
+ DrawSpecificationOf_customVector3_1_forDistanceInOrthogrphicViewDir();
+ Draw_specificationForTwoPoints("Point 1", "Point 2", true, true);
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.angleBetweenVectors:
+ DrawAngleVectorsWithColor();
+ EditorGUILayout.PropertyField(sP_angleUnitToDisplay, new GUIContent("Unit"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("addTextForAlternativeAngleUnit"), new GUIContent("Show also other angle unit (rad/deg)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("useReflexAngleOver180deg"), new GUIContent("Draw reflex angle over 180°"));
+ Draw_DrawPosition3DOffset_independentAlternativeValue(true, null, null, null, false);
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.angleFromLineToPlane:
+ Draw_lineAsGeoObject1_definedByThisGameobject("Line", serializedObject.FindProperty("minimumLineLength_forAngleLineToPlane"));
+ Draw_planeAsGeoObject2_definedByPartnerGameobject("Plane", false);
+ EditorGUILayout.PropertyField(sP_angleUnitToDisplay, new GUIContent("Unit"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("addTextForAlternativeAngleUnit"), new GUIContent("Show also other angle unit (rad/deg)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("returnObtuseAngleOver90deg"), new GUIContent("Draw obtuse angle over 90°"));
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.angleFromPlaneToPlane:
+ Draw_planeAsGeoObject1_definedByThisGameobject("Plane 1");
+ Draw_planeAsGeoObject2_definedByPartnerGameobject("Plane 2", false);
+ EditorGUILayout.PropertyField(sP_angleUnitToDisplay, new GUIContent("Unit"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("addTextForAlternativeAngleUnit"), new GUIContent("Show also other angle unit (rad/deg)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("returnObtuseAngleOver90deg"), new GUIContent("Draw obtuse angle over 90°"));
+ break;
+ default:
+ break;
+ }
+ }
+
+ void GeoSpecsBlock_start(string name)
+ {
+ GUIStyle style_ofHeadline = new GUIStyle();
+ style_ofHeadline.fontStyle = FontStyle.Bold;
+ EditorGUILayout.LabelField(name, style_ofHeadline);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ }
+
+ void GeoSpecsBlock_end(bool skipEmptyLineAtEnd)
+ {
+ if (skipEmptyLineAtEnd == false)
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void Draw_specificationForTwoPoints(string nameOfFirstPoint, string nameOfSecondPoint, bool skipEmptyLineAtEnd, bool drawColorOfPoints)
+ {
+ Draw_positionSpecificationForPointAtThisGameobject(nameOfFirstPoint, drawColorOfPoints);
+ Draw_positionSpecificationForEndPointDefinedByPartnerGameobject(nameOfSecondPoint, skipEmptyLineAtEnd, drawColorOfPoints);
+ }
+
+ void Draw_positionSpecificationForPointAtThisGameobject(string blockHeadline, bool drawColorOfPoint)
+ {
+ GeoSpecsBlock_start(blockHeadline);
+ if (drawColorOfPoint) { EditorGUILayout.PropertyField(serializedObject.FindProperty("color1"), new GUIContent("Color")); }
+ EditorGUILayout.LabelField("Position: This gameobject plus offset");
+ Draw_DrawPosition3DOffset(true, "Additional offset");
+ GeoSpecsBlock_end(false);
+ }
+
+ void Draw_positionSpecificationForEndPointDefinedByPartnerGameobject(string blockHeadline, bool skipEmptyLineAtEnd, bool drawColorOfPoint)
+ {
+ GeoSpecsBlock_start(blockHeadline);
+ if (drawColorOfPoint) { EditorGUILayout.PropertyField(serializedObject.FindProperty("color2"), new GUIContent("Color")); }
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("partnerGameobject"), new GUIContent("Position"));
+ Draw_DrawPosition3DOffset_ofPartnerGameobject(true, "Additional offset");
+ GeoSpecsBlock_end(skipEmptyLineAtEnd);
+ }
+
+ void Draw_lineAsGeoObject1_definedByThisGameobject(string blockHeadline, SerializedProperty optionalLineLengthField)
+ {
+ Draw_lineOrPlaneAsGeoObject1_definedByThisGameobject(blockHeadline, "Direction", optionalLineLengthField);
+ }
+
+ void Draw_planeAsGeoObject1_definedByThisGameobject(string blockHeadline)
+ {
+ Draw_lineOrPlaneAsGeoObject1_definedByThisGameobject(blockHeadline, "Normal", null);
+ }
+
+ void Draw_lineOrPlaneAsGeoObject1_definedByThisGameobject(string blockHeadline, string meaningOfVector, SerializedProperty optionalLineLengthField)
+ {
+ GeoSpecsBlock_start(blockHeadline);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color1"), new GUIContent("Color"));
+ EditorGUILayout.LabelField("Origin: This gameobject plus offset");
+ Draw_DrawPosition3DOffset(true, "Additional offset for origin");
+ DrawSpecificationOf_customVector3_4(meaningOfVector, false, null, true, false, false, false);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("name_ofGeoObject1"), new GUIContent("Drawn name tag"));
+ TryDrawLineLength(optionalLineLengthField);
+ GeoSpecsBlock_end(false);
+ }
+
+ void Draw_lineAsGeoObject2_definedByPartnerGameobject(string blockHeadline, bool skipEmptyLineAtEnd, SerializedProperty optionalLineLengthField)
+ {
+ Draw_lineOrPlaneAsGeoObject2_definedByPartnerGameobject(blockHeadline, "Direction", skipEmptyLineAtEnd, optionalLineLengthField);
+ }
+
+ void Draw_planeAsGeoObject2_definedByPartnerGameobject(string blockHeadline, bool skipEmptyLineAtEnd)
+ {
+ Draw_lineOrPlaneAsGeoObject2_definedByPartnerGameobject(blockHeadline, "Normal", skipEmptyLineAtEnd, null);
+ }
+
+ void Draw_lineOrPlaneAsGeoObject2_definedByPartnerGameobject(string blockHeadline, string meaningOfVector, bool skipEmptyLineAtEnd, SerializedProperty optionalLineLengthField)
+ {
+ GeoSpecsBlock_start(blockHeadline);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color2"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("partnerGameobject"), new GUIContent("Origin position"));
+ EditorGUI.BeginDisabledGroup(visualizerParentMonoBehaviour_unserialized.partnerGameobject == null);
+ Draw_DrawPosition3DOffset_ofPartnerGameobject(true, "Additional offset for origin");
+ DrawSpecificationOf_customVector3ofPartnerGameobject(meaningOfVector, false, null, true, false, false, false);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("name_ofGeoObject2"), new GUIContent("Drawn name tag"));
+ TryDrawLineLength(optionalLineLengthField);
+ EditorGUI.EndDisabledGroup();
+ GeoSpecsBlock_end(skipEmptyLineAtEnd);
+ }
+
+ void TryDrawLineLength(SerializedProperty optionalLineLengthField)
+ {
+ if (optionalLineLengthField != null)
+ {
+ EditorGUILayout.PropertyField(optionalLineLengthField, new GUIContent("Line Length", "The length of the line is at least so big that it spans to all measurement participants. It can be further prolonged via this field here."));
+ }
+ }
+
+ void DrawSpecificationOf_customVector3_1_forDistanceInOrthogrphicViewDir()
+ {
+ DrawSpecificationOf_customVector3_1("View direction", false, null, true, false, true, false);
+ }
+
+ void DrawAngleVectorsWithColor()
+ {
+ DrawSpecificationOf_customVector3_2("Vector 1", false, null, true, false, false, false);
+ if (serializedObject.FindProperty("customVector3Configs.Array.data[1].picker_isOutfolded").boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color1"), new GUIContent("Color"));
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ DrawSpecificationOf_customVector3_3("Vector 2", false, null, true, false, false, true);
+ if (serializedObject.FindProperty("customVector3Configs.Array.data[2].picker_isOutfolded").boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color2"), new GUIContent("Color"));
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawAppearanceSection(SerializedProperty sP_measurementType, SerializedProperty sP_distanceThresholdType)
+ {
+ SerializedProperty sP_appearanceBlock_isOutfolded = serializedObject.FindProperty("appearanceBlock_isOutfolded");
+ sP_appearanceBlock_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_appearanceBlock_isOutfolded.boolValue, "Appearance", true);
+ if (sP_appearanceBlock_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ string descriptionFor_enlargeSmallTextToThisMinTextSize = "Enlarge small text to this minimum textsize";
+ switch (sP_measurementType.enumValueIndex)
+ {
+ case (int)MeasurementVisualizer.MeasurementType.distanceBetweenPoints:
+ Draw_coneConfig_insideFoldout_forStraightVectors();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize"), new GUIContent(descriptionFor_enlargeSmallTextToThisMinTextSize));
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceThresholdBetweenPoints:
+ switch (sP_distanceThresholdType.enumValueIndex)
+ {
+ case (int)MeasurementVisualizer.DistanceThresholdType.one:
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("Short lines");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColor_forNear_oneThresholdVersion"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteStyle_forNear"), new GUIContent("Style"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("Long lines");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColor_forFar_oneThresholdVersion"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteStyle_forFar"), new GUIContent("Style"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ break;
+ case (int)MeasurementVisualizer.DistanceThresholdType.two:
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("Short lines");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColor_forNear_twoThresholdsVersion"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteStyle_forNear"), new GUIContent("Style"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("Middle lines");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColor_forMiddle_twoThresholdsVersion"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteStyle_forMiddle"), new GUIContent("Style"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.LabelField("Long lines");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColor_forFar_twoThresholdsVersion"), new GUIContent("Color"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteStyle_forFar"), new GUIContent("Style"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ break;
+ default:
+ break;
+ }
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("displayDistanceAlsoAsText"), new GUIContent("Draw distance value"));
+ Draw_endPlatesConfig_insideFoldout();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize"), new GUIContent(descriptionFor_enlargeSmallTextToThisMinTextSize));
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceFromPointToLine:
+ Draw_coneConfig_insideFoldout_forStraightVectors();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize"), new GUIContent(descriptionFor_enlargeSmallTextToThisMinTextSize));
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceFromLineToLine:
+ Draw_coneConfig_insideFoldout_forStraightVectors();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize"), new GUIContent(descriptionFor_enlargeSmallTextToThisMinTextSize));
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceFromPointToPlane:
+ Draw_coneConfig_insideFoldout_forStraightVectors();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize"), new GUIContent(descriptionFor_enlargeSmallTextToThisMinTextSize));
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distanceAlongOrthographicViewDir:
+ Draw_coneConfig_insideFoldout_forStraightVectors();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize"), new GUIContent(descriptionFor_enlargeSmallTextToThisMinTextSize));
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.distancePerpendicularToOrthographicViewDir:
+ Draw_coneConfig_insideFoldout_forStraightVectors();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enlargeSmallTextToThisMinTextSize"), new GUIContent(descriptionFor_enlargeSmallTextToThisMinTextSize));
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.angleBetweenVectors:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawBoundaryLines"), new GUIContent("Draw boundary lines"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forceRadius_value"), new GUIContent("Radius"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("pointerConfigOfAngleBetweenVectors"), new GUIContent("Pointers"));
+ Draw_coneLength_forCircledVectors();
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.angleFromLineToPlane:
+ Draw_coneLength_forCircledVectors();
+ break;
+ case (int)MeasurementVisualizer.MeasurementType.angleFromPlaneToPlane:
+ Draw_coneLength_forCircledVectors();
+ break;
+ default:
+ break;
+ }
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("linesWidth"), new GUIContent("Lines width"));
+ if (sP_measurementType.enumValueIndex != (int)MeasurementVisualizer.MeasurementType.distanceThresholdBetweenPoints)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color"));
+ }
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/MeasurementVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/MeasurementVisualizerInspector.cs.meta
new file mode 100644
index 0000000..f7c8cc3
--- /dev/null
+++ b/Editor/DrawDebugLibrary/MeasurementVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fe6531c0e5aca324bb0d0d77aaca4d77
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/PhysicsVisualizer2DInspector.cs b/Editor/DrawDebugLibrary/PhysicsVisualizer2DInspector.cs
new file mode 100644
index 0000000..d31fece
--- /dev/null
+++ b/Editor/DrawDebugLibrary/PhysicsVisualizer2DInspector.cs
@@ -0,0 +1,586 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(PhysicsVisualizer2D))]
+ [CanEditMultipleObjects]
+ public class PhysicsVisualizer2DInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("physics2D");
+ SerializedProperty sP_saveDrawnLinesType = serializedObject.FindProperty("saveDrawnLinesType");
+ EditorGUILayout.PropertyField(sP_saveDrawnLinesType, new GUIContent("Save drawn lines ?", "This simplifies the visualization. It may be helpful to save performance if you draw many casts at once." + Environment.NewLine + Environment.NewLine + "You can change the initial value of this via 'DrawXXL.DrawPhysics2D.visualizationQuality'."));
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ bool typeIsCast_notOverlap = false;
+ SerializedProperty sP_theGameobjectHasACompatibleAndEnabledCollider = serializedObject.FindProperty("theGameobjectHasACompatibleAndEnabledCollider");
+ SerializedProperty sP_shape = serializedObject.FindProperty("shape");
+
+ TryDrawCollisionTypeChooser(sP_shape, sP_theGameobjectHasACompatibleAndEnabledCollider, ref typeIsCast_notOverlap);
+
+ if ((sP_shape.enumValueIndex == (int)PhysicsVisualizer2D.Shape.collidersOnThisGameobject) && (sP_theGameobjectHasACompatibleAndEnabledCollider.boolValue == false))
+ {
+ EditorGUILayout.HelpBox("There is no enabled collider on this gameobject that could be cast. Supported colliders are 'BoxCollider2D', 'CircleCollider2D' and 'CapsuleCollider2D'.", MessageType.None, true);
+ }
+ else
+ {
+ SerializedProperty sP_wantedHits = serializedObject.FindProperty("wantedHits");
+ EditorGUILayout.PropertyField(sP_wantedHits, new GUIContent("Wanted hits"));
+ DrawDetectedHitsCount();
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ DrawShapeSizeSpecification(sP_shape);
+ DrawCastDirectionAndDistance(sP_shape, typeIsCast_notOverlap);
+ DrawOtherSettings(sP_shape, sP_wantedHits, sP_saveDrawnLinesType, typeIsCast_notOverlap);
+ DrawTextSpecs(sP_saveDrawnLinesType, typeIsCast_notOverlap);
+ DrawCheckboxFor_drawOnlyIfSelected("physics2D");
+ DrawCheckboxFor_hiddenByNearerObjects("physics2D");
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void TryDrawCollisionTypeChooser(SerializedProperty sP_shape, SerializedProperty sP_theGameobjectHasACompatibleAndEnabledCollider, ref bool typeIsCast_notOverlap)
+ {
+ SerializedProperty sP_collisionType = serializedObject.FindProperty("collisionType");
+
+ bool forceDisplayToCast = false;
+ switch ((PhysicsVisualizer2D.Shape)sP_shape.enumValueIndex)
+ {
+ case PhysicsVisualizer2D.Shape.collidersOnThisGameobject:
+ if (sP_theGameobjectHasACompatibleAndEnabledCollider.boolValue)
+ {
+ forceDisplayToCast = false;
+ typeIsCast_notOverlap = Get_typeIsCast_notOverlap(sP_collisionType, forceDisplayToCast);
+ }
+ break;
+ case PhysicsVisualizer2D.Shape.box:
+ forceDisplayToCast = false;
+ typeIsCast_notOverlap = Get_typeIsCast_notOverlap(sP_collisionType, forceDisplayToCast);
+ break;
+ case PhysicsVisualizer2D.Shape.circle:
+ forceDisplayToCast = false;
+ typeIsCast_notOverlap = Get_typeIsCast_notOverlap(sP_collisionType, forceDisplayToCast);
+ break;
+ case PhysicsVisualizer2D.Shape.capsule:
+ forceDisplayToCast = false;
+ typeIsCast_notOverlap = Get_typeIsCast_notOverlap(sP_collisionType, forceDisplayToCast);
+ break;
+ case PhysicsVisualizer2D.Shape.rayOrPoint:
+ forceDisplayToCast = false;
+ typeIsCast_notOverlap = Get_typeIsCast_notOverlap(sP_collisionType, forceDisplayToCast);
+ break;
+ case PhysicsVisualizer2D.Shape.ray3D:
+ forceDisplayToCast = true;
+ typeIsCast_notOverlap = Get_typeIsCast_notOverlap(sP_collisionType, forceDisplayToCast);
+ break;
+ default:
+ break;
+ }
+
+ string label_ofShape = typeIsCast_notOverlap ? "Shape to cast" : "Shape to overlap";
+ EditorGUILayout.PropertyField(sP_shape, new GUIContent(label_ofShape));
+
+ switch ((PhysicsVisualizer2D.Shape)sP_shape.enumValueIndex)
+ {
+ case PhysicsVisualizer2D.Shape.collidersOnThisGameobject:
+ if (sP_theGameobjectHasACompatibleAndEnabledCollider.boolValue)
+ {
+ if (UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale_2D(transform_onVisualizerObject.parent))
+ {
+ EditorGUILayout.HelpBox("A parent transform has a non-uniform scale -> The collider and cast positions may be wrong.", MessageType.Warning, true);
+ }
+
+ if (UtilitiesDXXL_EngineBasics.CheckIfThisOrAParentHasANonZRotation_2D(transform_onVisualizerObject))
+ {
+ EditorGUILayout.HelpBox("This transform or a parent has a non-z rotation. -> The collider and cast positions may be wrong.", MessageType.Warning, true);
+ }
+
+ if (serializedObject.FindProperty("aVisualizedBoxCollider2DOnThisComponent_hasANonZeroEdge").boolValue)
+ {
+ EditorGUILayout.HelpBox("A visualized BoxCollider2D component uses 'edge radius'. Casting rounded boxes is not supported." + Environment.NewLine + "-> Fallback to casting the box without the rounded edge.", MessageType.Warning, true);
+ }
+
+ if (serializedObject.FindProperty("aVisualizedBoxCollider2DOnThisComponent_hasAutoTiling").boolValue)
+ {
+ EditorGUILayout.HelpBox("A visualized BoxCollider2D component uses 'Auto Tiling'. The visualisation of this is not supported.", MessageType.Warning, true);
+ }
+
+ DrawCollisionTypeChooser(sP_collisionType, false);
+ }
+ break;
+ case PhysicsVisualizer2D.Shape.box:
+ DrawCollisionTypeChooser(sP_collisionType, false);
+ break;
+ case PhysicsVisualizer2D.Shape.circle:
+ DrawCollisionTypeChooser(sP_collisionType, false);
+ break;
+ case PhysicsVisualizer2D.Shape.capsule:
+ DrawCollisionTypeChooser(sP_collisionType, false);
+ break;
+ case PhysicsVisualizer2D.Shape.rayOrPoint:
+ DrawCollisionTypeChooser(sP_collisionType, false);
+ break;
+ case PhysicsVisualizer2D.Shape.ray3D:
+ DrawCollisionTypeChooser(sP_collisionType, true);
+ break;
+ default:
+ break;
+ }
+ }
+
+ bool Get_typeIsCast_notOverlap(SerializedProperty sP_collisionType, bool forceDisplayToCast)
+ {
+ if (forceDisplayToCast)
+ {
+ return true;
+ }
+ else
+ {
+ return (sP_collisionType.enumValueIndex == (int)CollisionType.cast);
+ }
+ }
+
+ void DrawCollisionTypeChooser(SerializedProperty sP_collisionType, bool forceDisplayToCast)
+ {
+ string label = "Collision type";
+ if (forceDisplayToCast)
+ {
+ CollisionType castCollisionType = CollisionType.cast;
+
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.EnumPopup(new GUIContent(label), castCollisionType);
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(sP_collisionType, new GUIContent(label));
+ }
+ }
+
+ void DrawDetectedHitsCount()
+ {
+ int numberOfDetectedHits = serializedObject.FindProperty("numberOfFoundHits").intValue;
+ Color displayColor = (numberOfDetectedHits == 0) ? serializedObject.FindProperty("colorForNonHittingCasts").colorValue : serializedObject.FindProperty("colorForHittingCasts").colorValue;
+ string labelText_name = "Detected hits:"; //-> I wanted to color this as well, but rich text seems to work only for the second label
+ string labelText_value = ("" + numberOfDetectedHits + "");
+ GUIStyle style = new GUIStyle(EditorStyles.label);
+ style.richText = true;
+ EditorGUILayout.LabelField(labelText_name, labelText_value, style);
+ }
+
+ void DrawShapeSizeSpecification(SerializedProperty sP_shape)
+ {
+ if ((sP_shape.enumValueIndex == (int)PhysicsVisualizer2D.Shape.box) || (sP_shape.enumValueIndex == (int)PhysicsVisualizer2D.Shape.circle) || (sP_shape.enumValueIndex == (int)PhysicsVisualizer2D.Shape.capsule))
+ {
+ GUIStyle richtextEnabledStyle = new GUIStyle(EditorStyles.label);
+ richtextEnabledStyle.richText = true;
+
+ switch ((PhysicsVisualizer2D.Shape)sP_shape.enumValueIndex)
+ {
+ case PhysicsVisualizer2D.Shape.collidersOnThisGameobject:
+ break;
+ case PhysicsVisualizer2D.Shape.box:
+ EditorGUILayout.LabelField("Box: --- Size / Orientation / Position ---", richtextEnabledStyle);
+ break;
+ case PhysicsVisualizer2D.Shape.circle:
+ EditorGUILayout.LabelField("Circle: --- Size / Position ---", richtextEnabledStyle);
+ break;
+ case PhysicsVisualizer2D.Shape.capsule:
+ EditorGUILayout.LabelField("Capsule: --- Size / Orientation / Position ---", richtextEnabledStyle);
+ break;
+ case PhysicsVisualizer2D.Shape.rayOrPoint:
+ break;
+ case PhysicsVisualizer2D.Shape.ray3D:
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ switch ((PhysicsVisualizer2D.Shape)sP_shape.enumValueIndex)
+ {
+ case PhysicsVisualizer2D.Shape.collidersOnThisGameobject:
+ break;
+ case PhysicsVisualizer2D.Shape.box:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("sizeScaleFactors_ofCastRespCheckedBox"), new GUIContent("Size"));
+ DrawShapeRotation();
+ Draw_DrawPosition2DOffset(true, "Position Offset");
+ DrawZPosChooserFor2D(true);
+ break;
+ case PhysicsVisualizer2D.Shape.circle:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("radiusScaleFactor_ofCastRespCheckedCircle"), new GUIContent("Radius"));
+ Draw_DrawPosition2DOffset(true, "Position Offset");
+ DrawZPosChooserFor2D(true);
+ break;
+ case PhysicsVisualizer2D.Shape.capsule:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("sizeScaleFactors_ofCastRespCheckedCapsule"), new GUIContent("Size"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("capsuleDirection2D_ofManuallyConstructedCapsuleMeaningNotFromCollider"), new GUIContent("Capsule Expansion"));
+ DrawShapeRotation();
+ Draw_DrawPosition2DOffset(true, "Position Offset");
+ DrawZPosChooserFor2D(true);
+ break;
+ case PhysicsVisualizer2D.Shape.rayOrPoint:
+ break;
+ case PhysicsVisualizer2D.Shape.ray3D:
+ break;
+ default:
+ break;
+ }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ else
+ {
+ if (sP_shape.enumValueIndex == (int)PhysicsVisualizer2D.Shape.rayOrPoint)
+ {
+ Draw_DrawPosition2DOffset(false, "Position Offset");
+ DrawZPosChooserFor2D();
+ }
+
+ if (sP_shape.enumValueIndex == (int)PhysicsVisualizer2D.Shape.ray3D)
+ {
+ Draw_DrawPosition3DOffset(false, "Position Offset");
+ DrawZPosChooserFor2D();
+ }
+ }
+ }
+
+ void DrawShapeRotation()
+ {
+ SerializedProperty sP_shapeRotationType = serializedObject.FindProperty("shapeRotationType");
+ EditorGUILayout.PropertyField(sP_shapeRotationType, new GUIContent("Rotation"));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ switch (sP_shapeRotationType.enumValueIndex)
+ {
+ case (int)PhysicsVisualizer2D.ShapeRotationType.transformsRotationPlusOptionalAdditionalRotation:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("rotationAngleOfShape_additionallyToTransformsAngle"), new GUIContent("Additional rotation", "The rotation is taken from the transforms z rotation. This value is added onto this."));
+ break;
+ case (int)PhysicsVisualizer2D.ShapeRotationType.customRotationIndependentFromTransform:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("rotationAngleOfShape_additionallyToTransformsAngle"), new GUIContent("Custom rotation"));
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ void DrawCastDirectionAndDistance(SerializedProperty sP_shape, bool typeIsCast_notOverlap)
+ {
+ if (typeIsCast_notOverlap)
+ {
+ if (sP_shape.enumValueIndex == (int)PhysicsVisualizer2D.Shape.ray3D)
+ {
+ DrawSpecificationOf_customVector3_1("Cast direction", false, null, true, false, true, false);
+ }
+ else
+ {
+ DrawSpecificationOf_customVector2_1("Cast direction", false, null, true, false, true, false);
+ }
+
+ EditorGUILayout.LabelField("Cast distance");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ SerializedProperty sP_distanceIsInfinityRespToOtherGO = serializedObject.FindProperty("distanceIsInfinityRespToOtherGO");
+
+ if (sP_shape.enumValueIndex == (int)PhysicsVisualizer2D.Shape.ray3D)
+ {
+ if (visualizerParentMonoBehaviour_unserialized.customVector3Configs[0].source == VisualizerParent.CustomVector3Source.toOtherGameobject)
+ {
+ EditorGUILayout.PropertyField(sP_distanceIsInfinityRespToOtherGO, new GUIContent("Till other gameobject"));
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(sP_distanceIsInfinityRespToOtherGO, new GUIContent("Infinity"));
+ }
+ }
+ else
+ {
+ if (visualizerParentMonoBehaviour_unserialized.customVector2Configs[0].source == VisualizerParent.CustomVector2Source.toOtherGameobject)
+ {
+ EditorGUILayout.PropertyField(sP_distanceIsInfinityRespToOtherGO, new GUIContent("Till other gameobject"));
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(sP_distanceIsInfinityRespToOtherGO, new GUIContent("Infinity"));
+ }
+ }
+
+ EditorGUI.BeginDisabledGroup(sP_distanceIsInfinityRespToOtherGO.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("adjustedDistance"), new GUIContent("Flexible"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void DrawOtherSettings(SerializedProperty sP_shape, SerializedProperty sP_wantedHits, SerializedProperty sP_saveDrawnLinesType, bool typeIsCast_notOverlap)
+ {
+ SerializedProperty sP_otherSettings_isFoldedOut = serializedObject.FindProperty("otherSettings_isFoldedOut");
+ sP_otherSettings_isFoldedOut.boolValue = EditorGUILayout.Foldout(sP_otherSettings_isFoldedOut.boolValue, "Other settings", true);
+ if (sP_otherSettings_isFoldedOut.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("excludeCollidersOnThisGO"), new GUIContent("Exclude colliders on this Gameobject from result", "Caution for disabling this:" + Environment.NewLine + "In many cases the colliders on this Gameobject will overlap with the starting position of the cast shapes. In these cases a collision will be detected, but the position and hit distance may be wrong."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("excludeCollidersOnParentGOs"), new GUIContent("Exclude colliders on parents from result", "Caution for disabling this:" + Environment.NewLine + "In many cases the colliders on the parents will overlap with the starting position of the cast shapes. In these cases a collision will be detected, but the position and hit distance may be wrong."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("excludeCollidersOnChildrenGOs"), new GUIContent("Exclude colliders on children from result", "Caution for disabling this:" + Environment.NewLine + "In many cases the colliders on the children will overlap with the starting position of the cast shapes. In these cases a collision will be detected, but the position and hit distance may be wrong."));
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("layerMask"), new GUIContent("Colliding layers", "The collision check considers only colliders that are part of the herewith selected layers." + Environment.NewLine + Environment.NewLine + "For more details see Unitys documentation of the 'layerMask' parameter inside the 'UnityEngine.Physics2D.*' functions documentation."));
+
+ bool castShape_isRay3D = (sP_shape.enumValueIndex == (int)PhysicsVisualizer2D.Shape.ray3D);
+ bool wantedHits_isAll = (sP_wantedHits.enumValueIndex == (int)WantedHits.all);
+
+ //depth restriction:
+ SerializedProperty sP_useDepth = serializedObject.FindProperty("useDepth");
+
+ EditorGUI.BeginDisabledGroup(castShape_isRay3D);
+ EditorGUILayout.PropertyField(sP_useDepth, new GUIContent("Restrict Z range", "When using this the collision results will only include Collider2D who have their Z coordinate inside the specified range." + Environment.NewLine + Environment.NewLine + "This is not available for 'Shape' of 'Ray 3D'." + Environment.NewLine + Environment.NewLine + "For more details see Unitys documentation of 'ContactFilter2D'."));
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUI.BeginDisabledGroup(sP_useDepth.boolValue == false);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("minDepth"), new GUIContent("Minimum Z"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("maxDepth"), new GUIContent("Maximum Z"));
+
+ EditorGUI.BeginDisabledGroup(wantedHits_isAll == false);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("useOutsideDepth"), new GUIContent("Restrict to OUTSIDE", "Restrict the collisions to the area outside of the range, instead of to area inside the range." + Environment.NewLine + Environment.NewLine + "This is only available if 'Wanted hits' is set to 'All'. And it is not available for 'Shape' of 'Ray 3D'."));
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ EditorGUI.EndDisabledGroup();
+
+ //normal angle restriction:
+ SerializedProperty sP_useNormalAngle = serializedObject.FindProperty("useNormalAngle");
+ EditorGUI.BeginDisabledGroup(castShape_isRay3D || (typeIsCast_notOverlap == false) || (wantedHits_isAll == false));
+ EditorGUILayout.PropertyField(sP_useNormalAngle, new GUIContent("Restrict by normal angle", "This restricts the result to collisons whose collision normal points into a direction that lies inside the specified angle segment. The angle segment is defined in global space and independent of the cast direction. An angle of 0 means 'towards global right' (positive x-axis). Higher angles are turned counter clockwise from there." + Environment.NewLine + Environment.NewLine + "This is only available for casts with 'Wanted hits' set to 'All'. And it is not available for 'Shape' of 'Ray 3D' and not for colliders that are configurated as triggers and not for overlap checks." + Environment.NewLine + Environment.NewLine + "For more details see Unitys documentation of 'ContactFilter2D'."));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUI.BeginDisabledGroup(sP_useNormalAngle.boolValue == false);
+
+ SerializedProperty sP_minNormalAngle = serializedObject.FindProperty("minNormalAngle");
+ SerializedProperty sP_maxNormalAngle = serializedObject.FindProperty("maxNormalAngle");
+
+ EditorGUI.BeginChangeCheck();
+ EditorGUILayout.PropertyField(sP_minNormalAngle, new GUIContent("Minimum normal angle", "The start of the segment that defines the allowed normal angles (in degrees). It is measured in global space counter clockwise from 'towards right' (positive x-axis)"));
+ bool minNormalAngle_changed = EditorGUI.EndChangeCheck();
+
+ EditorGUI.BeginChangeCheck();
+ EditorGUILayout.PropertyField(sP_maxNormalAngle, new GUIContent("Maximum normal angle", "The end of the segment that defines the allowed normal angles (in degrees). It is measured in global space counter clockwise from 'towards right' (positive x-axis)"));
+ bool maxNormalAngle_changed = EditorGUI.EndChangeCheck();
+
+ if (minNormalAngle_changed)
+ {
+ sP_maxNormalAngle.floatValue = Mathf.Max(sP_minNormalAngle.floatValue, sP_maxNormalAngle.floatValue);
+ }
+ else
+ {
+ if (maxNormalAngle_changed)
+ {
+ sP_minNormalAngle.floatValue = Mathf.Min(sP_minNormalAngle.floatValue, sP_maxNormalAngle.floatValue);
+ }
+ }
+
+ // The angle range via only single slider, that displays a span:
+ // (disadvantage: it doesn't display the values as numbers)
+ // float minNormalAngle = sP_minNormalAngle.floatValue;
+ // float maxNormalAngle = sP_maxNormalAngle.floatValue;
+ // EditorGUILayout.MinMaxSlider("Angle Segment (0°-360°)",ref minNormalAngle, ref maxNormalAngle, 0.0f, 360.0f);
+ // sP_minNormalAngle.floatValue = minNormalAngle;
+ // sP_maxNormalAngle.floatValue = maxNormalAngle;
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("useOutsideNormalAngle"), new GUIContent("Restrict to OUTSIDE", "Restrict the collisions to the normal angles outside of the defined segment, instead of to the angles inside the segment."));
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ EditorGUI.EndDisabledGroup();
+
+ //others:
+ EditorGUI.BeginDisabledGroup(castShape_isRay3D || (wantedHits_isAll == false));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("useTriggers"), new GUIContent("Collide with triggers", "Specifies wheather the collision check also interacts with colliders that are configured as triggers." + Environment.NewLine + " Note that the restiction of 'normal angles' doesn't work on triggers." + Environment.NewLine + Environment.NewLine + "This is only available if 'Wanted hits' is set to 'All'. And it is not available for 'Shape' of 'Ray 3D'."));
+ EditorGUI.EndDisabledGroup();
+
+ string displayNameOfColorForNonHittingChecks;
+ string displayNameOfColorForHittingChecks;
+ if (typeIsCast_notOverlap)
+ {
+ displayNameOfColorForNonHittingChecks = "Non hitting rays";
+ displayNameOfColorForHittingChecks = "Hitting rays";
+ }
+ else
+ {
+ displayNameOfColorForNonHittingChecks = "Not Overlapping";
+ displayNameOfColorForHittingChecks = "Overlapping";
+ }
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForNonHittingCasts"), new GUIContent(displayNameOfColorForNonHittingChecks, "You can change the initial value of this via 'DrawXXL.DrawPhysics2D.colorForNonHittingCasts'."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForHittingCasts"), new GUIContent(displayNameOfColorForHittingChecks, "You can change the initial value of this via 'DrawXXL.DrawPhysics2D.colorForHittingCasts'."));
+
+ if (typeIsCast_notOverlap)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForCastLineBeyondHit"), new GUIContent("After last hit", "You can change the initial value of this via 'DrawXXL.DrawPhysics2D.colorForCastLineBeyondHit'."));
+ DrawChooserLineFor_overwriteColorForCastsHitNormals();
+ Draw_castCorridorVisualizerDensity(sP_saveDrawnLinesType);
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void DrawChooserLineFor_overwriteColorForCastsHitNormals()
+ {
+ EditorGUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("doOverwriteColorForCastsHitNormals"), new GUIContent("Custom Hit Normal Color", "The default color for normals at collision positions is that 'Color of hitting rays' is used, but with an adjusted brightness. Though you can overwrite the color of the normal here."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColorForCastsHitNormals"), GUIContent.none);
+ EditorGUILayout.EndHorizontal();
+ }
+
+ void Draw_castCorridorVisualizerDensity(SerializedProperty sP_saveDrawnLinesType)
+ {
+ if (sP_saveDrawnLinesType.enumValueIndex == (int)PhysicsVisualizer.SaveDrawnLinesType.yes_displayWithLowDetails)
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("castCorridorVisualizerDensity"), new GUIContent("Density (of cast corridor visualizers)", "Not available in 'save drawn lines' mode."));
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("castCorridorVisualizerDensity"), new GUIContent("Density (of cast corridor visualizers)", "You can change the initial value of this via 'DrawXXL.DrawPhysics2D.castCorridorVisualizerDensity'." + Environment.NewLine + Environment.NewLine + "If you reached a limit and no new corridor visualizers appear you can raise the maximum value via 'DrawXXL.DrawPhysics2D.maxCorridorVisualizersPerCastVisualization'."));
+ }
+ }
+
+ public void DrawTextSpecs(SerializedProperty sP_saveDrawnLinesType, bool typeIsCast_notOverlap)
+ {
+ if (sP_saveDrawnLinesType.enumValueIndex == (int)PhysicsVisualizer.SaveDrawnLinesType.yes_displayWithLowDetails)
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ GUIStyle style_forFoldoutLine = new GUIStyle(EditorStyles.foldout);
+ EditorGUILayout.Foldout(false, new GUIContent("Text", "Not available in 'save drawn lines' mode."), false, style_forFoldoutLine);
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ //-> this fakes the appearance of beeing inside the parents text specification foldout
+ bool emptyLineAtEndIfOutfolded = false;
+ DrawTextInputInclMarkupHelper(true, false, null, emptyLineAtEndIfOutfolded);
+
+ if (serializedObject.FindProperty("textSection_isOutfolded").boolValue == true)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ if (typeIsCast_notOverlap)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawCastNameTag_atCastOrigin"), new GUIContent("Draw text tag at cast origin", "You can change the initial value of this via 'DrawXXL.DrawPhysics2D.drawCastNameTag_atCastOrigin'."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawCastNameTag_atHitPositions"), new GUIContent("Draw text tag at hit positions", "You can change the initial value of this via 'DrawXXL.DrawPhysics2D.drawCastNameTag_atHitPositions'."));
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForCastsHitText"), new GUIContent("Hit description color", "You can change the initial value of this via 'DrawXXL.DrawPhysics2D.colorForCastsHitText'."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("scaleFactor_forCastHitTextSize"), new GUIContent("Text size of hit descriptions", "You can change the initial value of this via 'DrawXXL.DrawPhysics2D.scaleFactor_forCastHitTextSize'."));
+ DrawChooserFor_useCustomDirectionForHitResultText(sP_saveDrawnLinesType);
+ }
+ else
+ {
+ SerializedProperty sP_overlapResultTextSizeInterpretation = serializedObject.FindProperty("overlapResultTextSizeInterpretation");
+ EditorGUILayout.PropertyField(sP_overlapResultTextSizeInterpretation, new GUIContent("Text Size Reference Frame"));
+
+ switch (sP_overlapResultTextSizeInterpretation.enumValueIndex)
+ {
+ case (int)PhysicsVisualizer.OverlapResultTextSizeInterpretation.relativeToTheSizeOfTheOverlapingPhysicsShape:
+ break;
+ case (int)PhysicsVisualizer.OverlapResultTextSizeInterpretation.fixedWorldSpaceSize:
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forcedConstantWorldspaceTextSize_forOverlapResultTexts"), new GUIContent("Text size"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ case (int)PhysicsVisualizer.OverlapResultTextSizeInterpretation.relativeToTheSceneViewWindowSize:
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forcedConstantScreenspaceTextSize_relToScreenHeight_forOverlapResultTexts"), new GUIContent("Text size"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ case (int)PhysicsVisualizer.OverlapResultTextSizeInterpretation.relativeToTheGameViewWindowSize:
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forcedConstantScreenspaceTextSize_relToScreenHeight_forOverlapResultTexts"), new GUIContent("Text size"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ default:
+ break;
+ }
+
+ SerializedProperty sP_maxListedColliders_inOverlapVolumesTextList = serializedObject.FindProperty("maxListedColliders_inOverlapVolumesTextList");
+ EditorGUILayout.PropertyField(sP_maxListedColliders_inOverlapVolumesTextList, new GUIContent("Maximum listed colliders in results text list", "The results list will be truncated if there are more results, along with a notification how many results are hidden." + Environment.NewLine + Environment.NewLine + "You can set the initial value of this via 'DrawPhysics2D.MaxListedColliders_inOverlapVolumesTextList'."));
+ sP_maxListedColliders_inOverlapVolumesTextList.intValue = Mathf.Max(1, sP_maxListedColliders_inOverlapVolumesTextList.intValue);
+
+ SerializedProperty sP_maxOverlapingCollidersWithUntruncatedText = serializedObject.FindProperty("maxOverlapingCollidersWithUntruncatedText");
+ if (sP_saveDrawnLinesType.enumValueIndex == (int)PhysicsVisualizer.SaveDrawnLinesType.no_useFullDetails)
+ {
+ EditorGUILayout.PropertyField(sP_maxOverlapingCollidersWithUntruncatedText, new GUIContent("Maximum collision markers with untruncated text", "If more collisions than this number are found then the description text at the collision position marker will be truncated to only a sequential number." + Environment.NewLine + Environment.NewLine + "You can set the initial value of this via 'DrawPhysics2D.maxOverlapingCollidersWithUntruncatedText'."));
+ }
+ else
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.PropertyField(sP_maxOverlapingCollidersWithUntruncatedText, new GUIContent("Maximum collision markers with untruncated text", "Only available if 'save drawn lines' is disabled."));
+ EditorGUI.EndDisabledGroup();
+ }
+ sP_maxOverlapingCollidersWithUntruncatedText.intValue = Mathf.Max(0, sP_maxOverlapingCollidersWithUntruncatedText.intValue);
+
+ }
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+ }
+
+ void DrawChooserFor_useCustomDirectionForHitResultText(SerializedProperty sP_saveDrawnLinesType)
+ {
+ if (sP_saveDrawnLinesType.enumValueIndex == (int)PhysicsVisualizer.SaveDrawnLinesType.no_useFullDetails)
+ {
+ SerializedProperty sP_useCustomDirectionForHitResultText = serializedObject.FindProperty("useCustomDirectionForHitResultText");
+ EditorGUILayout.BeginHorizontal();
+
+ EditorGUILayout.PropertyField(sP_useCustomDirectionForHitResultText, new GUIContent("Custom placement of hit description block", "You can change the initial value of this via 'DrawPhysics2D.directionOfHitResultText'."));
+
+ EditorGUI.BeginDisabledGroup(!sP_useCustomDirectionForHitResultText.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("customDirectionForHitResultText"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUILayout.EndHorizontal();
+ }
+ else
+ {
+ EditorGUI.BeginDisabledGroup(true);
+
+ SerializedProperty sP_useCustomDirectionForHitResultText = serializedObject.FindProperty("useCustomDirectionForHitResultText");
+ EditorGUILayout.BeginHorizontal();
+
+ EditorGUILayout.PropertyField(sP_useCustomDirectionForHitResultText, new GUIContent("Custom placement of hit description block", "Only available if 'save drawn lines' is disabled."));
+
+ EditorGUI.BeginDisabledGroup(!sP_useCustomDirectionForHitResultText.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("customDirectionForHitResultText"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUILayout.EndHorizontal();
+
+ EditorGUI.EndDisabledGroup();
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/PhysicsVisualizer2DInspector.cs.meta b/Editor/DrawDebugLibrary/PhysicsVisualizer2DInspector.cs.meta
new file mode 100644
index 0000000..25889c8
--- /dev/null
+++ b/Editor/DrawDebugLibrary/PhysicsVisualizer2DInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 09561109327f5bc43880b988763916a8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/PhysicsVisualizerInspector.cs b/Editor/DrawDebugLibrary/PhysicsVisualizerInspector.cs
new file mode 100644
index 0000000..12862cc
--- /dev/null
+++ b/Editor/DrawDebugLibrary/PhysicsVisualizerInspector.cs
@@ -0,0 +1,511 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(PhysicsVisualizer))]
+ [CanEditMultipleObjects]
+ public class PhysicsVisualizerInspector : VisualizerParentInspector
+ {
+ PhysicsVisualizer physicsVisualizer_unserializedMonoB;
+
+ void OnEnable()
+ {
+ OnEnable_base();
+ physicsVisualizer_unserializedMonoB = (PhysicsVisualizer)target;
+ }
+
+ public void OnSceneGUI()
+ {
+ if (physicsVisualizer_unserializedMonoB.showTransformIndependentRotationHandle)
+ {
+ Vector3 positionOfPhysicsShape = physicsVisualizer_unserializedMonoB.GetDrawPos3D_global();
+ float sizeOfRotationHandle = HandleUtility.GetHandleSize(positionOfPhysicsShape);
+ Vector3 shiftOffsetDirectionFromTransformHandle_normalized = Vector3.up;
+ if (SceneView.lastActiveSceneView != null)
+ {
+ shiftOffsetDirectionFromTransformHandle_normalized = SceneView.lastActiveSceneView.camera.transform.up;
+ }
+ Vector3 postionOfAdditionalRotationHandle = positionOfPhysicsShape + shiftOffsetDirectionFromTransformHandle_normalized * 2.5f * sizeOfRotationHandle;
+ Quaternion returnedRotationFromHandle;
+
+ switch (physicsVisualizer_unserializedMonoB.shapeOrientationType)
+ {
+ case PhysicsVisualizer.ShapeOrientationType.transformsRotationPlusOptionalAdditionalLocalRotation:
+ Quaternion optionalAdditionalRotation_local = physicsVisualizer_unserializedMonoB.transform.rotation * Quaternion.Euler(physicsVisualizer_unserializedMonoB.optionalAdditionalRotation_asEulersInV3);
+ Quaternion returnedRotationFromHandle_local = Handles.RotationHandle(optionalAdditionalRotation_local, postionOfAdditionalRotationHandle);
+ Quaternion returnedRotationFromHandle_global = Quaternion.Inverse(physicsVisualizer_unserializedMonoB.transform.rotation) * returnedRotationFromHandle_local;
+ physicsVisualizer_unserializedMonoB.optionalAdditionalRotation_asEulersInV3 = returnedRotationFromHandle_global.eulerAngles;
+ break;
+ case PhysicsVisualizer.ShapeOrientationType.transformsRotationPlusOptionalAdditionalGlobalRotation:
+ returnedRotationFromHandle = Handles.RotationHandle(Quaternion.Euler(physicsVisualizer_unserializedMonoB.optionalAdditionalRotation_asEulersInV3), postionOfAdditionalRotationHandle);
+ physicsVisualizer_unserializedMonoB.optionalAdditionalRotation_asEulersInV3 = returnedRotationFromHandle.eulerAngles;
+ break;
+ case PhysicsVisualizer.ShapeOrientationType.customRotationIndependentFromTransform:
+ returnedRotationFromHandle = Handles.RotationHandle(Quaternion.Euler(physicsVisualizer_unserializedMonoB.customRotation_asEulersInV3), postionOfAdditionalRotationHandle);
+ physicsVisualizer_unserializedMonoB.customRotation_asEulersInV3 = returnedRotationFromHandle.eulerAngles;
+ break;
+ default:
+ break;
+ }
+
+ Handles.Label(postionOfAdditionalRotationHandle, "Handle for Physics Shape", new GUIStyle());
+ }
+ }
+
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("physics");
+ SerializedProperty sP_saveDrawnLinesType = serializedObject.FindProperty("saveDrawnLinesType");
+ EditorGUILayout.PropertyField(sP_saveDrawnLinesType, new GUIContent("Save drawn lines ?", "This simplifies the visualization. It may be helpful to save performance if you draw many casts at once." + Environment.NewLine + Environment.NewLine + "You can change the initial value of this via 'DrawXXL.DrawPhysics.visualizationQuality'."));
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ bool typeIsCast_notCheck = false;
+ SerializedProperty sP_theGameobjectHasACompatibleAndEnabledCollider = serializedObject.FindProperty("theGameobjectHasACompatibleAndEnabledCollider");
+ SerializedProperty sP_shape = serializedObject.FindProperty("shape");
+
+ TryDrawCollisionTypeChooser(sP_shape, sP_theGameobjectHasACompatibleAndEnabledCollider, ref typeIsCast_notCheck);
+
+ if ((sP_shape.enumValueIndex == (int)PhysicsVisualizer.Shape.collidersOnThisGameobject) && (sP_theGameobjectHasACompatibleAndEnabledCollider.boolValue == false))
+ {
+ EditorGUILayout.HelpBox("There is no enabled collider on this gameobject that could be cast. Supported colliders are 'BoxCollider', 'SphereCollider' and 'CapsuleCollider'.", MessageType.None, true);
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("wantedHits"), new GUIContent("Wanted hits"));
+ DrawDetectedHitsCount();
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ DrawShapeSizeSpecification(sP_shape);
+ DrawCastDirectionAndDistance(typeIsCast_notCheck);
+ DrawOtherSettings(sP_saveDrawnLinesType, typeIsCast_notCheck);
+ DrawTextSpecs(sP_saveDrawnLinesType, typeIsCast_notCheck);
+ DrawCheckboxFor_drawOnlyIfSelected("physics");
+ DrawCheckboxFor_hiddenByNearerObjects("physics");
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void TryDrawCollisionTypeChooser(SerializedProperty sP_shape, SerializedProperty sP_theGameobjectHasACompatibleAndEnabledCollider, ref bool typeIsCast_notCheck)
+ {
+ SerializedProperty sP_collisionType = serializedObject.FindProperty("collisionType");
+
+ bool forceDisplayToCast = false;
+ switch ((PhysicsVisualizer.Shape)sP_shape.enumValueIndex)
+ {
+ case PhysicsVisualizer.Shape.collidersOnThisGameobject:
+ if (sP_theGameobjectHasACompatibleAndEnabledCollider.boolValue)
+ {
+ forceDisplayToCast = false;
+ typeIsCast_notCheck = Get_typeIsCast_notCheck(sP_collisionType, forceDisplayToCast);
+ }
+ break;
+ case PhysicsVisualizer.Shape.box:
+ forceDisplayToCast = false;
+ typeIsCast_notCheck = Get_typeIsCast_notCheck(sP_collisionType, forceDisplayToCast);
+ break;
+ case PhysicsVisualizer.Shape.sphere:
+ forceDisplayToCast = false;
+ typeIsCast_notCheck = Get_typeIsCast_notCheck(sP_collisionType, forceDisplayToCast);
+ break;
+ case PhysicsVisualizer.Shape.capsule:
+ forceDisplayToCast = false;
+ typeIsCast_notCheck = Get_typeIsCast_notCheck(sP_collisionType, forceDisplayToCast);
+ break;
+ case PhysicsVisualizer.Shape.ray:
+ forceDisplayToCast = true;
+ typeIsCast_notCheck = Get_typeIsCast_notCheck(sP_collisionType, forceDisplayToCast);
+ break;
+ default:
+ break;
+ }
+
+ string label_ofShape = typeIsCast_notCheck ? "Shape to cast" : "Shape to overlap";
+ EditorGUILayout.PropertyField(sP_shape, new GUIContent(label_ofShape));
+
+ switch ((PhysicsVisualizer.Shape)sP_shape.enumValueIndex)
+ {
+ case PhysicsVisualizer.Shape.collidersOnThisGameobject:
+ if (sP_theGameobjectHasACompatibleAndEnabledCollider.boolValue)
+ {
+ if (UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale(transform_onVisualizerObject.parent))
+ {
+ EditorGUILayout.HelpBox("A parent transform has a non-uniform scale -> The collider and cast positions may be wrong.", MessageType.Warning, true);
+ }
+ DrawCollisionTypeChooser(sP_collisionType, forceDisplayToCast);
+ }
+ break;
+ case PhysicsVisualizer.Shape.box:
+ DrawCollisionTypeChooser(sP_collisionType, forceDisplayToCast);
+ break;
+ case PhysicsVisualizer.Shape.sphere:
+ DrawCollisionTypeChooser(sP_collisionType, forceDisplayToCast);
+ break;
+ case PhysicsVisualizer.Shape.capsule:
+ DrawCollisionTypeChooser(sP_collisionType, forceDisplayToCast);
+ break;
+ case PhysicsVisualizer.Shape.ray:
+ DrawCollisionTypeChooser(sP_collisionType, forceDisplayToCast);
+ break;
+ default:
+ break;
+ }
+ }
+
+ bool Get_typeIsCast_notCheck(SerializedProperty sP_collisionType, bool forceDisplayToCast)
+ {
+ if (forceDisplayToCast)
+ {
+ return true;
+ }
+ else
+ {
+ return (sP_collisionType.enumValueIndex == (int)CollisionType.cast);
+ }
+ }
+
+ void DrawCollisionTypeChooser(SerializedProperty sP_collisionType, bool forceDisplayToCast)
+ {
+ string label = "Collision type";
+ if (forceDisplayToCast)
+ {
+ CollisionType castCollisionType = CollisionType.cast;
+
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.EnumPopup(new GUIContent(label), castCollisionType);
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(sP_collisionType, new GUIContent(label));
+ }
+ }
+
+ void DrawDetectedHitsCount()
+ {
+ int numberOfDetectedHits = serializedObject.FindProperty("numberOfFoundHits").intValue;
+ Color displayColor = (numberOfDetectedHits == 0) ? serializedObject.FindProperty("colorForNonHittingCasts").colorValue : serializedObject.FindProperty("colorForHittingCasts").colorValue;
+ string labelText_name = "Detected hits:"; //-> I wanted to color this as well, but rich text seems to work only for the second label
+ string labelText_value = ("" + numberOfDetectedHits + "");
+ GUIStyle style = new GUIStyle(EditorStyles.label);
+ style.richText = true;
+ EditorGUILayout.LabelField(labelText_name, labelText_value, style);
+ }
+
+ void DrawShapeSizeSpecification(SerializedProperty sP_shape)
+ {
+ if ((sP_shape.enumValueIndex == (int)PhysicsVisualizer.Shape.box) || (sP_shape.enumValueIndex == (int)PhysicsVisualizer.Shape.sphere) || (sP_shape.enumValueIndex == (int)PhysicsVisualizer.Shape.capsule))
+ {
+ GUIStyle richtextEnabledStyle = new GUIStyle(EditorStyles.label);
+ richtextEnabledStyle.richText = true;
+
+ switch ((PhysicsVisualizer.Shape)sP_shape.enumValueIndex)
+ {
+ case PhysicsVisualizer.Shape.collidersOnThisGameobject:
+ break;
+ case PhysicsVisualizer.Shape.box:
+ EditorGUILayout.LabelField("Box: --- Size / Orientation / Position ---", richtextEnabledStyle);
+ break;
+ case PhysicsVisualizer.Shape.sphere:
+ EditorGUILayout.LabelField("Sphere: --- Size / Position ---", richtextEnabledStyle);
+ break;
+ case PhysicsVisualizer.Shape.capsule:
+ EditorGUILayout.LabelField("Capsule: --- Size / Orientation / Position ---", richtextEnabledStyle);
+ break;
+ case PhysicsVisualizer.Shape.ray:
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ switch ((PhysicsVisualizer.Shape)sP_shape.enumValueIndex)
+ {
+ case PhysicsVisualizer.Shape.collidersOnThisGameobject:
+ break;
+ case PhysicsVisualizer.Shape.box:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("sizeScaleFactors_ofCastRespCheckedBox"), new GUIContent("Size"));
+ DrawShapeOrientation();
+ Draw_DrawPosition3DOffset(true, "Position Offset");
+ break;
+ case PhysicsVisualizer.Shape.sphere:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("radiusScaleFactor_ofCastRespCheckedShape"), new GUIContent("Radius"));
+ Draw_DrawPosition3DOffset(true, "Position Offset");
+ break;
+ case PhysicsVisualizer.Shape.capsule:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("radiusScaleFactor_ofCastRespCheckedShape"), new GUIContent("Radius"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("heightScaleFactor_ofCastRespCheckedCapsule"), new GUIContent("Height"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("capsuleAlignment"), new GUIContent("Height alignment"));
+ DrawShapeOrientation();
+ Draw_DrawPosition3DOffset(true, "Position Offset");
+ break;
+ case PhysicsVisualizer.Shape.ray:
+ break;
+ default:
+ break;
+ }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ else
+ {
+ if (sP_shape.enumValueIndex == (int)PhysicsVisualizer.Shape.ray)
+ {
+ Draw_DrawPosition3DOffset(false, "Position Offset");
+ }
+ }
+ }
+
+ void DrawShapeOrientation()
+ {
+ SerializedProperty sP_shapeOrientationType = serializedObject.FindProperty("shapeOrientationType");
+ EditorGUILayout.PropertyField(sP_shapeOrientationType, new GUIContent("Orientation"));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ switch (sP_shapeOrientationType.enumValueIndex)
+ {
+ case (int)PhysicsVisualizer.ShapeOrientationType.transformsRotationPlusOptionalAdditionalLocalRotation:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("optionalAdditionalRotation_asEulersInV3"), new GUIContent("Additional rotation (local)", "This is added to the rotation from the transform component. The angle values here rotate around the local axes of the transform, which may already be skewed and define a local space."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("showTransformIndependentRotationHandle"), new GUIContent("Show additional rotation handle", "This activates an additional rotation handle which is independent from the transforms rotation handle and only affects the additional rotation defined in the above line."));
+ break;
+ case (int)PhysicsVisualizer.ShapeOrientationType.transformsRotationPlusOptionalAdditionalGlobalRotation:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("optionalAdditionalRotation_asEulersInV3"), new GUIContent("Additional rotation (global)", "This is added to the rotation from the transform component. The angle values here rotate around the global axes, independent of how the transform is already skewed in space."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("showTransformIndependentRotationHandle"), new GUIContent("Show additional rotation handle", "This activates an additional rotation handle which is independent from the transforms rotation handle and only affects the additional rotation defined in the above line."));
+ break;
+ case (int)PhysicsVisualizer.ShapeOrientationType.customRotationIndependentFromTransform:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("customRotation_asEulersInV3"), new GUIContent("Custom rotation"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("showTransformIndependentRotationHandle"), new GUIContent("Show additional rotation handle", "This activates an additional rotation handle which is independent from the transforms rotation handle and only affects the custom rotation defined in the above line."));
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawCastDirectionAndDistance(bool typeIsCast_notCheck)
+ {
+ if (typeIsCast_notCheck)
+ {
+ DrawSpecificationOf_customVector3_1("Cast direction", false, null, true, false, true, false);
+
+ EditorGUILayout.LabelField("Cast distance");
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ SerializedProperty sP_distanceIsInfinityRespToOtherGO = serializedObject.FindProperty("distanceIsInfinityRespToOtherGO");
+
+ if (visualizerParentMonoBehaviour_unserialized.customVector3Configs[0].source == VisualizerParent.CustomVector3Source.toOtherGameobject)
+ {
+ EditorGUILayout.PropertyField(sP_distanceIsInfinityRespToOtherGO, new GUIContent("Till other gameobject"));
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(sP_distanceIsInfinityRespToOtherGO, new GUIContent("Infinity"));
+ }
+
+ EditorGUI.BeginDisabledGroup(sP_distanceIsInfinityRespToOtherGO.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("adjustedDistance"), new GUIContent("Flexible"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void DrawOtherSettings(SerializedProperty sP_saveDrawnLinesType, bool typeIsCast_notCheck)
+ {
+ SerializedProperty sP_otherSettings_isFoldedOut = serializedObject.FindProperty("otherSettings_isFoldedOut");
+ sP_otherSettings_isFoldedOut.boolValue = EditorGUILayout.Foldout(sP_otherSettings_isFoldedOut.boolValue, "Other settings", true);
+ if (sP_otherSettings_isFoldedOut.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("excludeCollidersOnThisGO"), new GUIContent("Exclude colliders on this Gameobject from result", "Caution for disabling this:" + Environment.NewLine + "In many cases the colliders on this Gameobject will overlap with the starting position of the cast shapes. In these cases a collision will be detected, but the position and hit distance may be wrong."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("excludeCollidersOnParentGOs"), new GUIContent("Exclude colliders on parents from result", "Caution for disabling this:" + Environment.NewLine + "In many cases the colliders on the parents will overlap with the starting position of the cast shapes. In these cases a collision will be detected, but the position and hit distance may be wrong."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("excludeCollidersOnChildrenGOs"), new GUIContent("Exclude colliders on children from result", "Caution for disabling this:" + Environment.NewLine + "In many cases the colliders on the children will overlap with the starting position of the cast shapes. In these cases a collision will be detected, but the position and hit distance may be wrong."));
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("layerMask"), new GUIContent("Colliding layers", "The collision check considers only colliders that are part of the herewith selected layers." + Environment.NewLine + Environment.NewLine + "For more details see Unitys documentation of the 'layerMask' parameter inside the 'UnityEngine.Physics.*' functions documentation."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("queryTriggerInteraction"), new GUIContent("Trigger Interaction Config", "This defines whether the collision checks interact with colliders that are configurated as triggers." + Environment.NewLine + "'Use global' means that the global setting is used, which is defined by 'UnityEngine.Physics.queriesHitTriggers'." + Environment.NewLine + Environment.NewLine + "For more details see Unitys documentation of 'QueryTriggerInteraction'."));
+
+ string displayNameOfColorForNonHittingChecks;
+ string displayNameOfColorForHittingChecks;
+ if (typeIsCast_notCheck)
+ {
+ displayNameOfColorForNonHittingChecks = "Non hitting rays";
+ displayNameOfColorForHittingChecks = "Hitting rays";
+ }
+ else
+ {
+ displayNameOfColorForNonHittingChecks = "Not Overlapping";
+ displayNameOfColorForHittingChecks = "Overlapping";
+ }
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForNonHittingCasts"), new GUIContent(displayNameOfColorForNonHittingChecks, "You can change the initial value of this via 'DrawPhysics.colorForNonHittingCasts'."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForHittingCasts"), new GUIContent(displayNameOfColorForHittingChecks, "You can change the initial value of this via 'DrawPhysics.colorForHittingCasts'."));
+
+ if (typeIsCast_notCheck)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForCastLineBeyondHit"), new GUIContent("After last hit", "You can change the initial value of this via 'DrawPhysics.colorForCastLineBeyondHit'."));
+ DrawChooserLineFor_overwriteColorForCastsHitNormals();
+ Draw_castSilhouetteVisualizerDensity(sP_saveDrawnLinesType);
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void DrawChooserLineFor_overwriteColorForCastsHitNormals()
+ {
+ EditorGUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("doOverwriteColorForCastsHitNormals"), new GUIContent("Custom Hit Normal Color", "The default color for normals at collision positions is that 'Color of hitting rays' is used, but with an adjusted brightness. Though you can overwrite the color of the normal here."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColorForCastsHitNormals"), GUIContent.none);
+ EditorGUILayout.EndHorizontal();
+ }
+
+ void Draw_castSilhouetteVisualizerDensity(SerializedProperty sP_saveDrawnLinesType)
+ {
+ if (sP_saveDrawnLinesType.enumValueIndex == (int)PhysicsVisualizer.SaveDrawnLinesType.yes_displayWithLowDetails)
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("castSilhouetteVisualizerDensity"), new GUIContent("Density (of cast silhouette visualizers)", "Not available in 'save drawn lines' mode."));
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("castSilhouetteVisualizerDensity"), new GUIContent("Density (of cast silhouette visualizers)", "You can change the initial value of this via 'DrawXXL.DrawPhysics.castSilhouetteVisualizerDensity'." + Environment.NewLine + Environment.NewLine + "If you reached a limit and no new silhouettes appear you can raise the maximum value via 'DrawXXL.DrawPhysics.maxSilhouettesPerCastVisualization'."));
+ }
+ }
+
+ public void DrawTextSpecs(SerializedProperty sP_saveDrawnLinesType, bool typeIsCast_notCheck)
+ {
+ if (sP_saveDrawnLinesType.enumValueIndex == (int)PhysicsVisualizer.SaveDrawnLinesType.yes_displayWithLowDetails)
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ GUIStyle style_forFoldoutLine = new GUIStyle(EditorStyles.foldout);
+ EditorGUILayout.Foldout(false, new GUIContent("Text", "Not available in 'save drawn lines' mode."), false, style_forFoldoutLine);
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ //-> this fakes the appearance of beeing inside the parents text specification foldout
+ bool emptyLineAtEndIfOutfolded = false;
+ DrawTextInputInclMarkupHelper(true, false, null, emptyLineAtEndIfOutfolded);
+
+ if (serializedObject.FindProperty("textSection_isOutfolded").boolValue == true)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ if (typeIsCast_notCheck)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawCastNameTag_atCastOrigin"), new GUIContent("Draw text tag at cast origin", "You can change the initial value of this via 'DrawPhysics.drawCastNameTag_atCastOrigin'."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawCastNameTag_atHitPositions"), new GUIContent("Draw text tag at hit positions", "You can change the initial value of this via 'DrawPhysics.drawCastNameTag_atHitPositions'."));
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForCastsHitText"), new GUIContent("Hit description color", "You can change the initial value of this via 'DrawPhysics.colorForCastsHitText'."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("scaleFactor_forCastHitTextSize"), new GUIContent("Text size of hit descriptions", "You can change the initial value of this via 'DrawPhysics.scaleFactor_forCastHitTextSize'."));
+ DrawChooserFor_useCustomDirectionForHitResultText(sP_saveDrawnLinesType);
+ }
+ else
+ {
+ SerializedProperty sP_overlapResultTextSizeInterpretation = serializedObject.FindProperty("overlapResultTextSizeInterpretation");
+ EditorGUILayout.PropertyField(sP_overlapResultTextSizeInterpretation, new GUIContent("Text Size Reference Frame"));
+
+ switch (sP_overlapResultTextSizeInterpretation.enumValueIndex)
+ {
+ case (int)PhysicsVisualizer.OverlapResultTextSizeInterpretation.relativeToTheSizeOfTheOverlapingPhysicsShape:
+ break;
+ case (int)PhysicsVisualizer.OverlapResultTextSizeInterpretation.fixedWorldSpaceSize:
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forcedConstantWorldspaceTextSize_forOverlapResultTexts"), new GUIContent("Text size"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ case (int)PhysicsVisualizer.OverlapResultTextSizeInterpretation.relativeToTheSceneViewWindowSize:
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forcedConstantScreenspaceTextSize_relToScreenHeight_forOverlapResultTexts"), new GUIContent("Text size"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ case (int)PhysicsVisualizer.OverlapResultTextSizeInterpretation.relativeToTheGameViewWindowSize:
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forcedConstantScreenspaceTextSize_relToScreenHeight_forOverlapResultTexts"), new GUIContent("Text size"));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ default:
+ break;
+ }
+
+ SerializedProperty sP_maxListedColliders_inOverlapVolumesTextList = serializedObject.FindProperty("maxListedColliders_inOverlapVolumesTextList");
+ EditorGUILayout.PropertyField(sP_maxListedColliders_inOverlapVolumesTextList, new GUIContent("Maximum listed colliders in results text list", "The results list will be truncated if there are more results, along with a notification how many results are hidden." + Environment.NewLine + Environment.NewLine + "You can set the initial value of this via 'DrawPhysics.MaxListedColliders_inOverlapVolumesTextList'."));
+ sP_maxListedColliders_inOverlapVolumesTextList.intValue = Mathf.Max(1, sP_maxListedColliders_inOverlapVolumesTextList.intValue);
+
+ SerializedProperty sP_maxOverlapingCollidersWithUntruncatedText = serializedObject.FindProperty("maxOverlapingCollidersWithUntruncatedText");
+ if (sP_saveDrawnLinesType.enumValueIndex == (int)PhysicsVisualizer.SaveDrawnLinesType.no_useFullDetails)
+ {
+ EditorGUILayout.PropertyField(sP_maxOverlapingCollidersWithUntruncatedText, new GUIContent("Maximum collision markers with untruncated text", "If more collisions than this number are found then the description text at the collision position marker will be truncated to only a sequential number." + Environment.NewLine + Environment.NewLine + "You can set the initial value of this via 'DrawPhysics.maxOverlapingCollidersWithUntruncatedText'."));
+ }
+ else
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.PropertyField(sP_maxOverlapingCollidersWithUntruncatedText, new GUIContent("Maximum collision markers with untruncated text", "Only available if 'save drawn lines' is disabled."));
+ EditorGUI.EndDisabledGroup();
+ }
+ sP_maxOverlapingCollidersWithUntruncatedText.intValue = Mathf.Max(0, sP_maxOverlapingCollidersWithUntruncatedText.intValue);
+
+ }
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+ }
+
+ void DrawChooserFor_useCustomDirectionForHitResultText(SerializedProperty sP_saveDrawnLinesType)
+ {
+ if (sP_saveDrawnLinesType.enumValueIndex == (int)PhysicsVisualizer.SaveDrawnLinesType.no_useFullDetails)
+ {
+ SerializedProperty sP_useCustomDirectionForHitResultText = serializedObject.FindProperty("useCustomDirectionForHitResultText");
+ EditorGUILayout.BeginHorizontal();
+
+ EditorGUILayout.PropertyField(sP_useCustomDirectionForHitResultText, new GUIContent("Custom placement of hit description block", "You can change the initial value of this via 'DrawPhysics.directionOfHitResultText'."));
+
+ EditorGUI.BeginDisabledGroup(!sP_useCustomDirectionForHitResultText.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("customDirectionForHitResultText"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUILayout.EndHorizontal();
+ }
+ else
+ {
+ EditorGUI.BeginDisabledGroup(true);
+
+ SerializedProperty sP_useCustomDirectionForHitResultText = serializedObject.FindProperty("useCustomDirectionForHitResultText");
+ EditorGUILayout.BeginHorizontal();
+
+ EditorGUILayout.PropertyField(sP_useCustomDirectionForHitResultText, new GUIContent("Custom placement of hit description block", "Only available if 'save drawn lines' is disabled."));
+
+ EditorGUI.BeginDisabledGroup(!sP_useCustomDirectionForHitResultText.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("customDirectionForHitResultText"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUILayout.EndHorizontal();
+
+ EditorGUI.EndDisabledGroup();
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/PhysicsVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/PhysicsVisualizerInspector.cs.meta
new file mode 100644
index 0000000..d9f0f10
--- /dev/null
+++ b/Editor/DrawDebugLibrary/PhysicsVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 969573b37874e894b9b60f080b9544f7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/PositionVisualizerInspector.cs b/Editor/DrawDebugLibrary/PositionVisualizerInspector.cs
new file mode 100644
index 0000000..3e184c5
--- /dev/null
+++ b/Editor/DrawDebugLibrary/PositionVisualizerInspector.cs
@@ -0,0 +1,58 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(PositionVisualizer))]
+ [CanEditMultipleObjects]
+ public class PositionVisualizerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("position");
+
+ SerializedProperty sP_global = serializedObject.FindProperty("global");
+ SerializedProperty sP_local = serializedObject.FindProperty("local");
+ SerializedProperty sP_allParents = serializedObject.FindProperty("allParents");
+
+ bool hasNoParents = (transform_onVisualizerObject.parent == null);
+ if (hasNoParents)
+ {
+ sP_global.boolValue = true;
+ sP_local.boolValue = false;
+ sP_allParents.boolValue = false;
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.PropertyField(sP_global, new GUIContent("Global"));
+ EditorGUILayout.PropertyField(sP_local, new GUIContent("Local"));
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(sP_global, new GUIContent("Global"));
+ EditorGUILayout.PropertyField(sP_local, new GUIContent("Local"));
+ }
+
+ if (sP_local.boolValue == false) { sP_allParents.boolValue = false; }
+
+ EditorGUI.BeginDisabledGroup(!sP_local.boolValue);
+ EditorGUILayout.PropertyField(sP_allParents, new GUIContent("For all parents"));
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineWidth"), new GUIContent("Line width"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color"));
+
+ DrawTextInputInclMarkupHelper();
+ DrawCheckboxFor_drawOnlyIfSelected("position");
+ DrawCheckboxFor_hiddenByNearerObjects("position");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/PositionVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/PositionVisualizerInspector.cs.meta
new file mode 100644
index 0000000..48f09a9
--- /dev/null
+++ b/Editor/DrawDebugLibrary/PositionVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fc49aa16f5c23294e842626a8292949e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/RotationVisualizerInspector.cs b/Editor/DrawDebugLibrary/RotationVisualizerInspector.cs
new file mode 100644
index 0000000..8554074
--- /dev/null
+++ b/Editor/DrawDebugLibrary/RotationVisualizerInspector.cs
@@ -0,0 +1,104 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(RotationVisualizer))]
+ [CanEditMultipleObjects]
+ public class RotationVisualizerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("rotation");
+
+ SerializedProperty sP_rotationType = serializedObject.FindProperty("rotationType");
+ EditorGUILayout.PropertyField(sP_rotationType, new GUIContent("Rotation type"));
+ bool displayIsQuaternion = ((sP_rotationType.enumValueIndex == (int)RotationVisualizer.RotationType.quaternionGlobal) || (sP_rotationType.enumValueIndex == (int)RotationVisualizer.RotationType.quaternionLocal));
+ bool displayIsEuler = !displayIsQuaternion;
+ bool isLocal = ((sP_rotationType.enumValueIndex == (int)RotationVisualizer.RotationType.quaternionLocal) || (sP_rotationType.enumValueIndex == (int)RotationVisualizer.RotationType.eulerAnglesLocal));
+
+ if (displayIsQuaternion)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color_ofTurnAxis"), new GUIContent("Turn axis color"));
+ }
+
+ if (displayIsEuler)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay"), new GUIContent("Angles from code instead from inspector", "Angles from code instead from inspector:" + Environment.NewLine + Environment.NewLine + "The same overall rotation can be created by different sets of x/y/z-angles. For example (100/0/0) ends up as the same overall rotation than (80/180/180). Unity uses a different set of x/y/z-angles for display in the inspectors transform component than what transform.eulerAngles returns in code, thought in the end it's both the same overall rotation."));
+ }
+
+ SerializedProperty sP_length_ofUpAndForwardVectors;
+ if (displayIsQuaternion)
+ {
+ sP_length_ofUpAndForwardVectors = serializedObject.FindProperty("length_ofUpAndForwardVectors_caseQuaternion");
+ }
+ else
+ {
+ sP_length_ofUpAndForwardVectors = serializedObject.FindProperty("length_ofUpAndForwardVectors_caseEuler");
+ }
+
+ GUIContent guiContent_ofUpForwardLength;
+ if (isLocal)
+ {
+ guiContent_ofUpForwardLength = new GUIContent("Rotated Up/Forward (length)", "This is in local units." + Environment.NewLine + Environment.NewLine + "You can disable the display of up and forward vectors by setting this value to 0.");
+ }
+ else
+ {
+ guiContent_ofUpForwardLength = new GUIContent("Rotated Up/Forward (length)", "You can disable the display of up and forward vectors by setting this value to 0.");
+ }
+
+ EditorGUILayout.PropertyField(sP_length_ofUpAndForwardVectors, guiContent_ofUpForwardLength);
+ if (sP_length_ofUpAndForwardVectors.floatValue < 0.001f)
+ {
+ sP_length_ofUpAndForwardVectors.floatValue = 0.0f;
+ }
+
+ if (displayIsEuler)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUI.BeginDisabledGroup(UtilitiesDXXL_Math.ApproximatelyZero(sP_length_ofUpAndForwardVectors.floatValue));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("alpha_ofSquareSpannedByForwardAndUp"), new GUIContent("Alpha (up/forward square)", "Is only available if length (up/forward) is bigger than 0."));
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ SerializedProperty sP_drawCustomRotatedVector;
+ if (displayIsQuaternion)
+ {
+ sP_drawCustomRotatedVector = serializedObject.FindProperty("drawCustomRotatedVector_caseQuaternion");
+ }
+ else
+ {
+ sP_drawCustomRotatedVector = serializedObject.FindProperty("drawCustomRotatedVector_caseEuler");
+ }
+
+ DrawSpecificationOf_customVector3_1("Rotate custom vector", true, sP_drawCustomRotatedVector, false, false, true, false);
+
+ if (displayIsQuaternion)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineWidth"), new GUIContent("Lines width"));
+ }
+
+ if (displayIsEuler)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("alpha_ofUnrotatedGimbalAxes"), new GUIContent("Alpha (unrotated axes)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("gimbalSize"), new GUIContent("Gimbal size", "This doesn't affect the display of the rotated vectors but only scales the size of the three main axes."));
+ }
+
+ Draw_DrawPosition3DOffset();
+ DrawTextInputInclMarkupHelper();
+ DrawCheckboxFor_drawOnlyIfSelected("rotation");
+ DrawCheckboxFor_hiddenByNearerObjects("rotation");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/RotationVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/RotationVisualizerInspector.cs.meta
new file mode 100644
index 0000000..eacf0a7
--- /dev/null
+++ b/Editor/DrawDebugLibrary/RotationVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0cf22c7aae289b147b16cb3a42620cb8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/ScaleVisualizerInspector.cs b/Editor/DrawDebugLibrary/ScaleVisualizerInspector.cs
new file mode 100644
index 0000000..ae7d48b
--- /dev/null
+++ b/Editor/DrawDebugLibrary/ScaleVisualizerInspector.cs
@@ -0,0 +1,47 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(ScaleVisualizer))]
+ [CanEditMultipleObjects]
+ public class ScaleVisualizerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("scale");
+
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("scaleType"), new GUIContent("Scale Type", "This is automatically set depending on if this gameObject has a parent or not."));
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawXDim"), new GUIContent("X"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawYDim"), new GUIContent("Y"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawZDim"), new GUIContent("Z"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("relSizeOfPlanes"), new GUIContent("Planes size"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineWidth"), new GUIContent("Line width"));
+
+ GUILayout.BeginHorizontal();
+ SerializedProperty sP_force_overwriteColor = serializedObject.FindProperty("force_overwriteColor");
+ EditorGUILayout.PropertyField(sP_force_overwriteColor, new GUIContent("Force color"));
+ EditorGUI.BeginDisabledGroup(!sP_force_overwriteColor.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("overwriteColor"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ Draw_DrawPosition3DOffset();
+ DrawTextInputInclMarkupHelper();
+ DrawCheckboxFor_drawOnlyIfSelected("scale");
+ DrawCheckboxFor_hiddenByNearerObjects("scale");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/ScaleVisualizerInspector.cs.meta b/Editor/DrawDebugLibrary/ScaleVisualizerInspector.cs.meta
new file mode 100644
index 0000000..f1f3f3b
--- /dev/null
+++ b/Editor/DrawDebugLibrary/ScaleVisualizerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4e8149ace8bc0b441958d0527f31b663
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/ShapeDrawer2DInspector.cs b/Editor/DrawDebugLibrary/ShapeDrawer2DInspector.cs
new file mode 100644
index 0000000..d788e83
--- /dev/null
+++ b/Editor/DrawDebugLibrary/ShapeDrawer2DInspector.cs
@@ -0,0 +1,272 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(ShapeDrawer2D))]
+ [CanEditMultipleObjects]
+ public class ShapeDrawer2DInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("shape2D");
+
+ SerializedProperty sP_shapeType = serializedObject.FindProperty("shapeType");
+ EditorGUILayout.PropertyField(sP_shapeType, new GUIContent("Shape type"));
+
+ GUILayout.Space(0.75f * EditorGUIUtility.singleLineHeight);
+
+ SerializedProperty sP_sizeDefinition = serializedObject.FindProperty("sizeDefinition");
+ Draw_sizeInterpretationChooser(sP_sizeDefinition);
+ DrawShapeSpecificOptions(sP_shapeType, sP_sizeDefinition);
+ DrawGeneralOptions(sP_shapeType, sP_sizeDefinition);
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void Draw_sizeInterpretationChooser(SerializedProperty sP_sizeDefinition)
+ {
+ EditorGUILayout.PropertyField(sP_sizeDefinition, new GUIContent("Size definition", "Some of the following parameters that define the size of the shape can be defined relative to a context of interest." + Environment.NewLine + "The values you specify in fields below like 'Radius' or 'Lines width' will be interpreted according to the setting here."));
+
+ SerializedProperty sP_cameraForSizeDefinitionIsAvailable = serializedObject.FindProperty("cameraForSizeDefinitionIsAvailable");
+ switch ((ShapeDrawer2D.ShapeSizeDefinition)sP_sizeDefinition.enumValueIndex)
+ {
+ case ShapeDrawer2D.ShapeSizeDefinition.relativeToGlobalScaleOfTheTransformUsingTheBiggestAbsoluteComponentButIgnoringZ:
+ break;
+ case ShapeDrawer2D.ShapeSizeDefinition.absoluteUnits:
+ break;
+ case ShapeDrawer2D.ShapeSizeDefinition.relativeToTheSceneViewWindowSize:
+ if (sP_cameraForSizeDefinitionIsAvailable.boolValue == false)
+ {
+ EditorGUILayout.HelpBox("Scene View Camera Window is not available", MessageType.Warning, true);
+ }
+ break;
+ case ShapeDrawer2D.ShapeSizeDefinition.relativeToTheGameViewWindowSize:
+ if (sP_cameraForSizeDefinitionIsAvailable.boolValue == false)
+ {
+ EditorGUILayout.HelpBox("No Game View Camera found.", MessageType.Warning, true);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawShapeSpecificOptions(SerializedProperty sP_shapeType, SerializedProperty sP_sizeDefinition)
+ {
+ switch (sP_shapeType.enumValueIndex)
+ {
+ case (int)ShapeDrawer2D.ShapeType.circle:
+ Draw_sizeInterpretationDependentLine("radiusScaleFactor", "Radius", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer2D.ShapeType.ellipse:
+ Draw_sizeInterpretationDependentLine("width_scaleFactor_initialValue1", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_scaleFactor_initialValue2", "Height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer2D.ShapeType.star:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("cornerOptionsForIrregularStar"), new GUIContent("Corners"));
+ Draw_sizeInterpretationDependentLine("width_scaleFactor_initialValue1", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_scaleFactor_initialValue1", "Height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer2D.ShapeType.capsule:
+ Draw_sizeInterpretationDependentLine("width_scaleFactor_initialValue1", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_scaleFactor_initialValue2", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("capusleDirection2D"), new GUIContent("Direction"));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.icon:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("iconType"), new GUIContent("Icon type"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("showAtlasOfAllAvailableIcons"), new GUIContent("Show atlas of all available icons"));
+ Draw_sizeInterpretationDependentLine("sizeOfIconScaleFactor", "Size", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("iconIsMirroredHorizontally"), new GUIContent("Mirror horizontally"));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.triangle:
+ Draw_sizeInterpretationDependentLine("width_scaleFactor_initialValue1", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_scaleFactor_initialValue1", "Height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer2D.ShapeType.square:
+ Draw_sizeInterpretationDependentLine("width_scaleFactor_initialValue1", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_scaleFactor_initialValue1", "Height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer2D.ShapeType.pentagon:
+ Draw_sizeInterpretationDependentLine("width_scaleFactor_initialValue1", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_scaleFactor_initialValue1", "Height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer2D.ShapeType.hexagon:
+ Draw_sizeInterpretationDependentLine("width_scaleFactor_initialValue1", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_scaleFactor_initialValue1", "Height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer2D.ShapeType.septagon:
+ Draw_sizeInterpretationDependentLine("width_scaleFactor_initialValue1", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_scaleFactor_initialValue1", "Height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer2D.ShapeType.octagon:
+ Draw_sizeInterpretationDependentLine("width_scaleFactor_initialValue1", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_scaleFactor_initialValue1", "Height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer2D.ShapeType.decagon:
+ Draw_sizeInterpretationDependentLine("width_scaleFactor_initialValue1", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_scaleFactor_initialValue1", "Height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer2D.ShapeType.dot:
+ Draw_sizeInterpretationDependentLine("sizeOfIconScaleFactor", "Size", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("dotDensity"), new GUIContent("Fill density", "Raise this if you want the dot to be more opaque."));
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawGeneralOptions(SerializedProperty sP_shapeType, SerializedProperty sP_sizeDefinition)
+ {
+ bool isIcon = (sP_shapeType.enumValueIndex == (int)ShapeDrawer2D.ShapeType.icon);
+ bool isStar = (sP_shapeType.enumValueIndex == (int)ShapeDrawer2D.ShapeType.star);
+ bool isDot = (sP_shapeType.enumValueIndex == (int)ShapeDrawer2D.ShapeType.dot);
+
+ if (isDot == false)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("rotation_angleDegCC"), new GUIContent("Rotation"));
+ Draw_sizeInterpretationDependentLine("linesWidth", "Lines width", null, sP_sizeDefinition);
+ }
+
+ if ((isIcon == false) && (isDot == false))
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineStyle"), new GUIContent("Line style"));
+ Draw_sizeInterpretationDependentLine("stylePatternScaleFactor", "Line style scaling", null, sP_sizeDefinition);
+ }
+
+ bool displayFillstyleOption = ((isIcon == false) && (isStar == false) && (isDot == false));
+ if (displayFillstyleOption)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("fillStyle"), new GUIContent("Fill style"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("shapeFillDensity"), new GUIContent("Fill density"));
+ }
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color"));
+
+ Draw_DrawPosition2DOffset();
+ DrawZPosChooserFor2D();
+ DrawTextSpecs(sP_sizeDefinition, isIcon, isDot);
+ DrawCheckboxFor_drawOnlyIfSelected("shape");
+ DrawCheckboxFor_hiddenByNearerObjects("shape2D");
+ }
+
+ void DrawTextSpecs(SerializedProperty sP_sizeDefinition, bool isIcon, bool isDot)
+ {
+ //-> this fakes the appearance of beeing inside the parents text specification foldout
+ bool emptyLineAtEndIfOutfolded = false;
+ DrawTextInputInclMarkupHelper(true, false, null, emptyLineAtEndIfOutfolded);
+
+ if (serializedObject.FindProperty("textSection_isOutfolded").boolValue == true)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ if (CheckIf_shapeAttachedTextsizeReferenceContext_isUsed(sP_sizeDefinition, isIcon, isDot))
+ {
+ DrawTextSizeChooser();
+ }
+
+ if ((isIcon == false) && (isDot == false))
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textBlockAboveLine"), new GUIContent("Text block above line"));
+ }
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ bool CheckIf_shapeAttachedTextsizeReferenceContext_isUsed(SerializedProperty sP_sizeDefinition, bool isIcon, bool isDot)
+ {
+ if (CheckIf_shapeSizeDefinition_isDependentOn_screenspace(sP_sizeDefinition))
+ {
+ return false;
+ }
+ else
+ {
+ if (isIcon || isDot)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ }
+
+ void DrawTextSizeChooser()
+ {
+ EditorGUILayout.LabelField("Text Size");
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_shapeAttachedTextsizeReferenceContext = serializedObject.FindProperty("shapeAttachedTextsizeReferenceContext");
+ EditorGUILayout.PropertyField(sP_shapeAttachedTextsizeReferenceContext, new GUIContent("Relative to"));
+
+ switch (sP_shapeAttachedTextsizeReferenceContext.enumValueIndex)
+ {
+ case (int)ShapeDrawer.ShapeAttachedTextsizeReferenceContext.sizeOfShape:
+ break;
+ case (int)ShapeDrawer.ShapeAttachedTextsizeReferenceContext.globalSpace:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value"), new GUIContent("Size per letter", "Text size in world units"));
+ break;
+ case (int)ShapeDrawer.ShapeAttachedTextsizeReferenceContext.sceneViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value_relToScreen"), new GUIContent("Size per letter", "Text size relative to Scene View window size."));
+ break;
+ case (int)ShapeDrawer.ShapeAttachedTextsizeReferenceContext.gameViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value_relToScreen"), new GUIContent("Size per letter", "Text size relative to Game View window size."));
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ bool CheckIf_shapeSizeDefinition_isDependentOn_screenspace(SerializedProperty sP_sizeDefinition)
+ {
+ return ((sP_sizeDefinition.enumValueIndex == (int)ShapeDrawer2D.ShapeSizeDefinition.relativeToTheSceneViewWindowSize) || (sP_sizeDefinition.enumValueIndex == (int)ShapeDrawer2D.ShapeSizeDefinition.relativeToTheGameViewWindowSize));
+ }
+
+ void Draw_sizeInterpretationDependentLine(string fieldName_withoutRelToScreenSuffix, string displayName, string tooltip, SerializedProperty sP_sizeDefinition)
+ {
+ GUIContent guiContent;
+ string toolTipSuffix = "This is relative to the reference frame defined by 'Size definition'";
+ if (tooltip == null)
+ {
+ guiContent = new GUIContent(displayName, toolTipSuffix);
+ }
+ else
+ {
+ guiContent = new GUIContent(displayName, tooltip + Environment.NewLine + Environment.NewLine + toolTipSuffix);
+ }
+
+ switch ((ShapeDrawer.ShapeSizeDefinition)sP_sizeDefinition.enumValueIndex)
+ {
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheGlobalScaleOfTheTransformRespectivelyItsBiggestAbsoluteComponent:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + ".absolute"), guiContent);
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.absoluteUnits:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + ".absolute"), guiContent);
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheSceneViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + ".relativeToScreen"), guiContent);
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheGameViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + ".relativeToScreen"), guiContent);
+ break;
+ default:
+ break;
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/ShapeDrawer2DInspector.cs.meta b/Editor/DrawDebugLibrary/ShapeDrawer2DInspector.cs.meta
new file mode 100644
index 0000000..7d0c5d7
--- /dev/null
+++ b/Editor/DrawDebugLibrary/ShapeDrawer2DInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 09be8e1cc1fa90f4c920096395f1ef6d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/ShapeDrawerInspector.cs b/Editor/DrawDebugLibrary/ShapeDrawerInspector.cs
new file mode 100644
index 0000000..043a541
--- /dev/null
+++ b/Editor/DrawDebugLibrary/ShapeDrawerInspector.cs
@@ -0,0 +1,839 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(ShapeDrawer))]
+ [CanEditMultipleObjects]
+ public class ShapeDrawerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("shape");
+
+ SerializedProperty sP_shapeCategory = serializedObject.FindProperty("shapeCategory");
+ SerializedProperty sP_shapeType_3D = serializedObject.FindProperty("shapeType_3D");
+ SerializedProperty sP_shapeType_flat = serializedObject.FindProperty("shapeType_flat");
+ SerializedProperty sP_pyramidDefinitionVariant = serializedObject.FindProperty("pyramidDefinitionVariant");
+ SerializedProperty sP_frustumDefinitionVariant = serializedObject.FindProperty("frustumDefinitionVariant");
+
+ EditorGUILayout.PropertyField(sP_shapeCategory, new GUIContent("Shape category"));
+ DrawShapeTypeChoosers(sP_shapeCategory, sP_shapeType_3D, sP_shapeType_flat, sP_pyramidDefinitionVariant, sP_frustumDefinitionVariant);
+
+ bool isIcon = ((sP_shapeCategory.enumValueIndex == (int)ShapeDrawer.ShapeCategory.flat) && (sP_shapeType_flat.enumValueIndex == (int)ShapeDrawer.ShapeType_flat.icon));
+ bool isDot = ((sP_shapeCategory.enumValueIndex == (int)ShapeDrawer.ShapeCategory.flat) && (sP_shapeType_flat.enumValueIndex == (int)ShapeDrawer.ShapeType_flat.dot));
+ bool isPlane = ((sP_shapeCategory.enumValueIndex == (int)ShapeDrawer.ShapeCategory.flat) && (sP_shapeType_flat.enumValueIndex == (int)ShapeDrawer.ShapeType_flat.plane));
+ bool isRhombus = ((sP_shapeCategory.enumValueIndex == (int)ShapeDrawer.ShapeCategory.flat) && (sP_shapeType_flat.enumValueIndex == (int)ShapeDrawer.ShapeType_flat.rhombus));
+
+ DrawPositionDefinition(sP_shapeCategory, sP_shapeType_3D, sP_frustumDefinitionVariant);
+ DrawOrientationDefinition(sP_shapeCategory, isIcon, isDot, isPlane, isRhombus);
+
+ SerializedProperty sP_sizeDefinition = serializedObject.FindProperty("sizeDefinition");
+ Draw_sizeInterpretationChooser(sP_sizeDefinition, isRhombus);
+
+ bool displayFillstyleOption = false;
+ DrawShapeSpecificOptions(sP_shapeCategory, sP_shapeType_3D, sP_pyramidDefinitionVariant, sP_frustumDefinitionVariant, sP_shapeType_flat, ref displayFillstyleOption, sP_sizeDefinition);
+ DrawGeneralOptions(displayFillstyleOption, isIcon, isDot, isPlane, isRhombus, sP_sizeDefinition);
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawShapeTypeChoosers(SerializedProperty sP_shapeCategory, SerializedProperty sP_shapeType_3D, SerializedProperty sP_shapeType_flat, SerializedProperty sP_pyramidDefinitionVariant, SerializedProperty sP_frustumDefinitionVariant)
+ {
+ switch (sP_shapeCategory.enumValueIndex)
+ {
+ case (int)ShapeDrawer.ShapeCategory._3D:
+ EditorGUILayout.PropertyField(sP_shapeType_3D, new GUIContent("Type of 3D shape"));
+ break;
+ case (int)ShapeDrawer.ShapeCategory.flat:
+ EditorGUILayout.PropertyField(sP_shapeType_flat, new GUIContent("Type of flat shape"));
+ break;
+ default:
+ break;
+ }
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ if (sP_shapeCategory.enumValueIndex == (int)ShapeDrawer.ShapeCategory._3D)
+ {
+ if (sP_shapeType_3D.enumValueIndex == (int)ShapeDrawer.ShapeType_3D.pyramid)
+ {
+ EditorGUILayout.PropertyField(sP_pyramidDefinitionVariant, new GUIContent("Pyramid definition variant"));
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+
+ if (sP_shapeType_3D.enumValueIndex == (int)ShapeDrawer.ShapeType_3D.cone)
+ {
+ EditorGUILayout.PropertyField(sP_pyramidDefinitionVariant, new GUIContent("Cone definition variant"));
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+
+ if (sP_shapeType_3D.enumValueIndex == (int)ShapeDrawer.ShapeType_3D.frustum)
+ {
+ EditorGUILayout.PropertyField(sP_frustumDefinitionVariant, new GUIContent("Frustum definition variant"));
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ if (sP_shapeCategory.enumValueIndex == (int)ShapeDrawer.ShapeCategory.flat)
+ {
+ if (sP_shapeType_flat.enumValueIndex == (int)ShapeDrawer.ShapeType_flat.icon)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("iconType"), new GUIContent("Icon type"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("showAtlasOfAllAvailableIcons"), new GUIContent("Show atlas of all available icons"));
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ }
+
+ void DrawPositionDefinition(SerializedProperty sP_shapeCategory, SerializedProperty sP_shapeType_3D, SerializedProperty sP_frustumDefinitionVariant)
+ {
+ GUIStyle style_ofHeadline = new GUIStyle();
+ style_ofHeadline.fontStyle = FontStyle.Bold;
+ EditorGUILayout.LabelField(serializedObject.FindProperty("labelOfPosition").stringValue, style_ofHeadline);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ Draw_DrawPosition3DOffset(true, "Offset from transform position");
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ if ((sP_shapeCategory.enumValueIndex == (int)ShapeDrawer.ShapeCategory._3D) && (sP_shapeType_3D.enumValueIndex == (int)ShapeDrawer.ShapeType_3D.frustum) && (sP_frustumDefinitionVariant.enumValueIndex == (int)ShapeDrawer.FrustumDefinitionVariant.centersOfBigAndSmallClipPlanes))
+ {
+ //special case: one frustum variant uses a second position:
+ EditorGUILayout.LabelField("Position of center of small clip plane", style_ofHeadline);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("partnerGameobject"), new GUIContent("Position"));
+ EditorGUI.BeginDisabledGroup(visualizerParentMonoBehaviour_unserialized.partnerGameobject == null);
+ Draw_DrawPosition3DOffset_ofPartnerGameobject(true, "Offset from other transform position");
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ void DrawOrientationDefinition(SerializedProperty sP_shapeCategory, bool isIcon, bool isDot, bool isPlane, bool isRhombus)
+ {
+ bool customVectorPickers_useGreyedOutVectors_3and4 = false;
+ if ((sP_shapeCategory.enumValueIndex == (int)ShapeDrawer.ShapeCategory.flat) && (isRhombus == false))
+ {
+ SerializedProperty sP_force2DShapeTo_facingToSceneViewCam = serializedObject.FindProperty("force2DShapeTo_facingToSceneViewCam");
+ SerializedProperty sP_force2DShapeTo_facingToGameViewCam = serializedObject.FindProperty("force2DShapeTo_facingToGameViewCam");
+
+ bool forceToSceneViewCam_isGreyedOut = false;
+ bool forceToGameViewCam_isGreyedOut = false;
+
+ if (sP_force2DShapeTo_facingToGameViewCam.boolValue == true)
+ {
+ sP_force2DShapeTo_facingToSceneViewCam.boolValue = false;
+ forceToSceneViewCam_isGreyedOut = true;
+ }
+
+ if (sP_force2DShapeTo_facingToSceneViewCam.boolValue == true)
+ {
+ sP_force2DShapeTo_facingToGameViewCam.boolValue = false;
+ forceToGameViewCam_isGreyedOut = true;
+ }
+
+ EditorGUI.BeginDisabledGroup(forceToSceneViewCam_isGreyedOut);
+ EditorGUILayout.PropertyField(sP_force2DShapeTo_facingToSceneViewCam, new GUIContent("Force facing to Scene view camera"));
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUI.BeginDisabledGroup(forceToGameViewCam_isGreyedOut);
+ EditorGUILayout.PropertyField(sP_force2DShapeTo_facingToGameViewCam, new GUIContent("Force facing to Game view camera"));
+ EditorGUI.EndDisabledGroup();
+
+ customVectorPickers_useGreyedOutVectors_3and4 = ((sP_force2DShapeTo_facingToGameViewCam.boolValue == true) || (sP_force2DShapeTo_facingToSceneViewCam.boolValue == true));
+
+ if (sP_force2DShapeTo_facingToGameViewCam.boolValue == true)
+ {
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[2].observerCamera = DrawBasics.CameraForAutomaticOrientation.gameViewCamera;
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[3].observerCamera = DrawBasics.CameraForAutomaticOrientation.gameViewCamera;
+ }
+
+ if (sP_force2DShapeTo_facingToSceneViewCam.boolValue == true)
+ {
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[2].observerCamera = DrawBasics.CameraForAutomaticOrientation.sceneViewCamera;
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[3].observerCamera = DrawBasics.CameraForAutomaticOrientation.sceneViewCamera;
+ }
+
+ if (isPlane)
+ {
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[2].source = VisualizerParent.CustomVector3Source.observerCameraUp;
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[3].source = VisualizerParent.CustomVector3Source.observerCameraForward;
+ }
+ else
+ {
+ if (isIcon || isDot)
+ {
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[2].source = VisualizerParent.CustomVector3Source.observerCameraBack;
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[3].source = VisualizerParent.CustomVector3Source.observerCameraUp;
+ }
+ else
+ {
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[2].source = VisualizerParent.CustomVector3Source.observerCameraForward;
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[3].source = VisualizerParent.CustomVector3Source.observerCameraUp;
+ }
+ }
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+
+ if (customVectorPickers_useGreyedOutVectors_3and4)
+ {
+ string explantionText_forGreyedOut = " (forced to face camera)";
+
+ EditorGUI.BeginDisabledGroup(true);
+ if (serializedObject.FindProperty("forwardVector_hasHigherPrioThan_upVector").boolValue)
+ {
+ DrawSpecificationOf_customVector3_3(serializedObject.FindProperty("labelOfForwardVector").stringValue + explantionText_forGreyedOut, false, null, true, false, true, false);
+ if (isDot == false)
+ {
+ DrawSpecificationOf_customVector3_4(serializedObject.FindProperty("labelOfUpVector").stringValue + explantionText_forGreyedOut, false, null, true, false, true, true);
+ }
+ }
+ else
+ {
+ DrawSpecificationOf_customVector3_4(serializedObject.FindProperty("labelOfUpVector").stringValue + explantionText_forGreyedOut, false, null, true, false, true, false);
+ DrawSpecificationOf_customVector3_3(serializedObject.FindProperty("labelOfForwardVector").stringValue + explantionText_forGreyedOut, false, null, true, false, true, true);
+ }
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ bool hideEverythingThatConcernsLength_atCustomVectorPicker = isRhombus ? false : true;
+ if (serializedObject.FindProperty("forwardVector_hasHigherPrioThan_upVector").boolValue)
+ {
+ DrawSpecificationOf_customVector3_1(serializedObject.FindProperty("labelOfForwardVector").stringValue, false, null, hideEverythingThatConcernsLength_atCustomVectorPicker, false, true, false);
+ if (isDot == false)
+ {
+ DrawSpecificationOf_customVector3_2(serializedObject.FindProperty("labelOfUpVector").stringValue, false, null, hideEverythingThatConcernsLength_atCustomVectorPicker, false, true, true);
+ }
+ }
+ else
+ {
+ DrawSpecificationOf_customVector3_2(serializedObject.FindProperty("labelOfUpVector").stringValue, false, null, hideEverythingThatConcernsLength_atCustomVectorPicker, false, true, false);
+ DrawSpecificationOf_customVector3_1(serializedObject.FindProperty("labelOfForwardVector").stringValue, false, null, hideEverythingThatConcernsLength_atCustomVectorPicker, false, true, true);
+ }
+ }
+ }
+
+ void Draw_sizeInterpretationChooser(SerializedProperty sP_sizeDefinition, bool isRhombus)
+ {
+ EditorGUILayout.PropertyField(sP_sizeDefinition, new GUIContent("Size definition", "Some of the following parameters that define the size of the shape can be defined relative to a context of interest." + Environment.NewLine + "The values you specify in fields below like 'Size' or 'Lines width' will be interpreted according to the setting here."));
+
+ SerializedProperty sP_cameraForSizeDefinitionIsAvailable = serializedObject.FindProperty("cameraForSizeDefinitionIsAvailable");
+ switch ((ShapeDrawer.ShapeSizeDefinition)sP_sizeDefinition.enumValueIndex)
+ {
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheGlobalScaleOfTheTransformRespectivelyItsBiggestAbsoluteComponent:
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.absoluteUnits:
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheSceneViewWindowSize:
+ if (sP_cameraForSizeDefinitionIsAvailable.boolValue == false)
+ {
+ EditorGUILayout.HelpBox("Scene View Camera Window is not available", MessageType.Warning, true);
+ }
+ if (isRhombus) { DrawInfoBoxForRhombusInScreenspace("Scene View"); }
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheGameViewWindowSize:
+ if (sP_cameraForSizeDefinitionIsAvailable.boolValue == false)
+ {
+ EditorGUILayout.HelpBox("No Game View Camera found.", MessageType.Warning, true);
+ }
+ if (isRhombus) { DrawInfoBoxForRhombusInScreenspace("Game View"); }
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawInfoBoxForRhombusInScreenspace(string typeOfScreen)
+ {
+ EditorGUILayout.HelpBox("The size of 'Rhombus' is defined by the two edge vectors and thus is not dependent on the screen window size. Though at least 'Lines width' and 'Line style scaling' are now tied to the " + typeOfScreen + " window size.", MessageType.Info, false);
+ }
+
+ void DrawShapeSpecificOptions(SerializedProperty sP_shapeCategory, SerializedProperty sP_shapeType_3D, SerializedProperty sP_pyramidDefinitionVariant, SerializedProperty sP_frustumDefinitionVariant, SerializedProperty sP_shapeType_flat, ref bool displayFillstyleOption, SerializedProperty sP_sizeDefinition)
+ {
+
+ switch (sP_shapeCategory.enumValueIndex)
+ {
+ case (int)ShapeDrawer.ShapeCategory._3D:
+ DrawShapeSpecificOptions_for3DShapes(sP_shapeType_3D, sP_pyramidDefinitionVariant, sP_frustumDefinitionVariant, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer.ShapeCategory.flat:
+ DrawShapeSpecificOptions_forFlatShapes(sP_shapeType_flat, ref displayFillstyleOption, sP_sizeDefinition);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawShapeSpecificOptions_for3DShapes(SerializedProperty sP_shapeType_3D, SerializedProperty sP_pyramidDefinitionVariant, SerializedProperty sP_frustumDefinitionVariant, SerializedProperty sP_sizeDefinition)
+ {
+ SerializedProperty sP_coneIsFilled = serializedObject.FindProperty("coneIsFilled");
+
+ switch (sP_shapeType_3D.enumValueIndex)
+ {
+ case (int)ShapeDrawer.ShapeType_3D.cube:
+ Draw_sizeInterpretationDependentLine("scaleFactors_ofHullVolume", "Size", null, sP_sizeDefinition);
+
+ SerializedProperty sP_cubeIsFilled = serializedObject.FindProperty("cubeIsFilled");
+ EditorGUILayout.PropertyField(sP_cubeIsFilled, new GUIContent("Fill sides"));
+ if (serializedObject.FindProperty("cubeIsFilled").boolValue)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorOfSidePlanes"), new GUIContent("Color of cube sides"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("segmentsPerSide"), new GUIContent("Segments per cube side"));
+ Draw_sizeInterpretationDependentLine("linesWidthOfCubeFillLines", "Line width of side filling", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("useEdgesColorAsTextColor_ifAvailable"), new GUIContent("Text color from edges", "The text color can be chosen to be the same as the edge color or the same as side planes color."));
+ }
+ break;
+ case (int)ShapeDrawer.ShapeType_3D.sphere:
+ Draw_sizeInterpretationDependentLine("radiusScaleFactor", "Radius", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("struts"), new GUIContent("Struts"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("sphereQuality"), new GUIContent("Roundness Quality", "You can change the initial value of this for newly created components via 'DrawShapes.LinesPerSphereCircle'."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("onlyUpperHalf"), new GUIContent("Only upper half shell"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawEquator"), new GUIContent("Draw equator"));
+ break;
+ case (int)ShapeDrawer.ShapeType_3D.capsule:
+ Draw_sizeInterpretationDependentLine("radiusScaleFactor", "Radius", "In constrast to the behaviour of the size definition of CapsuleCollider all three dimensions are taken into account here, since the upward orientation can be freely chosen and doesn't have to fit a transform axis.", sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightOfCapsule3D_scaleFactor", "Height", "In constrast to the behaviour of the size definition of CapsuleCollider all three dimensions are taken into account here, since the upward orientation can be freely chosen and doesn't have to fit a transform axis.", sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("struts"), new GUIContent("Struts"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("sphereQuality"), new GUIContent("Roundness Quality", "You can change the initial value of this for newly created components via 'DrawShapes.LinesPerSphereCircle'."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("onlyUpperHalf"), new GUIContent("Only upper half shell"));
+ break;
+ case (int)ShapeDrawer.ShapeType_3D.cylinder:
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("width_ofBase_scaleFactor", "Width of base", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("length_ofBase_scaleFactor", "Length of base", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("baseShape_withInitialValueOf_circle4struts"), new GUIContent("Extruded shape"));
+ break;
+ case (int)ShapeDrawer.ShapeType_3D.extrusion:
+ Draw_sizeInterpretationDependentLine("heightToUp_scaleFactor", "Upward extrusion height", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightToDown_scaleFactor", "Downward extrusion height", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("width_ofBase_scaleFactor", "Width of extruded cross section", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("length_ofBase_scaleFactor", "Length of extruded cross section", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("baseShape_withInitialValueOf_square"), new GUIContent("Extruded shape"));
+ break;
+ case (int)ShapeDrawer.ShapeType_3D.ellipsoid:
+ SerializedProperty sP_ellipsoidIsNonUniform = serializedObject.FindProperty("ellipsoidIsNonUniform");
+ EditorGUILayout.PropertyField(sP_ellipsoidIsNonUniform, new GUIContent("Non uniform half shells"));
+ if (sP_ellipsoidIsNonUniform.boolValue)
+ {
+ Draw_sizeInterpretationDependentLine("radiusUpScaleFactor_ellipsoid", "Upward radius", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("radiusDownScaleFactor_ellipsoid", "Downward radius", null, sP_sizeDefinition);
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("onlyUpperHalf"), new GUIContent("Only upper half shell"));
+ Draw_sizeInterpretationDependentLine("radiusUpScaleFactor_ellipsoid", "Upward radius", null, sP_sizeDefinition);
+ }
+ Draw_sizeInterpretationDependentLine("width_ofBase_scaleFactor", "X - equator radius", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("length_ofBase_scaleFactor", "Z - equator radius", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("struts"), new GUIContent("Struts"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("sphereQuality"), new GUIContent("Roundness Quality", "You can change the initial value of this for newly created components via 'DrawShapes.LinesPerSphereCircle'."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawEquator"), new GUIContent("Draw equator"));
+ break;
+ case (int)ShapeDrawer.ShapeType_3D.pyramid:
+ switch (sP_pyramidDefinitionVariant.enumValueIndex)
+ {
+ case (int)ShapeDrawer.PyramidDefinitionVariant.fromCenterOfBasePlane:
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("width_ofBase_scaleFactor", "Width of base", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("length_ofBase_scaleFactor", "Length of base", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer.PyramidDefinitionVariant.fromApex:
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("angleDegVert_initialValueOf90"), new GUIContent("Angle (vertical)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("angleDegHoriz_initialValueOf90"), new GUIContent("Angle (horizontal)"));
+ break;
+ case (int)ShapeDrawer.PyramidDefinitionVariant.fromCenterOfHullVolume:
+ Draw_sizeInterpretationDependentLine("scaleFactors_ofHullVolume", "Size of hull", null, sP_sizeDefinition);
+ break;
+ default:
+ break;
+ }
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("baseShape_withInitialValueOf_square"), new GUIContent("Base shape"));
+ break;
+ case (int)ShapeDrawer.ShapeType_3D.bipyramid:
+ Draw_sizeInterpretationDependentLine("heightToUp_scaleFactor", "Height of upper pyramid", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightToDown_scaleFactor", "Height of lower pyramid", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("width_ofBase_scaleFactor", "Width of base", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("length_ofBase_scaleFactor", "Length of base", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("baseShape_withInitialValueOf_square"), new GUIContent("Base shape"));
+ break;
+ case (int)ShapeDrawer.ShapeType_3D.cone:
+ EditorGUILayout.PropertyField(sP_coneIsFilled, new GUIContent("Dense filling"));
+ if (sP_coneIsFilled.boolValue)
+ {
+ switch (sP_pyramidDefinitionVariant.enumValueIndex)
+ {
+ case (int)ShapeDrawer.PyramidDefinitionVariant.fromCenterOfBasePlane:
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("width_ofBase_scaleFactor", "Width of base circle", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("length_ofBase_scaleFactor", "Length of base circle", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer.PyramidDefinitionVariant.fromApex:
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("angleDegVert_initialValueOf90"), new GUIContent("Angle (vertical)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("angleDegHoriz_initialValueOf90"), new GUIContent("Angle (horizontal)"));
+ break;
+ case (int)ShapeDrawer.PyramidDefinitionVariant.fromCenterOfHullVolume:
+ Draw_sizeInterpretationDependentLine("scaleFactors_ofHullVolume", "Size of hull", null, sP_sizeDefinition);
+ break;
+ default:
+ break;
+ }
+ }
+ else
+ {
+ switch (sP_pyramidDefinitionVariant.enumValueIndex)
+ {
+ case (int)ShapeDrawer.PyramidDefinitionVariant.fromCenterOfBasePlane:
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("width_ofBase_scaleFactor", "Width of base circle", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("length_ofBase_scaleFactor", "Length of base circle", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer.PyramidDefinitionVariant.fromApex:
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("angleDegVert_initialValueOf90"), new GUIContent("Angle (vertical)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("angleDegHoriz_initialValueOf90"), new GUIContent("Angle (horizontal)"));
+ break;
+ case (int)ShapeDrawer.PyramidDefinitionVariant.fromCenterOfHullVolume:
+ Draw_sizeInterpretationDependentLine("scaleFactors_ofHullVolume", "Size of hull", null, sP_sizeDefinition);
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+ case (int)ShapeDrawer.ShapeType_3D.frustum:
+ switch (sP_frustumDefinitionVariant.enumValueIndex)
+ {
+ case (int)ShapeDrawer.FrustumDefinitionVariant.centerOfBigClipPlanePlusDistanceAndScaleFactorOfSmallPlane:
+ Draw_sizeInterpretationDependentLine("distanceBetweenClipPlanes_scaleFactor", "Distance between clip planes", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("scalingFactor_forSmallClipPlane"), new GUIContent("Small clip plane size (relative to big plane)"));
+ Draw_sizeInterpretationDependentLine("width_ofBigClipPlane_scaleFactor", "Big clip plane width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_ofBigClipPlane_scaleFactor", "Big clip plane height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer.FrustumDefinitionVariant.centerOfBigClipPlanePlusDistancesToSmallPlaneAndApex:
+ Draw_sizeInterpretationDependentLine("distance_bigClipPlaneToApex_scaleFactor", "Distance from big clip plane to apex", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("distanceBetweenClipPlanes_scaleFactor", "Distance between clip planes", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("width_ofBigClipPlane_scaleFactor", "Big clip plane width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_ofBigClipPlane_scaleFactor", "Big clip plane height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer.FrustumDefinitionVariant.centersOfBigAndSmallClipPlanes:
+ Draw_sizeInterpretationDependentLine("width_ofBigClipPlane_scaleFactor", "Big clip plane width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_ofBigClipPlane_scaleFactor", "Big clip plane height", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("width_ofSmallClipPlane_scaleFactor", "Small clip plane width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("height_ofSmallClipPlane_scaleFactor", "Small clip plane height", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer.FrustumDefinitionVariant.fromApex:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("angleDeg_initialValueOf60"), new GUIContent("Field of view (vertical angle)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("aspectRatio"), new GUIContent("Aspect ratio"));
+ Draw_sizeInterpretationDependentLine("distanceApexToNearPlane_scaleFactor", "Near clip planes distance from apex", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("distance_bigClipPlaneToApex_scaleFactor", "Far clip planes distance from apex", null, sP_sizeDefinition);
+ break;
+ case (int)ShapeDrawer.FrustumDefinitionVariant.fromCenterOfHullVolume:
+ Draw_sizeInterpretationDependentLine("scaleFactors_ofHullVolume", "Size of hull", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("scalingFactor_forSmallClipPlane"), new GUIContent("Small clip plane size (relative to big plane)"));
+ break;
+ default:
+ break;
+ }
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("baseShape_withInitialValueOf_square"), new GUIContent("Clip planes shape"));
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawShapeSpecificOptions_forFlatShapes(SerializedProperty sP_shapeType_flat, ref bool displayFillstyleOption, SerializedProperty sP_sizeDefinition)
+ {
+ SerializedProperty sP_flatShapeIsNonUniform = serializedObject.FindProperty("flatShapeIsNonUniform");
+ string flatShapeIsNonUniform_description = "Uneven aspect ratio";
+
+ switch (sP_shapeType_flat.enumValueIndex)
+ {
+ case (int)ShapeDrawer.ShapeType_flat.circle:
+ displayFillstyleOption = true;
+ EditorGUILayout.PropertyField(sP_flatShapeIsNonUniform, new GUIContent(flatShapeIsNonUniform_description));
+ if (sP_flatShapeIsNonUniform.boolValue)
+ {
+ Draw_sizeInterpretationDependentLine("widthScaleFactor", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("flattenRoundLines_intoShapePlane"), new GUIContent("Force round lines to flat", "This only applies if 'Lines width' is bigger than zero."));
+ }
+ else
+ {
+ Draw_sizeInterpretationDependentLine("radiusScaleFactor", "Radius", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ }
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.ellipse:
+ displayFillstyleOption = true;
+ Draw_sizeInterpretationDependentLine("radiusSideward_ofEllipse_scaleFactor", "Radius towards side", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("radiusUpward_ofEllipse_scaleFactor", "Radius towards up", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.star:
+ EditorGUILayout.PropertyField(sP_flatShapeIsNonUniform, new GUIContent(flatShapeIsNonUniform_description));
+ if (sP_flatShapeIsNonUniform.boolValue)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("cornerOptionsForIrregularStar"), new GUIContent("Corners"));
+ Draw_sizeInterpretationDependentLine("widthScaleFactor", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("flattenRoundLines_intoShapePlane"), new GUIContent("Force round lines to flat", "This only applies if 'Lines width' is bigger than zero."));
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("corners"), new GUIContent("Corners"));
+ Draw_sizeInterpretationDependentLine("outerRadiusOfStars_scaleFactor", "Outer radius", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("innerRadiusFactor"), new GUIContent("Inner radius (relative to outer radius)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ }
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.capsule:
+ displayFillstyleOption = true;
+ Draw_sizeInterpretationDependentLine("widthOfCapsule2D_scaleFactor", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightOfCapsule2D_scaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("capusleDirection2D"), new GUIContent("Direction"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.icon:
+ Draw_sizeInterpretationDependentLine("uniformSizeScaleFactor", "Size", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("iconIsMirroredHorizontally"), new GUIContent("Mirror horizontally"));
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.triangle:
+ displayFillstyleOption = true;
+ EditorGUILayout.PropertyField(sP_flatShapeIsNonUniform, new GUIContent(flatShapeIsNonUniform_description));
+ if (sP_flatShapeIsNonUniform.boolValue)
+ {
+ Draw_sizeInterpretationDependentLine("widthScaleFactor", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("flattenRoundLines_intoShapePlane"), new GUIContent("Force round lines to flat", "This only applies if 'Lines width' is bigger than zero."));
+ }
+ else
+ {
+ Draw_sizeInterpretationDependentLine("radiusScaleFactor", "Radius (of hull circle)", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ }
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.square:
+ displayFillstyleOption = true;
+ EditorGUILayout.PropertyField(sP_flatShapeIsNonUniform, new GUIContent(flatShapeIsNonUniform_description));
+ if (sP_flatShapeIsNonUniform.boolValue)
+ {
+ Draw_sizeInterpretationDependentLine("widthScaleFactor", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("flattenRoundLines_intoShapePlane"), new GUIContent("Force round lines to flat", "This only applies if 'Lines width' is bigger than zero."));
+ }
+ else
+ {
+ Draw_sizeInterpretationDependentLine("uniformSizeScaleFactor", "Size", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ }
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.pentagon:
+ displayFillstyleOption = true;
+ EditorGUILayout.PropertyField(sP_flatShapeIsNonUniform, new GUIContent(flatShapeIsNonUniform_description));
+ if (sP_flatShapeIsNonUniform.boolValue)
+ {
+ Draw_sizeInterpretationDependentLine("widthScaleFactor", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("flattenRoundLines_intoShapePlane"), new GUIContent("Force round lines to flat", "This only applies if 'Lines width' is bigger than zero."));
+ }
+ else
+ {
+ Draw_sizeInterpretationDependentLine("radiusScaleFactor", "Radius (of hull circle)", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ }
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.hexagon:
+ displayFillstyleOption = true;
+ EditorGUILayout.PropertyField(sP_flatShapeIsNonUniform, new GUIContent(flatShapeIsNonUniform_description));
+ if (sP_flatShapeIsNonUniform.boolValue)
+ {
+ Draw_sizeInterpretationDependentLine("widthScaleFactor", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("flattenRoundLines_intoShapePlane"), new GUIContent("Force round lines to flat", "This only applies if 'Lines width' is bigger than zero."));
+ }
+ else
+ {
+ Draw_sizeInterpretationDependentLine("radiusScaleFactor", "Radius (of hull circle)", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ }
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.septagon:
+ displayFillstyleOption = true;
+ EditorGUILayout.PropertyField(sP_flatShapeIsNonUniform, new GUIContent(flatShapeIsNonUniform_description));
+ if (sP_flatShapeIsNonUniform.boolValue)
+ {
+ Draw_sizeInterpretationDependentLine("widthScaleFactor", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("flattenRoundLines_intoShapePlane"), new GUIContent("Force round lines to flat", "This only applies if 'Lines width' is bigger than zero."));
+ }
+ else
+ {
+ Draw_sizeInterpretationDependentLine("radiusScaleFactor", "Radius (of hull circle)", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ }
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.octagon:
+ displayFillstyleOption = true;
+ EditorGUILayout.PropertyField(sP_flatShapeIsNonUniform, new GUIContent(flatShapeIsNonUniform_description));
+ if (sP_flatShapeIsNonUniform.boolValue)
+ {
+ Draw_sizeInterpretationDependentLine("widthScaleFactor", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("flattenRoundLines_intoShapePlane"), new GUIContent("Force round lines to flat", "This only applies if 'Lines width' is bigger than zero."));
+ }
+ else
+ {
+ Draw_sizeInterpretationDependentLine("radiusScaleFactor", "Radius (of hull circle)", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ }
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.decagon:
+ displayFillstyleOption = true;
+ EditorGUILayout.PropertyField(sP_flatShapeIsNonUniform, new GUIContent(flatShapeIsNonUniform_description));
+ if (sP_flatShapeIsNonUniform.boolValue)
+ {
+ Draw_sizeInterpretationDependentLine("widthScaleFactor", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("heightScaleFactor", "Height", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("flattenRoundLines_intoShapePlane"), new GUIContent("Force round lines to flat", "This only applies if 'Lines width' is bigger than zero."));
+ }
+ else
+ {
+ Draw_sizeInterpretationDependentLine("radiusScaleFactor", "Radius (of hull circle)", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ }
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.regularPolygon:
+ displayFillstyleOption = true;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("corners"), new GUIContent("Corners"));
+ Draw_sizeInterpretationDependentLine("radiusScaleFactor", "Radius (of hull circle)", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("filledWithSpokes"), new GUIContent("Filled with spokes"));
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.plane:
+ Draw_sizeInterpretationDependentLine("widthOfPlane_scaleFactor", "Width", null, sP_sizeDefinition);
+ Draw_sizeInterpretationDependentLine("lengthOfPlane_scaleFactor", "Length", null, sP_sizeDefinition);
+ Draw_extendPlaneToOtherGO();
+ Draw_planeStrutConfig();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("planeAnchorVisualizationSize"), new GUIContent("Size of Anchor Point Visualization"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("pointer_as_textAttachStyle_forPlanes"), new GUIContent("Text position beside plane", "This only applies if 'Drawn text tag' is filled"));
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.rhombus:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("rhombusPositionDescribesCenterNotCorner"), new GUIContent("Position defines center, not corner"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("subSegments"), new GUIContent("Sub segments"));
+ break;
+ case (int)ShapeDrawer.ShapeType_flat.dot:
+ Draw_sizeInterpretationDependentLine("uniformSizeScaleFactor", "Size", null, sP_sizeDefinition);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("dotDensity"), new GUIContent("Fill density", "Raise this if you want the dot to be more opaque."));
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawGeneralOptions(bool displayFillstyleOption, bool isIcon, bool isDot, bool isPlane, bool isRhombus, SerializedProperty sP_sizeDefinition)
+ {
+ if (isDot == false)
+ {
+ Draw_sizeInterpretationDependentLine("linesWidth", "Lines width", null, sP_sizeDefinition);
+ }
+
+ if ((isIcon == false) && (isDot == false))
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineStyle"), new GUIContent("Line style"));
+ Draw_sizeInterpretationDependentLine("stylePatternScaleFactor", "Line style scaling", null, sP_sizeDefinition);
+ }
+
+ if (displayFillstyleOption)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("fillStyle"), new GUIContent("Fill style"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("shapeFillDensity"), new GUIContent("Fill density"));
+ }
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color"));
+
+ bool shapeDisplaysText_viaPointCollection = ((isIcon == false) && (isDot == false) && (isRhombus == false) && ((isPlane == false) || (serializedObject.FindProperty("pointer_as_textAttachStyle_forPlanes").boolValue)));
+ DrawTextSpecs(sP_sizeDefinition, shapeDisplaysText_viaPointCollection);
+ DrawCheckboxFor_drawOnlyIfSelected("shape");
+ DrawCheckboxFor_hiddenByNearerObjects("shape");
+ }
+
+ void DrawTextSpecs(SerializedProperty sP_sizeDefinition, bool shapeDisplaysText_viaPointCollection)
+ {
+ //-> this fakes the appearance of beeing inside the parents text specification foldout
+ bool emptyLineAtEndIfOutfolded = false;
+ DrawTextInputInclMarkupHelper(true, false, null, emptyLineAtEndIfOutfolded);
+
+ if (serializedObject.FindProperty("textSection_isOutfolded").boolValue == true)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ if (CheckIf_shapeAttachedTextsizeReferenceContext_isUsed(sP_sizeDefinition, shapeDisplaysText_viaPointCollection))
+ {
+ DrawTextSizeChooser();
+ }
+
+ if (shapeDisplaysText_viaPointCollection)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textBlockAboveLine"), new GUIContent("Text block above line"));
+ }
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ bool CheckIf_shapeAttachedTextsizeReferenceContext_isUsed(SerializedProperty sP_sizeDefinition, bool shapeDisplaysText_viaPointCollection)
+ {
+ if (CheckIf_shapeSizeDefinition_isDependentOn_screenspace(sP_sizeDefinition))
+ {
+ return false;
+ }
+ else
+ {
+ return shapeDisplaysText_viaPointCollection;
+ }
+ }
+
+ void DrawTextSizeChooser()
+ {
+ EditorGUILayout.LabelField("Text Size");
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_shapeAttachedTextsizeReferenceContext = serializedObject.FindProperty("shapeAttachedTextsizeReferenceContext");
+ EditorGUILayout.PropertyField(sP_shapeAttachedTextsizeReferenceContext, new GUIContent("Relative to"));
+
+ switch (sP_shapeAttachedTextsizeReferenceContext.enumValueIndex)
+ {
+ case (int)ShapeDrawer.ShapeAttachedTextsizeReferenceContext.sizeOfShape:
+ break;
+ case (int)ShapeDrawer.ShapeAttachedTextsizeReferenceContext.globalSpace:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value"), new GUIContent("Size per letter", "Text size in world units"));
+ break;
+ case (int)ShapeDrawer.ShapeAttachedTextsizeReferenceContext.sceneViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value_relToScreen"), new GUIContent("Size per letter", "Text size relative to Scene View window size."));
+ break;
+ case (int)ShapeDrawer.ShapeAttachedTextsizeReferenceContext.gameViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value_relToScreen"), new GUIContent("Size per letter", "Text size relative to Game View window size."));
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ bool CheckIf_shapeSizeDefinition_isDependentOn_screenspace(SerializedProperty sP_sizeDefinition)
+ {
+ return ((sP_sizeDefinition.enumValueIndex == (int)ShapeDrawer.ShapeSizeDefinition.relativeToTheSceneViewWindowSize) || (sP_sizeDefinition.enumValueIndex == (int)ShapeDrawer.ShapeSizeDefinition.relativeToTheGameViewWindowSize));
+ }
+
+ void Draw_sizeInterpretationDependentLine(string fieldName_withoutRelToScreenSuffix, string displayName, string tooltip, SerializedProperty sP_sizeDefinition)
+ {
+ GUIContent guiContent;
+ string toolTipSuffix = "This is relative to the reference frame defined by 'Size definition'";
+ if (tooltip == null)
+ {
+ guiContent = new GUIContent(displayName, toolTipSuffix);
+ }
+ else
+ {
+ guiContent = new GUIContent(displayName, tooltip + Environment.NewLine + Environment.NewLine + toolTipSuffix);
+ }
+
+ // handle Vector3 field (scaleFactors_ofHullVolume) which still uses old _relToScreen convention
+ if (fieldName_withoutRelToScreenSuffix == "scaleFactors_ofHullVolume")
+ {
+ switch ((ShapeDrawer.ShapeSizeDefinition)sP_sizeDefinition.enumValueIndex)
+ {
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheGlobalScaleOfTheTransformRespectivelyItsBiggestAbsoluteComponent:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix), guiContent);
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.absoluteUnits:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix), guiContent);
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheSceneViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + "_relToScreen"), guiContent);
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheGameViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + "_relToScreen"), guiContent);
+ break;
+ default:
+ break;
+ }
+ return;
+ }
+
+ switch ((ShapeDrawer.ShapeSizeDefinition)sP_sizeDefinition.enumValueIndex)
+ {
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheGlobalScaleOfTheTransformRespectivelyItsBiggestAbsoluteComponent:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + ".absolute"), guiContent);
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.absoluteUnits:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + ".absolute"), guiContent);
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheSceneViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + ".relativeToScreen"), guiContent);
+ break;
+ case ShapeDrawer.ShapeSizeDefinition.relativeToTheGameViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + ".relativeToScreen"), guiContent);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void Draw_extendPlaneToOtherGO()
+ {
+ SerializedProperty sP_extendPlaneToOtherGO = serializedObject.FindProperty("extendPlaneToOtherGO");
+ EditorGUILayout.PropertyField(sP_extendPlaneToOtherGO, new GUIContent("Extend Plane to other Gameobject", "This will extend the drawn plane so it incorporates the position of an other Gameobject, respectively the perpendicular plump position on the plane of this other Gameobject."));
+ bool gameobjectIsAssigned = (sP_extendPlaneToOtherGO.objectReferenceValue != null);
+
+ EditorGUI.BeginDisabledGroup(gameobjectIsAssigned == false);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ string tooltip = gameobjectIsAssigned ? null : "This is only available if the Gameobject in the preceding line is assigned.";
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawPlumbLine_fromExtentionPosition"), new GUIContent("Draw perpendicular line to other Gameobject", tooltip));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ EditorGUI.EndDisabledGroup();
+ }
+
+ void Draw_planeStrutConfig()
+ {
+ SerializedProperty sP_planeStrutDefinitionType = serializedObject.FindProperty("planeStrutDefinitionType");
+ EditorGUILayout.PropertyField(sP_planeStrutDefinitionType, new GUIContent("Sub segments definition"));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ if (sP_planeStrutDefinitionType.enumValueIndex == (int)ShapeDrawer.PlaneStrutDefinitionType.fixedNumber)
+ {
+ SerializedProperty sP_subSegments = serializedObject.FindProperty("subSegments");
+ EditorGUILayout.PropertyField(sP_subSegments, new GUIContent("Number of Sub Segments"));
+ sP_subSegments.intValue = Mathf.Max(sP_subSegments.intValue, 1);
+ }
+ else
+ {
+ SerializedProperty sP_fixedPlaneStrutDistance = serializedObject.FindProperty("fixedPlaneStrutDistance");
+ EditorGUILayout.PropertyField(sP_fixedPlaneStrutDistance, new GUIContent("Distance of Sub Segments", "This is always in world space, so it is independent from the 'Size definition' setting above."));
+ sP_fixedPlaneStrutDistance.floatValue = Mathf.Max(sP_fixedPlaneStrutDistance.floatValue, UtilitiesDXXL_Shapes.min_fixedWorldSpaceDistanceOfStrutSegments);
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/ShapeDrawerInspector.cs.meta b/Editor/DrawDebugLibrary/ShapeDrawerInspector.cs.meta
new file mode 100644
index 0000000..2d315ea
--- /dev/null
+++ b/Editor/DrawDebugLibrary/ShapeDrawerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8130065c3bc0110449d42f3c5661dec1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/ShapeDrawerScreenspaceInspector.cs b/Editor/DrawDebugLibrary/ShapeDrawerScreenspaceInspector.cs
new file mode 100644
index 0000000..5fcab91
--- /dev/null
+++ b/Editor/DrawDebugLibrary/ShapeDrawerScreenspaceInspector.cs
@@ -0,0 +1,139 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(ShapeDrawerScreenspace))]
+ [CanEditMultipleObjects]
+ public class ShapeDrawerScreenspaceInspector : VisualizerScreenspaceParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("shape");
+ if (DrawCameraChooser(true))
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ SerializedProperty sP_shapeType = serializedObject.FindProperty("shapeType");
+ EditorGUILayout.PropertyField(sP_shapeType, new GUIContent("Shape type"));
+
+ GUILayout.Space(0.75f * EditorGUIUtility.singleLineHeight);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("positionInsideViewport0to1"), new GUIContent("Position (inside viewport)"));
+ DrawShapeSpecificOptions(sP_shapeType);
+ DrawGeneralOptions(sP_shapeType);
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawShapeSpecificOptions(SerializedProperty sP_shapeType)
+ {
+
+ switch (sP_shapeType.enumValueIndex)
+ {
+ case (int)ShapeDrawer2D.ShapeType.circle:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("radius_relToViewportHeight"), new GUIContent("Radius", tooltip_explaining_relativeToViewPortHeight));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.ellipse:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("width_relToViewportHeight_initialValue01"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("height_relToViewportHeight_initialValue02"), new GUIContent("Height", tooltip_explaining_relativeToViewPortHeight));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.star:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("cornerOptionsForIrregularStar"), new GUIContent("Corners"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("width_relToViewportHeight_initialValue01"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("height_relToViewportHeight_initialValue01"), new GUIContent("Height", tooltip_explaining_relativeToViewPortHeight));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.capsule:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("width_relToViewportHeight_initialValue01"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("height_relToViewportHeight_initialValue02"), new GUIContent("Height", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("capusleDirection2D"), new GUIContent("Direction"));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.icon:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("iconType"), new GUIContent("Icon type"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("sizeOfIcon_relToViewportHeight"), new GUIContent("Size", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("iconIsMirroredHorizontally"), new GUIContent("Mirror horizontally"));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.triangle:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("width_relToViewportHeight_initialValue01"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("height_relToViewportHeight_initialValue01"), new GUIContent("Height", tooltip_explaining_relativeToViewPortHeight));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.square:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("width_relToViewportHeight_initialValue01"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("height_relToViewportHeight_initialValue01"), new GUIContent("Height", tooltip_explaining_relativeToViewPortHeight));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.pentagon:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("width_relToViewportHeight_initialValue01"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("height_relToViewportHeight_initialValue01"), new GUIContent("Height", tooltip_explaining_relativeToViewPortHeight));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.hexagon:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("width_relToViewportHeight_initialValue01"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("height_relToViewportHeight_initialValue01"), new GUIContent("Height", tooltip_explaining_relativeToViewPortHeight));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.septagon:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("width_relToViewportHeight_initialValue01"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("height_relToViewportHeight_initialValue01"), new GUIContent("Height", tooltip_explaining_relativeToViewPortHeight));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.octagon:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("width_relToViewportHeight_initialValue01"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("height_relToViewportHeight_initialValue01"), new GUIContent("Height", tooltip_explaining_relativeToViewPortHeight));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.decagon:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("width_relToViewportHeight_initialValue01"), new GUIContent("Width", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("height_relToViewportHeight_initialValue01"), new GUIContent("Height", tooltip_explaining_relativeToViewPortHeight));
+ break;
+ case (int)ShapeDrawer2D.ShapeType.dot:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("radius_relToViewportHeight"), new GUIContent("Radius", tooltip_explaining_relativeToViewPortHeight));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("dotDensity"), new GUIContent("Fill density", "Raise this if you want the dot to be more opaque."));
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawGeneralOptions(SerializedProperty sP_shapeType)
+ {
+ bool isIcon = (sP_shapeType.enumValueIndex == (int)ShapeDrawer2D.ShapeType.icon);
+ bool isDot = (sP_shapeType.enumValueIndex == (int)ShapeDrawer2D.ShapeType.dot);
+ bool isStar = (sP_shapeType.enumValueIndex == (int)ShapeDrawer2D.ShapeType.star);
+
+ if (isDot == false)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("zRotationDegCC"), new GUIContent("Rotation"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("linesWidth_relToViewportHeight"), new GUIContent("Lines width", tooltip_explaining_relativeToViewPortHeight));
+ }
+
+ if ((isIcon == false) && (isDot == false))
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("lineStyle"), new GUIContent("Line style"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("stylePatternScaleFactor"), new GUIContent("Line style scaling"));
+ }
+
+ bool displayFillstyleOption = ((isIcon == false) && (isDot == false) && (isStar == false));
+ if (displayFillstyleOption)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("fillStyle"), new GUIContent("Fill style"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("shapeFillDensity"), new GUIContent("Fill density"));
+ }
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color"));
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawPointerIfOffscreen"), new GUIContent("Draw pointer if off screen"));
+ if ((isIcon == false) && (isDot == false))
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("addTextForOutsideDistance_toOffscreenPointer"), new GUIContent("Add text for outside screen distance", "This only applies if the shape position is outside of the viewport."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawHullEdgeLines_forScreenEncasingShapes"), new GUIContent("Draw indicator for screen encasing shapes", "This helps to identify and locate shapes that are (partly) bigger than the screen."));
+ }
+
+ DrawTextInputInclMarkupHelper();
+ DrawCheckboxFor_drawOnlyIfSelected("shape");
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/ShapeDrawerScreenspaceInspector.cs.meta b/Editor/DrawDebugLibrary/ShapeDrawerScreenspaceInspector.cs.meta
new file mode 100644
index 0000000..3ef08c0
--- /dev/null
+++ b/Editor/DrawDebugLibrary/ShapeDrawerScreenspaceInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 72934fc66d4837548937f8010c21850c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/TagDrawer2DInspector.cs b/Editor/DrawDebugLibrary/TagDrawer2DInspector.cs
new file mode 100644
index 0000000..278126c
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TagDrawer2DInspector.cs
@@ -0,0 +1,183 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(TagDrawer2D))]
+ [CanEditMultipleObjects]
+ public class TagDrawer2DInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("tag2D");
+
+ EditorGUILayout.HelpBox("If you want to tag multiple gameobjects at once or want a pointer for offscreen objects you can use the 'Tag Drawer Screenspace' component instead.", MessageType.None, true);
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ SerializedProperty sP_pointerSizeInterpretation = serializedObject.FindProperty("pointerSizeInterpretation");
+ DrawTextSpecs(sP_pointerSizeInterpretation);
+ Draw_DrawPosition2DOffset(false, "Tagged Position: Offset From Transform");
+ DrawSize_ofPointer(sP_pointerSizeInterpretation);
+ DrawCoordinatesOptions_ofPointer(sP_pointerSizeInterpretation);
+
+ SerializedProperty sP_forcePointerDirection = serializedObject.FindProperty("forcePointerDirection");
+ DrawSpecificationOf_customVector2_1("Force pointer direction", true, sP_forcePointerDirection, true, true, false, false);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("skipConeDrawing"), new GUIContent("Hide cone"));
+ Draw_sizeInterpretationDependentLine("linesWidth", "Lines width", "Lines width", null, sP_pointerSizeInterpretation);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color"));
+ DrawZPosChooserFor2D();
+ DrawCheckboxFor_drawOnlyIfSelected("tag");
+ DrawCheckboxFor_hiddenByNearerObjects("tag2D");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawTextSpecs(SerializedProperty sP_pointerSizeInterpretation)
+ {
+ //-> this fakes the appearance of beeing inside the parents text specification foldout
+ bool emptyLineAtEndIfOutfolded = false;
+ DrawTextInputInclMarkupHelper(true, false, null, emptyLineAtEndIfOutfolded);
+
+ if (serializedObject.FindProperty("textSection_isOutfolded").boolValue == true)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ DrawFixedTextSize_ofPointer(sP_pointerSizeInterpretation);
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawFixedTextSize_ofPointer(SerializedProperty sP_pointerSizeInterpretation)
+ {
+ if (CheckIf_pointerSizeInterpretaion_isDependentOn_screenspace(sP_pointerSizeInterpretation) == false)
+ {
+ EditorGUILayout.LabelField("Text Size");
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_attachedTextsizeReferenceContext = serializedObject.FindProperty("attachedTextsizeReferenceContext");
+ EditorGUILayout.PropertyField(sP_attachedTextsizeReferenceContext, new GUIContent("Relative to"));
+
+ switch (sP_attachedTextsizeReferenceContext.enumValueIndex)
+ {
+ case (int)TagDrawer.AttachedTextsizeReferenceContext.extentOfTag:
+ break;
+ case (int)TagDrawer.AttachedTextsizeReferenceContext.globalSpace:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("pointerTextSize_value"), new GUIContent("Size per letter", "Text size in world units"));
+ break;
+ case (int)TagDrawer.AttachedTextsizeReferenceContext.sceneViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("pointerTextSize_value_relToScreen"), new GUIContent("Size per letter", "Text size relative to Scene View window size."));
+ break;
+ case (int)TagDrawer.AttachedTextsizeReferenceContext.gameViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("pointerTextSize_value_relToScreen"), new GUIContent("Size per letter", "Text size relative to Game View window size."));
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawCoordinatesOptions_ofPointer(SerializedProperty sP_pointerSizeInterpretation)
+ {
+ SerializedProperty sP_drawGlobalCoordinates = serializedObject.FindProperty("drawGlobalCoordinates");
+ EditorGUILayout.PropertyField(sP_drawGlobalCoordinates, new GUIContent("Draw global coordinates"));
+
+ DrawSizeAndTextBoldness_forMarkingCross_ofPointer(sP_drawGlobalCoordinates, sP_pointerSizeInterpretation);
+ }
+
+ void DrawSizeAndTextBoldness_forMarkingCross_ofPointer(SerializedProperty sP_drawGlobalCoordinates, SerializedProperty sP_pointerSizeInterpretation)
+ {
+ bool sizeOfMarkingCross_isGreyedOut = (sP_drawGlobalCoordinates.boolValue == false);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUI.BeginDisabledGroup(sizeOfMarkingCross_isGreyedOut);
+ Draw_sizeInterpretationDependentLine("sizeOfMarkingCross", "Size of coordinates", "Size of coordinates", null, sP_pointerSizeInterpretation);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("strokeWidth_forCoordinateTexts_onPointVisualiation_in0to1"), new GUIContent("Bold Text"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawSize_ofPointer(SerializedProperty sP_pointerSizeInterpretation)
+ {
+ SerializedProperty sP_textOffsetDistance_isOutfolded = serializedObject.FindProperty("textOffsetDistance_isOutfolded");
+ sP_textOffsetDistance_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_textOffsetDistance_isOutfolded.boolValue, "Pointer Size", true);
+ if (sP_textOffsetDistance_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUILayout.PropertyField(sP_pointerSizeInterpretation, new GUIContent("Size interpretation", "The pointer size can be specified relative to a context of interest. The 'Length value' and along with it the text size will be interpreted according to the setting here."));
+
+ SerializedProperty sP_cameraForSizeDefinitionIsAvailable = serializedObject.FindProperty("cameraForSizeDefinitionIsAvailable");
+ if (sP_cameraForSizeDefinitionIsAvailable.boolValue == false)
+ {
+ if (sP_pointerSizeInterpretation.enumValueIndex == (int)TagDrawer.PointerSizeInterpretation.relativeToTheSceneViewWindowSize)
+ {
+ EditorGUILayout.HelpBox("Scene View Camera Window is not available", MessageType.Warning, true);
+ }
+
+ if (sP_pointerSizeInterpretation.enumValueIndex == (int)TagDrawer.PointerSizeInterpretation.relativeToTheGameViewWindowSize)
+ {
+ EditorGUILayout.HelpBox("No Game View Camera found.", MessageType.Warning, true);
+ }
+ }
+
+ Draw_sizeInterpretationDependentLine("textOffsetDistance", "Length", "Length / Text size", null, sP_pointerSizeInterpretation);
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ bool CheckIf_pointerSizeInterpretaion_isDependentOn_screenspace(SerializedProperty sP_pointerSizeInterpretation)
+ {
+ return ((sP_pointerSizeInterpretation.enumValueIndex == (int)TagDrawer.PointerSizeInterpretation.relativeToTheSceneViewWindowSize) || (sP_pointerSizeInterpretation.enumValueIndex == (int)TagDrawer.PointerSizeInterpretation.relativeToTheGameViewWindowSize));
+ }
+
+ void Draw_sizeInterpretationDependentLine(string fieldName_withoutRelToScreenSuffix, string displayName, string displayName_ifRelToScreenSize, string tooltip, SerializedProperty sP_pointerSizeInterpretation)
+ {
+ GUIContent guiContent;
+ string toolTipSuffix = "This is relative to the reference frame defined by 'Size interpretation'";
+ string used_displayName = CheckIf_pointerSizeInterpretaion_isDependentOn_screenspace(sP_pointerSizeInterpretation) ? displayName_ifRelToScreenSize : displayName;
+ if (tooltip == null)
+ {
+ guiContent = new GUIContent(used_displayName, toolTipSuffix);
+ }
+ else
+ {
+ guiContent = new GUIContent(used_displayName, tooltip + Environment.NewLine + Environment.NewLine + toolTipSuffix);
+ }
+
+ switch ((TagDrawer.PointerSizeInterpretation)sP_pointerSizeInterpretation.enumValueIndex)
+ {
+ case TagDrawer.PointerSizeInterpretation.absoluteUnits:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix), guiContent);
+ break;
+ case TagDrawer.PointerSizeInterpretation.relativeToGameobjectSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix), guiContent);
+ break;
+ case TagDrawer.PointerSizeInterpretation.relativeToTheSceneViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + "_relToScreen"), guiContent);
+ break;
+ case TagDrawer.PointerSizeInterpretation.relativeToTheGameViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + "_relToScreen"), guiContent);
+ break;
+ default:
+ break;
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/TagDrawer2DInspector.cs.meta b/Editor/DrawDebugLibrary/TagDrawer2DInspector.cs.meta
new file mode 100644
index 0000000..99caa5b
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TagDrawer2DInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f555426e775029e4197ab2b1d52f58e5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/TagDrawerInspector.cs b/Editor/DrawDebugLibrary/TagDrawerInspector.cs
new file mode 100644
index 0000000..5cd78b4
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TagDrawerInspector.cs
@@ -0,0 +1,232 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(TagDrawer))]
+ [CanEditMultipleObjects]
+ public class TagDrawerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("tag");
+
+ EditorGUILayout.HelpBox("If you want to tag multiple gameobjects at once or want a pointer for offscreen objects you can use the 'Tag Drawer Screenspace' component instead.", MessageType.None, true);
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ SerializedProperty sP_tagStyle = serializedObject.FindProperty("tagStyle");
+ EditorGUILayout.PropertyField(sP_tagStyle, new GUIContent("Tag style"));
+
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+
+ string displayNameOfMainColor = null;
+ switch (sP_tagStyle.enumValueIndex)
+ {
+ case (int)TagDrawer.TagStyle.pointer:
+ DrawSpecs_forPointer();
+ displayNameOfMainColor = "Color";
+ break;
+ case (int)TagDrawer.TagStyle.boxed:
+ DrawSpecs_forBoxed();
+ displayNameOfMainColor = "Text color";
+ break;
+ default:
+ break;
+ }
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForText"), new GUIContent(displayNameOfMainColor));
+ DrawCheckboxFor_drawOnlyIfSelected("tag");
+ DrawCheckboxFor_hiddenByNearerObjects("tag");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawSpecs_forPointer()
+ {
+ SerializedProperty sP_pointerSizeInterpretation = serializedObject.FindProperty("pointerSizeInterpretation");
+
+ DrawTextSpecs(sP_pointerSizeInterpretation);
+ Draw_DrawPosition3DOffset(false, "Tagged Position: Offset From Transform");
+ DrawSize_ofPointer(sP_pointerSizeInterpretation);
+ DrawCoordinatesOptions_ofPointer(sP_pointerSizeInterpretation);
+
+ SerializedProperty sP_forcePointerDirection = serializedObject.FindProperty("forcePointerDirection");
+ DrawSpecificationOf_customVector3_1("Force pointer direction", true, sP_forcePointerDirection, true, true, false, false);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("skipConeDrawing"), new GUIContent("Hide cone"));
+ Draw_sizeInterpretationDependentLine("linesWidth", "Lines width", "Lines width", null, sP_pointerSizeInterpretation);
+ }
+
+ void DrawTextSpecs(SerializedProperty sP_pointerSizeInterpretation)
+ {
+ //-> this fakes the appearance of beeing inside the parents text specification foldout
+ bool emptyLineAtEndIfOutfolded = false;
+ DrawTextInputInclMarkupHelper(true, false, null, emptyLineAtEndIfOutfolded);
+
+ if (serializedObject.FindProperty("textSection_isOutfolded").boolValue == true)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ DrawFixedTextSize_ofPointer(sP_pointerSizeInterpretation);
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawFixedTextSize_ofPointer(SerializedProperty sP_pointerSizeInterpretation)
+ {
+ if ((sP_pointerSizeInterpretation == null) || CheckIf_pointerSizeInterpretaion_isDependentOn_screenspace(sP_pointerSizeInterpretation) == false)
+ {
+ EditorGUILayout.LabelField("Text Size");
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_attachedTextsizeReferenceContext = serializedObject.FindProperty("attachedTextsizeReferenceContext");
+ EditorGUILayout.PropertyField(sP_attachedTextsizeReferenceContext, new GUIContent("Relative to"));
+
+ switch (sP_attachedTextsizeReferenceContext.enumValueIndex)
+ {
+ case (int)TagDrawer.AttachedTextsizeReferenceContext.extentOfTag:
+ break;
+ case (int)TagDrawer.AttachedTextsizeReferenceContext.globalSpace:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value"), new GUIContent("Size per letter", "Text size in world units"));
+ break;
+ case (int)TagDrawer.AttachedTextsizeReferenceContext.sceneViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value_relToScreen"), new GUIContent("Size per letter", "Text size relative to Scene View window size."));
+ break;
+ case (int)TagDrawer.AttachedTextsizeReferenceContext.gameViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textSize_value_relToScreen"), new GUIContent("Size per letter", "Text size relative to Game View window size."));
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ void DrawCoordinatesOptions_ofPointer(SerializedProperty sP_pointerSizeInterpretation)
+ {
+ SerializedProperty sP_drawGlobalCoordinates = serializedObject.FindProperty("drawGlobalCoordinates");
+ SerializedProperty sP_drawLocalCoordinates = serializedObject.FindProperty("drawLocalCoordinates");
+ EditorGUILayout.PropertyField(sP_drawGlobalCoordinates, new GUIContent("Draw global coordinates"));
+
+ EditorGUI.BeginDisabledGroup(visualizerParentMonoBehaviour_unserialized.transform.parent == null);
+ EditorGUILayout.PropertyField(sP_drawLocalCoordinates, new GUIContent("Draw local coordinates"));
+ EditorGUI.EndDisabledGroup();
+
+ DrawSizeAndTextBoldness_ofMarkingCross_ofPointer(sP_drawGlobalCoordinates, sP_drawLocalCoordinates, sP_pointerSizeInterpretation);
+ }
+
+ void DrawSizeAndTextBoldness_ofMarkingCross_ofPointer(SerializedProperty sP_drawGlobalCoordinates, SerializedProperty sP_drawLocalCoordinates, SerializedProperty sP_pointerSizeInterpretation)
+ {
+ bool sizeOfMarkingCross_isGreyedOut = ((sP_drawGlobalCoordinates.boolValue == false) && (sP_drawLocalCoordinates.boolValue == false));
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUI.BeginDisabledGroup(sizeOfMarkingCross_isGreyedOut);
+ Draw_sizeInterpretationDependentLine("sizeOfMarkingCross", "Size of coordinates", "Size of coordinates", null, sP_pointerSizeInterpretation);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("strokeWidth_forCoordinateTexts_onPointVisualiation_in0to1"), new GUIContent("Bold Text"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawSize_ofPointer(SerializedProperty sP_pointerSizeInterpretation)
+ {
+ SerializedProperty sP_textOffsetDistance_isOutfolded = serializedObject.FindProperty("textOffsetDistance_isOutfolded");
+ sP_textOffsetDistance_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_textOffsetDistance_isOutfolded.boolValue, "Pointer Size", true);
+ if (sP_textOffsetDistance_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUILayout.PropertyField(sP_pointerSizeInterpretation, new GUIContent("Size interpretation", "The pointer size can be specified relative to a context of interest. The 'Length value' and along with it the text size will be interpreted according to the setting here."));
+
+ SerializedProperty sP_cameraForSizeDefinitionIsAvailable = serializedObject.FindProperty("cameraForSizeDefinitionIsAvailable");
+ if (sP_cameraForSizeDefinitionIsAvailable.boolValue == false)
+ {
+ if (sP_pointerSizeInterpretation.enumValueIndex == (int)TagDrawer.PointerSizeInterpretation.relativeToTheSceneViewWindowSize)
+ {
+ EditorGUILayout.HelpBox("Scene View Camera Window is not available", MessageType.Warning, true);
+ }
+
+ if (sP_pointerSizeInterpretation.enumValueIndex == (int)TagDrawer.PointerSizeInterpretation.relativeToTheGameViewWindowSize)
+ {
+ EditorGUILayout.HelpBox("No Game View Camera found.", MessageType.Warning, true);
+ }
+ }
+
+ Draw_sizeInterpretationDependentLine("textOffsetDistance", "Length", "Length / Text size", null, sP_pointerSizeInterpretation);
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ bool CheckIf_pointerSizeInterpretaion_isDependentOn_screenspace(SerializedProperty sP_pointerSizeInterpretation)
+ {
+ return ((sP_pointerSizeInterpretation.enumValueIndex == (int)TagDrawer.PointerSizeInterpretation.relativeToTheSceneViewWindowSize) || (sP_pointerSizeInterpretation.enumValueIndex == (int)TagDrawer.PointerSizeInterpretation.relativeToTheGameViewWindowSize));
+ }
+
+ void Draw_sizeInterpretationDependentLine(string fieldName_withoutRelToScreenSuffix, string displayName, string displayName_ifRelToScreenSize, string tooltip, SerializedProperty sP_pointerSizeInterpretation)
+ {
+ GUIContent guiContent;
+ string toolTipSuffix = "This is relative to the reference frame defined by 'Size interpretation'";
+ string used_displayName = CheckIf_pointerSizeInterpretaion_isDependentOn_screenspace(sP_pointerSizeInterpretation) ? displayName_ifRelToScreenSize : displayName;
+ if (tooltip == null)
+ {
+ guiContent = new GUIContent(used_displayName, toolTipSuffix);
+ }
+ else
+ {
+ guiContent = new GUIContent(used_displayName, tooltip + Environment.NewLine + Environment.NewLine + toolTipSuffix);
+ }
+
+ switch ((TagDrawer.PointerSizeInterpretation)sP_pointerSizeInterpretation.enumValueIndex)
+ {
+ case TagDrawer.PointerSizeInterpretation.absoluteUnits:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix), guiContent);
+ break;
+ case TagDrawer.PointerSizeInterpretation.relativeToGameobjectSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix), guiContent);
+ break;
+ case TagDrawer.PointerSizeInterpretation.relativeToTheSceneViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + "_relToScreen"), guiContent);
+ break;
+ case TagDrawer.PointerSizeInterpretation.relativeToTheGameViewWindowSize:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty(fieldName_withoutRelToScreenSuffix + "_relToScreen"), guiContent);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawSpecs_forBoxed()
+ {
+ DrawTextSpecs(null);
+ DrawDifferentBoxColor_ofBoxed();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("encapsulateChildren"), new GUIContent("Encapsulate children"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textBlockAboveLine"), new GUIContent("Text block above line"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("linesWidth"), new GUIContent("Lines width"));
+ }
+
+ void DrawDifferentBoxColor_ofBoxed()
+ {
+ SerializedProperty sP_differentBoxColor = serializedObject.FindProperty("differentBoxColor");
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_differentBoxColor, new GUIContent("Custom box color", "With this you can define a color for the box that differs from the text color."));
+ EditorGUI.BeginDisabledGroup(!sP_differentBoxColor.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("differentBoxColor_value"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/TagDrawerInspector.cs.meta b/Editor/DrawDebugLibrary/TagDrawerInspector.cs.meta
new file mode 100644
index 0000000..0016c45
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TagDrawerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a51a954ea1e597943843bf58a5200ceb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/TagDrawerScreenspaceInspector.cs b/Editor/DrawDebugLibrary/TagDrawerScreenspaceInspector.cs
new file mode 100644
index 0000000..9059e26
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TagDrawerScreenspaceInspector.cs
@@ -0,0 +1,153 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(TagDrawerScreenspace))]
+ [CanEditMultipleObjects]
+ public class TagDrawerScreenspaceInspector : VisualizerScreenspaceParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("tag");
+ if (DrawCameraChooser(true))
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ SerializedProperty sP_taggedPositionType = serializedObject.FindProperty("taggedPositionType");
+ EditorGUILayout.PropertyField(sP_taggedPositionType, new GUIContent("Tagged position type"));
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ string displayNameOfMainColor = null;
+ DrawIndividualSpecsForEachTaggedPositionType(sP_taggedPositionType, ref displayNameOfMainColor);
+
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("linesWidth_relToViewportHeight"), new GUIContent("Lines width", "This is relative to the viewport height."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("colorForText"), new GUIContent(displayNameOfMainColor));
+ DrawCheckboxFor_drawOnlyIfSelected("screenspace tag");
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawIndividualSpecsForEachTaggedPositionType(SerializedProperty sP_taggedPositionType, ref string displayNameOfMainColor)
+ {
+ switch (sP_taggedPositionType.enumValueIndex)
+ {
+ case (int)TagDrawerScreenspace.TaggedPositionType.positionOnViewport:
+ DrawSpecsFor_positionOnViewport(ref displayNameOfMainColor);
+ break;
+ case (int)TagDrawerScreenspace.TaggedPositionType.aGameobject:
+ DrawSpecsFor_aGameobject(ref displayNameOfMainColor);
+ break;
+ case (int)TagDrawerScreenspace.TaggedPositionType.multipleGameobjects:
+ DrawSpecsFor_multipleGameobjects(ref displayNameOfMainColor);
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DrawSpecsFor_positionOnViewport(ref string displayNameOfMainColor)
+ {
+ DrawTextInputInclMarkupHelper(true, true);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("positionInsideViewport0to1"), new GUIContent("Position (inside viewport)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textOffsetDistance_relToViewportHeight"), new GUIContent("Pointer size", "This is relative to the viewport height."));
+ Draw_pointerDirectionSpecificationType();
+ DrawForceTextSize_caseFlexiblePointerLength();
+ Draw_offScreenBehaviour_forCaseOf_positionOnViewport();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("skipConeDrawing"), new GUIContent("Hide cone", "This only applies if the position is inside of the viewport."));
+ displayNameOfMainColor = "Color";
+ }
+
+ void Draw_pointerDirectionSpecificationType()
+ {
+ SerializedProperty sP_pointerDirectionSpecificationType = serializedObject.FindProperty("pointerDirectionSpecificationType");
+ EditorGUILayout.PropertyField(sP_pointerDirectionSpecificationType, new GUIContent("Pointer direction"));
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ switch (sP_pointerDirectionSpecificationType.enumValueIndex)
+ {
+ case (int)TagDrawerScreenspace.PointerDirectionSpecificationType.fixedAngle:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("fixedPointerDiretion_angledDegCC"), new GUIContent("Angle"));
+ break;
+ case (int)TagDrawerScreenspace.PointerDirectionSpecificationType.vanishingPointPosition:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("positionInsideViewport0to1_v2"), new GUIContent("Vanishing point"));
+ break;
+ default:
+ break;
+ }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void Draw_offScreenBehaviour_forCaseOf_positionOnViewport()
+ {
+ SerializedProperty sP_drawPointerIfOffscreen = serializedObject.FindProperty("drawPointerIfOffscreen");
+ EditorGUILayout.PropertyField(sP_drawPointerIfOffscreen, new GUIContent("Draw indicator if off screen"));
+
+ EditorGUI.BeginDisabledGroup(!sP_drawPointerIfOffscreen.boolValue);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ GUIContent guiContent_for_addTextForOutsideDistance_toOffscreenPointer = new GUIContent("Add text for outside screen distance", "This only applies if the position is outside of the viewport.");
+ if (sP_drawPointerIfOffscreen.boolValue)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("addTextForOutsideDistance_toOffscreenPointer"), guiContent_for_addTextForOutsideDistance_toOffscreenPointer);
+ }
+ else
+ {
+ EditorGUILayout.Toggle(guiContent_for_addTextForOutsideDistance_toOffscreenPointer, false);
+ }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ EditorGUI.EndDisabledGroup();
+ }
+
+ void DrawSpecsFor_aGameobject(ref string displayNameOfMainColor)
+ {
+ DrawTextInputInclMarkupHelper(true, true);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("partnerGameobject"), new GUIContent("Tagged gameobject"));
+ DrawDifferentBoxColor();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("encapsulateChildren"), new GUIContent("Encapsulate children"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawPointerIfOffscreen"), new GUIContent("Draw indicator if off screen"));
+ displayNameOfMainColor = "Text color";
+ }
+
+ void DrawSpecsFor_multipleGameobjects(ref string displayNameOfMainColor)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("taggedScreenspaceObjects"), new GUIContent("Tagged gameobjects"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("encapsulateChildren"), new GUIContent("Encapsulate children"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawPointerIfOffscreen"), new GUIContent("Draw indicator if off screen"));
+ displayNameOfMainColor = "Text color";
+ }
+
+ void DrawForceTextSize_caseFlexiblePointerLength()
+ {
+ SerializedProperty sP_forceTextSize = serializedObject.FindProperty("forceTextSize");
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_forceTextSize, new GUIContent("Fixed text size", "This prevents the text size from scaling with the pointer length." + Environment.NewLine + Environment.NewLine + "The text size can still be scaled via 'Text/Style/Size scaling'."));
+ EditorGUI.BeginDisabledGroup(!sP_forceTextSize.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("forceTextSize_value"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+ }
+
+ void DrawDifferentBoxColor()
+ {
+ SerializedProperty sP_differentBoxColor = serializedObject.FindProperty("differentBoxColor");
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_differentBoxColor, new GUIContent("Custom box color", "With this you can define a color for the box that differs from the text color."));
+ EditorGUI.BeginDisabledGroup(!sP_differentBoxColor.boolValue);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("differentBoxColor_value"), GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/TagDrawerScreenspaceInspector.cs.meta b/Editor/DrawDebugLibrary/TagDrawerScreenspaceInspector.cs.meta
new file mode 100644
index 0000000..b95187e
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TagDrawerScreenspaceInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a2b1d6f41cdb0fe4481ed98905895d3e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/TextDrawer2DInspector.cs b/Editor/DrawDebugLibrary/TextDrawer2DInspector.cs
new file mode 100644
index 0000000..9c05549
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TextDrawer2DInspector.cs
@@ -0,0 +1,39 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(TextDrawer2D))]
+ [CanEditMultipleObjects]
+ public class TextDrawer2DInspector : TextDrawerInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("text");
+ DrawTextInputInclMarkupHelper(true, true, "Drawn text:");
+ DrawSpecificationOf_customVector2_1("Text direction", false, null, true, true, true, false);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color", "This can be overwritten by 'Text/Style/Colored', but then still defines the color of a frame box."));
+ SerializedProperty sP_sizeInterpretation = serializedObject.FindProperty("sizeInterpretation");
+ SerializedProperty sP_forceTextEnlargementToThisMinWidth = serializedObject.FindProperty("forceTextEnlargementToThisMinWidth");
+ SerializedProperty sP_forceRestrictTextSizeToThisMaxTextWidth = serializedObject.FindProperty("forceRestrictTextSizeToThisMaxTextWidth");
+ DrawSizeSpecs(sP_sizeInterpretation, sP_forceTextEnlargementToThisMinWidth, sP_forceRestrictTextSizeToThisMaxTextWidth, "The here used gameobject size is defined by the biggest absolute global scale dimension (excluding z) of the transform.");
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textAnchor"), new GUIContent("Text anchor"));
+ DrawFrameBoxSpecs();
+ Draw_TextBlockConstraints(sP_sizeInterpretation, sP_forceTextEnlargementToThisMinWidth, sP_forceRestrictTextSizeToThisMaxTextWidth);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("autoFlipToPreventMirrorInverted"), new GUIContent("Auto flip to prevent mirror inverted", "This flips the text horizontally so it is always non-mirrored readable in the camera specified by the settings above or else by 'DrawBasics.cameraForAutomaticOrientation'."));
+ Draw_DrawPosition2DOffset();
+ DrawZPosChooserFor2D();
+ DrawCheckboxFor_drawOnlyIfSelected("text");
+ DrawCheckboxFor_hiddenByNearerObjects("text");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/TextDrawer2DInspector.cs.meta b/Editor/DrawDebugLibrary/TextDrawer2DInspector.cs.meta
new file mode 100644
index 0000000..83d10a6
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TextDrawer2DInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1971e4e62afdc924596df57f1e5a8b5c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/TextDrawerInspector.cs b/Editor/DrawDebugLibrary/TextDrawerInspector.cs
new file mode 100644
index 0000000..8ae4f81
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TextDrawerInspector.cs
@@ -0,0 +1,301 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(TextDrawer))]
+ [CanEditMultipleObjects]
+ public class TextDrawerInspector : VisualizerParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("text");
+ DrawTextInputInclMarkupHelper(true, true, "Drawn text:");
+ SerializedProperty sP_forceTextTo_facingToSceneViewCam = serializedObject.FindProperty("forceTextTo_facingToSceneViewCam");
+ SerializedProperty sP_forceTextTo_facingToGameViewCam = serializedObject.FindProperty("forceTextTo_facingToGameViewCam");
+ DrawOrientationSpecs(sP_forceTextTo_facingToSceneViewCam, sP_forceTextTo_facingToGameViewCam);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color", "This can be overwritten by 'Text/Style/Colored', but then still defines the color of a frame box."));
+ SerializedProperty sP_sizeInterpretation = serializedObject.FindProperty("sizeInterpretation");
+ SerializedProperty sP_forceTextEnlargementToThisMinWidth = serializedObject.FindProperty("forceTextEnlargementToThisMinWidth");
+ SerializedProperty sP_forceRestrictTextSizeToThisMaxTextWidth = serializedObject.FindProperty("forceRestrictTextSizeToThisMaxTextWidth");
+ DrawSizeSpecs(sP_sizeInterpretation, sP_forceTextEnlargementToThisMinWidth, sP_forceRestrictTextSizeToThisMaxTextWidth, "The here used gameobject size is defined by the biggest absolute global scale dimension of the transform.");
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textAnchor"), new GUIContent("Text anchor"));
+ DrawFrameBoxSpecs();
+ Draw_TextBlockConstraints(sP_sizeInterpretation, sP_forceTextEnlargementToThisMinWidth, sP_forceRestrictTextSizeToThisMaxTextWidth);
+ DrawAutoFlipCheckbox(sP_forceTextTo_facingToSceneViewCam, sP_forceTextTo_facingToGameViewCam);
+ Draw_DrawPosition3DOffset();
+ DrawCheckboxFor_drawOnlyIfSelected("text");
+ DrawCheckboxFor_hiddenByNearerObjects("text");
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ void DrawOrientationSpecs(SerializedProperty sP_forceTextTo_facingToSceneViewCam, SerializedProperty sP_forceTextTo_facingToGameViewCam)
+ {
+ bool forceToSceneViewCam_isGreyedOut = false;
+ bool forceToGameViewCam_isGreyedOut = false;
+
+ if (sP_forceTextTo_facingToGameViewCam.boolValue == true)
+ {
+ sP_forceTextTo_facingToSceneViewCam.boolValue = false;
+ forceToSceneViewCam_isGreyedOut = true;
+ }
+
+ if (sP_forceTextTo_facingToSceneViewCam.boolValue == true)
+ {
+ sP_forceTextTo_facingToGameViewCam.boolValue = false;
+ forceToGameViewCam_isGreyedOut = true;
+ }
+
+ EditorGUI.BeginDisabledGroup(forceToSceneViewCam_isGreyedOut);
+ EditorGUILayout.PropertyField(sP_forceTextTo_facingToSceneViewCam, new GUIContent("Force facing to Scene view camera"));
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUI.BeginDisabledGroup(forceToGameViewCam_isGreyedOut);
+ EditorGUILayout.PropertyField(sP_forceTextTo_facingToGameViewCam, new GUIContent("Force facing to Game view camera"));
+ EditorGUI.EndDisabledGroup();
+
+ if (sP_forceTextTo_facingToGameViewCam.boolValue == true)
+ {
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[2].observerCamera = DrawBasics.CameraForAutomaticOrientation.gameViewCamera;
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[3].observerCamera = DrawBasics.CameraForAutomaticOrientation.gameViewCamera;
+ }
+
+ if (sP_forceTextTo_facingToSceneViewCam.boolValue == true)
+ {
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[2].observerCamera = DrawBasics.CameraForAutomaticOrientation.sceneViewCamera;
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[3].observerCamera = DrawBasics.CameraForAutomaticOrientation.sceneViewCamera;
+ }
+
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[2].source = VisualizerParent.CustomVector3Source.observerCameraRight;
+ visualizerParentMonoBehaviour_unserialized.customVector3Configs[3].source = VisualizerParent.CustomVector3Source.observerCameraUp;
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ bool customVectorPickers_useGreyedOutVectors_3and4 = ((sP_forceTextTo_facingToGameViewCam.boolValue == true) || (sP_forceTextTo_facingToSceneViewCam.boolValue == true));
+ if (customVectorPickers_useGreyedOutVectors_3and4)
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ DrawSpecificationOf_customVector3_3("Text direction", false, null, true, true, true, false);
+ DrawSpecificationOf_customVector3_4("Text upward direction", false, null, true, true, true, true);
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ DrawSpecificationOf_customVector3_1("Text direction", false, null, true, true, true, false);
+ DrawSpecificationOf_customVector3_2("Text upward direction", false, null, true, true, true, true);
+ }
+ }
+
+ public void DrawSizeSpecs(SerializedProperty sP_sizeInterpretation, SerializedProperty sP_forceTextEnlargementToThisMinWidth, SerializedProperty sP_forceRestrictTextSizeToThisMaxTextWidth, string tooltip_for_relToGamebobjecSizeInterpretation)
+ {
+ SerializedProperty sP_size_isOutfolded = serializedObject.FindProperty("size_isOutfolded");
+ sP_size_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_size_isOutfolded.boolValue, "Text Size", true);
+ if (sP_size_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.HelpBox("This defines the width per letter.", MessageType.None, true);
+
+ EditorGUILayout.PropertyField(sP_sizeInterpretation, new GUIContent("Relative to", "The text size can be specified relative to a context of interest. The following size value will be scaled according to this interpretation setting here."));
+
+ string name_ofSizeLine = "Size value";
+ switch (sP_sizeInterpretation.enumValueIndex)
+ {
+ case (int)TextDrawer.SizeInterpretation.globalSpace:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("size"), new GUIContent(name_ofSizeLine));
+ break;
+ case (int)TextDrawer.SizeInterpretation.sizeOfGameobject:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("size"), new GUIContent(name_ofSizeLine, tooltip_for_relToGamebobjecSizeInterpretation));
+ break;
+ case (int)TextDrawer.SizeInterpretation.sceneViewWindowWidth:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("size_relToScreen"), new GUIContent(name_ofSizeLine));
+ break;
+ case (int)TextDrawer.SizeInterpretation.gameViewWindowWidth:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("size_relToScreen"), new GUIContent(name_ofSizeLine));
+ break;
+ default:
+ break;
+ }
+
+ if (sP_forceTextEnlargementToThisMinWidth.boolValue || sP_forceRestrictTextSizeToThisMaxTextWidth.boolValue)
+ {
+ EditorGUILayout.HelpBox("This text size may get overwritten due to the activated 'Minimum/Maximum text block width'.", MessageType.None, false);
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ GUILayout.Space(0.75f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public void DrawFrameBoxSpecs()
+ {
+ SerializedProperty sP_enclosingBox_isOutfolded = serializedObject.FindProperty("enclosingBox_isOutfolded");
+ GUIContent guiContent_ofFrameBoxHeader = new GUIContent("Frame box", "If you want to have a different color for the box and the text you can use 'Text/Style/Colored' to overwrite the text color.");
+ sP_enclosingBox_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_enclosingBox_isOutfolded.boolValue, guiContent_ofFrameBoxHeader, true);
+ if (sP_enclosingBox_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_enclosingBoxLineStyle = serializedObject.FindProperty("enclosingBoxLineStyle");
+ EditorGUILayout.PropertyField(sP_enclosingBoxLineStyle, new GUIContent("Style"));
+ bool enclosingBoxIsDisabled = sP_enclosingBoxLineStyle.enumValueIndex == (int)DrawBasics.LineStyle.invisible;
+
+ EditorGUI.BeginDisabledGroup(enclosingBoxIsDisabled);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enclosingBox_lineWidth_relToTextSize"), new GUIContent("Width", "This is relative to the text size."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enclosingBox_paddingSize_relToTextSize"), new GUIContent("Padding", "This is relative to the text size."));
+ EditorGUI.EndDisabledGroup();
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ public void Draw_TextBlockConstraints(SerializedProperty sP_sizeInterpretation, SerializedProperty sP_forceTextEnlargementToThisMinWidth, SerializedProperty sP_forceRestrictTextSizeToThisMaxTextWidth)
+ {
+ SerializedProperty sP_autoLineBreakWidth_isOutfolded = serializedObject.FindProperty("autoLineBreakWidth_isOutfolded");
+ SerializedProperty sP_autoLineBreakWidth = serializedObject.FindProperty("autoLineBreakWidth");
+ SerializedProperty sP_autoLineBreakWidth_value = serializedObject.FindProperty("autoLineBreakWidth_value");
+ SerializedProperty sP_autoLineBreakWidth_value_relToScreen = serializedObject.FindProperty("autoLineBreakWidth_value_relToScreen");
+ SerializedProperty sP_autoLineBreakWidth_interpretation = serializedObject.FindProperty("autoLineBreakWidth_interpretation");
+
+ SerializedProperty sP_forceTextEnlargementToThisMinWidth_isOutfolded = serializedObject.FindProperty("forceTextEnlargementToThisMinWidth_isOutfolded");
+ SerializedProperty sP_forceTextEnlargementToThisMinWidth_value = serializedObject.FindProperty("forceTextEnlargementToThisMinWidth_value");
+ SerializedProperty sP_forceTextEnlargementToThisMinWidth_value_relToScreen = serializedObject.FindProperty("forceTextEnlargementToThisMinWidth_value_relToScreen");
+ SerializedProperty sP_forceTextEnlargementToThisMinWidth_interpretation = serializedObject.FindProperty("forceTextEnlargementToThisMinWidth_interpretation");
+
+ SerializedProperty sP_forceRestrictTextSizeToThisMaxTextWidth_isOutfolded = serializedObject.FindProperty("forceRestrictTextSizeToThisMaxTextWidth_isOutfolded");
+ SerializedProperty sP_forceRestrictTextSizeToThisMaxTextWidth_value = serializedObject.FindProperty("forceRestrictTextSizeToThisMaxTextWidth_value");
+ SerializedProperty sP_forceRestrictTextSizeToThisMaxTextWidth_value_relToScreen = serializedObject.FindProperty("forceRestrictTextSizeToThisMaxTextWidth_value_relToScreen");
+ SerializedProperty sP_forceRestrictTextSizeToThisMaxTextWidth_interpretation = serializedObject.FindProperty("forceRestrictTextSizeToThisMaxTextWidth_interpretation");
+
+ GUIContent used_GUIContent;
+ GUIContent used_GUIContentOfEnableToggle;
+
+ string helpBoxText_for_autoLineBreakWidth = "This automatically inserts line breaks into the text, so that the width of the whole text block doesn't exceed the specified width.";
+ used_GUIContent = new GUIContent("Automatic line breaks");
+ used_GUIContentOfEnableToggle = new GUIContent("Force line breaks after width span");
+ Draw_TextBlockConstraint(used_GUIContent, used_GUIContentOfEnableToggle, "Maximum line width", helpBoxText_for_autoLineBreakWidth, sP_autoLineBreakWidth_isOutfolded, sP_autoLineBreakWidth, sP_autoLineBreakWidth_value, sP_autoLineBreakWidth_value_relToScreen, sP_autoLineBreakWidth_interpretation, sP_sizeInterpretation);
+
+ string helpBoxText_for_forceTextEnlargementToThisMinWidth = "This overwrites the text size and rescales the text, so that the whole text block has at least the specified width.";
+ used_GUIContent = new GUIContent("Minimum text block width");
+ used_GUIContentOfEnableToggle = new GUIContent("Force text enlargement to reach a minimum text block width");
+ EditorGUI.BeginChangeCheck();
+ Draw_TextBlockConstraint(used_GUIContent, used_GUIContentOfEnableToggle, "Minimum text block width", helpBoxText_for_forceTextEnlargementToThisMinWidth, sP_forceTextEnlargementToThisMinWidth_isOutfolded, sP_forceTextEnlargementToThisMinWidth, sP_forceTextEnlargementToThisMinWidth_value, sP_forceTextEnlargementToThisMinWidth_value_relToScreen, sP_forceTextEnlargementToThisMinWidth_interpretation, sP_sizeInterpretation);
+ bool minWidth_changed = EditorGUI.EndChangeCheck();
+
+ string helpBoxText_for_forceRestrictTextSizeToThisMaxTextWidth = "This overwrites the text size and rescales the text, so that the whole text block is not wider then the specified width." + Environment.NewLine + "If you want restrict the text block width but keep the text size you can use 'Automatic line breaks'.";
+ used_GUIContent = new GUIContent("Maximum text block width");
+ used_GUIContentOfEnableToggle = new GUIContent("Force restrict the text block width to a maximum");
+ EditorGUI.BeginChangeCheck();
+ Draw_TextBlockConstraint(used_GUIContent, used_GUIContentOfEnableToggle, "Maximum text block width", helpBoxText_for_forceRestrictTextSizeToThisMaxTextWidth, sP_forceRestrictTextSizeToThisMaxTextWidth_isOutfolded, sP_forceRestrictTextSizeToThisMaxTextWidth, sP_forceRestrictTextSizeToThisMaxTextWidth_value, sP_forceRestrictTextSizeToThisMaxTextWidth_value_relToScreen, sP_forceRestrictTextSizeToThisMaxTextWidth_interpretation, sP_sizeInterpretation);
+ bool maxWidth_changed = EditorGUI.EndChangeCheck();
+
+ if (minWidth_changed)
+ {
+ sP_forceRestrictTextSizeToThisMaxTextWidth_value.floatValue = Mathf.Max(sP_forceTextEnlargementToThisMinWidth_value.floatValue, sP_forceRestrictTextSizeToThisMaxTextWidth_value.floatValue);
+ }
+ else
+ {
+ if (maxWidth_changed)
+ {
+ sP_forceTextEnlargementToThisMinWidth_value.floatValue = Mathf.Min(sP_forceTextEnlargementToThisMinWidth_value.floatValue, sP_forceRestrictTextSizeToThisMaxTextWidth_value.floatValue);
+ }
+ }
+ }
+
+ void Draw_TextBlockConstraint(GUIContent used_GUIContentOfHeadline, GUIContent used_GUIContentOfEnableToggle, string used_nameString_ofValue, string helpBoxText, SerializedProperty sP_isOutfoldedProperty, SerializedProperty sP_boolProperty, SerializedProperty sP_floatProperty, SerializedProperty sP_floatProperty_relToScreen, SerializedProperty sP_blockConstraintInterpretationProperty, SerializedProperty sP_sizeInterpretation)
+ {
+ sP_isOutfoldedProperty.boolValue = EditorGUILayout.Foldout(sP_isOutfoldedProperty.boolValue, used_GUIContentOfHeadline, true);
+ if (sP_isOutfoldedProperty.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUILayout.HelpBox(helpBoxText, MessageType.None, true);
+ EditorGUILayout.PropertyField(sP_boolProperty, used_GUIContentOfEnableToggle);
+ EditorGUI.BeginDisabledGroup(!sP_boolProperty.boolValue);
+
+ if (CheckIf_blockWidthConstraintValue_isDependentOn_screenWindowSize(sP_blockConstraintInterpretationProperty, sP_sizeInterpretation))
+ {
+ EditorGUILayout.PropertyField(sP_floatProperty_relToScreen, new GUIContent(used_nameString_ofValue));
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(sP_floatProperty, new GUIContent(used_nameString_ofValue));
+ }
+
+ EditorGUILayout.PropertyField(sP_blockConstraintInterpretationProperty, new GUIContent("Value interpretation", "The value can be specified relative to a context of interest." + Environment.NewLine + "The '" + used_nameString_ofValue + "' value from the previous line will be scaled according to this interpretation setting here."));
+
+ if (sP_blockConstraintInterpretationProperty.enumValueIndex == (int)TextDrawer.SizeInterpretationInclFallback.relativeToTheSameAsTextSize)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.PropertyField(sP_sizeInterpretation, new GUIContent("Text Size is relative to"));
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ EditorGUI.EndDisabledGroup();
+
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ bool CheckIf_blockWidthConstraintValue_isDependentOn_screenWindowSize(SerializedProperty sP_blockConstraintInterpretationProperty, SerializedProperty sP_sizeInterpretation)
+ {
+ switch (sP_blockConstraintInterpretationProperty.enumValueIndex)
+ {
+ case (int)TextDrawer.SizeInterpretationInclFallback.relativeToTheSameAsTextSize:
+ switch (sP_sizeInterpretation.enumValueIndex)
+ {
+ case (int)TextDrawer.SizeInterpretation.globalSpace:
+ return false;
+ case (int)TextDrawer.SizeInterpretation.sizeOfGameobject:
+ return false;
+ case (int)TextDrawer.SizeInterpretation.sceneViewWindowWidth:
+ return true;
+ case (int)TextDrawer.SizeInterpretation.gameViewWindowWidth:
+ return true;
+ default:
+ return false;
+ }
+ case (int)TextDrawer.SizeInterpretationInclFallback.absoluteUnits:
+ return false;
+ case (int)TextDrawer.SizeInterpretationInclFallback.relativeToGameobjectSize:
+ return false;
+ case (int)TextDrawer.SizeInterpretationInclFallback.relativeToTheSceneViewWindowWidth:
+ return true;
+ case (int)TextDrawer.SizeInterpretationInclFallback.relativeToTheGameViewWindowWidth:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ void DrawAutoFlipCheckbox(SerializedProperty sP_forceTextTo_facingToSceneViewCam, SerializedProperty sP_forceTextTo_facingToGameViewCam)
+ {
+ if ((sP_forceTextTo_facingToGameViewCam.boolValue == true) || (sP_forceTextTo_facingToSceneViewCam.boolValue == true))
+ {
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.Toggle(new GUIContent("Auto flip to prevent mirror inverted", "Only available if 'Force facing to a camera' is disabled."), true);
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("autoFlipToPreventMirrorInverted"), new GUIContent("Auto flip to prevent mirror inverted", "This flips the text horizontally so it is always non-mirrored readable in the camera specified by the 'Force facing to a camera' settings above or else by 'DrawBasics.cameraForAutomaticOrientation'."));
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/TextDrawerInspector.cs.meta b/Editor/DrawDebugLibrary/TextDrawerInspector.cs.meta
new file mode 100644
index 0000000..7729eaf
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TextDrawerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dfab7e1fe45865d459f908a32081404b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/TextDrawerScreenspaceInspector.cs b/Editor/DrawDebugLibrary/TextDrawerScreenspaceInspector.cs
new file mode 100644
index 0000000..5ec66d2
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TextDrawerScreenspaceInspector.cs
@@ -0,0 +1,131 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(TextDrawerScreenspace))]
+ [CanEditMultipleObjects]
+ public class TextDrawerScreenspaceInspector : VisualizerScreenspaceParentInspector
+ {
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ DrawConsumedLines("text");
+ if (DrawCameraChooser(true))
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+
+ DrawTextInputInclMarkupHelper(true, true, "Drawn text:");
+ DrawSpecificationOf_customVector2_1("Text direction", false, null, true, true, true, false);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("color"), new GUIContent("Color", "This can be overwritten by 'Text/Style/Colored', but then still defines the color of a frame box."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("size_relToViewportHeight"), new GUIContent("Size", "This is the width per letter, relative to the viewport height."));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("textAnchor"), new GUIContent("Text anchor"));
+ DrawFrameBoxSpecs();
+ Draw_ToggleableFloatSliders();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("autoLineBreakAtScreenBorder"), new GUIContent("Automatic line break at viewport border"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("autoFlipTextToPreventUpsideDown"), new GUIContent("Automatic horizontal flip to prevent upside down"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("positionInsideViewport0to1"), new GUIContent("Position (inside viewport)"));
+ DrawCheckboxFor_drawOnlyIfSelected("screenspace text");
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ public void DrawFrameBoxSpecs()
+ {
+ SerializedProperty sP_enclosingBox_isOutfolded = serializedObject.FindProperty("enclosingBox_isOutfolded");
+ GUIContent guiContent_ofFrameBoxHeader = new GUIContent("Frame box", "If you want to have a different color for the box and the text you can use 'Text/Style/Colored' to overwrite the text color.");
+ sP_enclosingBox_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_enclosingBox_isOutfolded.boolValue, guiContent_ofFrameBoxHeader, true);
+ if (sP_enclosingBox_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_enclosingBoxLineStyle = serializedObject.FindProperty("enclosingBoxLineStyle");
+ EditorGUILayout.PropertyField(sP_enclosingBoxLineStyle, new GUIContent("Style"));
+ bool enclosingBoxIsDisabled = sP_enclosingBoxLineStyle.enumValueIndex == (int)DrawBasics.LineStyle.invisible;
+
+ EditorGUI.BeginDisabledGroup(enclosingBoxIsDisabled);
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enclosingBox_lineWidth_relToTextSize"), new GUIContent("Width"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("enclosingBox_paddingSize_relToTextSize"), new GUIContent("Padding"));
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ public void Draw_ToggleableFloatSliders()
+ {
+ SerializedProperty sP_autoLineBreakWidth_relToViewportWidth_isOutfolded = serializedObject.FindProperty("autoLineBreakWidth_relToViewportWidth_isOutfolded");
+ SerializedProperty sP_autoLineBreakWidth_relToViewportWidth = serializedObject.FindProperty("autoLineBreakWidth_relToViewportWidth");
+ SerializedProperty sP_autoLineBreakWidth_relToViewportWidth_value = serializedObject.FindProperty("autoLineBreakWidth_relToViewportWidth_value");
+
+ SerializedProperty sP_forceTextEnlargementToThisMinWidth_relToViewportWidth_isOutfolded = serializedObject.FindProperty("forceTextEnlargementToThisMinWidth_relToViewportWidth_isOutfolded");
+ SerializedProperty sP_forceTextEnlargementToThisMinWidth_relToViewportWidth = serializedObject.FindProperty("forceTextEnlargementToThisMinWidth_relToViewportWidth");
+ SerializedProperty sP_forceTextEnlargementToThisMinWidth_relToViewportWidth_value = serializedObject.FindProperty("forceTextEnlargementToThisMinWidth_relToViewportWidth_value");
+
+ SerializedProperty sP_forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth_isOutfolded = serializedObject.FindProperty("forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth_isOutfolded");
+ SerializedProperty sP_forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth = serializedObject.FindProperty("forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth");
+ SerializedProperty sP_forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth_value = serializedObject.FindProperty("forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth_value");
+
+ GUIContent used_GUIContent;
+ GUIContent used_GUIContentOfEnableToggle;
+
+ string helpBoxText_for_autoLineBreakWidth = "This automatically inserts line breaks into the text, so that the width of the whole text block doesn't exceed the specified width.";
+ used_GUIContent = new GUIContent("Automatic line breaks");
+ used_GUIContentOfEnableToggle = new GUIContent("Force line breaks after width span");
+ Draw_ToggleableFloatSlider(used_GUIContent, used_GUIContentOfEnableToggle, "Maximum line width (relative to screen width)", helpBoxText_for_autoLineBreakWidth, sP_autoLineBreakWidth_relToViewportWidth_isOutfolded, sP_autoLineBreakWidth_relToViewportWidth, sP_autoLineBreakWidth_relToViewportWidth_value);
+
+ string helpBoxText_for_forceTextEnlargementToThisMinWidth = "This overwrites the text size and rescales the text, so that the whole text block has at least the specified width.";
+ used_GUIContent = new GUIContent("Minimum text block width");
+ used_GUIContentOfEnableToggle = new GUIContent("Force text enlargement to reach a minimum text block width");
+ EditorGUI.BeginChangeCheck();
+ Draw_ToggleableFloatSlider(used_GUIContent, used_GUIContentOfEnableToggle, "Minimum text block width (relative to screen width)", helpBoxText_for_forceTextEnlargementToThisMinWidth, sP_forceTextEnlargementToThisMinWidth_relToViewportWidth_isOutfolded, sP_forceTextEnlargementToThisMinWidth_relToViewportWidth, sP_forceTextEnlargementToThisMinWidth_relToViewportWidth_value);
+ bool minWidth_changed = EditorGUI.EndChangeCheck();
+
+ string helpBoxText_for_forceRestrictTextSizeToThisMaxTextWidth = "This overwrites the text size and rescales the text, so that the whole text block is not wider then the specified width." + Environment.NewLine + Environment.NewLine + "If you want restrict the text block width but keep the text size you can use 'Automatic line breaks'.";
+ used_GUIContent = new GUIContent("Maximum text block width");
+ used_GUIContentOfEnableToggle = new GUIContent("Force restrict the text block width to a maximum");
+ EditorGUI.BeginChangeCheck();
+ Draw_ToggleableFloatSlider(used_GUIContent, used_GUIContentOfEnableToggle, "Maximum text block width (relative to screen width)", helpBoxText_for_forceRestrictTextSizeToThisMaxTextWidth, sP_forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth_isOutfolded, sP_forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth, sP_forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth_value);
+ bool maxWidth_changed = EditorGUI.EndChangeCheck();
+
+ if (minWidth_changed)
+ {
+ sP_forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth_value.floatValue = Mathf.Max(sP_forceTextEnlargementToThisMinWidth_relToViewportWidth_value.floatValue, sP_forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth_value.floatValue);
+ }
+ else
+ {
+ if (maxWidth_changed)
+ {
+ sP_forceTextEnlargementToThisMinWidth_relToViewportWidth_value.floatValue = Mathf.Min(sP_forceTextEnlargementToThisMinWidth_relToViewportWidth_value.floatValue, sP_forceRestrictTextSizeToThisMaxTextWidth_relToViewportWidth_value.floatValue);
+ }
+ }
+ }
+
+ void Draw_ToggleableFloatSlider(GUIContent used_GUIContentOfHeadline, GUIContent used_GUIContentOfEnableToggle, string used_nameString_ofValue, string helpBoxText, SerializedProperty sP_isOutfoldedProperty, SerializedProperty sP_boolProperty, SerializedProperty sP_floatProperty)
+ {
+ sP_isOutfoldedProperty.boolValue = EditorGUILayout.Foldout(sP_isOutfoldedProperty.boolValue, used_GUIContentOfHeadline, true);
+ if (sP_isOutfoldedProperty.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ EditorGUILayout.HelpBox(helpBoxText, MessageType.None, true);
+ EditorGUILayout.PropertyField(sP_boolProperty, used_GUIContentOfEnableToggle);
+
+ EditorGUI.BeginDisabledGroup(!sP_boolProperty.boolValue);
+ EditorGUILayout.PropertyField(sP_floatProperty, new GUIContent(used_nameString_ofValue));
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/TextDrawerScreenspaceInspector.cs.meta b/Editor/DrawDebugLibrary/TextDrawerScreenspaceInspector.cs.meta
new file mode 100644
index 0000000..e898dce
--- /dev/null
+++ b/Editor/DrawDebugLibrary/TextDrawerScreenspaceInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 068aeed28827b954d8afd63e08369bea
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/VisualizerParentInspector.cs b/Editor/DrawDebugLibrary/VisualizerParentInspector.cs
new file mode 100644
index 0000000..b9bef2e
--- /dev/null
+++ b/Editor/DrawDebugLibrary/VisualizerParentInspector.cs
@@ -0,0 +1,1367 @@
+namespace DrawXXL
+{
+ using System;
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(VisualizerParent))]
+ public class VisualizerParentInspector : Editor
+ {
+ public VisualizerParent visualizerParentMonoBehaviour_unserialized;
+ public Transform transform_onVisualizerObject;
+
+ void OnEnable()
+ {
+ OnEnable_base();
+ }
+
+ public void OnEnable_base()
+ {
+ visualizerParentMonoBehaviour_unserialized = (VisualizerParent)target;
+ transform_onVisualizerObject = visualizerParentMonoBehaviour_unserialized.transform;
+ }
+
+ public override void OnInspectorGUI()
+ {
+ int indentLevel_before = EditorGUI.indentLevel;
+ serializedObject.Update();
+
+ EditorGUILayout.HelpBox("This is the parent script that does nothing. Don't create it manually. You can delete this component.", MessageType.Info, true);
+
+ serializedObject.ApplyModifiedProperties();
+ EditorGUI.indentLevel = indentLevel_before;
+ }
+
+ public float DrawConsumedLines(string nameOfVisualizedObject)
+ {
+ SerializedProperty sP_drawnLinesPerPass = serializedObject.FindProperty("drawnLinesPerPass");
+ GUIStyle style_ofConsumedLinesLabel = new GUIStyle();
+ style_ofConsumedLinesLabel.richText = true;
+ float allowedConsumedLines_0to1 = (float)sP_drawnLinesPerPass.intValue / (float)DrawBasics.MaxAllowedDrawnLinesPerFrame;
+ float hueValueOfColor = 0.33333f * (1.0f - allowedConsumedLines_0to1);
+ Color color_visualizingWarningForTooManyLines = SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(hueValueOfColor, 0.5f, 1.0f);
+ string coloredLineNumber = "" + sP_drawnLinesPerPass.intValue + "";
+ string tooltipForBoth = "This " + nameOfVisualizedObject + " visualization is drawn with single straight lines (like from 'Debug.DrawLine()'). If too many of these straight lines are drawn it may hit the Editor execution performance." + Environment.NewLine + Environment.NewLine + "The color of this line count becomes more red as the number reaches a critical area." + Environment.NewLine + Environment.NewLine + "(see also 'DrawXXL.DrawBasics.MaxAllowedDrawnLinesPerFrame')";
+ GUIContent drawnLinesWord = new GUIContent("Drawn lines:", tooltipForBoth);
+ GUIContent drawnLinesNumber = new GUIContent(coloredLineNumber, tooltipForBoth);
+ EditorGUILayout.LabelField(drawnLinesWord, drawnLinesNumber, style_ofConsumedLinesLabel);
+
+ // Game View 渲染模式切换开关
+ SerializedProperty sP_wireMesh = serializedObject.FindProperty("useWireMeshInLateUpdate");
+ if (sP_wireMesh != null)
+ {
+ EditorGUI.BeginChangeCheck();
+ EditorGUILayout.PropertyField(sP_wireMesh, new GUIContent("Game View visible", "启用 wireMesh 渲染使 Game 视图中可见"));
+ if (EditorGUI.EndChangeCheck())
+ {
+ serializedObject.ApplyModifiedProperties();
+ }
+ }
+
+ return allowedConsumedLines_0to1;
+ }
+
+ public void Draw_coneConfig_insideFoldout_forStraightVectors()
+ {
+ SerializedProperty sP_coneLength_forStraightVectors_isOutfolded = serializedObject.FindProperty("coneLength_forStraightVectors_isOutfolded");
+ sP_coneLength_forStraightVectors_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_coneLength_forStraightVectors_isOutfolded.boolValue, "Cone length", true);
+ if (sP_coneLength_forStraightVectors_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ Draw_coneLengthInclSpaceInterpretation_forStraightVectors();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public void Draw_coneLengthInclSpaceInterpretation_forStraightVectors()
+ {
+ SerializedProperty sP_coneLength_forStraightVectors = serializedObject.FindProperty("coneLength_forStraightVectors");
+ SerializedProperty sP_coneLength_interpretation_forStraightVectors = serializedObject.FindProperty("coneLength_interpretation_forStraightVectors");
+ EditorGUILayout.PropertyField(sP_coneLength_interpretation_forStraightVectors, new GUIContent("Length interpretation", "You can change the initial value of this via 'DrawXXL.DrawBasics.coneLength_interpretation_forStraightVectors'."));
+ switch (sP_coneLength_interpretation_forStraightVectors.enumValueIndex)
+ {
+ case (int)DrawBasics.LengthInterpretation.relativeToLineLength:
+ sP_coneLength_forStraightVectors.floatValue = Mathf.Clamp(sP_coneLength_forStraightVectors.floatValue, UtilitiesDXXL_DrawBasics.min_relConeLengthForVectors, UtilitiesDXXL_DrawBasics.max_relConeLengthForVectors);
+ sP_coneLength_forStraightVectors.floatValue = EditorGUILayout.Slider("Length value", sP_coneLength_forStraightVectors.floatValue, UtilitiesDXXL_DrawBasics.min_relConeLengthForVectors, UtilitiesDXXL_DrawBasics.max_relConeLengthForVectors);
+ break;
+ case (int)DrawBasics.LengthInterpretation.absoluteUnits:
+ EditorGUILayout.PropertyField(sP_coneLength_forStraightVectors, new GUIContent("Length value"));
+ sP_coneLength_forStraightVectors.floatValue = Mathf.Max(sP_coneLength_forStraightVectors.floatValue, 0.0f);
+ break;
+ default:
+ break;
+ }
+ }
+
+ public void Draw_coneLength_forCircledVectors()
+ {
+ SerializedProperty sP_coneLength_forCircledVectors_isOutfolded = serializedObject.FindProperty("coneLength_forCircledVectors_isOutfolded");
+ sP_coneLength_forCircledVectors_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_coneLength_forCircledVectors_isOutfolded.boolValue, "Cone length", true);
+ if (sP_coneLength_forCircledVectors_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_coneLength_forCircledVectors = serializedObject.FindProperty("coneLength_forCircledVectors");
+ SerializedProperty sP_coneLength_interpretation_forCircledVectors = serializedObject.FindProperty("coneLength_interpretation_forCircledVectors");
+ EditorGUILayout.PropertyField(sP_coneLength_interpretation_forCircledVectors, new GUIContent("Value interpretation", "You can change the initial value of this via 'DrawXXL.DrawBasics.coneLength_interpretation_forCircledVectors'."));
+ switch (sP_coneLength_interpretation_forCircledVectors.enumValueIndex)
+ {
+ case (int)DrawBasics.LengthInterpretation.relativeToLineLength:
+ sP_coneLength_forCircledVectors.floatValue = Mathf.Clamp01(sP_coneLength_forCircledVectors.floatValue);
+ sP_coneLength_forCircledVectors.floatValue = EditorGUILayout.Slider("Relative to radius", sP_coneLength_forCircledVectors.floatValue, 0.0f, 1.0f);
+ break;
+ case (int)DrawBasics.LengthInterpretation.absoluteUnits:
+ EditorGUILayout.PropertyField(sP_coneLength_forCircledVectors, new GUIContent("Absolute length"));
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public void Draw_endPlatesConfig_insideFoldout()
+ {
+ SerializedProperty sP_endPlates_size_isOutfolded = serializedObject.FindProperty("endPlates_size_isOutfolded");
+ sP_endPlates_size_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_endPlates_size_isOutfolded.boolValue, "End plates size", true);
+ if (sP_endPlates_size_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ Draw_endPlatesSizeInclSpaceInterpretation();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+
+ public void Draw_endPlatesSizeInclSpaceInterpretation()
+ {
+ SerializedProperty sP_endPlates_sizeInterpretation = serializedObject.FindProperty("endPlates_sizeInterpretation");
+ SerializedProperty sP_endPlates_size = serializedObject.FindProperty("endPlates_size");
+
+ EditorGUILayout.PropertyField(sP_endPlates_sizeInterpretation, new GUIContent("Size interpretation", "You can change the initial value of this via 'DrawXXL.DrawBasics.endPlates_sizeInterpretation'."));
+ switch (sP_endPlates_sizeInterpretation.enumValueIndex)
+ {
+ case (int)DrawBasics.LengthInterpretation.relativeToLineLength:
+ sP_endPlates_size.floatValue = Mathf.Clamp01(sP_endPlates_size.floatValue);
+ sP_endPlates_size.floatValue = EditorGUILayout.Slider("Size of End Plates", sP_endPlates_size.floatValue, 0.0f, 1.0f);
+ break;
+ case (int)DrawBasics.LengthInterpretation.absoluteUnits:
+ EditorGUILayout.PropertyField(sP_endPlates_size, new GUIContent("Size of End Plates"));
+ sP_endPlates_size.floatValue = Mathf.Max(sP_endPlates_size.floatValue, 0.0f);
+ break;
+ default:
+ break;
+ }
+ }
+
+ static string firstLine_ofTooltip_forLocal_caseFromThisTransform = "This is the local space defined by this transform.";
+ static string firstLine_ofTooltip_forLocal_caseFromOtherTransform = "This is the local space defined by the transform of the other object.";
+
+ public void Draw_DrawPosition3DOffset(bool skipEmptyLineAtEndOfExpandedBlock = false, string overwrite_foldoutLabel = null, string displayNameOf_globalOffset = null, string displayNameOf_localOffset = null, bool withoutHeadline_norIntend_norSpaceAtEnd = false)
+ {
+ string firstLine_ofTooltip_forLocal = firstLine_ofTooltip_forLocal_caseFromThisTransform;
+ SerializedProperty sP_drawPosOffset3DSection_isOutfolded = serializedObject.FindProperty("drawPosOffset3DSection_isOutfolded");
+ SerializedProperty sP_drawPosOffset3D_global = serializedObject.FindProperty("drawPosOffset3D_global");
+ SerializedProperty sP_drawPosOffset3D_local = serializedObject.FindProperty("drawPosOffset3D_local");
+ Draw_DrawPosition3DOffset(skipEmptyLineAtEndOfExpandedBlock, overwrite_foldoutLabel, firstLine_ofTooltip_forLocal, sP_drawPosOffset3DSection_isOutfolded, sP_drawPosOffset3D_global, sP_drawPosOffset3D_local, displayNameOf_globalOffset, displayNameOf_localOffset, withoutHeadline_norIntend_norSpaceAtEnd);
+ }
+
+ public void Draw_DrawPosition3DOffset_independentAlternativeValue(bool skipEmptyLineAtEndOfExpandedBlock = false, string overwrite_foldoutLabel = null, string displayNameOf_globalOffset = null, string displayNameOf_localOffset = null, bool withoutHeadline_norIntend_norSpaceAtEnd = false)
+ {
+ string firstLine_ofTooltip_forLocal = firstLine_ofTooltip_forLocal_caseFromThisTransform;
+ SerializedProperty sP_drawPosOffset3DSection_isOutfolded_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset3DSection_isOutfolded_independentAlternativeValue");
+ SerializedProperty sP_drawPosOffset3D_global_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset3D_global_independentAlternativeValue");
+ SerializedProperty sP_drawPosOffset3D_local_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset3D_local_independentAlternativeValue");
+ Draw_DrawPosition3DOffset(skipEmptyLineAtEndOfExpandedBlock, overwrite_foldoutLabel, firstLine_ofTooltip_forLocal, sP_drawPosOffset3DSection_isOutfolded_independentAlternativeValue, sP_drawPosOffset3D_global_independentAlternativeValue, sP_drawPosOffset3D_local_independentAlternativeValue, displayNameOf_globalOffset, displayNameOf_localOffset, withoutHeadline_norIntend_norSpaceAtEnd);
+ }
+
+ public void Draw_DrawPosition3DOffset_ofPartnerGameobject(bool skipEmptyLineAtEndOfExpandedBlock = false, string overwrite_foldoutLabel = null, string displayNameOf_globalOffset = null, string displayNameOf_localOffset = null, bool withoutHeadline_norIntend_norSpaceAtEnd = false)
+ {
+ string firstLine_ofTooltip_forLocal = firstLine_ofTooltip_forLocal_caseFromOtherTransform;
+ SerializedProperty sP_drawPosOffset3DSection_isOutfolded = serializedObject.FindProperty("drawPosOffset3DSection_ofPartnerGameobject_isOutfolded");
+ SerializedProperty sP_drawPosOffset3D_global = serializedObject.FindProperty("drawPosOffset3D_ofPartnerGameobject_global");
+ SerializedProperty sP_drawPosOffset3D_local = serializedObject.FindProperty("drawPosOffset3D_ofPartnerGameobject_local");
+ Draw_DrawPosition3DOffset(skipEmptyLineAtEndOfExpandedBlock, overwrite_foldoutLabel, firstLine_ofTooltip_forLocal, sP_drawPosOffset3DSection_isOutfolded, sP_drawPosOffset3D_global, sP_drawPosOffset3D_local, displayNameOf_globalOffset, displayNameOf_localOffset, withoutHeadline_norIntend_norSpaceAtEnd);
+ }
+
+ public void Draw_DrawPosition3DOffset_ofPartnerGameobject_independentAlternativeValue(bool skipEmptyLineAtEndOfExpandedBlock = false, string overwrite_foldoutLabel = null, string displayNameOf_globalOffset = null, string displayNameOf_localOffset = null, bool withoutHeadline_norIntend_norSpaceAtEnd = false)
+ {
+ string firstLine_ofTooltip_forLocal = firstLine_ofTooltip_forLocal_caseFromOtherTransform;
+ SerializedProperty sP_drawPosOffset3DSection_isOutfolded_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset3DSection_ofPartnerGameobject_isOutfolded_independentAlternativeValue");
+ SerializedProperty sP_drawPosOffset3D_global_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset3D_ofPartnerGameobject_global_independentAlternativeValue");
+ SerializedProperty sP_drawPosOffset3D_local_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset3D_ofPartnerGameobject_local_independentAlternativeValue");
+ Draw_DrawPosition3DOffset(skipEmptyLineAtEndOfExpandedBlock, overwrite_foldoutLabel, firstLine_ofTooltip_forLocal, sP_drawPosOffset3DSection_isOutfolded_independentAlternativeValue, sP_drawPosOffset3D_global_independentAlternativeValue, sP_drawPosOffset3D_local_independentAlternativeValue, displayNameOf_globalOffset, displayNameOf_localOffset, withoutHeadline_norIntend_norSpaceAtEnd);
+ }
+
+ void Draw_DrawPosition3DOffset(bool skipEmptyLineAtEndOfExpandedBlock, string overwrite_foldoutLabel, string firstLine_ofTooltip_forLocal, SerializedProperty sP_drawPosOffset3DSection_isOutfolded, SerializedProperty sP_drawPosOffset3D_global, SerializedProperty sP_drawPosOffset3D_local, string displayNameOf_globalOffset = null, string displayNameOf_localOffset = null, bool withoutHeadline_norIntend_norSpaceAtEnd = false)
+ {
+ if (withoutHeadline_norIntend_norSpaceAtEnd)
+ {
+ Draw_DrawPosition3DOffset_insideIndentedFoldout(firstLine_ofTooltip_forLocal, sP_drawPosOffset3D_global, sP_drawPosOffset3D_local, displayNameOf_globalOffset, displayNameOf_localOffset);
+ }
+ else
+ {
+ string used_foldoutLabel = (overwrite_foldoutLabel == null) ? "Draw Position Offset" : overwrite_foldoutLabel;
+ sP_drawPosOffset3DSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_drawPosOffset3DSection_isOutfolded.boolValue, used_foldoutLabel, true);
+ if (sP_drawPosOffset3DSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ Draw_DrawPosition3DOffset_insideIndentedFoldout(firstLine_ofTooltip_forLocal, sP_drawPosOffset3D_global, sP_drawPosOffset3D_local, displayNameOf_globalOffset, displayNameOf_localOffset);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ if (skipEmptyLineAtEndOfExpandedBlock == false) { GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight); }
+ }
+ }
+ }
+
+ void Draw_DrawPosition3DOffset_insideIndentedFoldout(string firstLine_ofTooltip_forLocal, SerializedProperty sP_drawPosOffset3D_global, SerializedProperty sP_drawPosOffset3D_local, string displayNameOf_globalOffset, string displayNameOf_localOffset)
+ {
+ string used_displayNameOf_globalOffset = (displayNameOf_globalOffset == null) ? "global" : displayNameOf_globalOffset;
+ string used_displayNameOf_localOffset = (displayNameOf_localOffset == null) ? "local" : displayNameOf_localOffset;
+
+ EditorGUILayout.PropertyField(sP_drawPosOffset3D_global, new GUIContent(used_displayNameOf_globalOffset));
+ EditorGUILayout.PropertyField(sP_drawPosOffset3D_local, new GUIContent(used_displayNameOf_localOffset, firstLine_ofTooltip_forLocal + Environment.NewLine + Environment.NewLine + "It may lead to wrong results if a parent has a non-uniform scale."));
+ }
+
+ public void Draw_DrawPosition2DOffset(bool skipEmptyLineAtEndOfExpandedBlock = false, string overwrite_foldoutLabel = null, string displayNameOf_globalOffset = null, string displayNameOf_localOffset = null, bool withoutHeadline_norIntend_norSpaceAtEnd = false)
+ {
+ string firstLine_ofTooltip_forLocal = firstLine_ofTooltip_forLocal_caseFromThisTransform;
+ SerializedProperty sP_drawPosOffset2DSection_isOutfolded = serializedObject.FindProperty("drawPosOffset2DSection_isOutfolded");
+ SerializedProperty sP_drawPosOffset2D_global = serializedObject.FindProperty("drawPosOffset2D_global");
+ SerializedProperty sP_drawPosOffset2D_local = serializedObject.FindProperty("drawPosOffset2D_local");
+ Transform transformThatDefinesTheLocalSpace = transform_onVisualizerObject;
+ Draw_DrawPosition2DOffset(skipEmptyLineAtEndOfExpandedBlock, overwrite_foldoutLabel, firstLine_ofTooltip_forLocal, sP_drawPosOffset2DSection_isOutfolded, sP_drawPosOffset2D_global, sP_drawPosOffset2D_local, transformThatDefinesTheLocalSpace, displayNameOf_globalOffset, displayNameOf_localOffset, withoutHeadline_norIntend_norSpaceAtEnd);
+ }
+
+ public void Draw_DrawPosition2DOffset_independentAlternativeValue(bool skipEmptyLineAtEndOfExpandedBlock = false, string overwrite_foldoutLabel = null, string displayNameOf_globalOffset = null, string displayNameOf_localOffset = null, bool withoutHeadline_norIntend_norSpaceAtEnd = false)
+ {
+ string firstLine_ofTooltip_forLocal = firstLine_ofTooltip_forLocal_caseFromThisTransform;
+ SerializedProperty sP_drawPosOffset2DSection_isOutfolded_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset2DSection_isOutfolded_independentAlternativeValue");
+ SerializedProperty sP_drawPosOffset2D_global_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset2D_global_independentAlternativeValue");
+ SerializedProperty sP_drawPosOffset2D_local_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset2D_local_independentAlternativeValue");
+ Transform transformThatDefinesTheLocalSpace = transform_onVisualizerObject;
+ Draw_DrawPosition2DOffset(skipEmptyLineAtEndOfExpandedBlock, overwrite_foldoutLabel, firstLine_ofTooltip_forLocal, sP_drawPosOffset2DSection_isOutfolded_independentAlternativeValue, sP_drawPosOffset2D_global_independentAlternativeValue, sP_drawPosOffset2D_local_independentAlternativeValue, transformThatDefinesTheLocalSpace, displayNameOf_globalOffset, displayNameOf_localOffset, withoutHeadline_norIntend_norSpaceAtEnd);
+ }
+
+ public void Draw_DrawPosition2DOffset_ofPartnerGameobject(bool skipEmptyLineAtEndOfExpandedBlock = false, string overwrite_foldoutLabel = null, string displayNameOf_globalOffset = null, string displayNameOf_localOffset = null, bool withoutHeadline_norIntend_norSpaceAtEnd = false)
+ {
+ if (visualizerParentMonoBehaviour_unserialized.partnerGameobject != null)
+ {
+ string firstLine_ofTooltip_forLocal = firstLine_ofTooltip_forLocal_caseFromOtherTransform;
+ SerializedProperty sP_drawPosOffset2DSection_isOutfolded = serializedObject.FindProperty("drawPosOffset2DSection_ofPartnerGameobject_isOutfolded");
+ SerializedProperty sP_drawPosOffset2D_global = serializedObject.FindProperty("drawPosOffset2D_ofPartnerGameobject_global");
+ SerializedProperty sP_drawPosOffset2D_local = serializedObject.FindProperty("drawPosOffset2D_ofPartnerGameobject_local");
+ Transform transformThatDefinesTheLocalSpace = visualizerParentMonoBehaviour_unserialized.partnerGameobject.transform;
+ Draw_DrawPosition2DOffset(skipEmptyLineAtEndOfExpandedBlock, overwrite_foldoutLabel, firstLine_ofTooltip_forLocal, sP_drawPosOffset2DSection_isOutfolded, sP_drawPosOffset2D_global, sP_drawPosOffset2D_local, transformThatDefinesTheLocalSpace, displayNameOf_globalOffset, displayNameOf_localOffset, withoutHeadline_norIntend_norSpaceAtEnd);
+ }
+ }
+
+ public void Draw_DrawPosition2DOffset_ofPartnerGameobject_independentAlternativeValue(bool skipEmptyLineAtEndOfExpandedBlock = false, string overwrite_foldoutLabel = null, string displayNameOf_globalOffset = null, string displayNameOf_localOffset = null, bool withoutHeadline_norIntend_norSpaceAtEnd = false)
+ {
+ if (visualizerParentMonoBehaviour_unserialized.partnerGameobject != null)
+ {
+ string firstLine_ofTooltip_forLocal = firstLine_ofTooltip_forLocal_caseFromOtherTransform;
+ SerializedProperty sP_drawPosOffset2DSection_isOutfolded_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset2DSection_ofPartnerGameobject_isOutfolded_independentAlternativeValue");
+ SerializedProperty sP_drawPosOffset2D_global_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset2D_ofPartnerGameobject_global_independentAlternativeValue");
+ SerializedProperty sP_drawPosOffset2D_local_independentAlternativeValue = serializedObject.FindProperty("drawPosOffset2D_ofPartnerGameobject_local_independentAlternativeValue");
+ Transform transformThatDefinesTheLocalSpace = visualizerParentMonoBehaviour_unserialized.partnerGameobject.transform;
+ Draw_DrawPosition2DOffset(skipEmptyLineAtEndOfExpandedBlock, overwrite_foldoutLabel, firstLine_ofTooltip_forLocal, sP_drawPosOffset2DSection_isOutfolded_independentAlternativeValue, sP_drawPosOffset2D_global_independentAlternativeValue, sP_drawPosOffset2D_local_independentAlternativeValue, transformThatDefinesTheLocalSpace, displayNameOf_globalOffset, displayNameOf_localOffset, withoutHeadline_norIntend_norSpaceAtEnd);
+ }
+ }
+
+ void Draw_DrawPosition2DOffset(bool skipEmptyLineAtEndOfExpandedBlock, string overwrite_foldoutLabel, string firstLine_ofTooltip_forLocal, SerializedProperty sP_drawPosOffset2DSection_isOutfolded, SerializedProperty sP_drawPosOffset2D_global, SerializedProperty sP_drawPosOffset2D_local, Transform transformThatDefinesTheLocalSpace, string displayNameOf_globalOffset = null, string displayNameOf_localOffset = null, bool withoutHeadline_norIntend_norSpaceAtEnd = false)
+ {
+ if (withoutHeadline_norIntend_norSpaceAtEnd)
+ {
+ Draw_DrawPosition2DOffset_insideIndentedFoldout(firstLine_ofTooltip_forLocal, sP_drawPosOffset2D_global, sP_drawPosOffset2D_local, transformThatDefinesTheLocalSpace, displayNameOf_globalOffset, displayNameOf_localOffset);
+ }
+ else
+ {
+ string used_foldoutLabel = (overwrite_foldoutLabel == null) ? "Draw Position Offset" : overwrite_foldoutLabel;
+ sP_drawPosOffset2DSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_drawPosOffset2DSection_isOutfolded.boolValue, used_foldoutLabel, true);
+ if (sP_drawPosOffset2DSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ Draw_DrawPosition2DOffset_insideIndentedFoldout(firstLine_ofTooltip_forLocal, sP_drawPosOffset2D_global, sP_drawPosOffset2D_local, transformThatDefinesTheLocalSpace, displayNameOf_globalOffset, displayNameOf_localOffset);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ if (skipEmptyLineAtEndOfExpandedBlock == false) { GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight); }
+ }
+ }
+ }
+
+ void Draw_DrawPosition2DOffset_insideIndentedFoldout(string firstLine_ofTooltip_forLocal, SerializedProperty sP_drawPosOffset2D_global, SerializedProperty sP_drawPosOffset2D_local, Transform transformThatDefinesTheLocalSpace, string displayNameOf_globalOffset, string displayNameOf_localOffset)
+ {
+ string used_displayNameOf_globalOffset = (displayNameOf_globalOffset == null) ? "global" : displayNameOf_globalOffset;
+ string used_displayNameOf_localOffset = (displayNameOf_localOffset == null) ? "local" : displayNameOf_localOffset;
+
+ EditorGUILayout.PropertyField(sP_drawPosOffset2D_global, new GUIContent(used_displayNameOf_globalOffset));
+ EditorGUILayout.PropertyField(sP_drawPosOffset2D_local, new GUIContent(used_displayNameOf_localOffset, firstLine_ofTooltip_forLocal + Environment.NewLine + Environment.NewLine + "This may lead to wrong results if a parent has a non-uniform scale."));
+
+ if (UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale_2D(transformThatDefinesTheLocalSpace.parent))
+ {
+ EditorGUILayout.HelpBox("A parent transform has a non-uniform scale. This may lead to wrong or weird results.", MessageType.Warning, true);
+ }
+
+ if (UtilitiesDXXL_EngineBasics.CheckIfThisOrAParentHasANonZRotation_2D(transformThatDefinesTheLocalSpace))
+ {
+ EditorGUILayout.HelpBox("The transform or a parent has a non-z rotation. This may lead to wrong or weird results in 2D mode.", MessageType.Warning, true);
+ }
+ }
+
+ public void DrawZPosChooserFor2D(bool skipEmptyLineAtEndOfExpandedBlock = false)
+ {
+ SerializedProperty sP_customZPos_for2D_isOutfolded = serializedObject.FindProperty("customZPos_for2D_isOutfolded");
+ sP_customZPos_for2D_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_customZPos_for2D_isOutfolded.boolValue, "Z position", true);
+ if (sP_customZPos_for2D_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ SerializedProperty sP_zPosSource = serializedObject.FindProperty("zPosSource");
+ EditorGUILayout.PropertyField(sP_zPosSource, new GUIContent("Source of Z Position", "'Default' refers to the setting of 'DrawXXL.DrawBasics2D.Default_zPos_forDrawing'"));
+ switch (sP_zPosSource.enumValueIndex)
+ {
+ case (int)VisualizerParent.ZPosSource.transformPositionPlusOffset:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("customZPos_offsetValue"), new GUIContent("Offset from this transform", "In global units."));
+ break;
+ case (int)VisualizerParent.ZPosSource.setAbsolute:
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("customZPos_absValue"), new GUIContent("Absolute z position", "In global units."));
+ break;
+ case (int)VisualizerParent.ZPosSource.defaultDrawZPosFromGlobalDrawXxlSettings:
+ EditorGUI.BeginDisabledGroup(true);
+ EditorGUILayout.FloatField(new GUIContent("Global default z position", "According to 'DrawBasics2D.Default_zPos_forDrawing'."), DrawBasics2D.Default_zPos_forDrawing);
+ EditorGUI.EndDisabledGroup();
+ break;
+ default:
+ break;
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+
+ if (skipEmptyLineAtEndOfExpandedBlock == false) { GUILayout.Space(0.5f * EditorGUIUtility.singleLineHeight); }
+ }
+ }
+
+ public void DrawCheckboxFor_drawOnlyIfSelected(string nameOfVisualizedObject)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("drawOnlyIfSelected"), new GUIContent("Draw only if selected", "When this is enabled then the " + nameOfVisualizedObject + " will only be drawn if this gameobject is selected in the editor." + Environment.NewLine + Environment.NewLine + "You can set the initial value of this for newly created components via 'DrawXXL.DrawBasics.initial_drawOnlyIfSelected_forComponents'."));
+ }
+
+ public void DrawCheckboxFor_hiddenByNearerObjects(string nameOfVisualizedObject)
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("hiddenByNearerObjects"), new GUIContent("Hidden by nearer objects", "This is the same as the 'depthTest' parameter from 'Debug.DrawLine()'. It defines how much the drawn " + nameOfVisualizedObject + " shines through other objects that hide it." + Environment.NewLine + Environment.NewLine + "It has only effect in playmode."));
+ }
+
+ public void DrawSpecificationOf_customVector3_1(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isChecked, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed, bool skipHeadline = false, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition = true)
+ {
+ SerializedProperty sP_source_ofCustomVector3_1 = serializedObject.FindProperty("customVector3Configs.Array.data[0].source");
+ SerializedProperty sP_customVector3_1_clipboardForManualInput = serializedObject.FindProperty("customVector3Configs.Array.data[0].clipboardForManualInput");
+ SerializedProperty sP_customVector3_1_targetGameObject = serializedObject.FindProperty("customVector3Configs.Array.data[0].targetGameObject");
+ SerializedProperty sP_customVector3_1_hasForcedAbsLength = serializedObject.FindProperty("customVector3Configs.Array.data[0].hasForcedAbsLength");
+ SerializedProperty sP_customVector3_1_picker_isOutfolded = serializedObject.FindProperty("customVector3Configs.Array.data[0].picker_isOutfolded");
+ SerializedProperty sP_forcedAbsLength_ofCustomVector3_1 = serializedObject.FindProperty("customVector3Configs.Array.data[0].forcedAbsLength");
+ SerializedProperty sP_lengthRelScaleFactor_ofCustomVector3_1 = serializedObject.FindProperty("customVector3Configs.Array.data[0].lengthRelScaleFactor");
+ SerializedProperty sP_vectorInterpretation_ofCustomVector3_1 = serializedObject.FindProperty("customVector3Configs.Array.data[0].vectorInterpretation");
+ SerializedProperty sP_observerCamera_ofCustomVector3_1 = serializedObject.FindProperty("customVector3Configs.Array.data[0].observerCamera");
+
+ DrawSpecificationOf_aCustomVector3(foldoutRespCheckboxName, asCheckbox_insteadOfAsFoldout, sP_customVector3_1_picker_isOutfolded, sP_customVectorPicker_isChecked, sP_source_ofCustomVector3_1, sP_customVector3_1_clipboardForManualInput, sP_customVector3_1_targetGameObject, sP_customVector3_1_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector3_1, sP_lengthRelScaleFactor_ofCustomVector3_1, sP_vectorInterpretation_ofCustomVector3_1, sP_observerCamera_ofCustomVector3_1, visualizerParentMonoBehaviour_unserialized.Get_customVector3_1_inGlobalSpaceUnits, visualizerParentMonoBehaviour_unserialized.Get_customVector3_1_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, emptyLineAtEnd_ifCollapsed, skipHeadline, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition);
+ }
+
+ public void DrawSpecificationOf_customVector3_2(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isChecked, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed, bool skipHeadline = false, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition = true)
+ {
+ SerializedProperty sP_source_ofCustomVector3_2 = serializedObject.FindProperty("customVector3Configs.Array.data[1].source");
+ SerializedProperty sP_customVector3_2_clipboardForManualInput = serializedObject.FindProperty("customVector3Configs.Array.data[1].clipboardForManualInput");
+ SerializedProperty sP_customVector3_2_targetGameObject = serializedObject.FindProperty("customVector3Configs.Array.data[1].targetGameObject");
+ SerializedProperty sP_customVector3_2_hasForcedAbsLength = serializedObject.FindProperty("customVector3Configs.Array.data[1].hasForcedAbsLength");
+ SerializedProperty sP_customVector3_2_picker_isOutfolded = serializedObject.FindProperty("customVector3Configs.Array.data[1].picker_isOutfolded");
+ SerializedProperty sP_forcedAbsLength_ofCustomVector3_2 = serializedObject.FindProperty("customVector3Configs.Array.data[1].forcedAbsLength");
+ SerializedProperty sP_lengthRelScaleFactor_ofCustomVector3_2 = serializedObject.FindProperty("customVector3Configs.Array.data[1].lengthRelScaleFactor");
+ SerializedProperty sP_vectorInterpretation_ofCustomVector3_2 = serializedObject.FindProperty("customVector3Configs.Array.data[1].vectorInterpretation");
+ SerializedProperty sP_observerCamera_ofCustomVector3_2 = serializedObject.FindProperty("customVector3Configs.Array.data[1].observerCamera");
+
+ DrawSpecificationOf_aCustomVector3(foldoutRespCheckboxName, asCheckbox_insteadOfAsFoldout, sP_customVector3_2_picker_isOutfolded, sP_customVectorPicker_isChecked, sP_source_ofCustomVector3_2, sP_customVector3_2_clipboardForManualInput, sP_customVector3_2_targetGameObject, sP_customVector3_2_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector3_2, sP_lengthRelScaleFactor_ofCustomVector3_2, sP_vectorInterpretation_ofCustomVector3_2, sP_observerCamera_ofCustomVector3_2, visualizerParentMonoBehaviour_unserialized.Get_customVector3_2_inGlobalSpaceUnits, visualizerParentMonoBehaviour_unserialized.Get_customVector3_2_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, emptyLineAtEnd_ifCollapsed, skipHeadline, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition);
+ }
+
+ public void DrawSpecificationOf_customVector3_3(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isChecked, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed, bool skipHeadline = false, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition = true)
+ {
+ SerializedProperty sP_source_ofCustomVector3_3 = serializedObject.FindProperty("customVector3Configs.Array.data[2].source");
+ SerializedProperty sP_customVector3_3_clipboardForManualInput = serializedObject.FindProperty("customVector3Configs.Array.data[2].clipboardForManualInput");
+ SerializedProperty sP_customVector3_3_targetGameObject = serializedObject.FindProperty("customVector3Configs.Array.data[2].targetGameObject");
+ SerializedProperty sP_customVector3_3_hasForcedAbsLength = serializedObject.FindProperty("customVector3Configs.Array.data[2].hasForcedAbsLength");
+ SerializedProperty sP_customVector3_3_picker_isOutfolded = serializedObject.FindProperty("customVector3Configs.Array.data[2].picker_isOutfolded");
+ SerializedProperty sP_forcedAbsLength_ofCustomVector3_3 = serializedObject.FindProperty("customVector3Configs.Array.data[2].forcedAbsLength");
+ SerializedProperty sP_lengthRelScaleFactor_ofCustomVector3_3 = serializedObject.FindProperty("customVector3Configs.Array.data[2].lengthRelScaleFactor");
+ SerializedProperty sP_vectorInterpretation_ofCustomVector3_3 = serializedObject.FindProperty("customVector3Configs.Array.data[2].vectorInterpretation");
+ SerializedProperty sP_observerCamera_ofCustomVector3_3 = serializedObject.FindProperty("customVector3Configs.Array.data[2].observerCamera");
+
+ DrawSpecificationOf_aCustomVector3(foldoutRespCheckboxName, asCheckbox_insteadOfAsFoldout, sP_customVector3_3_picker_isOutfolded, sP_customVectorPicker_isChecked, sP_source_ofCustomVector3_3, sP_customVector3_3_clipboardForManualInput, sP_customVector3_3_targetGameObject, sP_customVector3_3_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector3_3, sP_lengthRelScaleFactor_ofCustomVector3_3, sP_vectorInterpretation_ofCustomVector3_3, sP_observerCamera_ofCustomVector3_3, visualizerParentMonoBehaviour_unserialized.Get_customVector3_3_inGlobalSpaceUnits, visualizerParentMonoBehaviour_unserialized.Get_customVector3_3_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, emptyLineAtEnd_ifCollapsed, skipHeadline, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition);
+ }
+
+ public void DrawSpecificationOf_customVector3_4(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isChecked, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed, bool skipHeadline = false, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition = true)
+ {
+ SerializedProperty sP_source_ofCustomVector3_4 = serializedObject.FindProperty("customVector3Configs.Array.data[3].source");
+ SerializedProperty sP_customVector3_4_clipboardForManualInput = serializedObject.FindProperty("customVector3Configs.Array.data[3].clipboardForManualInput");
+ SerializedProperty sP_customVector3_4_targetGameObject = serializedObject.FindProperty("customVector3Configs.Array.data[3].targetGameObject");
+ SerializedProperty sP_customVector3_4_hasForcedAbsLength = serializedObject.FindProperty("customVector3Configs.Array.data[3].hasForcedAbsLength");
+ SerializedProperty sP_customVector3_4_picker_isOutfolded = serializedObject.FindProperty("customVector3Configs.Array.data[3].picker_isOutfolded");
+ SerializedProperty sP_forcedAbsLength_ofCustomVector3_4 = serializedObject.FindProperty("customVector3Configs.Array.data[3].forcedAbsLength");
+ SerializedProperty sP_lengthRelScaleFactor_ofCustomVector3_4 = serializedObject.FindProperty("customVector3Configs.Array.data[3].lengthRelScaleFactor");
+ SerializedProperty sP_vectorInterpretation_ofCustomVector3_4 = serializedObject.FindProperty("customVector3Configs.Array.data[3].vectorInterpretation");
+ SerializedProperty sP_observerCamera_ofCustomVector3_4 = serializedObject.FindProperty("customVector3Configs.Array.data[3].observerCamera");
+
+ DrawSpecificationOf_aCustomVector3(foldoutRespCheckboxName, asCheckbox_insteadOfAsFoldout, sP_customVector3_4_picker_isOutfolded, sP_customVectorPicker_isChecked, sP_source_ofCustomVector3_4, sP_customVector3_4_clipboardForManualInput, sP_customVector3_4_targetGameObject, sP_customVector3_4_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector3_4, sP_lengthRelScaleFactor_ofCustomVector3_4, sP_vectorInterpretation_ofCustomVector3_4, sP_observerCamera_ofCustomVector3_4, visualizerParentMonoBehaviour_unserialized.Get_customVector3_4_inGlobalSpaceUnits, visualizerParentMonoBehaviour_unserialized.Get_customVector3_4_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, emptyLineAtEnd_ifCollapsed, skipHeadline, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition);
+ }
+
+ public void DrawSpecificationOf_customVector3ofPartnerGameobject(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isChecked, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed)
+ {
+ SerializedProperty sP_source_ofCustomVector3ofPartnerGameobject = serializedObject.FindProperty("source_ofCustomVector3ofPartnerGameobject");
+ SerializedProperty sP_customVector3ofPartnerGameobject_clipboardForManualInput = serializedObject.FindProperty("customVector3ofPartnerGameobject_clipboardForManualInput");
+ SerializedProperty sP_customVector3ofPartnerGameobject_targetGameObject = serializedObject.FindProperty("customVector3ofPartnerGameobject_targetGameObject");
+ SerializedProperty sP_customVector3ofPartnerGameobject_hasForcedAbsLength = serializedObject.FindProperty("customVector3ofPartnerGameobject_hasForcedAbsLength");
+ SerializedProperty sP_customVector3ofPartnerGameobject_picker_isOutfolded = serializedObject.FindProperty("customVector3ofPartnerGameobject_picker_isOutfolded");
+ SerializedProperty sP_forcedAbsLength_ofCustomVector3ofPartnerGameobject = serializedObject.FindProperty("forcedAbsLength_ofCustomVector3ofPartnerGameobject");
+ SerializedProperty sP_lengthRelScaleFactor_ofCustomVector3ofPartnerGameobject = serializedObject.FindProperty("lengthRelScaleFactor_ofCustomVector3ofPartnerGameobject");
+ SerializedProperty sP_vectorInterpretation_ofCustomVector3ofPartnerGameobject = serializedObject.FindProperty("vectorInterpretation_ofCustomVector3ofPartnerGameobject");
+ SerializedProperty sP_observerCamera_ofCustomVector3ofPartnerGameobject = serializedObject.FindProperty("observerCamera_ofCustomVector3ofPartnerGameobject");
+
+ DrawSpecificationOf_aCustomVector3(foldoutRespCheckboxName, asCheckbox_insteadOfAsFoldout, sP_customVector3ofPartnerGameobject_picker_isOutfolded, sP_customVectorPicker_isChecked, sP_source_ofCustomVector3ofPartnerGameobject, sP_customVector3ofPartnerGameobject_clipboardForManualInput, sP_customVector3ofPartnerGameobject_targetGameObject, sP_customVector3ofPartnerGameobject_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector3ofPartnerGameobject, sP_lengthRelScaleFactor_ofCustomVector3ofPartnerGameobject, sP_vectorInterpretation_ofCustomVector3ofPartnerGameobject, sP_observerCamera_ofCustomVector3ofPartnerGameobject, visualizerParentMonoBehaviour_unserialized.Get_customVector3ofPartnerGameobject_inGlobalSpaceUnits, visualizerParentMonoBehaviour_unserialized.Get_customVector3ofPartnerGameobject_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, emptyLineAtEnd_ifCollapsed, false, true);
+ }
+
+ void DrawSpecificationOf_aCustomVector3(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isOutfolded, SerializedProperty sP_customVectorPicker_isChecked, SerializedProperty sP_source_ofCustomVector3, SerializedProperty sP_customVector3_clipboardForManualInput, SerializedProperty sP_customVector_targetGameObject, SerializedProperty sP_customVector_hasForcedAbsLength, SerializedProperty sP_forcedAbsLength_ofCustomVector, SerializedProperty sP_lengthRelScaleFactor_ofCustomVector, SerializedProperty sP_vectorInterpretation_ofCustomVector, SerializedProperty sP_observerCamera_ofCustomVector, VisualizerParent.FlexibleGetCustomVector3 Get_concernedCustomVector3_inGlobalSpaceUnits, VisualizerParent.FlexibleGetCustomVector3 Get_concernedCustomVector3_inLocalSpaceDefinedByParentUnits, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed, bool skipHeadline, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition)
+ {
+ if (asCheckbox_insteadOfAsFoldout)
+ {
+ GUIStyle style_ofPickerHeadline = new GUIStyle(EditorStyles.toggle);
+ style_ofPickerHeadline.richText = true;
+ sP_customVectorPicker_isChecked.boolValue = EditorGUILayout.Toggle(foldoutRespCheckboxName, sP_customVectorPicker_isChecked.boolValue, style_ofPickerHeadline);
+
+ EditorGUI.BeginDisabledGroup(!sP_customVectorPicker_isChecked.boolValue);
+ DrawContentOfACustomVector3Specification(sP_source_ofCustomVector3, sP_customVector3_clipboardForManualInput, sP_customVector_targetGameObject, sP_customVector_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector, sP_lengthRelScaleFactor_ofCustomVector, sP_vectorInterpretation_ofCustomVector, sP_observerCamera_ofCustomVector, sP_customVectorPicker_isChecked, Get_concernedCustomVector3_inGlobalSpaceUnits, Get_concernedCustomVector3_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition);
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ GUIStyle style_ofPickerHeadline = new GUIStyle(EditorStyles.foldout);
+ style_ofPickerHeadline.richText = true;
+
+ bool used_isOutfolded = true;
+ if (skipHeadline == false)
+ {
+ sP_customVectorPicker_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_customVectorPicker_isOutfolded.boolValue, foldoutRespCheckboxName, true, style_ofPickerHeadline);
+ used_isOutfolded = sP_customVectorPicker_isOutfolded.boolValue;
+ }
+
+ if (used_isOutfolded)
+ {
+ DrawContentOfACustomVector3Specification(sP_source_ofCustomVector3, sP_customVector3_clipboardForManualInput, sP_customVector_targetGameObject, sP_customVector_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector, sP_lengthRelScaleFactor_ofCustomVector, sP_vectorInterpretation_ofCustomVector, sP_observerCamera_ofCustomVector, sP_customVectorPicker_isChecked, Get_concernedCustomVector3_inGlobalSpaceUnits, Get_concernedCustomVector3_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition);
+ }
+ else
+ {
+ if (emptyLineAtEnd_ifCollapsed)
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+ }
+ }
+
+ void DrawContentOfACustomVector3Specification(SerializedProperty sP_source_ofCustomVector3, SerializedProperty sP_customVector3_clipboardForManualInput, SerializedProperty sP_customVector_targetGameObject, SerializedProperty sP_customVector_hasForcedAbsLength, SerializedProperty sP_forcedAbsLength_ofCustomVector, SerializedProperty sP_lengthRelScaleFactor_ofCustomVector, SerializedProperty sP_vectorInterpretation_ofCustomVector, SerializedProperty sP_observerCamera_ofCustomVector, SerializedProperty sP_customVectorPicker_isChecked, VisualizerParent.FlexibleGetCustomVector3 Get_concernedCustomVector3_inGlobalSpaceUnits, VisualizerParent.FlexibleGetCustomVector3 Get_concernedCustomVector3_inLocalSpaceDefinedByParentUnits, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(sP_source_ofCustomVector3, new GUIContent("Vector source"));
+
+ bool forceInterpretationToAlwaysGlobal;
+ switch (sP_source_ofCustomVector3.enumValueIndex)
+ {
+ case (int)VisualizerParent.CustomVector3Source.manualInput:
+ EditorGUILayout.PropertyField(sP_customVector3_clipboardForManualInput, new GUIContent("Input"));
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.toOtherGameobject:
+ EditorGUILayout.PropertyField(sP_customVector_targetGameObject, new GUIContent("Other GameObject"));
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.fromOtherGameobject:
+ EditorGUILayout.PropertyField(sP_customVector_targetGameObject, new GUIContent("Other GameObject"));
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.transformsForward:
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.transformsUp:
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.transformsRight:
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.transformsBack:
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.transformsDown:
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.transformsLeft:
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.globalForward:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.globalUp:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.globalRight:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.globalBack:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.globalDown:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.globalLeft:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.observerCameraForward:
+ EditorGUILayout.PropertyField(sP_observerCamera_ofCustomVector, new GUIContent("Camera to use"));
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.observerCameraUp:
+ EditorGUILayout.PropertyField(sP_observerCamera_ofCustomVector, new GUIContent("Camera to use"));
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.observerCameraRight:
+ EditorGUILayout.PropertyField(sP_observerCamera_ofCustomVector, new GUIContent("Camera to use"));
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.observerCameraBack:
+ EditorGUILayout.PropertyField(sP_observerCamera_ofCustomVector, new GUIContent("Camera to use"));
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.observerCameraDown:
+ EditorGUILayout.PropertyField(sP_observerCamera_ofCustomVector, new GUIContent("Camera to use"));
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.observerCameraLeft:
+ EditorGUILayout.PropertyField(sP_observerCamera_ofCustomVector, new GUIContent("Camera to use"));
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector3Source.observerCameraToThisGameobject:
+ EditorGUILayout.PropertyField(sP_observerCamera_ofCustomVector, new GUIContent("Camera to use"));
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ default:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ }
+
+ Draw_interpretationChooser_forGlobalOrLocal_V3(sP_vectorInterpretation_ofCustomVector, sP_customVectorPicker_isChecked, forceInterpretationToAlwaysGlobal, sP_source_ofCustomVector3, hideEverythingThatConcernsLength);
+ if (hideEverythingThatConcernsLength == false)
+ {
+ DrawLengthAdjustmentForCustomVector(sP_customVector_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector, sP_lengthRelScaleFactor_ofCustomVector, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition);
+ }
+ if (hideDisplayOfReadOnlyFinalVectorValues == false)
+ {
+ string displayName_ofFinalVectorGlobal = fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition ? "Final vector (global) (read only)" : "Final position (global) (read only)";
+ EditorGUILayout.Vector3Field(new GUIContent(displayName_ofFinalVectorGlobal, "This is in units of the global space." + Environment.NewLine + "It is read only."), Get_concernedCustomVector3_inGlobalSpaceUnits());
+
+ string displayName_ofFinalVectorLocal = fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition ? "Final vector (local) (read only)" : "Final position (local) (read only)";
+ EditorGUILayout.Vector3Field(new GUIContent(displayName_ofFinalVectorLocal, "This is in units of the local space defined by the parent transform." + Environment.NewLine + Environment.NewLine + "It is read only."), Get_concernedCustomVector3_inLocalSpaceDefinedByParentUnits());
+ }
+
+ if (emptyLineAtEnd_ifOutfolded)
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void Draw_interpretationChooser_forGlobalOrLocal_V3(SerializedProperty sP_vectorInterpretation_ofCustomVector, SerializedProperty sP_customVectorPicker_isChecked, bool alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace, SerializedProperty sP_source_ofCustomVector3, bool hideEverythingThatConcernsLength)
+ {
+ if (hideEverythingThatConcernsLength)
+ {
+ if (sP_source_ofCustomVector3.enumValueIndex == (int)VisualizerParent.CustomVector3Source.manualInput)
+ {
+ EditorGUILayout.PropertyField(sP_vectorInterpretation_ofCustomVector, new GUIContent("Vector source interpretation"));
+ TryDraw_warningHelpBox_forNonUniformParentScale_V3(sP_vectorInterpretation_ofCustomVector, sP_customVectorPicker_isChecked, alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace);
+ }
+ }
+ else
+ {
+ if (alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace)
+ {
+ EditorGUI.BeginDisabledGroup(alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace);
+ }
+
+ if (alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace)
+ {
+ EditorGUILayout.EnumPopup(new GUIContent("Vector source interpretation"), VisualizerParent.VectorInterpretation.globalSpace);
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(sP_vectorInterpretation_ofCustomVector, new GUIContent("Vector source interpretation"));
+ }
+
+ if (alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace)
+ {
+ EditorGUI.EndDisabledGroup();
+ }
+ TryDraw_warningHelpBox_forNonUniformParentScale_V3(sP_vectorInterpretation_ofCustomVector, sP_customVectorPicker_isChecked, alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace);
+ }
+ }
+
+ void TryDraw_warningHelpBox_forNonUniformParentScale_V3(SerializedProperty sP_vectorInterpretation_ofCustomVector, SerializedProperty sP_customVectorPicker_isChecked, bool alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace)
+ {
+ if (transform_onVisualizerObject.parent != null)
+ {
+ if ((sP_customVectorPicker_isChecked == null) || sP_customVectorPicker_isChecked.boolValue)
+ {
+ if (alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace == false)
+ {
+ if ((VisualizerParent.VectorInterpretation)sP_vectorInterpretation_ofCustomVector.enumValueIndex == VisualizerParent.VectorInterpretation.localSpaceDefinedByParent)
+ {
+ if (UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale(transform_onVisualizerObject.parent))
+ {
+ EditorGUILayout.HelpBox("A parent transform has a non-uniform scale. This may lead to wrong or weird results.", MessageType.Warning, true);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void DrawSpecificationOf_customVector2_1(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isChecked, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed, bool skipHeadline = false, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition = true, bool hideEverythingThatConcernsLocalSpace = false)
+ {
+ SerializedProperty sP_source_ofCustomVector2_1 = serializedObject.FindProperty("customVector2Configs.Array.data[0].source");
+ SerializedProperty sP_customVector2_1_clipboardForManualInput = serializedObject.FindProperty("customVector2Configs.Array.data[0].clipboardForManualInput");
+ SerializedProperty sP_customVector2_1_targetGameObject = serializedObject.FindProperty("customVector2Configs.Array.data[0].targetGameObject");
+ SerializedProperty sP_customVector2_1_hasForcedAbsLength = serializedObject.FindProperty("customVector2Configs.Array.data[0].hasForcedAbsLength");
+ SerializedProperty sP_customVector2_1_picker_isOutfolded = serializedObject.FindProperty("customVector2Configs.Array.data[0].picker_isOutfolded");
+ SerializedProperty sP_rotationFromRight_ofCustomVector2_1 = serializedObject.FindProperty("customVector2Configs.Array.data[0].rotationFromRight");
+ SerializedProperty sP_forcedAbsLength_ofCustomVector2_1 = serializedObject.FindProperty("customVector2Configs.Array.data[0].forcedAbsLength");
+ SerializedProperty sP_lengthRelScaleFactor_ofCustomVector2_1 = serializedObject.FindProperty("customVector2Configs.Array.data[0].lengthRelScaleFactor");
+ SerializedProperty sP_vectorInterpretation_ofCustomVector2_1 = serializedObject.FindProperty("customVector2Configs.Array.data[0].vectorInterpretation");
+
+ DrawSpecificationOf_aCustomVector2(foldoutRespCheckboxName, asCheckbox_insteadOfAsFoldout, sP_customVector2_1_picker_isOutfolded, sP_customVectorPicker_isChecked, sP_rotationFromRight_ofCustomVector2_1, sP_source_ofCustomVector2_1, sP_customVector2_1_clipboardForManualInput, sP_customVector2_1_targetGameObject, sP_customVector2_1_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector2_1, sP_lengthRelScaleFactor_ofCustomVector2_1, sP_vectorInterpretation_ofCustomVector2_1, visualizerParentMonoBehaviour_unserialized.Get_customVector2_1_inGlobalSpaceUnits, visualizerParentMonoBehaviour_unserialized.Get_customVector2_1_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, emptyLineAtEnd_ifCollapsed, skipHeadline, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition, hideEverythingThatConcernsLocalSpace);
+ }
+
+ public void DrawSpecificationOf_customVector2_2(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isChecked, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed, bool skipHeadline = false, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition = true, bool hideEverythingThatConcernsLocalSpace = false)
+ {
+ SerializedProperty sP_source_ofCustomVector2_2 = serializedObject.FindProperty("customVector2Configs.Array.data[1].source");
+ SerializedProperty sP_customVector2_2_clipboardForManualInput = serializedObject.FindProperty("customVector2Configs.Array.data[1].clipboardForManualInput");
+ SerializedProperty sP_customVector2_2_targetGameObject = serializedObject.FindProperty("customVector2Configs.Array.data[1].targetGameObject");
+ SerializedProperty sP_customVector2_2_hasForcedAbsLength = serializedObject.FindProperty("customVector2Configs.Array.data[1].hasForcedAbsLength");
+ SerializedProperty sP_customVector2_2_picker_isOutfolded = serializedObject.FindProperty("customVector2Configs.Array.data[1].picker_isOutfolded");
+ SerializedProperty sP_rotationFromRight_ofCustomVector2_2 = serializedObject.FindProperty("customVector2Configs.Array.data[1].rotationFromRight");
+ SerializedProperty sP_forcedAbsLength_ofCustomVector2_2 = serializedObject.FindProperty("customVector2Configs.Array.data[1].forcedAbsLength");
+ SerializedProperty sP_lengthRelScaleFactor_ofCustomVector2_2 = serializedObject.FindProperty("customVector2Configs.Array.data[1].lengthRelScaleFactor");
+ SerializedProperty sP_vectorInterpretation_ofCustomVector2_2 = serializedObject.FindProperty("customVector2Configs.Array.data[1].vectorInterpretation");
+
+ DrawSpecificationOf_aCustomVector2(foldoutRespCheckboxName, asCheckbox_insteadOfAsFoldout, sP_customVector2_2_picker_isOutfolded, sP_customVectorPicker_isChecked, sP_rotationFromRight_ofCustomVector2_2, sP_source_ofCustomVector2_2, sP_customVector2_2_clipboardForManualInput, sP_customVector2_2_targetGameObject, sP_customVector2_2_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector2_2, sP_lengthRelScaleFactor_ofCustomVector2_2, sP_vectorInterpretation_ofCustomVector2_2, visualizerParentMonoBehaviour_unserialized.Get_customVector2_2_inGlobalSpaceUnits, visualizerParentMonoBehaviour_unserialized.Get_customVector2_2_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, emptyLineAtEnd_ifCollapsed, skipHeadline, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition, hideEverythingThatConcernsLocalSpace);
+ }
+
+ public void DrawSpecificationOf_customVector2_3(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isChecked, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed, bool skipHeadline = false, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition = true, bool hideEverythingThatConcernsLocalSpace = false)
+ {
+ SerializedProperty sP_source_ofCustomVector2_3 = serializedObject.FindProperty("customVector2Configs.Array.data[2].source");
+ SerializedProperty sP_customVector2_3_clipboardForManualInput = serializedObject.FindProperty("customVector2Configs.Array.data[2].clipboardForManualInput");
+ SerializedProperty sP_customVector2_3_targetGameObject = serializedObject.FindProperty("customVector2Configs.Array.data[2].targetGameObject");
+ SerializedProperty sP_customVector2_3_hasForcedAbsLength = serializedObject.FindProperty("customVector2Configs.Array.data[2].hasForcedAbsLength");
+ SerializedProperty sP_customVector2_3_picker_isOutfolded = serializedObject.FindProperty("customVector2Configs.Array.data[2].picker_isOutfolded");
+ SerializedProperty sP_rotationFromRight_ofCustomVector2_3 = serializedObject.FindProperty("customVector2Configs.Array.data[2].rotationFromRight");
+ SerializedProperty sP_forcedAbsLength_ofCustomVector2_3 = serializedObject.FindProperty("customVector2Configs.Array.data[2].forcedAbsLength");
+ SerializedProperty sP_lengthRelScaleFactor_ofCustomVector2_3 = serializedObject.FindProperty("customVector2Configs.Array.data[2].lengthRelScaleFactor");
+ SerializedProperty sP_vectorInterpretation_ofCustomVector2_3 = serializedObject.FindProperty("customVector2Configs.Array.data[2].vectorInterpretation");
+
+ DrawSpecificationOf_aCustomVector2(foldoutRespCheckboxName, asCheckbox_insteadOfAsFoldout, sP_customVector2_3_picker_isOutfolded, sP_customVectorPicker_isChecked, sP_rotationFromRight_ofCustomVector2_3, sP_source_ofCustomVector2_3, sP_customVector2_3_clipboardForManualInput, sP_customVector2_3_targetGameObject, sP_customVector2_3_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector2_3, sP_lengthRelScaleFactor_ofCustomVector2_3, sP_vectorInterpretation_ofCustomVector2_3, visualizerParentMonoBehaviour_unserialized.Get_customVector2_3_inGlobalSpaceUnits, visualizerParentMonoBehaviour_unserialized.Get_customVector2_3_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, emptyLineAtEnd_ifCollapsed, skipHeadline, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition, hideEverythingThatConcernsLocalSpace);
+ }
+
+ public void DrawSpecificationOf_customVector2_4(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isChecked, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed, bool skipHeadline = false, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition = true, bool hideEverythingThatConcernsLocalSpace = false)
+ {
+ SerializedProperty sP_source_ofCustomVector2_4 = serializedObject.FindProperty("customVector2Configs.Array.data[3].source");
+ SerializedProperty sP_customVector2_4_clipboardForManualInput = serializedObject.FindProperty("customVector2Configs.Array.data[3].clipboardForManualInput");
+ SerializedProperty sP_customVector2_4_targetGameObject = serializedObject.FindProperty("customVector2Configs.Array.data[3].targetGameObject");
+ SerializedProperty sP_customVector2_4_hasForcedAbsLength = serializedObject.FindProperty("customVector2Configs.Array.data[3].hasForcedAbsLength");
+ SerializedProperty sP_customVector2_4_picker_isOutfolded = serializedObject.FindProperty("customVector2Configs.Array.data[3].picker_isOutfolded");
+ SerializedProperty sP_rotationFromRight_ofCustomVector2_4 = serializedObject.FindProperty("customVector2Configs.Array.data[3].rotationFromRight");
+ SerializedProperty sP_forcedAbsLength_ofCustomVector2_4 = serializedObject.FindProperty("customVector2Configs.Array.data[3].forcedAbsLength");
+ SerializedProperty sP_lengthRelScaleFactor_ofCustomVector2_4 = serializedObject.FindProperty("customVector2Configs.Array.data[3].lengthRelScaleFactor");
+ SerializedProperty sP_vectorInterpretation_ofCustomVector2_4 = serializedObject.FindProperty("customVector2Configs.Array.data[3].vectorInterpretation");
+
+ DrawSpecificationOf_aCustomVector2(foldoutRespCheckboxName, asCheckbox_insteadOfAsFoldout, sP_customVector2_4_picker_isOutfolded, sP_customVectorPicker_isChecked, sP_rotationFromRight_ofCustomVector2_4, sP_source_ofCustomVector2_4, sP_customVector2_4_clipboardForManualInput, sP_customVector2_4_targetGameObject, sP_customVector2_4_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector2_4, sP_lengthRelScaleFactor_ofCustomVector2_4, sP_vectorInterpretation_ofCustomVector2_4, visualizerParentMonoBehaviour_unserialized.Get_customVector2_4_inGlobalSpaceUnits, visualizerParentMonoBehaviour_unserialized.Get_customVector2_4_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, emptyLineAtEnd_ifCollapsed, skipHeadline, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition, hideEverythingThatConcernsLocalSpace);
+ }
+
+ public void DrawSpecificationOf_customVector2ofPartnerGameobject(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isChecked, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed)
+ {
+ SerializedProperty sP_source_ofCustomVector2ofPartnerGameobject = serializedObject.FindProperty("source_ofCustomVector2ofPartnerGameobject");
+ SerializedProperty sP_customVector2ofPartnerGameobject_clipboardForManualInput = serializedObject.FindProperty("customVector2ofPartnerGameobject_clipboardForManualInput");
+ SerializedProperty sP_customVector2ofPartnerGameobject_targetGameObject = serializedObject.FindProperty("customVector2ofPartnerGameobject_targetGameObject");
+ SerializedProperty sP_customVector2ofPartnerGameobject_hasForcedAbsLength = serializedObject.FindProperty("customVector2ofPartnerGameobject_hasForcedAbsLength");
+ SerializedProperty sP_customVector2ofPartnerGameobject_picker_isOutfolded = serializedObject.FindProperty("customVector2ofPartnerGameobject_picker_isOutfolded");
+ SerializedProperty sP_rotationFromRight_ofCustomVector2ofPartnerGameobject = serializedObject.FindProperty("rotationFromRight_ofCustomVector2ofPartnerGameobject");
+ SerializedProperty sP_forcedAbsLength_ofCustomVector2ofPartnerGameobject = serializedObject.FindProperty("forcedAbsLength_ofCustomVector2ofPartnerGameobject");
+ SerializedProperty sP_lengthRelScaleFactor_ofCustomVector2ofPartnerGameobject = serializedObject.FindProperty("lengthRelScaleFactor_ofCustomVector2ofPartnerGameobject");
+ SerializedProperty sP_vectorInterpretation_ofCustomVector2ofPartnerGameobject = serializedObject.FindProperty("vectorInterpretation_ofCustomVector2ofPartnerGameobject");
+
+ DrawSpecificationOf_aCustomVector2(foldoutRespCheckboxName, asCheckbox_insteadOfAsFoldout, sP_customVector2ofPartnerGameobject_picker_isOutfolded, sP_customVectorPicker_isChecked, sP_rotationFromRight_ofCustomVector2ofPartnerGameobject, sP_source_ofCustomVector2ofPartnerGameobject, sP_customVector2ofPartnerGameobject_clipboardForManualInput, sP_customVector2ofPartnerGameobject_targetGameObject, sP_customVector2ofPartnerGameobject_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector2ofPartnerGameobject, sP_lengthRelScaleFactor_ofCustomVector2ofPartnerGameobject, sP_vectorInterpretation_ofCustomVector2ofPartnerGameobject, visualizerParentMonoBehaviour_unserialized.Get_customVector2ofPartnerGameobject_inGlobalSpaceUnits, visualizerParentMonoBehaviour_unserialized.Get_customVector2ofPartnerGameobject_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, emptyLineAtEnd_ifCollapsed, false, true, false);
+ }
+
+ void DrawSpecificationOf_aCustomVector2(string foldoutRespCheckboxName, bool asCheckbox_insteadOfAsFoldout, SerializedProperty sP_customVectorPicker_isOutfolded, SerializedProperty sP_customVectorPicker_isChecked, SerializedProperty sP_rotationFromRight_ofCustomVector2, SerializedProperty sP_source_ofCustomVector2, SerializedProperty sP_customVector2_clipboardForManualInput, SerializedProperty sP_customVector_targetGameObject, SerializedProperty sP_customVector_hasForcedAbsLength, SerializedProperty sP_forcedAbsLength_ofCustomVector, SerializedProperty sP_lengthRelScaleFactor_ofCustomVector, SerializedProperty sP_vectorInterpretation_ofCustomVector, VisualizerParent.FlexibleGetCustomVector2 Get_concernedCustomVector2_inGlobalSpaceUnits, VisualizerParent.FlexibleGetCustomVector2 Get_concernedCustomVector2_inLocalSpaceDefinedByParentUnits, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool emptyLineAtEnd_ifCollapsed, bool skipHeadline, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition, bool hideEverythingThatConcernsLocalSpace)
+ {
+ if (asCheckbox_insteadOfAsFoldout)
+ {
+ GUIStyle style_ofPickerHeadline = new GUIStyle(EditorStyles.toggle);
+ style_ofPickerHeadline.richText = true;
+ sP_customVectorPicker_isChecked.boolValue = EditorGUILayout.Toggle(foldoutRespCheckboxName, sP_customVectorPicker_isChecked.boolValue, style_ofPickerHeadline);
+
+ EditorGUI.BeginDisabledGroup(!sP_customVectorPicker_isChecked.boolValue);
+ DrawContentOfACustomVector2Specification(sP_rotationFromRight_ofCustomVector2, sP_source_ofCustomVector2, sP_customVector2_clipboardForManualInput, sP_customVector_targetGameObject, sP_customVector_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector, sP_lengthRelScaleFactor_ofCustomVector, sP_vectorInterpretation_ofCustomVector, sP_customVectorPicker_isChecked, Get_concernedCustomVector2_inGlobalSpaceUnits, Get_concernedCustomVector2_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition, hideEverythingThatConcernsLocalSpace);
+ EditorGUI.EndDisabledGroup();
+ }
+ else
+ {
+ GUIStyle style_ofPickerHeadline = new GUIStyle(EditorStyles.foldout);
+ style_ofPickerHeadline.richText = true;
+
+ bool used_isOutfolded = true;
+ if (skipHeadline == false)
+ {
+ sP_customVectorPicker_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_customVectorPicker_isOutfolded.boolValue, foldoutRespCheckboxName, true, style_ofPickerHeadline);
+ used_isOutfolded = sP_customVectorPicker_isOutfolded.boolValue;
+ }
+
+ if (used_isOutfolded)
+ {
+ DrawContentOfACustomVector2Specification(sP_rotationFromRight_ofCustomVector2, sP_source_ofCustomVector2, sP_customVector2_clipboardForManualInput, sP_customVector_targetGameObject, sP_customVector_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector, sP_lengthRelScaleFactor_ofCustomVector, sP_vectorInterpretation_ofCustomVector, sP_customVectorPicker_isChecked, Get_concernedCustomVector2_inGlobalSpaceUnits, Get_concernedCustomVector2_inLocalSpaceDefinedByParentUnits, hideEverythingThatConcernsLength, hideDisplayOfReadOnlyFinalVectorValues, emptyLineAtEnd_ifOutfolded, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition, hideEverythingThatConcernsLocalSpace);
+ }
+ else
+ {
+ if (emptyLineAtEnd_ifCollapsed)
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+ }
+ }
+ }
+
+ void DrawContentOfACustomVector2Specification(SerializedProperty sP_rotationFromRight_ofCustomVector2, SerializedProperty sP_source_ofCustomVector2, SerializedProperty sP_customVector2_clipboardForManualInput, SerializedProperty sP_customVector_targetGameObject, SerializedProperty sP_customVector_hasForcedAbsLength, SerializedProperty sP_forcedAbsLength_ofCustomVector, SerializedProperty sP_lengthRelScaleFactor_ofCustomVector, SerializedProperty sP_vectorInterpretation_ofCustomVector, SerializedProperty sP_customVectorPicker_isChecked, VisualizerParent.FlexibleGetCustomVector2 Get_concernedCustomVector2_inGlobalSpaceUnits, VisualizerParent.FlexibleGetCustomVector2 Get_concernedCustomVector2_inLocalSpaceDefinedByParentUnits, bool hideEverythingThatConcernsLength, bool hideDisplayOfReadOnlyFinalVectorValues, bool emptyLineAtEnd_ifOutfolded, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition, bool hideEverythingThatConcernsLocalSpace)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(sP_source_ofCustomVector2, new GUIContent("Vector source"));
+
+ bool forceInterpretationToAlwaysGlobal;
+ switch (sP_source_ofCustomVector2.enumValueIndex)
+ {
+ case (int)VisualizerParent.CustomVector2Source.rotationAroundZStartingFromRight:
+ EditorGUILayout.PropertyField(sP_rotationFromRight_ofCustomVector2, new GUIContent("Z Angle"));
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector2Source.manualInput:
+ EditorGUILayout.PropertyField(sP_customVector2_clipboardForManualInput, new GUIContent("Input"));
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector2Source.toOtherGameobject:
+ EditorGUILayout.PropertyField(sP_customVector_targetGameObject, new GUIContent("Other GameObject"));
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector2Source.fromOtherGameobject:
+ EditorGUILayout.PropertyField(sP_customVector_targetGameObject, new GUIContent("Other GameObject"));
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector2Source.transformsUp:
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector2Source.transformsRight:
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector2Source.transformsDown:
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector2Source.transformsLeft:
+ forceInterpretationToAlwaysGlobal = false;
+ break;
+ case (int)VisualizerParent.CustomVector2Source.globalUp:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector2Source.globalRight:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector2Source.globalDown:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ case (int)VisualizerParent.CustomVector2Source.globalLeft:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ default:
+ forceInterpretationToAlwaysGlobal = true;
+ break;
+ }
+
+ if (hideEverythingThatConcernsLocalSpace == false)
+ {
+ Draw_interpretationChooser_forGlobalOrLocal_V2(sP_vectorInterpretation_ofCustomVector, sP_customVectorPicker_isChecked, forceInterpretationToAlwaysGlobal, sP_source_ofCustomVector2, hideEverythingThatConcernsLength);
+ }
+
+ if (hideEverythingThatConcernsLength == false)
+ {
+ DrawLengthAdjustmentForCustomVector(sP_customVector_hasForcedAbsLength, sP_forcedAbsLength_ofCustomVector, sP_lengthRelScaleFactor_ofCustomVector, fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition);
+ }
+ if (hideDisplayOfReadOnlyFinalVectorValues == false)
+ {
+ string displayName_ofFinalVectorGlobal = fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition ? "Final vector (global) (read only)" : "Final position (global) (read only)";
+ EditorGUILayout.Vector2Field(new GUIContent(displayName_ofFinalVectorGlobal, "This is in units of the global space." + Environment.NewLine + "It is read only."), Get_concernedCustomVector2_inGlobalSpaceUnits());
+
+ if (hideEverythingThatConcernsLocalSpace == false)
+ {
+ string displayName_ofFinalVectorLocal = fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition ? "Final vector (local) (read only)" : "Final position (local) (read only)";
+ EditorGUILayout.Vector2Field(new GUIContent(displayName_ofFinalVectorLocal, "This is in units of the local space defined by the parent transform." + Environment.NewLine + Environment.NewLine + "It is read only."), Get_concernedCustomVector2_inLocalSpaceDefinedByParentUnits());
+ }
+ }
+ if (hideEverythingThatConcernsLength == false)
+ {
+ TryDraw_warningHelpBoxes_forNonUniformParentScale_orNonZRotation_V2(sP_customVectorPicker_isChecked);
+ }
+
+ if (emptyLineAtEnd_ifOutfolded)
+ {
+ GUILayout.Space(EditorGUIUtility.singleLineHeight);
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void Draw_interpretationChooser_forGlobalOrLocal_V2(SerializedProperty sP_vectorInterpretation_ofCustomVector, SerializedProperty sP_customVectorPicker_isChecked, bool alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace, SerializedProperty sP_source_ofCustomVector2, bool hideEverythingThatConcernsLength)
+ {
+ if (hideEverythingThatConcernsLength)
+ {
+ if ((sP_source_ofCustomVector2.enumValueIndex == (int)VisualizerParent.CustomVector2Source.rotationAroundZStartingFromRight) || (sP_source_ofCustomVector2.enumValueIndex == (int)VisualizerParent.CustomVector2Source.manualInput))
+ {
+ EditorGUILayout.PropertyField(sP_vectorInterpretation_ofCustomVector, new GUIContent("Vector source interpretation"));
+ }
+ }
+ else
+ {
+ if (alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace)
+ {
+ EditorGUI.BeginDisabledGroup(alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace);
+ }
+
+ if (alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace)
+ {
+ EditorGUILayout.EnumPopup(new GUIContent("Vector source interpretation"), VisualizerParent.VectorInterpretation.globalSpace);
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(sP_vectorInterpretation_ofCustomVector, new GUIContent("Vector source interpretation"));
+ }
+
+ if (alwaysGreyOutAndReturnFalse_whichMeansLeaveItInGlobalSpace)
+ {
+ EditorGUI.EndDisabledGroup();
+ }
+ }
+ }
+
+ void TryDraw_warningHelpBoxes_forNonUniformParentScale_orNonZRotation_V2(SerializedProperty sP_customVectorPicker_isChecked)
+ {
+ if ((sP_customVectorPicker_isChecked == null) || sP_customVectorPicker_isChecked.boolValue)
+ {
+ if (UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale_2D(transform_onVisualizerObject.parent))
+ {
+ EditorGUILayout.HelpBox("A parent transform has a non-uniform scale. This may lead to wrong or weird results.", MessageType.Warning, true);
+ }
+
+ if (UtilitiesDXXL_EngineBasics.CheckIfThisOrAParentHasANonZRotation_2D(transform_onVisualizerObject))
+ {
+ EditorGUILayout.HelpBox("This transform or a parent has a non-z rotation. This may lead to wrong or weird results in 2D mode.", MessageType.Warning, true);
+ }
+ }
+ }
+
+ void DrawLengthAdjustmentForCustomVector(SerializedProperty sP_customVector_hasForcedAbsLength, SerializedProperty sP_forcedAbsLength_ofCustomVector, SerializedProperty sP_lengthRelScaleFactor_ofCustomVector, bool fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition)
+ {
+ GUIStyle style_ofLengthHeadline = new GUIStyle();
+ //style_ofLengthHeadline.fontStyle = FontStyle.Bold;
+
+ string displayName_ofHeadline = fieldDisplayNames_fitVectorMeaningAsDirection_notAsPosition ? "Length" : "Distance from origin";
+ EditorGUILayout.LabelField(displayName_ofHeadline, style_ofLengthHeadline);
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_customVector_hasForcedAbsLength, new GUIContent("Force absolute", "This absolute length value is in units of the space as defined by 'Vector interpretation'."));
+ EditorGUI.BeginDisabledGroup(!sP_customVector_hasForcedAbsLength.boolValue);
+ EditorGUILayout.PropertyField(sP_forcedAbsLength_ofCustomVector, GUIContent.none);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ EditorGUI.BeginDisabledGroup(sP_customVector_hasForcedAbsLength.boolValue);
+ EditorGUILayout.PropertyField(sP_lengthRelScaleFactor_ofCustomVector, new GUIContent("Scale relative"));
+ EditorGUI.EndDisabledGroup();
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ public void DrawTextInputInclMarkupHelper(bool inputTextAs_multiLineArea = true, bool emptyLineAtEndEvenIfCollapsed = false, string overwrite_nameOfTextField = null, bool emptyLineAtEndIfOutfolded = true, bool displaySizeScalingStyleOption = true)
+ {
+ SerializedProperty sP_text_exclGlobalMarkupTags = serializedObject.FindProperty("text_exclGlobalMarkupTags");
+ SerializedProperty sP_text_inclGlobalMarkupTags = serializedObject.FindProperty("text_inclGlobalMarkupTags");
+ SerializedProperty sP_textSection_isOutfolded = serializedObject.FindProperty("textSection_isOutfolded");
+ SerializedProperty sP_textStyleSection_isOutfolded = serializedObject.FindProperty("textStyleSection_isOutfolded");
+ SerializedProperty sP_textMarkupHelperSection_isOutfolded = serializedObject.FindProperty("textMarkupHelperSection_isOutfolded");
+
+ SerializedProperty sP_globalText_isBold = serializedObject.FindProperty("globalText_isBold");
+
+ SerializedProperty sP_globalText_isStrokeWidthModified = serializedObject.FindProperty("globalText_isStrokeWidthModified");
+ SerializedProperty sP_curr_strokeWidthSize0to1_forGlobalMarkup = serializedObject.FindProperty("curr_strokeWidthSize0to1_forGlobalMarkup");
+
+ SerializedProperty sP_globalText_isItalic = serializedObject.FindProperty("globalText_isItalic");
+ SerializedProperty sP_globalText_isUnderlined = serializedObject.FindProperty("globalText_isUnderlined");
+ SerializedProperty sP_globalText_isDeleted = serializedObject.FindProperty("globalText_isDeleted");
+
+ SerializedProperty sP_globalText_isSizeModified = serializedObject.FindProperty("globalText_isSizeModified");
+ SerializedProperty sP_curr_sizeScaleFactor_forGlobalMarkup = serializedObject.FindProperty("curr_sizeScaleFactor_forGlobalMarkup");
+
+ SerializedProperty sP_globalText_isColorModified = serializedObject.FindProperty("globalText_isColorModified");
+ SerializedProperty sP_curr_color_forGlobalMarkup = serializedObject.FindProperty("curr_color_forGlobalMarkup");
+
+ if (sP_text_inclGlobalMarkupTags.stringValue == null) { sP_text_inclGlobalMarkupTags.stringValue = MarkupGlobalText(sP_text_exclGlobalMarkupTags.stringValue, sP_globalText_isBold.boolValue, sP_globalText_isItalic.boolValue, sP_globalText_isUnderlined.boolValue, sP_globalText_isDeleted.boolValue, sP_globalText_isSizeModified.boolValue, sP_globalText_isColorModified.boolValue, sP_globalText_isStrokeWidthModified.boolValue, sP_curr_sizeScaleFactor_forGlobalMarkup.floatValue, sP_curr_color_forGlobalMarkup.colorValue, sP_curr_strokeWidthSize0to1_forGlobalMarkup.floatValue); }
+
+ GUIStyle style_forFoldoutLine = new GUIStyle(EditorStyles.foldout);
+ sP_textSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_textSection_isOutfolded.boolValue, "Text", true, style_forFoldoutLine);
+ if (sP_textSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+
+ string tooltip_for_inputTextField = "You can use rich text markup here, for example to make words bold.";
+ EditorGUI.BeginChangeCheck();
+ if (inputTextAs_multiLineArea)
+ {
+ string used_textFieldName = (overwrite_nameOfTextField == null) ? "Drawn text tag:" : overwrite_nameOfTextField;
+ EditorGUILayout.LabelField(new GUIContent(used_textFieldName, tooltip_for_inputTextField));
+ sP_text_exclGlobalMarkupTags.stringValue = EditorGUILayout.TextArea(sP_text_exclGlobalMarkupTags.stringValue);
+ }
+ else
+ {
+ string used_textFieldName = (overwrite_nameOfTextField == null) ? "Drawn text tag" : overwrite_nameOfTextField;
+ EditorGUILayout.PropertyField(sP_text_exclGlobalMarkupTags, new GUIContent(used_textFieldName, tooltip_for_inputTextField));
+ }
+ bool mainInputText_changed = EditorGUI.EndChangeCheck();
+ if (mainInputText_changed) { sP_text_inclGlobalMarkupTags.stringValue = MarkupGlobalText(sP_text_exclGlobalMarkupTags.stringValue, sP_globalText_isBold.boolValue, sP_globalText_isItalic.boolValue, sP_globalText_isUnderlined.boolValue, sP_globalText_isDeleted.boolValue, sP_globalText_isSizeModified.boolValue, sP_globalText_isColorModified.boolValue, sP_globalText_isStrokeWidthModified.boolValue, sP_curr_sizeScaleFactor_forGlobalMarkup.floatValue, sP_curr_color_forGlobalMarkup.colorValue, sP_curr_strokeWidthSize0to1_forGlobalMarkup.floatValue); }
+
+ sP_textStyleSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_textStyleSection_isOutfolded.boolValue, "Style", true);
+ if (sP_textStyleSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ sP_text_inclGlobalMarkupTags.stringValue = DrawGlobalTextStyleOptions(sP_text_exclGlobalMarkupTags, sP_text_inclGlobalMarkupTags.stringValue, sP_globalText_isBold, sP_globalText_isStrokeWidthModified, sP_curr_strokeWidthSize0to1_forGlobalMarkup, sP_globalText_isItalic, sP_globalText_isUnderlined, sP_globalText_isDeleted, sP_globalText_isSizeModified, sP_curr_sizeScaleFactor_forGlobalMarkup, sP_globalText_isColorModified, sP_curr_color_forGlobalMarkup, displaySizeScalingStyleOption);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ sP_textMarkupHelperSection_isOutfolded.boolValue = EditorGUILayout.Foldout(sP_textMarkupHelperSection_isOutfolded.boolValue, "Markup snippet creator", true);
+ if (sP_textMarkupHelperSection_isOutfolded.boolValue)
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ DrawSnippetMarkupCreator();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ if (emptyLineAtEndIfOutfolded)
+ {
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ else
+ {
+ if (emptyLineAtEndEvenIfCollapsed)
+ {
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ }
+ }
+ }
+
+ string DrawGlobalTextStyleOptions(SerializedProperty sP_text_exclGlobalMarkupTags, string text_inclGlobalMarkupTags, SerializedProperty sP_globalText_isBold, SerializedProperty sP_globalText_isStrokeWidthModified, SerializedProperty sP_curr_strokeWidthSize0to1_forGlobalMarkup, SerializedProperty sP_globalText_isItalic, SerializedProperty sP_globalText_isUnderlined, SerializedProperty sP_globalText_isDeleted, SerializedProperty sP_globalText_isSizeModified, SerializedProperty sP_curr_sizeScaleFactor_forGlobalMarkup, SerializedProperty sP_globalText_isColorModified, SerializedProperty sP_curr_color_forGlobalMarkup, bool displaySizeScalingStyleOption)
+ {
+ EditorGUI.BeginChangeCheck();
+
+ EditorGUILayout.PropertyField(sP_globalText_isBold, new GUIContent("Bold"));
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_globalText_isStrokeWidthModified, new GUIContent("Custom stroke width"));
+ EditorGUI.BeginDisabledGroup(!sP_globalText_isStrokeWidthModified.boolValue);
+ sP_curr_strokeWidthSize0to1_forGlobalMarkup.floatValue = EditorGUILayout.Slider(sP_curr_strokeWidthSize0to1_forGlobalMarkup.floatValue, 0.0f, 1.0f);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ EditorGUILayout.PropertyField(sP_globalText_isItalic, new GUIContent("Italic"));
+
+ EditorGUILayout.PropertyField(sP_globalText_isUnderlined, new GUIContent("Underlined"));
+
+ EditorGUILayout.PropertyField(sP_globalText_isDeleted, new GUIContent("Deleted"));
+
+ if (displaySizeScalingStyleOption)
+ {
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_globalText_isSizeModified, new GUIContent("Size scaling"));
+ EditorGUI.BeginDisabledGroup(!sP_globalText_isSizeModified.boolValue);
+ sP_curr_sizeScaleFactor_forGlobalMarkup.floatValue = EditorGUILayout.Slider(sP_curr_sizeScaleFactor_forGlobalMarkup.floatValue, 0.1f, 20.0f);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+ }
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_globalText_isColorModified, new GUIContent("Colored"));
+ EditorGUI.BeginDisabledGroup(!sP_globalText_isColorModified.boolValue);
+ sP_curr_color_forGlobalMarkup.colorValue = EditorGUILayout.ColorField(sP_curr_color_forGlobalMarkup.colorValue);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+
+ bool globalMarkupConfig_changed = EditorGUI.EndChangeCheck();
+ if (globalMarkupConfig_changed) { text_inclGlobalMarkupTags = MarkupGlobalText(sP_text_exclGlobalMarkupTags.stringValue, sP_globalText_isBold.boolValue, sP_globalText_isItalic.boolValue, sP_globalText_isUnderlined.boolValue, sP_globalText_isDeleted.boolValue, sP_globalText_isSizeModified.boolValue, sP_globalText_isColorModified.boolValue, sP_globalText_isStrokeWidthModified.boolValue, sP_curr_sizeScaleFactor_forGlobalMarkup.floatValue, sP_curr_color_forGlobalMarkup.colorValue, sP_curr_strokeWidthSize0to1_forGlobalMarkup.floatValue); }
+
+ GUILayout.Space(1.0f * EditorGUIUtility.singleLineHeight);
+ return text_inclGlobalMarkupTags;
+ }
+
+ string MarkupGlobalText(string text_withoutMarkupTags, bool globalText_isBold, bool globalText_isItalic, bool globalText_isUnderlined, bool globalText_isDeleted, bool globalText_isSizeModified, bool globalText_isColorModified, bool globalText_isStrokeWidthModified, float curr_sizeScaleFactor_forGlobalMarkup, Color curr_color_forGlobalMarkup, float curr_strokeWidthSize0to1_forGlobalMarkup)
+ {
+ string resultingText_withMarkupTags = null;
+ MarkupTextSnippet(false, ref resultingText_withMarkupTags, text_withoutMarkupTags, globalText_isBold, globalText_isItalic, globalText_isUnderlined, globalText_isDeleted, globalText_isSizeModified, globalText_isColorModified, globalText_isStrokeWidthModified, curr_sizeScaleFactor_forGlobalMarkup, curr_color_forGlobalMarkup, curr_strokeWidthSize0to1_forGlobalMarkup, false, false, false, false);
+ if (resultingText_withMarkupTags == null) { resultingText_withMarkupTags = ""; }
+ return resultingText_withMarkupTags;
+ }
+
+ void DrawSnippetMarkupCreator()
+ {
+ SerializedProperty sP_markupSnippetText_isBold = serializedObject.FindProperty("markupSnippetText_isBold");
+ SerializedProperty sP_markupSnippetText_escapesBold = serializedObject.FindProperty("markupSnippetText_escapesBold");
+
+ SerializedProperty sP_markupSnippetText_isStrokeWidthModified = serializedObject.FindProperty("markupSnippetText_isStrokeWidthModified");
+ SerializedProperty sP_curr_strokeWidthSize0to1_forMarkupSnippet = serializedObject.FindProperty("curr_strokeWidthSize0to1_forMarkupSnippet");
+
+ SerializedProperty sP_markupSnippetText_isItalic = serializedObject.FindProperty("markupSnippetText_isItalic");
+ SerializedProperty sP_markupSnippetText_escapesItalic = serializedObject.FindProperty("markupSnippetText_escapesItalic");
+
+ SerializedProperty sP_markupSnippetText_isUnderlined = serializedObject.FindProperty("markupSnippetText_isUnderlined");
+ SerializedProperty sP_markupSnippetText_escapesUnderlined = serializedObject.FindProperty("markupSnippetText_escapesUnderlined");
+
+ SerializedProperty sP_markupSnippetText_isDeleted = serializedObject.FindProperty("markupSnippetText_isDeleted");
+ SerializedProperty sP_markupSnippetText_escapesDeleted = serializedObject.FindProperty("markupSnippetText_escapesDeleted");
+
+ SerializedProperty sP_markupSnippetText_isSizeModified = serializedObject.FindProperty("markupSnippetText_isSizeModified");
+ SerializedProperty sP_curr_sizeScaleFactor_forMarkupSnippet = serializedObject.FindProperty("curr_sizeScaleFactor_forMarkupSnippet");
+
+ SerializedProperty sP_markupSnippetText_isColorModified = serializedObject.FindProperty("markupSnippetText_isColorModified");
+ SerializedProperty sP_curr_color_forMarkupSnippet = serializedObject.FindProperty("curr_color_forMarkupSnippet");
+
+ SerializedProperty sP_curr_heightOfEmptyLine_forMarkupCreator = serializedObject.FindProperty("curr_heightOfEmptyLine_forMarkupCreator");
+
+ EditorGUILayout.HelpBox("You can use this to easily create text snippets inside markup tags that you can copy into the drawn text field (or into your code)." + Environment.NewLine + Environment.NewLine + "With the created snippets you can have for each word (or letter) different styles that differ from to the global 'Style' settings above.", MessageType.None, true);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+
+ SerializedProperty sP_textSnippet_toPutInMarkupTags = serializedObject.FindProperty("textSnippet_toPutInMarkupTags");
+ SerializedProperty sP_curr_iconType_forMarkupCreator = serializedObject.FindProperty("curr_iconType_forMarkupCreator");
+ SerializedProperty sP_curr_textMarkupInputSnippetOptions = serializedObject.FindProperty("curr_textMarkupInputSnippetOptions");
+ SerializedProperty sP_curr_logType_forMarkupCreator = serializedObject.FindProperty("curr_logType_forMarkupCreator");
+
+ SerializedProperty sP_resultTextSnippet_insideMarkupTags_forTextInput = serializedObject.FindProperty("resultTextSnippet_insideMarkupTags_forTextInput");
+ SerializedProperty sP_resultTextSnippet_insideMarkupTags_forIconInput = serializedObject.FindProperty("resultTextSnippet_insideMarkupTags_forIconInput");
+ SerializedProperty sP_resultTextSnippet_insideMarkupTags_forCustomHeightEmptyLineInput = serializedObject.FindProperty("resultTextSnippet_insideMarkupTags_forCustomHeightEmptyLineInput");
+ SerializedProperty sP_resultTextSnippet_insideMarkupTags_forLogSymbolInput = serializedObject.FindProperty("resultTextSnippet_insideMarkupTags_forLogSymbolInput");
+
+ EditorGUI.BeginChangeCheck();
+
+ EditorGUILayout.PropertyField(sP_curr_textMarkupInputSnippetOptions, new GUIContent("Input type"));
+
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+
+ GUIStyle style_ofSnippetCreatorSubHeadlines = new GUIStyle();
+ style_ofSnippetCreatorSubHeadlines.fontStyle = FontStyle.Bold;
+ EditorGUILayout.LabelField("Snippet", style_ofSnippetCreatorSubHeadlines);
+
+ switch (sP_curr_textMarkupInputSnippetOptions.enumValueIndex)
+ {
+ case ((int)VisualizerParent.TextMarkupInputSnippetOptions.text):
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(sP_textSnippet_toPutInMarkupTags, new GUIContent("Input"));
+ EditorGUILayout.TextField("Output", sP_resultTextSnippet_insideMarkupTags_forTextInput.stringValue);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ DrawSnippetOptionsForInputTypeOf_text(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isBold, sP_markupSnippetText_escapesBold, sP_markupSnippetText_isStrokeWidthModified, sP_curr_strokeWidthSize0to1_forMarkupSnippet, sP_markupSnippetText_isItalic, sP_markupSnippetText_escapesItalic, sP_markupSnippetText_isUnderlined, sP_markupSnippetText_escapesUnderlined, sP_markupSnippetText_isDeleted, sP_markupSnippetText_escapesDeleted, sP_markupSnippetText_isSizeModified, sP_curr_sizeScaleFactor_forMarkupSnippet, sP_markupSnippetText_isColorModified, sP_curr_color_forMarkupSnippet);
+ break;
+ case ((int)VisualizerParent.TextMarkupInputSnippetOptions.icon):
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(sP_curr_iconType_forMarkupCreator, new GUIContent("Icon type"));
+ EditorGUILayout.TextField("Output", sP_resultTextSnippet_insideMarkupTags_forIconInput.stringValue);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ DrawSnippetOptionsForInputTypeOf_text(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isBold, sP_markupSnippetText_escapesBold, sP_markupSnippetText_isStrokeWidthModified, sP_curr_strokeWidthSize0to1_forMarkupSnippet, sP_markupSnippetText_isItalic, sP_markupSnippetText_escapesItalic, sP_markupSnippetText_isUnderlined, sP_markupSnippetText_escapesUnderlined, sP_markupSnippetText_isDeleted, sP_markupSnippetText_escapesDeleted, sP_markupSnippetText_isSizeModified, sP_curr_sizeScaleFactor_forMarkupSnippet, sP_markupSnippetText_isColorModified, sP_curr_color_forMarkupSnippet);
+ break;
+ case ((int)VisualizerParent.TextMarkupInputSnippetOptions.customHeightEmptyLine):
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.TextField("Output", sP_resultTextSnippet_insideMarkupTags_forCustomHeightEmptyLineInput.stringValue);
+ DrawSnippetOptionsForInputTypeOf_customHeightEmptyLine(sP_curr_heightOfEmptyLine_forMarkupCreator);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ case ((int)VisualizerParent.TextMarkupInputSnippetOptions.logSymbol):
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(sP_curr_logType_forMarkupCreator, new GUIContent("Log type"));
+ EditorGUILayout.TextField("Output", sP_resultTextSnippet_insideMarkupTags_forLogSymbolInput.stringValue);
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ DrawSnippetOptionsForInputTypeOf_logSymbol(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isBold, sP_markupSnippetText_escapesBold, sP_markupSnippetText_isStrokeWidthModified, sP_curr_strokeWidthSize0to1_forMarkupSnippet, sP_markupSnippetText_isItalic, sP_markupSnippetText_escapesItalic, sP_markupSnippetText_isUnderlined, sP_markupSnippetText_escapesUnderlined, sP_markupSnippetText_isDeleted, sP_markupSnippetText_escapesDeleted, sP_markupSnippetText_isSizeModified, sP_curr_sizeScaleFactor_forMarkupSnippet);
+ break;
+ case ((int)VisualizerParent.TextMarkupInputSnippetOptions.lineBreak):
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.TextField("Output", "
");
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ break;
+ default:
+ break;
+ }
+ bool markupSnippedInputConfig_changed = EditorGUI.EndChangeCheck();
+ if (markupSnippedInputConfig_changed) { MarkupSnippets(ref sP_resultTextSnippet_insideMarkupTags_forTextInput, ref sP_resultTextSnippet_insideMarkupTags_forIconInput, ref sP_resultTextSnippet_insideMarkupTags_forCustomHeightEmptyLineInput, ref sP_resultTextSnippet_insideMarkupTags_forLogSymbolInput, sP_textSnippet_toPutInMarkupTags.stringValue, (DrawBasics.IconType)sP_curr_iconType_forMarkupCreator.enumValueIndex, (LogType)sP_curr_logType_forMarkupCreator.enumValueIndex, sP_curr_heightOfEmptyLine_forMarkupCreator.floatValue, sP_markupSnippetText_isBold.boolValue, sP_markupSnippetText_isItalic.boolValue, sP_markupSnippetText_isUnderlined.boolValue, sP_markupSnippetText_isDeleted.boolValue, sP_markupSnippetText_isSizeModified.boolValue, sP_markupSnippetText_isColorModified.boolValue, sP_markupSnippetText_isStrokeWidthModified.boolValue, sP_curr_sizeScaleFactor_forMarkupSnippet.floatValue, sP_curr_color_forMarkupSnippet.colorValue, sP_curr_strokeWidthSize0to1_forMarkupSnippet.floatValue, sP_markupSnippetText_escapesBold.boolValue, sP_markupSnippetText_escapesItalic.boolValue, sP_markupSnippetText_escapesUnderlined.boolValue, sP_markupSnippetText_escapesDeleted.boolValue); }
+ }
+
+ void MarkupSnippets(ref SerializedProperty sP_resultTextSnippet_insideMarkupTags_forTextInput, ref SerializedProperty sP_resultTextSnippet_insideMarkupTags_forIconInput, ref SerializedProperty sP_resultTextSnippet_insideMarkupTags_forCustomHeightEmptyLineInput, ref SerializedProperty sP_resultTextSnippet_insideMarkupTags_forLogSymbolInput, string textSnippet_toPutInMarkupTags, DrawBasics.IconType curr_iconType_forMarkupCreator, LogType curr_logType_forMarkupCreator, float curr_heightOfEmptyLine_forMarkupCreator, bool markupSnippetText_isBold, bool markupSnippetText_isItalic, bool markupSnippetText_isUnderlined, bool markupSnippetText_isDeleted, bool markupSnippetText_isSizeModified, bool markupSnippetText_isColorModified, bool markupSnippetText_isStrokeWidthModified, float curr_sizeScaleFactor_forMarkupSnippet, Color curr_color_forMarkupSnippet, float curr_strokeWidthSize0to1_forMarkupSnippet, bool markupSnippetText_escapesBold, bool markupSnippetText_escapesItalic, bool markupSnippetText_escapesUnderlined, bool markupSnippetText_escapesDeleted)
+ {
+ string resultTextSnippet_insideMarkupTags_forTextInput = null;
+ MarkupTextSnippet(true, ref resultTextSnippet_insideMarkupTags_forTextInput, textSnippet_toPutInMarkupTags, markupSnippetText_isBold, markupSnippetText_isItalic, markupSnippetText_isUnderlined, markupSnippetText_isDeleted, markupSnippetText_isSizeModified, markupSnippetText_isColorModified, markupSnippetText_isStrokeWidthModified, curr_sizeScaleFactor_forMarkupSnippet, curr_color_forMarkupSnippet, curr_strokeWidthSize0to1_forMarkupSnippet, markupSnippetText_escapesBold, markupSnippetText_escapesItalic, markupSnippetText_escapesUnderlined, markupSnippetText_escapesDeleted);
+ if (resultTextSnippet_insideMarkupTags_forTextInput == null) { resultTextSnippet_insideMarkupTags_forTextInput = ""; }
+ sP_resultTextSnippet_insideMarkupTags_forTextInput.stringValue = resultTextSnippet_insideMarkupTags_forTextInput;
+
+ string resultTextSnippet_insideMarkupTags_forIconInput = null;
+ MarkupTextSnippet(true, ref resultTextSnippet_insideMarkupTags_forIconInput, DrawText.MarkupIcon(curr_iconType_forMarkupCreator), markupSnippetText_isBold, markupSnippetText_isItalic, markupSnippetText_isUnderlined, markupSnippetText_isDeleted, markupSnippetText_isSizeModified, markupSnippetText_isColorModified, markupSnippetText_isStrokeWidthModified, curr_sizeScaleFactor_forMarkupSnippet, curr_color_forMarkupSnippet, curr_strokeWidthSize0to1_forMarkupSnippet, markupSnippetText_escapesBold, markupSnippetText_escapesItalic, markupSnippetText_escapesUnderlined, markupSnippetText_escapesDeleted);
+ if (resultTextSnippet_insideMarkupTags_forIconInput == null) { resultTextSnippet_insideMarkupTags_forIconInput = ""; }
+ sP_resultTextSnippet_insideMarkupTags_forIconInput.stringValue = resultTextSnippet_insideMarkupTags_forIconInput;
+
+ string resultTextSnippet_insideMarkupTags_forLogSymbolInput = null;
+ MarkupTextSnippet(true, ref resultTextSnippet_insideMarkupTags_forLogSymbolInput, DrawText.MarkupLogSymbol(curr_logType_forMarkupCreator), markupSnippetText_isBold, markupSnippetText_isItalic, markupSnippetText_isUnderlined, markupSnippetText_isDeleted, markupSnippetText_isSizeModified, false, markupSnippetText_isStrokeWidthModified, curr_sizeScaleFactor_forMarkupSnippet, default(Color), curr_strokeWidthSize0to1_forMarkupSnippet, markupSnippetText_escapesBold, markupSnippetText_escapesItalic, markupSnippetText_escapesUnderlined, markupSnippetText_escapesDeleted);
+ if (resultTextSnippet_insideMarkupTags_forLogSymbolInput == null) { resultTextSnippet_insideMarkupTags_forLogSymbolInput = ""; }
+ sP_resultTextSnippet_insideMarkupTags_forLogSymbolInput.stringValue = resultTextSnippet_insideMarkupTags_forLogSymbolInput;
+
+ sP_resultTextSnippet_insideMarkupTags_forCustomHeightEmptyLineInput.stringValue = DrawText.MarkupCustomHeightEmptyLine(curr_heightOfEmptyLine_forMarkupCreator);
+ }
+
+ void MarkupTextSnippet(bool isForMarkupSnippet, ref string stringToFill, string text_withoutMarkupTags, bool isBold, bool isItalic, bool isUnderlined, bool isDeleted, bool isSizeModified, bool isColorModified, bool isStrokeWidthModified, float sizeScaleFactor, Color color, float strokeWidthSizeInPPMofSize, bool markupSnippetText_escapesBold, bool markupSnippetText_escapesItalic, bool markupSnippetText_escapesUnderlined, bool markupSnippetText_escapesDeleted)
+ {
+ if (text_withoutMarkupTags != null && text_withoutMarkupTags != "")
+ {
+ stringToFill = "" + text_withoutMarkupTags;
+
+ if (isBold)
+ {
+ stringToFill = DrawText.MarkupBold(stringToFill);
+ }
+ else
+ {
+ if (isForMarkupSnippet)
+ {
+ if (markupSnippetText_escapesBold)
+ {
+ stringToFill = DrawText.MarkupBoldEscape(stringToFill);
+ }
+ }
+ }
+
+ if (isItalic)
+ {
+ stringToFill = DrawText.MarkupItalic(stringToFill);
+ }
+ else
+ {
+ if (isForMarkupSnippet)
+ {
+ if (markupSnippetText_escapesItalic)
+ {
+ stringToFill = DrawText.MarkupItalicEscape(stringToFill);
+ }
+ }
+ }
+
+ if (isUnderlined)
+ {
+ stringToFill = DrawText.MarkupUnderlined(stringToFill);
+ }
+ else
+ {
+ if (isForMarkupSnippet)
+ {
+ if (markupSnippetText_escapesUnderlined)
+ {
+ stringToFill = DrawText.MarkupUnderlinedEscape(stringToFill);
+ }
+ }
+ }
+
+ if (isDeleted)
+ {
+ stringToFill = DrawText.MarkupDeleted(stringToFill);
+ }
+ else
+ {
+ if (isForMarkupSnippet)
+ {
+ if (markupSnippetText_escapesDeleted)
+ {
+ stringToFill = DrawText.MarkupDeletedEscape(stringToFill);
+ }
+ }
+ }
+
+ if (isSizeModified)
+ {
+ stringToFill = DrawText.MarkupSize(stringToFill, sizeScaleFactor);
+ }
+
+ if (isColorModified)
+ {
+ stringToFill = DrawText.MarkupColor(stringToFill, color);
+ }
+
+ if (isStrokeWidthModified)
+ {
+ stringToFill = DrawText.MarkupStrokeWidth(stringToFill, Float0to1_to_intStrokeWidthInPPMofSize(strokeWidthSizeInPPMofSize));
+ }
+ }
+ }
+
+ int Float0to1_to_intStrokeWidthInPPMofSize(float float0to1)
+ {
+ return Mathf.RoundToInt(float0to1 * UtilitiesDXXL_Text.maxRelStrokeWidth_inPPMofSize);
+ }
+
+ float spaceBetweenMarkupStyleOptions = 0.5f * EditorGUIUtility.singleLineHeight;
+ void DrawSnippetOptionsForInputTypeOf_text(GUIStyle style_ofSnippetCreatorSubHeadlines, SerializedProperty sP_markupSnippetText_isBold, SerializedProperty sP_markupSnippetText_escapesBold, SerializedProperty sP_markupSnippetText_isStrokeWidthModified, SerializedProperty sP_curr_strokeWidthSize0to1_forMarkupSnippet, SerializedProperty sP_markupSnippetText_isItalic, SerializedProperty sP_markupSnippetText_escapesItalic, SerializedProperty sP_markupSnippetText_isUnderlined, SerializedProperty sP_markupSnippetText_escapesUnderlined, SerializedProperty sP_markupSnippetText_isDeleted, SerializedProperty sP_markupSnippetText_escapesDeleted, SerializedProperty sP_markupSnippetText_isSizeModified, SerializedProperty sP_curr_sizeScaleFactor_forMarkupSnippet, SerializedProperty sP_markupSnippetText_isColorModified, SerializedProperty sP_curr_color_forMarkupSnippet)
+ {
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_bold(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isBold, sP_markupSnippetText_escapesBold);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_strokeWidth(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isStrokeWidthModified, sP_curr_strokeWidthSize0to1_forMarkupSnippet);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_italic(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isItalic, sP_markupSnippetText_escapesItalic);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_underlined(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isUnderlined, sP_markupSnippetText_escapesUnderlined);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_deleted(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isDeleted, sP_markupSnippetText_escapesDeleted);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_sizeScaling(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isSizeModified, sP_curr_sizeScaleFactor_forMarkupSnippet);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_color(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isColorModified, sP_curr_color_forMarkupSnippet);
+ }
+
+ void DrawSnippetOptionsForInputTypeOf_customHeightEmptyLine(SerializedProperty sP_curr_heightOfEmptyLine_forMarkupCreator)
+ {
+ EditorGUILayout.PropertyField(sP_curr_heightOfEmptyLine_forMarkupCreator, new GUIContent("Gap size", "A value of 1 means the gap has the height of 1 line."));
+ }
+
+ void DrawSnippetOptionsForInputTypeOf_logSymbol(GUIStyle style_ofSnippetCreatorSubHeadlines, SerializedProperty sP_markupSnippetText_isBold, SerializedProperty sP_markupSnippetText_escapesBold, SerializedProperty sP_markupSnippetText_isStrokeWidthModified, SerializedProperty sP_curr_strokeWidthSize0to1_forMarkupSnippet, SerializedProperty sP_markupSnippetText_isItalic, SerializedProperty sP_markupSnippetText_escapesItalic, SerializedProperty sP_markupSnippetText_isUnderlined, SerializedProperty sP_markupSnippetText_escapesUnderlined, SerializedProperty sP_markupSnippetText_isDeleted, SerializedProperty sP_markupSnippetText_escapesDeleted, SerializedProperty sP_markupSnippetText_isSizeModified, SerializedProperty sP_curr_sizeScaleFactor_forMarkupSnippet)
+ {
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_bold(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isBold, sP_markupSnippetText_escapesBold);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_strokeWidth(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isStrokeWidthModified, sP_curr_strokeWidthSize0to1_forMarkupSnippet);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_italic(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isItalic, sP_markupSnippetText_escapesItalic);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_underlined(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isUnderlined, sP_markupSnippetText_escapesUnderlined);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_deleted(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isDeleted, sP_markupSnippetText_escapesDeleted);
+ GUILayout.Space(spaceBetweenMarkupStyleOptions);
+ DrawSnippetOption_sizeScaling(style_ofSnippetCreatorSubHeadlines, sP_markupSnippetText_isSizeModified, sP_curr_sizeScaleFactor_forMarkupSnippet);
+ }
+
+ void DrawSnippetOption_bold(GUIStyle style_ofSnippetCreatorSubHeadlines, SerializedProperty sP_markupSnippetText_isBold, SerializedProperty sP_markupSnippetText_escapesBold)
+ {
+ EditorGUILayout.LabelField("Bold", style_ofSnippetCreatorSubHeadlines);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUI.BeginDisabledGroup(sP_markupSnippetText_escapesBold.boolValue);
+ EditorGUILayout.PropertyField(sP_markupSnippetText_isBold, new GUIContent("Enable"));
+ EditorGUI.EndDisabledGroup();
+ GUIContent guiContent_for_escapeToggle = new GUIContent("Escape enclosing", "If you copy the created snippet into a text that is already bold, then this will remove the enclosing bold style from the snippet." + Environment.NewLine + Environment.NewLine + "Warning: If the enclosing text is NOT bold this will lead to a confusing faulty final text.");
+ EditorGUILayout.PropertyField(sP_markupSnippetText_escapesBold, guiContent_for_escapeToggle);
+ if (sP_markupSnippetText_escapesBold.boolValue) { sP_markupSnippetText_isBold.boolValue = false; }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawSnippetOption_strokeWidth(GUIStyle style_ofSnippetCreatorSubHeadlines, SerializedProperty sP_markupSnippetText_isStrokeWidthModified, SerializedProperty sP_curr_strokeWidthSize0to1_forMarkupSnippet)
+ {
+ EditorGUILayout.LabelField("Stroke width", style_ofSnippetCreatorSubHeadlines);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_markupSnippetText_isStrokeWidthModified, new GUIContent("Enable"));
+ EditorGUI.BeginDisabledGroup(!sP_markupSnippetText_isStrokeWidthModified.boolValue);
+ sP_curr_strokeWidthSize0to1_forMarkupSnippet.floatValue = EditorGUILayout.Slider(sP_curr_strokeWidthSize0to1_forMarkupSnippet.floatValue, 0.0f, 1.0f);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawSnippetOption_italic(GUIStyle style_ofSnippetCreatorSubHeadlines, SerializedProperty sP_markupSnippetText_isItalic, SerializedProperty sP_markupSnippetText_escapesItalic)
+ {
+ EditorGUILayout.LabelField("Italic", style_ofSnippetCreatorSubHeadlines);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUI.BeginDisabledGroup(sP_markupSnippetText_escapesItalic.boolValue);
+ EditorGUILayout.PropertyField(sP_markupSnippetText_isItalic, new GUIContent("Enable"));
+ EditorGUI.EndDisabledGroup();
+ GUIContent guiContent_for_escapeToggle = new GUIContent("Escape enclosing", "If you copy the created snippet into a text that is already italic, then this will remove the enclosing italic style from the snippet." + Environment.NewLine + Environment.NewLine + "Warning: If the enclosing text is NOT italic this will lead to a confusing faulty final text.");
+ EditorGUILayout.PropertyField(sP_markupSnippetText_escapesItalic, guiContent_for_escapeToggle);
+ if (sP_markupSnippetText_escapesItalic.boolValue) { sP_markupSnippetText_isItalic.boolValue = false; }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawSnippetOption_underlined(GUIStyle style_ofSnippetCreatorSubHeadlines, SerializedProperty sP_markupSnippetText_isUnderlined, SerializedProperty sP_markupSnippetText_escapesUnderlined)
+ {
+ EditorGUILayout.LabelField("Underlined", style_ofSnippetCreatorSubHeadlines);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUI.BeginDisabledGroup(sP_markupSnippetText_escapesUnderlined.boolValue);
+ EditorGUILayout.PropertyField(sP_markupSnippetText_isUnderlined, new GUIContent("Enable"));
+ EditorGUI.EndDisabledGroup();
+ GUIContent guiContent_for_escapeToggle = new GUIContent("Escape enclosing", "If you copy the created snippet into a text that is already underlined, then this will remove the enclosing underlined style from the snippet." + Environment.NewLine + Environment.NewLine + "Warning: If the enclosing text is NOT underlined this will lead to a confusing faulty final text.");
+ EditorGUILayout.PropertyField(sP_markupSnippetText_escapesUnderlined, guiContent_for_escapeToggle);
+ if (sP_markupSnippetText_escapesUnderlined.boolValue) { sP_markupSnippetText_isUnderlined.boolValue = false; }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawSnippetOption_deleted(GUIStyle style_ofSnippetCreatorSubHeadlines, SerializedProperty sP_markupSnippetText_isDeleted, SerializedProperty sP_markupSnippetText_escapesDeleted)
+ {
+ EditorGUILayout.LabelField("Deleted", style_ofSnippetCreatorSubHeadlines);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUI.BeginDisabledGroup(sP_markupSnippetText_escapesDeleted.boolValue);
+ EditorGUILayout.PropertyField(sP_markupSnippetText_isDeleted, new GUIContent("Enable"));
+ EditorGUI.EndDisabledGroup();
+ GUIContent guiContent_for_escapeToggle = new GUIContent("Escape enclosing", "If you copy the created snippet into a text that is already deleted, then this will remove the enclosing deleted style from the snippet." + Environment.NewLine + Environment.NewLine + "Warning: If the enclosing text is NOT deleted this will lead to a confusing faulty final text.");
+ EditorGUILayout.PropertyField(sP_markupSnippetText_escapesDeleted, guiContent_for_escapeToggle);
+ if (sP_markupSnippetText_escapesDeleted.boolValue) { sP_markupSnippetText_isDeleted.boolValue = false; }
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawSnippetOption_sizeScaling(GUIStyle style_ofSnippetCreatorSubHeadlines, SerializedProperty sP_markupSnippetText_isSizeModified, SerializedProperty sP_curr_sizeScaleFactor_forMarkupSnippet)
+ {
+ EditorGUILayout.LabelField("Size scaling", style_ofSnippetCreatorSubHeadlines);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_markupSnippetText_isSizeModified, new GUIContent("Enable"));
+ EditorGUI.BeginDisabledGroup(!sP_markupSnippetText_isSizeModified.boolValue);
+ sP_curr_sizeScaleFactor_forMarkupSnippet.floatValue = EditorGUILayout.Slider(sP_curr_sizeScaleFactor_forMarkupSnippet.floatValue, 0.1f, 20.0f);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ void DrawSnippetOption_color(GUIStyle style_ofSnippetCreatorSubHeadlines, SerializedProperty sP_markupSnippetText_isColorModified, SerializedProperty sP_curr_color_forMarkupSnippet)
+ {
+ EditorGUILayout.LabelField("Color", style_ofSnippetCreatorSubHeadlines);
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PropertyField(sP_markupSnippetText_isColorModified, new GUIContent("Enable"));
+ EditorGUI.BeginDisabledGroup(!sP_markupSnippetText_isColorModified.boolValue);
+ sP_curr_color_forMarkupSnippet.colorValue = EditorGUILayout.ColorField(sP_curr_color_forMarkupSnippet.colorValue);
+ EditorGUI.EndDisabledGroup();
+ GUILayout.EndHorizontal();
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/VisualizerParentInspector.cs.meta b/Editor/DrawDebugLibrary/VisualizerParentInspector.cs.meta
new file mode 100644
index 0000000..71ac2de
--- /dev/null
+++ b/Editor/DrawDebugLibrary/VisualizerParentInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: efd8084923da7964681f4c555a2abb1e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/VisualizerScreenspaceParentInspector.cs b/Editor/DrawDebugLibrary/VisualizerScreenspaceParentInspector.cs
new file mode 100644
index 0000000..9fe4795
--- /dev/null
+++ b/Editor/DrawDebugLibrary/VisualizerScreenspaceParentInspector.cs
@@ -0,0 +1,87 @@
+namespace DrawXXL
+{
+ using System;
+ using UnityEngine;
+
+#if UNITY_EDITOR
+ using UnityEditor;
+
+ [CustomEditor(typeof(VisualizerScreenspaceParent))]
+ [CanEditMultipleObjects]
+ public class VisualizerScreenspaceParentInspector : VisualizerParentInspector
+ {
+ public string tooltip_explaining_relativeToViewPortHeight = "This is relative to the viewport height.";
+ public VisualizerScreenspaceParent visualizerScreenspaceParentMonoBehaviour_unserialized;
+ void OnEnable()
+ {
+ OnEnable_base();
+ OnEnable_ofScreenspaceParent();
+ }
+
+ public void OnEnable_ofScreenspaceParent()
+ {
+ visualizerScreenspaceParentMonoBehaviour_unserialized = (VisualizerScreenspaceParent)target;
+ }
+
+ public bool DrawCameraChooser(bool drawWarningBox_forDisabledCamComponents)
+ {
+ SerializedProperty sP_screenspaceDefiningCamera = serializedObject.FindProperty("screenspaceDefiningCamera");
+ SerializedProperty sP_usedCameraIsAvailable = serializedObject.FindProperty("usedCameraIsAvailable");
+ EditorGUILayout.PropertyField(sP_screenspaceDefiningCamera, new GUIContent("Camera for drawing", "The viewport space of this camera is used for drawing."));
+
+ switch (sP_screenspaceDefiningCamera.enumValueIndex)
+ {
+ case (int)VisualizerScreenspaceParent.ScreenspaceDefiningCameras.cameraAtThisGameobject:
+ if (sP_usedCameraIsAvailable.boolValue == false)
+ {
+ EditorGUILayout.HelpBox("Drawing is skipped: There is no camera component attached to this gameobject.", MessageType.Warning, true);
+ return false;
+ }
+ break;
+ case (int)VisualizerScreenspaceParent.ScreenspaceDefiningCameras.manuallyAssignedCamera:
+ SerializedProperty sP_manuallyAssignedCamera = serializedObject.FindProperty("manuallyAssignedCamera");
+ EditorGUILayout.PropertyField(sP_manuallyAssignedCamera, new GUIContent("Manually assigned camera"));
+ if (sP_manuallyAssignedCamera.objectReferenceValue == null)
+ {
+ EditorGUILayout.HelpBox("Assign a camera to start drawing.", MessageType.Info, true);
+ return false;
+ }
+ break;
+ case (int)VisualizerScreenspaceParent.ScreenspaceDefiningCameras.automaticallySearchForMainGameViewCamera:
+ if (sP_usedCameraIsAvailable.boolValue == false)
+ {
+ EditorGUILayout.HelpBox("Drawing is skipped: No camera could be found.", MessageType.Warning, true);
+ return false;
+ }
+ break;
+ case (int)VisualizerScreenspaceParent.ScreenspaceDefiningCameras.sceneViewCamera:
+ if (sP_usedCameraIsAvailable.boolValue == false)
+ {
+ EditorGUILayout.HelpBox("Drawing is skipped: There is no Scene View Window available.", MessageType.Warning, true);
+ return false;
+ }
+ else
+ {
+ EditorGUI.indentLevel = EditorGUI.indentLevel + 1;
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("alwaysChangeToCurrentlyActiveSceneView_insteadOfStayingAtTheSelectedOne"), new GUIContent("Always change to the currently active Scene View.", "Always change to the currently active Scene View:" + Environment.NewLine + Environment.NewLine + "This affects the situation when there is more then one Scene View window docked in the Editor." + Environment.NewLine + Environment.NewLine + "If it is disabled:" + Environment.NewLine + "The visualized camera will always remain the one of the same Scene View window, also if the focus changes between multiple Scene View windows." + Environment.NewLine + Environment.NewLine + "If it is enabled:" + Environment.NewLine + "The visualized camera will ongoingly switch to be the one of the Scene View window that has focus."));
+ EditorGUI.indentLevel = EditorGUI.indentLevel - 1;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (drawWarningBox_forDisabledCamComponents)
+ {
+ if (visualizerScreenspaceParentMonoBehaviour_unserialized.CheckIf_usedCameraIsActiveAndEnabled() == false)
+ {
+ EditorGUILayout.HelpBox("The drawing may be invisible, because the used camera component is inactive or disabled.", MessageType.Warning, true);
+ }
+ }
+
+ return true;
+ }
+
+ }
+#endif
+}
diff --git a/Editor/DrawDebugLibrary/VisualizerScreenspaceParentInspector.cs.meta b/Editor/DrawDebugLibrary/VisualizerScreenspaceParentInspector.cs.meta
new file mode 100644
index 0000000..5dfeef4
--- /dev/null
+++ b/Editor/DrawDebugLibrary/VisualizerScreenspaceParentInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 659ec197b9a568846aad9c7a9692b8fc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets.meta b/Editor/DrawDebugLibrary/code snippets.meta
new file mode 100644
index 0000000..1afadb0
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 519c3eebaeba63646922f49219629a8a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawBasics.snippet b/Editor/DrawDebugLibrary/code snippets/drawBasics.snippet
new file mode 100644
index 0000000..ba8b7b2
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawBasics.snippet
@@ -0,0 +1,2890 @@
+
+
+
+
+ drawLine
+ drawLine
+ Draw a Line in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Line
+ line
+
+
+
+
+
+
+
+ drawRay
+ drawRay
+ Draw a Ray in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ray
+ ray
+
+
+
+
+
+
+
+ drawLineFrom
+ drawLineFrom
+ Draw a LineFrom in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineFrom
+ lineFrom
+
+
+
+
+
+
+
+ drawLineTo
+ drawLineTo
+ Draw a LineTo in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineTo
+ lineTo
+
+
+
+
+
+
+
+ drawLineColFade
+ drawLineColFade
+ Draw a LineColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineColFade
+ lineColFade
+
+
+
+
+
+
+
+ drawRayColFade
+ drawRayColFade
+ Draw a RayColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayColFade
+ rayColFade
+
+
+
+
+
+
+
+ drawLineFromColFade
+ drawLineFromColFade
+ Draw a LineFromColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineFromColFade
+ lineFromColFade
+
+
+
+
+
+
+
+ drawLineToColFade
+ drawLineToColFade
+ Draw a LineToColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineToColFade
+ lineToColFade
+
+
+
+
+
+
+
+ drawLineCircled_vecToVec
+ drawLineCircled_vecToVec
+ Draw a LineCircled in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ lineCircled
+
+
+
+
+
+
+
+ drawLineCircled_fromQuatUp
+ drawLineCircled_fromQuatUp
+ Draw a LineCircled in the Unity Editor. (quaternion-forward defines turnAxis, line starts at quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ lineCircled
+
+
+
+
+
+
+
+ drawLineCircled_relToQuatUp
+ drawLineCircled_relToQuatUp
+ Draw a LineCircled in the Unity Editor. (quaternion-forward defines turnAxis, start and end angles measured relative to quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ lineCircled
+
+
+
+
+
+
+
+ drawLineCircled_aroundRayAxis
+ drawLineCircled_aroundRayAxis
+ Draw a LineCircled in the Unity Editor. (via ray as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ lineCircled
+
+
+
+
+
+
+
+ drawLineCircled_aroundVecAxis
+ drawLineCircled_aroundVecAxis
+ Draw a LineCircled in the Unity Editor. (via vector as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ lineCircled
+
+
+
+
+
+
+
+ drawCircleSegment_vecToVec
+ drawCircleSegment_vecToVec
+ Draw a CircleSegment in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ circleSegment
+
+
+
+
+
+
+
+ drawCircleSegment_fromQuatUp
+ drawCircleSegment_fromQuatUp
+ Draw a CircleSegment in the Unity Editor. (quaternion-forward defines turnAxis, segment starts at quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ circleSegment
+
+
+
+
+
+
+
+ drawCircleSegment_relToQuatUp
+ drawCircleSegment_relToQuatUp
+ Draw a CircleSegment in the Unity Editor. (quaternion-forward defines turnAxis, start and end angles measured relative to quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ circleSegment
+
+
+
+
+
+
+
+ drawCircleSegment_aroundRayAxis
+ drawCircleSegment_aroundRayAxis
+ Draw a CircleSegment in the Unity Editor. (via ray as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ circleSegment
+
+
+
+
+
+
+
+ drawCircleSegment_aroundVecAxis
+ drawCircleSegment_aroundVecAxis
+ Draw a CircleSegment in the Unity Editor. (via vector as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ circleSegment
+
+
+
+
+
+
+
+ drawLineString_array
+ drawLineString_array
+ Draw a LineString in the Unity Editor. (via points from array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineString
+ lineString
+
+
+
+
+
+
+
+ drawLineString_list
+ drawLineString_list
+ Draw a LineString in the Unity Editor. (via points from list)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ bool closeGapBetweenLastAndFirstPoint_of_$name$ = false;
+ float width_of_$name$ = 0.0f;
+ string text_of_$name$ = null;
+ DrawBasics.LineStyle style_of_$name$ = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor_of_$name$ = 1.0f;
+ bool textBlockAboveLine_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics.LineString(points_of_$name$, color_of_$name$, closeGapBetweenLastAndFirstPoint_of_$name$, width_of_$name$, text_of_$name$, style_of_$name$, stylePatternScaleFactor_of_$name$, textBlockAboveLine_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineString
+ lineString
+
+
+
+
+
+
+
+ drawLineStringColFade_array
+ drawLineStringColFade_array
+ Draw a LineStringColFade in the Unity Editor. (via points from array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineStringColFade
+ lineStringColFade
+
+
+
+
+
+
+
+ drawLineStringColFade_list
+ drawLineStringColFade_list
+ Draw a LineStringColFade in the Unity Editor. (via points from list)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color startColor_of_$name$ = ;
+ Color endColor_of_$name$ = ;
+ bool closeGapBetweenLastAndFirstPoint_of_$name$ = false;
+ float width_of_$name$ = 0.0f;
+ string text_of_$name$ = null;
+ DrawBasics.LineStyle style_of_$name$ = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor_of_$name$ = 1.0f;
+ bool textBlockAboveLine_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics.LineStringColorFade(points_of_$name$, startColor_of_$name$, endColor_of_$name$, closeGapBetweenLastAndFirstPoint_of_$name$, width_of_$name$, text_of_$name$, style_of_$name$, stylePatternScaleFactor_of_$name$, textBlockAboveLine_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineStringColFade
+ lineStringColFade
+
+
+
+
+
+
+
+ drawPointArray
+ drawPointArray
+ Draw a PointArray in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointArray
+ pointArray
+
+
+
+
+
+
+
+ drawPointList
+ drawPointList
+ Draw a PointList in the Unity Editor.
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ float sizeOfMarkingCross_of_$name$ = 1.0f;
+ float markingCrossLinesWidth_of_$name$ = 0.0f;
+ bool drawCoordsAsText_of_$name$ = true;
+ bool hideZDir_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics.PointList(points_of_$name$, color_of_$name$, sizeOfMarkingCross_of_$name$, markingCrossLinesWidth_of_$name$, drawCoordsAsText_of_$name$, hideZDir_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointList
+ pointList
+
+
+
+
+
+
+
+ drawPoint
+ drawPoint
+ Draw a Point in the Unity Editor. (pointMarking has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Point
+ point
+
+
+
+
+
+
+
+ drawPoint_prioText
+ drawPoint_prioText
+ Draw a Point in the Unity Editor. (text parameter has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Point
+ point
+
+
+
+
+
+
+
+ drawPointLocalArray_transformAsParent
+ drawPointLocalArray_transformAsParent
+ Draw a PointLocalArray in the Unity Editor. (local space is defined by transform as parent)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocalArray
+ pointLocalArray
+
+
+
+
+
+
+
+ drawPointLocalList_transformAsParent
+ drawPointLocalList_transformAsParent
+ Draw a PointLocalList in the Unity Editor. (local space is defined by transform as parent)
+ Draw XXL
+
+
+
+ localPoints_of_$name$ = $end$;
+ Transform parentTransform_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ float sizeOfMarkingCross_global_of_$name$ = 1.0f;
+ float markingCrossLinesWidth_of_$name$ = 0.0f;
+ bool drawCoordsAsText_of_$name$ = true;
+ bool additionallyDrawGlobalCoords_of_$name$ = false;
+ bool drawLocalOrigin_of_$name$ = true;
+ bool hideZDir_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics.PointLocalList(localPoints_of_$name$, parentTransform_of_$name$, color_of_$name$, sizeOfMarkingCross_global_of_$name$, markingCrossLinesWidth_of_$name$, drawCoordsAsText_of_$name$, additionallyDrawGlobalCoords_of_$name$, drawLocalOrigin_of_$name$, hideZDir_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocalList
+ pointLocalList
+
+
+
+
+
+
+
+ drawPointLocalArray_vecAsParent
+ drawPointLocalArray_vecAsParent
+ Draw a PointLocalArray in the Unity Editor. (local space is defined by vectors as parent)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocalArray
+ pointLocalArray
+
+
+
+
+
+
+
+ drawPointLocalList_vecAsParent
+ drawPointLocalList_vecAsParent
+ Draw a PointLocalList in the Unity Editor. (local space is defined by vectors as parent)
+ Draw XXL
+
+
+
+ localPoints_of_$name$ = $end$;
+ Vector3 parentPositionGlobal_of_$name$ = ;
+ Quaternion parentRotationGlobal_of_$name$ = ;
+ Vector3 parentScaleGlobal_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ float sizeOfMarkingCross_global_of_$name$ = 1.0f;
+ float markingCrossLinesWidth_of_$name$ = 0.0f;
+ bool drawCoordsAsText_of_$name$ = true;
+ bool additionallyDrawGlobalCoords_of_$name$ = false;
+ bool drawLocalOrigin_of_$name$ = true;
+ bool hideZDir_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics.PointLocalList(localPoints_of_$name$, parentPositionGlobal_of_$name$, parentRotationGlobal_of_$name$, parentScaleGlobal_of_$name$, color_of_$name$, sizeOfMarkingCross_global_of_$name$, markingCrossLinesWidth_of_$name$, drawCoordsAsText_of_$name$, additionallyDrawGlobalCoords_of_$name$, drawLocalOrigin_of_$name$, hideZDir_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocalList
+ pointLocalList
+
+
+
+
+
+
+
+ drawPointLocal_transformAsParent
+ drawPointLocal_transformAsParent
+ Draw a PointLocal in the Unity Editor. (local space is defined by transform as parent) (pointMarking has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocal
+ pointLocal
+
+
+
+
+
+
+
+ drawPointLocal_transformAsParent_prioText
+ drawPointLocal_transformAsParent_prioText
+ Draw a PointLocal in the Unity Editor. (local space is defined by transform as parent) (text parameter has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocal
+ pointLocal
+
+
+
+
+
+
+
+ drawPointLocal_vecAsParent
+ drawPointLocal_vecAsParent
+ Draw a PointLocal in the Unity Editor. (local space is defined by vectors as parent) (pointMarking has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocal
+ pointLocal
+
+
+
+
+
+
+
+ drawPointLocal_vecAsParent_prioText
+ drawPointLocal_vecAsParent_prioText
+ Draw a PointLocal in the Unity Editor. (local space is defined by vectors as parent) (text parameter has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocal
+ pointLocal
+
+
+
+
+
+
+
+ drawPointTag
+ drawPointTag
+ Draw a PointTag in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointTag
+ pointTag
+
+
+
+
+
+
+
+ drawVector
+ drawVector
+ Draw a Vector in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Vector
+ vector
+
+
+
+
+
+
+
+ drawVectorFrom
+ drawVectorFrom
+ Draw a VectorFrom in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorFrom
+ vectorFrom
+
+
+
+
+
+
+
+ drawVectorTo
+ drawVectorTo
+ Draw a VectorTo in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorTo
+ vectorTo
+
+
+
+
+
+
+
+ drawVectorCircled_vecToVec
+ drawVectorCircled_vecToVec
+ Draw a VectorCircled in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ vectorCircled
+
+
+
+
+
+
+
+ drawVectorCircled_fromQuatUp
+ drawVectorCircled_fromQuatUp
+ Draw a VectorCircled in the Unity Editor. (quaternion-forward defines turnAxis, vector starts at quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ vectorCircled
+
+
+
+
+
+
+
+ drawVectorCircled_relToQuatUp
+ drawVectorCircled_relToQuatUp
+ Draw a VectorCircled in the Unity Editor. (quaternion-forward defines turnAxis, start and end angles measured relative to quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ vectorCircled
+
+
+
+
+
+
+
+ drawVectorCircled_aroundRayAxis
+ drawVectorCircled_aroundRayAxis
+ Draw a VectorCircled in the Unity Editor. (via Ray as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ vectorCircled
+
+
+
+
+
+
+
+ drawVectorCircled_aroundVecAxis
+ drawVectorCircled_aroundVecAxis
+ Draw a VectorCircled in the Unity Editor. (via Vector as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ vectorCircled
+
+
+
+
+
+
+
+ drawIcon_rotViaVec
+ drawIcon_rotViaVec
+ Draw an Icon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Icon
+ icon
+
+
+
+
+
+
+
+ drawIcon_rotViaQuat
+ drawIcon_rotViaQuat
+ Draw an Icon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Icon
+ icon
+
+
+
+
+
+
+
+ drawDot
+ drawDot
+ Draw a Dot in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Dot
+ dot
+
+
+
+
+
+
+
+ drawMovingArrowsRay
+ drawMovingArrowsRay
+ Draw a MovingArrowsRay in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn MovingArrowsRay
+ movingArrowsRay
+
+
+
+
+
+
+
+ drawMovingArrowsLine
+ drawMovingArrowsLine
+ Draw a MovingArrowsLine in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn MovingArrowsLine
+ movingArrowsLine
+
+
+
+
+
+
+
+ drawRayWithAlternatingColors
+ drawRayWithAlternatingColors
+ Draw a RayWithAlternatingColors in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayWithAlternatingColors
+ rayWithAlternatingColors
+
+
+
+
+
+
+
+ drawLineWithAlternatingColors
+ drawLineWithAlternatingColors
+ Draw a LineWithAlternatingColors in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineWithAlternatingColors
+ lineWithAlternatingColors
+
+
+
+
+
+
+
+ drawBlinkingRay
+ drawBlinkingRay
+ Draw a BlinkingRay in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BlinkingRay
+ blinkingRay
+
+
+
+
+
+
+
+ drawBlinkingLine
+ drawBlinkingLine
+ Draw a BlinkingLine in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BlinkingLine
+ blinkingLine
+
+
+
+
+
+
+
+ drawRayUnderTension
+ drawRayUnderTension
+ Draw a RayUnderTension in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayUnderTension
+ rayUnderTension
+
+
+
+
+
+
+
+ drawLineUnderTension
+ drawLineUnderTension
+ Draw a LineUnderTension in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineUnderTension
+ lineUnderTension
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic_go_go
+ drawBezierSegmentQuadratic_go_go
+ Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 2 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ bezierSegmentQuadratic
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic_tr_tr
+ drawBezierSegmentQuadratic_tr_tr
+ Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 2 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ bezierSegmentQuadratic
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic_go_go_go
+ drawBezierSegmentQuadratic_go_go_go
+ Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 3 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ bezierSegmentQuadratic
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic_tr_tr_tr
+ drawBezierSegmentQuadratic_tr_tr_tr
+ Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 3 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ bezierSegmentQuadratic
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic_vec
+ drawBezierSegmentQuadratic_vec
+ Draw a BezierSegmentQuadratic in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ bezierSegmentQuadratic
+
+
+
+
+
+
+
+ drawBezierSegmentCubic_go_go
+ drawBezierSegmentCubic_go_go
+ Draw a BezierSegmentCubic in the Unity Editor. (defined by 2 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ bezierSegmentCubic
+
+
+
+
+
+
+
+ drawBezierSegmentCubic_tr_tr
+ drawBezierSegmentCubic_tr_tr
+ Draw a BezierSegmentCubic in the Unity Editor. (defined by 2 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ bezierSegmentCubic
+
+
+
+
+
+
+
+ drawBezierSegmentCubic_go_go_go
+ drawBezierSegmentCubic_go_go_go
+ Draw a BezierSegmentCubic in the Unity Editor. (defined by 3 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ bezierSegmentCubic
+
+
+
+
+
+
+
+ drawBezierSegmentCubic_tr_tr_tr
+ drawBezierSegmentCubic_tr_tr_tr
+ Draw a BezierSegmentCubic in the Unity Editor. (defined by 3 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ bezierSegmentCubic
+
+
+
+
+
+
+
+ drawBezierSegmentCubic_vec
+ drawBezierSegmentCubic_vec
+ Draw a BezierSegmentCubic in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ bezierSegmentCubic
+
+
+
+
+
+
+
+ drawBezierSpline_goArray
+ drawBezierSpline_goArray
+ Draw a BezierSpline in the Unity Editor. (control points from array of gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
+
+ drawBezierSpline_goList
+ drawBezierSpline_goList
+ Draw a BezierSpline in the Unity Editor. (control points from list of gameobjects)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList_of_$name$ = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned;
+ string text_of_$name$ = null;
+ float width_of_$name$ = 0.0f;
+ bool closeGapFromEndToStart_of_$name$ = false;
+ int straightSubDivisionsPerSegment_of_$name$ = 50;
+ float textSize_of_$name$ = 0.1f;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics.BezierSpline(points_of_$name$, color_of_$name$, interpretationOfList_of_$name$, text_of_$name$, width_of_$name$, closeGapFromEndToStart_of_$name$, straightSubDivisionsPerSegment_of_$name$, textSize_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
+
+ drawBezierSpline_trArray
+ drawBezierSpline_trArray
+ Draw a BezierSpline in the Unity Editor. (control points from array of transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
+
+ drawBezierSpline_trList
+ drawBezierSpline_trList
+ Draw a BezierSpline in the Unity Editor. (control points from list of transforms)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList_of_$name$ = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned;
+ string text_of_$name$ = null;
+ float width_of_$name$ = 0.0f;
+ bool closeGapFromEndToStart_of_$name$ = false;
+ int straightSubDivisionsPerSegment_of_$name$ = 50;
+ float textSize_of_$name$ = 0.1f;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics.BezierSpline(points_of_$name$, color_of_$name$, interpretationOfList_of_$name$, text_of_$name$, width_of_$name$, closeGapFromEndToStart_of_$name$, straightSubDivisionsPerSegment_of_$name$, textSize_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
+
+ drawBezierSpline_vecArray
+ drawBezierSpline_vecArray
+ Draw a BezierSpline in the Unity Editor. (control points from array of vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
+
+ drawBezierSpline_vecList
+ drawBezierSpline_vecList
+ Draw a BezierSpline in the Unity Editor. (control points from list of vectors)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList_of_$name$ = DrawBasics.BezierPosInterpretation.start_control1_control2_endIsNextStart;
+ string text_of_$name$ = null;
+ float width_of_$name$ = 0.0f;
+ bool closeGapFromEndToStart_of_$name$ = false;
+ int straightSubDivisionsPerSegment_of_$name$ = 50;
+ float textSize_of_$name$ = 0.1f;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics.BezierSpline(points_of_$name$, color_of_$name$, interpretationOfList_of_$name$, text_of_$name$, width_of_$name$, closeGapFromEndToStart_of_$name$, straightSubDivisionsPerSegment_of_$name$, textSize_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawBasics.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawBasics.snippet.meta
new file mode 100644
index 0000000..903398a
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawBasics.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: a6372d521eb9ee34e93d5bc4660977e8
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawBasics2D.snippet b/Editor/DrawDebugLibrary/code snippets/drawBasics2D.snippet
new file mode 100644
index 0000000..1f76d0e
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawBasics2D.snippet
@@ -0,0 +1,2642 @@
+
+
+
+
+ drawLine2D
+ drawLine2D
+ Draw a Line in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Line
+ line
+
+
+
+
+
+
+
+ drawRay2D
+ drawRay2D
+ Draw a Ray in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ray
+ ray
+
+
+
+
+
+
+
+ drawLineFrom2D
+ drawLineFrom2D
+ Draw a LineFrom in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineFrom
+ lineFrom
+
+
+
+
+
+
+
+ drawLineTo2D
+ drawLineTo2D
+ Draw a LineTo in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineTo
+ lineTo
+
+
+
+
+
+
+
+ drawLineColFade2D
+ drawLineColFade2D
+ Draw a LineColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineColFade
+ lineColFade
+
+
+
+
+
+
+
+ drawRayColFade2D
+ drawRayColFade2D
+ Draw a RayColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayColFade
+ rayColFade
+
+
+
+
+
+
+
+ drawLineFromColFade2D
+ drawLineFromColFade2D
+ Draw a LineFromColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineFromColFade
+ lineFromColFade
+
+
+
+
+
+
+
+ drawLineToColFade2D
+ drawLineToColFade2D
+ Draw a LineToColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineToColFade
+ lineToColFade
+
+
+
+
+
+
+
+ drawLineCircled2D_vecToVec
+ drawLineCircled2D_vecToVec
+ Draw a LineCircled in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ lineCircled
+
+
+
+
+
+
+
+ drawLineCircled2D_angleFromStartPos
+ drawLineCircled2D_angleFromStartPos
+ Draw a LineCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ lineCircled
+
+
+
+
+
+
+
+ drawLineCircled2D_angleToAngle
+ drawLineCircled2D_angleToAngle
+ Draw a LineCircled in the Unity Editor. (turnCenter defined as position, angles relative to up-vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ lineCircled
+
+
+
+
+
+
+
+ drawCircleSegment2D_vecToVec
+ drawCircleSegment2D_vecToVec
+ Draw a CircleSegment in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ circleSegment
+
+
+
+
+
+
+
+ drawCircleSegment2D_angleFromStartPos
+ drawCircleSegment2D_angleFromStartPos
+ Draw a CircleSegment in the Unity Editor. (turnCenter and startPositionOnPerimeter defined as positions, angle as float)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ circleSegment
+
+
+
+
+
+
+
+ drawCircleSegment2D_angleToAngle
+ drawCircleSegment2D_angleToAngle
+ Draw a CircleSegment in the Unity Editor. (turnCenter defined as position, angles relative to up-vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ circleSegment
+
+
+
+
+
+
+
+ drawLineString2D_array
+ drawLineString2D_array
+ Draw a LineString in the Unity Editor. (via points from array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineString
+ lineString
+
+
+
+
+
+
+
+ drawLineString2D_list
+ drawLineString2D_list
+ Draw a LineString in the Unity Editor. (via points from list)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ bool closeGapBetweenLastAndFirstPoint_of_$name$ = false;
+ float width_of_$name$ = 0.0f;
+ string text_of_$name$ = null;
+ DrawBasics.LineStyle style_of_$name$ = DrawBasics.LineStyle.solid;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ float stylePatternScaleFactor_of_$name$ = 1.0f;
+ bool textBlockAboveLine_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics2D.LineString(points_of_$name$, color_of_$name$, closeGapBetweenLastAndFirstPoint_of_$name$, width_of_$name$, text_of_$name$, style_of_$name$, custom_zPos_of_$name$, stylePatternScaleFactor_of_$name$, textBlockAboveLine_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineString
+ lineString
+
+
+
+
+
+
+
+ drawLineStringColFade2D_array
+ drawLineStringColFade2D_array
+ Draw a LineStringColFade in the Unity Editor. (via points from array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineStringColFade
+ lineStringColFade
+
+
+
+
+
+
+
+ drawLineStringColFade2D_list
+ drawLineStringColFade2D_list
+ Draw a LineStringColFade in the Unity Editor. (via points from list)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color startColor_of_$name$ = ;
+ Color endColor_of_$name$ = ;
+ bool closeGapBetweenLastAndFirstPoint_of_$name$ = false;
+ float width_of_$name$ = 0.0f;
+ string text_of_$name$ = null;
+ DrawBasics.LineStyle style_of_$name$ = DrawBasics.LineStyle.solid;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ float stylePatternScaleFactor_of_$name$ = 1.0f;
+ bool textBlockAboveLine_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics2D.LineStringColorFade(points_of_$name$, startColor_of_$name$, endColor_of_$name$, closeGapBetweenLastAndFirstPoint_of_$name$, width_of_$name$, text_of_$name$, style_of_$name$, custom_zPos_of_$name$, stylePatternScaleFactor_of_$name$, textBlockAboveLine_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineStringColFade
+ lineStringColFade
+
+
+
+
+
+
+
+ drawPointArray2D
+ drawPointArray2D
+ Draw a PointArray in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointArray
+ pointArray
+
+
+
+
+
+
+
+ drawPointList2D
+ drawPointList2D
+ Draw a PointList in the Unity Editor.
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ float sizeOfMarkingCross_of_$name$ = 1.0f;
+ float markingCrossLinesWidth_of_$name$ = 0.0f;
+ bool drawCoordsAsText_of_$name$ = true;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics2D.PointList(points_of_$name$, color_of_$name$, sizeOfMarkingCross_of_$name$, markingCrossLinesWidth_of_$name$, drawCoordsAsText_of_$name$, custom_zPos_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointList
+ pointList
+
+
+
+
+
+
+
+ drawPoint2D
+ drawPoint2D
+ Draw a Point in the Unity Editor. (pointMarking has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Point
+ point
+
+
+
+
+
+
+
+ drawPoint2D_prioText
+ drawPoint2D_prioText
+ Draw a Point in the Unity Editor. (text parameter has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Point
+ point
+
+
+
+
+
+
+
+ drawPointTag2D
+ drawPointTag2D
+ Draw a PointTag in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointTag
+ pointTag
+
+
+
+
+
+
+
+ drawVector2D
+ drawVector2D
+ Draw a Vector in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Vector
+ vector
+
+
+
+
+
+
+
+ drawVectorFrom2D
+ drawVectorFrom2D
+ Draw a VectorFrom in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorFrom
+ vectorFrom
+
+
+
+
+
+
+
+ drawVectorTo2D
+ drawVectorTo2D
+ Draw a VectorTo in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorTo
+ vectorTo
+
+
+
+
+
+
+
+ drawVectorCircled2D_vecToVec
+ drawVectorCircled2D_vecToVec
+ Draw a VectorCircled in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ vectorCircled
+
+
+
+
+
+
+
+ drawVectorCircled2D_angleFromStartPos
+ drawVectorCircled2D_angleFromStartPos
+ Draw a VectorCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ vectorCircled
+
+
+
+
+
+
+
+ drawVectorCircled2D_angleToAngle
+ drawVectorCircled2D_angleToAngle
+ Draw a VectorCircled in the Unity Editor. (turnCenter defined as position, angles relative to up-vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ vectorCircled
+
+
+
+
+
+
+
+ drawMovingArrowsRay2D
+ drawMovingArrowsRay2D
+ Draw a MovingArrowsRay in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn MovingArrowsRay
+ movingArrowsRay
+
+
+
+
+
+
+
+ drawMovingArrowsLine2D
+ drawMovingArrowsLine2D
+ Draw a MovingArrowsLine in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn MovingArrowsLine
+ movingArrowsLine
+
+
+
+
+
+
+
+ drawRayWithAlternatingColors2D
+ drawRayWithAlternatingColors2D
+ Draw a RayWithAlternatingColors in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayWithAlternatingColors
+ rayWithAlternatingColors
+
+
+
+
+
+
+
+ drawLineWithAlternatingColors2D
+ drawLineWithAlternatingColors2D
+ Draw a LineWithAlternatingColors in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineWithAlternatingColors
+ lineWithAlternatingColors
+
+
+
+
+
+
+
+ drawBlinkingRay2D
+ drawBlinkingRay2D
+ Draw a BlinkingRay in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BlinkingRay
+ blinkingRay
+
+
+
+
+
+
+
+ drawBlinkingLine2D
+ drawBlinkingLine2D
+ Draw a BlinkingLine in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BlinkingLine
+ blinkingLine
+
+
+
+
+
+
+
+ drawRayUnderTension2D
+ drawRayUnderTension2D
+ Draw a RayUnderTension in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayUnderTension
+ rayUnderTension
+
+
+
+
+
+
+
+ drawLineUnderTension2D
+ drawLineUnderTension2D
+ Draw a LineUnderTension in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineUnderTension
+ lineUnderTension
+
+
+
+
+
+
+
+ drawIcon2D
+ drawIcon2D
+ Draw an Icon in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Icon
+ icon
+
+
+
+
+
+
+
+ drawShape2D_rect_defaultZ
+ drawShape2D_rect_defaultZ
+ Draw a Shape in the Unity Editor. (extent via rect struct) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Shape
+ shape
+
+
+
+
+
+
+
+ drawShape2D_vec_defaultZ
+ drawShape2D_vec_defaultZ
+ Draw a Shape in the Unity Editor. (extent via vectors) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Shape
+ shape
+
+
+
+
+
+
+
+ drawDot2D
+ drawDot2D
+ Draw a Dot in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Dot
+ dot
+
+
+
+
+
+
+
+ drawBox2D_rect_defaultZ
+ drawBox2D_rect_defaultZ
+ Draw a Box in the Unity Editor. (defined via rect struct) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Box
+ box
+
+
+
+
+
+
+
+ drawBox2D_vec_defaultZ
+ drawBox2D_vec_defaultZ
+ Draw a Box in the Unity Editor. (defined via vectors) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Box
+ box
+
+
+
+
+
+
+
+ drawCircle2D_rect_defaultZ
+ drawCircle2D_rect_defaultZ
+ Draw a Circle in the Unity Editor. (defined via rect struct) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle
+ circle
+
+
+
+
+
+
+
+ drawCircle2D_vecRad_defaultZ
+ drawCircle2D_vecRad_defaultZ
+ Draw a Circle in the Unity Editor. (defined via vector and float as radius) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle
+ circle
+
+
+
+
+
+
+
+ drawCapsule2D_vecC1C2Pos_defaultZ
+ drawCapsule2D_vecC1C2Pos_defaultZ
+ Draw a Capsule in the Unity Editor. (defined via position of circle1 and circle2) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ capsule
+
+
+
+
+
+
+
+ drawCapsule2D_rect_defaultZ
+ drawCapsule2D_rect_defaultZ
+ Draw a Capsule in the Unity Editor. (defined via rect struct) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ capsule
+
+
+
+
+
+
+
+ drawCapsule2D_vecPosSize_defaultZ
+ drawCapsule2D_vecPosSize_defaultZ
+ Draw a Capsule in the Unity Editor. (defined via center position and size from vector) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ capsule
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic2D_go_go
+ drawBezierSegmentQuadratic2D_go_go
+ Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 2 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ bezierSegmentQuadratic
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic2D_tr_tr
+ drawBezierSegmentQuadratic2D_tr_tr
+ Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 2 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ bezierSegmentQuadratic
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic2D_go_go_go
+ drawBezierSegmentQuadratic2D_go_go_go
+ Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 3 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ bezierSegmentQuadratic
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic2D_tr_tr_tr
+ drawBezierSegmentQuadratic2D_tr_tr_tr
+ Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 3 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ bezierSegmentQuadratic
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic2D_vec
+ drawBezierSegmentQuadratic2D_vec
+ Draw a BezierSegmentQuadratic in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ bezierSegmentQuadratic
+
+
+
+
+
+
+
+ drawBezierSegmentCubic2D_go_go
+ drawBezierSegmentCubic2D_go_go
+ Draw a BezierSegmentCubic in the Unity Editor. (defined by 2 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ bezierSegmentCubic
+
+
+
+
+
+
+
+ drawBezierSegmentCubic2D_tr_tr
+ drawBezierSegmentCubic2D_tr_tr
+ Draw a BezierSegmentCubic in the Unity Editor. (defined by 2 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ bezierSegmentCubic
+
+
+
+
+
+
+
+ drawBezierSegmentCubic2D_go_go_go
+ drawBezierSegmentCubic2D_go_go_go
+ Draw a BezierSegmentCubic in the Unity Editor. (defined by 3 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ bezierSegmentCubic
+
+
+
+
+
+
+
+ drawBezierSegmentCubic2D_tr_tr_tr
+ drawBezierSegmentCubic2D_tr_tr_tr
+ Draw a BezierSegmentCubic in the Unity Editor. (defined by 3 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ bezierSegmentCubic
+
+
+
+
+
+
+
+ drawBezierSegmentCubic2D_vec
+ drawBezierSegmentCubic2D_vec
+ Draw a BezierSegmentCubic in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ bezierSegmentCubic
+
+
+
+
+
+
+
+ drawBezierSpline2D_goArray
+ drawBezierSpline2D_goArray
+ Draw a BezierSpline in the Unity Editor. (control points from array of gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
+
+ drawBezierSpline2D_goList
+ drawBezierSpline2D_goList
+ Draw a BezierSpline in the Unity Editor. (control points from list of gameobjects)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList_of_$name$ = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned;
+ string text_of_$name$ = null;
+ float width_of_$name$ = 0.0f;
+ bool closeGapFromEndToStart_of_$name$ = false;
+ int straightSubDivisionsPerSegment_of_$name$ = 50;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ float textSize_of_$name$ = 0.1f;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics2D.BezierSpline(points_of_$name$, color_of_$name$, interpretationOfList_of_$name$, text_of_$name$, width_of_$name$, closeGapFromEndToStart_of_$name$, straightSubDivisionsPerSegment_of_$name$, custom_zPos_of_$name$, textSize_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
+
+ drawBezierSpline2D_trArray
+ drawBezierSpline2D_trArray
+ Draw a BezierSpline in the Unity Editor. (control points from array of transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
+
+ drawBezierSpline2D_trList
+ drawBezierSpline2D_trList
+ Draw a BezierSpline in the Unity Editor. (control points from list of transforms)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList_of_$name$ = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned;
+ string text_of_$name$ = null;
+ float width_of_$name$ = 0.0f;
+ bool closeGapFromEndToStart_of_$name$ = false;
+ int straightSubDivisionsPerSegment_of_$name$ = 50;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ float textSize_of_$name$ = 0.1f;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics2D.BezierSpline(points_of_$name$, color_of_$name$, interpretationOfList_of_$name$, text_of_$name$, width_of_$name$, closeGapFromEndToStart_of_$name$, straightSubDivisionsPerSegment_of_$name$, custom_zPos_of_$name$, textSize_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
+
+ drawBezierSpline2D_vecArray
+ drawBezierSpline2D_vecArray
+ Draw a BezierSpline in the Unity Editor. (control points from array of vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
+
+ drawBezierSpline2D_vecList
+ drawBezierSpline2D_vecList
+ Draw a BezierSpline in the Unity Editor. (control points from list of vectors)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList_of_$name$ = DrawBasics.BezierPosInterpretation.start_control1_control2_endIsNextStart;
+ string text_of_$name$ = null;
+ float width_of_$name$ = 0.0f;
+ bool closeGapFromEndToStart_of_$name$ = false;
+ int straightSubDivisionsPerSegment_of_$name$ = 50;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ float textSize_of_$name$ = 0.1f;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawBasics2D.BezierSpline(points_of_$name$, color_of_$name$, interpretationOfList_of_$name$, text_of_$name$, width_of_$name$, closeGapFromEndToStart_of_$name$, straightSubDivisionsPerSegment_of_$name$, custom_zPos_of_$name$, textSize_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ bezierSpline
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawBasics2D.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawBasics2D.snippet.meta
new file mode 100644
index 0000000..d52686e
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawBasics2D.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 8cb1d067fc00471419f6d383bb689668
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawBasics2D_func.snippet b/Editor/DrawDebugLibrary/code snippets/drawBasics2D_func.snippet
new file mode 100644
index 0000000..d062a53
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawBasics2D_func.snippet
@@ -0,0 +1,2834 @@
+
+
+
+
+ drawLine2D_func
+ drawLine2D_func
+ Encapsulated in a function: Draw a Line in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Line
+ WithThisName
+
+
+
+
+
+
+
+ drawRay2D_func
+ drawRay2D_func
+ Encapsulated in a function: Draw a Ray in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ray
+ WithThisName
+
+
+
+
+
+
+
+ drawLineFrom2D_func
+ drawLineFrom2D_func
+ Encapsulated in a function: Draw a LineFrom in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineFrom
+ WithThisName
+
+
+
+
+
+
+
+ drawLineTo2D_func
+ drawLineTo2D_func
+ Encapsulated in a function: Draw a LineTo in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineTo
+ WithThisName
+
+
+
+
+
+
+
+ drawLineColFade2D_func
+ drawLineColFade2D_func
+ Encapsulated in a function: Draw a LineColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawRayColFade2D_func
+ drawRayColFade2D_func
+ Encapsulated in a function: Draw a RayColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawLineFromColFade2D_func
+ drawLineFromColFade2D_func
+ Encapsulated in a function: Draw a LineFromColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineFromColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawLineToColFade2D_func
+ drawLineToColFade2D_func
+ Encapsulated in a function: Draw a LineToColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineToColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawLineCircled2D_vecToVec_func
+ drawLineCircled2D_vecToVec_func
+ Encapsulated in a function: Draw a LineCircled in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawLineCircled2D_angleFromStartPos_func
+ drawLineCircled2D_angleFromStartPos_func
+ Encapsulated in a function: Draw a LineCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawLineCircled2D_angleToAngle_func
+ drawLineCircled2D_angleToAngle_func
+ Encapsulated in a function: Draw a LineCircled in the Unity Editor. (turnCenter defined as position, angles relative to up-vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleSegment2D_vecToVec_func
+ drawCircleSegment2D_vecToVec_func
+ Encapsulated in a function: Draw a CircleSegment in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleSegment2D_angleFromStartPos_func
+ drawCircleSegment2D_angleFromStartPos_func
+ Encapsulated in a function: Draw a CircleSegment in the Unity Editor. (turnCenter and startPositionOnPerimeter defined as positions, angle as float)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleSegment2D_angleToAngle_func
+ drawCircleSegment2D_angleToAngle_func
+ Encapsulated in a function: Draw a CircleSegment in the Unity Editor. (turnCenter defined as position, angles relative to up-vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawLineString2D_array_func
+ drawLineString2D_array_func
+ Encapsulated in a function: Draw a LineString in the Unity Editor. (via points from array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineString
+ WithThisName
+
+
+
+
+
+
+
+ drawLineString2D_list_func
+ drawLineString2D_list_func
+ Encapsulated in a function: Draw a LineString in the Unity Editor. (via points from list)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ bool closeGapBetweenLastAndFirstPoint = false;
+ float width = 0.0f;
+ string text = null;
+ DrawBasics.LineStyle style = DrawBasics.LineStyle.solid;
+ float custom_zPos = float.PositiveInfinity;
+ float stylePatternScaleFactor = 1.0f;
+ bool textBlockAboveLine = false;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics2D.LineString(points, color, closeGapBetweenLastAndFirstPoint, width, text, style, custom_zPos, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineString
+ WithThisName
+
+
+
+
+
+
+
+ drawLineStringColFade2D_array_func
+ drawLineStringColFade2D_array_func
+ Encapsulated in a function: Draw a LineStringColFade in the Unity Editor. (via points from array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineStringColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawLineStringColFade2D_list_func
+ drawLineStringColFade2D_list_func
+ Encapsulated in a function: Draw a LineStringColFade in the Unity Editor. (via points from list)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color startColor = ;
+ Color endColor = ;
+ bool closeGapBetweenLastAndFirstPoint = false;
+ float width = 0.0f;
+ string text = null;
+ DrawBasics.LineStyle style = DrawBasics.LineStyle.solid;
+ float custom_zPos = float.PositiveInfinity;
+ float stylePatternScaleFactor = 1.0f;
+ bool textBlockAboveLine = false;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics2D.LineStringColorFade(points, startColor, endColor, closeGapBetweenLastAndFirstPoint, width, text, style, custom_zPos, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineStringColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawPointArray2D_func
+ drawPointArray2D_func
+ Encapsulated in a function: Draw a PointArray in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointArray
+ WithThisName
+
+
+
+
+
+
+
+ drawPointList2D_func
+ drawPointList2D_func
+ Encapsulated in a function: Draw a PointList in the Unity Editor.
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ float sizeOfMarkingCross = 1.0f;
+ float markingCrossLinesWidth = 0.0f;
+ bool drawCoordsAsText = true;
+ float custom_zPos = float.PositiveInfinity;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics2D.PointList(points, color, sizeOfMarkingCross, markingCrossLinesWidth, drawCoordsAsText, custom_zPos, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointList
+ WithThisName
+
+
+
+
+
+
+
+ drawPoint2D_func
+ drawPoint2D_func
+ Encapsulated in a function: Draw a Point in the Unity Editor. (pointMarking has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Point
+ WithThisName
+
+
+
+
+
+
+
+ drawPoint2D_prioText_func
+ drawPoint2D_prioText_func
+ Encapsulated in a function: Draw a Point in the Unity Editor. (text parameter has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Point
+ WithThisName
+
+
+
+
+
+
+
+ drawPointTag2D_func
+ drawPointTag2D_func
+ Encapsulated in a function: Draw a PointTag in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointTag
+ WithThisName
+
+
+
+
+
+
+
+ drawVector2D_func
+ drawVector2D_func
+ Encapsulated in a function: Draw a Vector in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Vector
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorFrom2D_func
+ drawVectorFrom2D_func
+ Encapsulated in a function: Draw a VectorFrom in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorFrom
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorTo2D_func
+ drawVectorTo2D_func
+ Encapsulated in a function: Draw a VectorTo in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorTo
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorCircled2D_vecToVec_func
+ drawVectorCircled2D_vecToVec_func
+ Encapsulated in a function: Draw a VectorCircled in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorCircled2D_angleFromStartPos_func
+ drawVectorCircled2D_angleFromStartPos_func
+ Encapsulated in a function: Draw a VectorCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorCircled2D_angleToAngle_func
+ drawVectorCircled2D_angleToAngle_func
+ Encapsulated in a function: Draw a VectorCircled in the Unity Editor. (turnCenter defined as position, angles relative to up-vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawMovingArrowsRay2D_func
+ drawMovingArrowsRay2D_func
+ Encapsulated in a function: Draw a MovingArrowsRay in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn MovingArrowsRay
+ WithThisName
+
+
+
+
+
+
+
+ drawMovingArrowsLine2D_func
+ drawMovingArrowsLine2D_func
+ Encapsulated in a function: Draw a MovingArrowsLine in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn MovingArrowsLine
+ WithThisName
+
+
+
+
+
+
+
+ drawRayWithAlternatingColors2D_func
+ drawRayWithAlternatingColors2D_func
+ Encapsulated in a function: Draw a RayWithAlternatingColors in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayWithAlternatingColors
+ WithThisName
+
+
+
+
+
+
+
+ drawLineWithAlternatingColors2D_func
+ drawLineWithAlternatingColors2D_func
+ Encapsulated in a function: Draw a LineWithAlternatingColors in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineWithAlternatingColors
+ WithThisName
+
+
+
+
+
+
+
+ drawBlinkingRay2D_func
+ drawBlinkingRay2D_func
+ Encapsulated in a function: Draw a BlinkingRay in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BlinkingRay
+ WithThisName
+
+
+
+
+
+
+
+ drawBlinkingLine2D_func
+ drawBlinkingLine2D_func
+ Encapsulated in a function: Draw a BlinkingLine in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BlinkingLine
+ WithThisName
+
+
+
+
+
+
+
+ drawRayUnderTension2D_func
+ drawRayUnderTension2D_func
+ Encapsulated in a function: Draw a RayUnderTension in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayUnderTension
+ WithThisName
+
+
+
+
+
+
+
+ drawLineUnderTension2D_func
+ drawLineUnderTension2D_func
+ Encapsulated in a function: Draw a LineUnderTension in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineUnderTension
+ WithThisName
+
+
+
+
+
+
+
+ drawIcon2D_func
+ drawIcon2D_func
+ Encapsulated in a function: Draw an Icon in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Icon
+ WithThisName
+
+
+
+
+
+
+
+ drawShape2D_rect_defaultZ_func
+ drawShape2D_rect_defaultZ_func
+ Encapsulated in a function: Draw a Shape in the Unity Editor. (extent via rect struct) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Shape
+ WithThisName
+
+
+
+
+
+
+
+ drawShape2D_vec_defaultZ_func
+ drawShape2D_vec_defaultZ_func
+ Encapsulated in a function: Draw a Shape in the Unity Editor. (extent via vectors) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Shape
+ WithThisName
+
+
+
+
+
+
+
+ drawDot2D_func
+ drawDot2D_func
+ Encapsulated in a function: Draw a Dot in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Dot
+ WithThisName
+
+
+
+
+
+
+
+ drawBox2D_rect_defaultZ_func
+ drawBox2D_rect_defaultZ_func
+ Encapsulated in a function: Draw a Box in the Unity Editor. (defined via rect struct) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Box
+ WithThisName
+
+
+
+
+
+
+
+ drawBox2D_vec_defaultZ_func
+ drawBox2D_vec_defaultZ_func
+ Encapsulated in a function: Draw a Box in the Unity Editor. (defined via vectors) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Box
+ WithThisName
+
+
+
+
+
+
+
+ drawCircle2D_rect_defaultZ_func
+ drawCircle2D_rect_defaultZ_func
+ Encapsulated in a function: Draw a Circle in the Unity Editor. (defined via rect struct) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle
+ WithThisName
+
+
+
+
+
+
+
+ drawCircle2D_vecRad_defaultZ_func
+ drawCircle2D_vecRad_defaultZ_func
+ Encapsulated in a function: Draw a Circle in the Unity Editor. (defined via vector and float as radius) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule2D_vecC1C2Pos_defaultZ_func
+ drawCapsule2D_vecC1C2Pos_defaultZ_func
+ Encapsulated in a function: Draw a Capsule in the Unity Editor. (defined via position of circle1 and circle2) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule2D_rect_defaultZ_func
+ drawCapsule2D_rect_defaultZ_func
+ Encapsulated in a function: Draw a Capsule in the Unity Editor. (defined via rect struct) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule2D_vecPosSize_defaultZ_func
+ drawCapsule2D_vecPosSize_defaultZ_func
+ Encapsulated in a function: Draw a Capsule in the Unity Editor. (defined via center position and size from vector) (z pos from DrawBasics2D.Default_zPos_forDrawing)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic2D_go_go_func
+ drawBezierSegmentQuadratic2D_go_go_func
+ Encapsulated in a function: Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 2 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic2D_tr_tr_func
+ drawBezierSegmentQuadratic2D_tr_tr_func
+ Encapsulated in a function: Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 2 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic2D_go_go_go_func
+ drawBezierSegmentQuadratic2D_go_go_go_func
+ Encapsulated in a function: Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 3 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic2D_tr_tr_tr_func
+ drawBezierSegmentQuadratic2D_tr_tr_tr_func
+ Encapsulated in a function: Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 3 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic2D_vec_func
+ drawBezierSegmentQuadratic2D_vec_func
+ Encapsulated in a function: Draw a BezierSegmentQuadratic in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentCubic2D_go_go_func
+ drawBezierSegmentCubic2D_go_go_func
+ Encapsulated in a function: Draw a BezierSegmentCubic in the Unity Editor. (defined by 2 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentCubic2D_tr_tr_func
+ drawBezierSegmentCubic2D_tr_tr_func
+ Encapsulated in a function: Draw a BezierSegmentCubic in the Unity Editor. (defined by 2 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentCubic2D_go_go_go_func
+ drawBezierSegmentCubic2D_go_go_go_func
+ Encapsulated in a function: Draw a BezierSegmentCubic in the Unity Editor. (defined by 3 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentCubic2D_tr_tr_tr_func
+ drawBezierSegmentCubic2D_tr_tr_tr_func
+ Encapsulated in a function: Draw a BezierSegmentCubic in the Unity Editor. (defined by 3 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentCubic2D_vec_func
+ drawBezierSegmentCubic2D_vec_func
+ Encapsulated in a function: Draw a BezierSegmentCubic in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline2D_goArray_func
+ drawBezierSpline2D_goArray_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from array of gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline2D_goList_func
+ drawBezierSpline2D_goList_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from list of gameobjects)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned;
+ string text = null;
+ float width = 0.0f;
+ bool closeGapFromEndToStart = false;
+ int straightSubDivisionsPerSegment = 50;
+ float custom_zPos = float.PositiveInfinity;
+ float textSize = 0.1f;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics2D.BezierSpline(points, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, custom_zPos, textSize, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline2D_trArray_func
+ drawBezierSpline2D_trArray_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from array of transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline2D_trList_func
+ drawBezierSpline2D_trList_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from list of transforms)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned;
+ string text = null;
+ float width = 0.0f;
+ bool closeGapFromEndToStart = false;
+ int straightSubDivisionsPerSegment = 50;
+ float custom_zPos = float.PositiveInfinity;
+ float textSize = 0.1f;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics2D.BezierSpline(points, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, custom_zPos, textSize, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline2D_vecArray_func
+ drawBezierSpline2D_vecArray_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from array of vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline2D_vecList_func
+ drawBezierSpline2D_vecList_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from list of vectors)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList = DrawBasics.BezierPosInterpretation.start_control1_control2_endIsNextStart;
+ string text = null;
+ float width = 0.0f;
+ bool closeGapFromEndToStart = false;
+ int straightSubDivisionsPerSegment = 50;
+ float custom_zPos = float.PositiveInfinity;
+ float textSize = 0.1f;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics2D.BezierSpline(points, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, custom_zPos, textSize, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawBasics2D_func.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawBasics2D_func.snippet.meta
new file mode 100644
index 0000000..f54f79f
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawBasics2D_func.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 1a9b78b35e605f04fbc3af2d9d34f401
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawBasics_func.snippet b/Editor/DrawDebugLibrary/code snippets/drawBasics_func.snippet
new file mode 100644
index 0000000..8720fde
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawBasics_func.snippet
@@ -0,0 +1,3100 @@
+
+
+
+
+ drawLine_func
+ drawLine_func
+ Encapsulated in a function: Draw a Line in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Line
+ WithThisName
+
+
+
+
+
+
+
+ drawRay_func
+ drawRay_func
+ Encapsulated in a function: Draw a Ray in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ray
+ WithThisName
+
+
+
+
+
+
+
+ drawLineFrom_func
+ drawLineFrom_func
+ Encapsulated in a function: Draw a LineFrom in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineFrom
+ WithThisName
+
+
+
+
+
+
+
+ drawLineTo_func
+ drawLineTo_func
+ Encapsulated in a function: Draw a LineTo in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineTo
+ WithThisName
+
+
+
+
+
+
+
+ drawLineColFade_func
+ drawLineColFade_func
+ Encapsulated in a function: Draw a LineColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawRayColFade_func
+ drawRayColFade_func
+ Encapsulated in a function: Draw a RayColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawLineFromColFade_func
+ drawLineFromColFade_func
+ Encapsulated in a function: Draw a LineFromColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineFromColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawLineToColFade_func
+ drawLineToColFade_func
+ Encapsulated in a function: Draw a LineToColFade in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineToColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawLineCircled_vecToVec_func
+ drawLineCircled_vecToVec_func
+ Encapsulated in a function: Draw a LineCircled in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawLineCircled_fromQuatUp_func
+ drawLineCircled_fromQuatUp_func
+ Encapsulated in a function: Draw a LineCircled in the Unity Editor. (quaternion-forward defines turnAxis, line starts at quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawLineCircled_relToQuatUp_func
+ drawLineCircled_relToQuatUp_func
+ Encapsulated in a function: Draw a LineCircled in the Unity Editor. (quaternion-forward defines turnAxis, start and end angles measured relative to quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawLineCircled_aroundRayAxis_func
+ drawLineCircled_aroundRayAxis_func
+ Encapsulated in a function: Draw a LineCircled in the Unity Editor. (via ray as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawLineCircled_aroundVecAxis_func
+ drawLineCircled_aroundVecAxis_func
+ Encapsulated in a function: Draw a LineCircled in the Unity Editor. (via vector as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleSegment_vecToVec_func
+ drawCircleSegment_vecToVec_func
+ Encapsulated in a function: Draw a CircleSegment in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleSegment_fromQuatUp_func
+ drawCircleSegment_fromQuatUp_func
+ Encapsulated in a function: Draw a CircleSegment in the Unity Editor. (quaternion-forward defines turnAxis, segment starts at quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleSegment_relToQuatUp_func
+ drawCircleSegment_relToQuatUp_func
+ Encapsulated in a function: Draw a CircleSegment in the Unity Editor. (quaternion-forward defines turnAxis, start and end angles measured relative to quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleSegment_aroundRayAxis_func
+ drawCircleSegment_aroundRayAxis_func
+ Encapsulated in a function: Draw a CircleSegment in the Unity Editor. (via ray as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleSegment_aroundVecAxis_func
+ drawCircleSegment_aroundVecAxis_func
+ Encapsulated in a function: Draw a CircleSegment in the Unity Editor. (via vector as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawLineString_array_func
+ drawLineString_array_func
+ Encapsulated in a function: Draw a LineString in the Unity Editor. (via points from array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineString
+ WithThisName
+
+
+
+
+
+
+
+ drawLineString_list_func
+ drawLineString_list_func
+ Encapsulated in a function: Draw a LineString in the Unity Editor. (via points from list)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ bool closeGapBetweenLastAndFirstPoint = false;
+ float width = 0.0f;
+ string text = null;
+ DrawBasics.LineStyle style = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor = 1.0f;
+ bool textBlockAboveLine = false;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics.LineString(points, color, closeGapBetweenLastAndFirstPoint, width, text, style, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineString
+ WithThisName
+
+
+
+
+
+
+
+ drawLineStringColFade_array_func
+ drawLineStringColFade_array_func
+ Encapsulated in a function: Draw a LineStringColFade in the Unity Editor. (via points from array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineStringColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawLineStringColFade_list_func
+ drawLineStringColFade_list_func
+ Encapsulated in a function: Draw a LineStringColFade in the Unity Editor. (via points from list)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color startColor = ;
+ Color endColor = ;
+ bool closeGapBetweenLastAndFirstPoint = false;
+ float width = 0.0f;
+ string text = null;
+ DrawBasics.LineStyle style = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor = 1.0f;
+ bool textBlockAboveLine = false;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics.LineStringColorFade(points, startColor, endColor, closeGapBetweenLastAndFirstPoint, width, text, style, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineStringColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawPointArray_func
+ drawPointArray_func
+ Encapsulated in a function: Draw a PointArray in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointArray
+ WithThisName
+
+
+
+
+
+
+
+ drawPointList_func
+ drawPointList_func
+ Encapsulated in a function: Draw a PointList in the Unity Editor.
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ float sizeOfMarkingCross = 1.0f;
+ float markingCrossLinesWidth = 0.0f;
+ bool drawCoordsAsText = true;
+ bool hideZDir = false;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics.PointList(points, color, sizeOfMarkingCross, markingCrossLinesWidth, drawCoordsAsText, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointList
+ WithThisName
+
+
+
+
+
+
+
+ drawPoint_func
+ drawPoint_func
+ Encapsulated in a function: Draw a Point in the Unity Editor. (pointMarking has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Point
+ WithThisName
+
+
+
+
+
+
+
+ drawPoint_prioText_func
+ drawPoint_prioText_func
+ Encapsulated in a function: Draw a Point in the Unity Editor. (text parameter has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Point
+ WithThisName
+
+
+
+
+
+
+
+ drawPointLocalArray_transformAsParent_func
+ drawPointLocalArray_transformAsParent_func
+ Encapsulated in a function: Draw a PointLocalArray in the Unity Editor. (local space is defined by transform as parent)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocalArray
+ WithThisName
+
+
+
+
+
+
+
+ drawPointLocalList_transformAsParent_func
+ drawPointLocalList_transformAsParent_func
+ Encapsulated in a function: Draw a PointLocalList in the Unity Editor. (local space is defined by transform as parent)
+ Draw XXL
+
+
+
+ localPoints = $end$;
+ Transform parentTransform = ;
+ Color color = default(Color);
+ float sizeOfMarkingCross_global = 1.0f;
+ float markingCrossLinesWidth = 0.0f;
+ bool drawCoordsAsText = true;
+ bool additionallyDrawGlobalCoords = false;
+ bool drawLocalOrigin = true;
+ bool hideZDir = false;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics.PointLocalList(localPoints, parentTransform, color, sizeOfMarkingCross_global, markingCrossLinesWidth, drawCoordsAsText, additionallyDrawGlobalCoords, drawLocalOrigin, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocalList
+ WithThisName
+
+
+
+
+
+
+
+ drawPointLocalArray_vecAsParent_func
+ drawPointLocalArray_vecAsParent_func
+ Encapsulated in a function: Draw a PointLocalArray in the Unity Editor. (local space is defined by vectors as parent)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocalArray
+ WithThisName
+
+
+
+
+
+
+
+ drawPointLocalList_vecAsParent_func
+ drawPointLocalList_vecAsParent_func
+ Encapsulated in a function: Draw a PointLocalList in the Unity Editor. (local space is defined by vectors as parent)
+ Draw XXL
+
+
+
+ localPoints = $end$;
+ Vector3 parentPositionGlobal = ;
+ Quaternion parentRotationGlobal = ;
+ Vector3 parentScaleGlobal = ;
+ Color color = default(Color);
+ float sizeOfMarkingCross_global = 1.0f;
+ float markingCrossLinesWidth = 0.0f;
+ bool drawCoordsAsText = true;
+ bool additionallyDrawGlobalCoords = false;
+ bool drawLocalOrigin = true;
+ bool hideZDir = false;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics.PointLocalList(localPoints, parentPositionGlobal, parentRotationGlobal, parentScaleGlobal, color, sizeOfMarkingCross_global, markingCrossLinesWidth, drawCoordsAsText, additionallyDrawGlobalCoords, drawLocalOrigin, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocalList
+ WithThisName
+
+
+
+
+
+
+
+ drawPointLocal_transformAsParent_func
+ drawPointLocal_transformAsParent_func
+ Encapsulated in a function: Draw a PointLocal in the Unity Editor. (local space is defined by transform as parent) (pointMarking has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawPointLocal_transformAsParent_prioText_func
+ drawPointLocal_transformAsParent_prioText_func
+ Encapsulated in a function: Draw a PointLocal in the Unity Editor. (local space is defined by transform as parent) (text parameter has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawPointLocal_vecAsParent_func
+ drawPointLocal_vecAsParent_func
+ Encapsulated in a function: Draw a PointLocal in the Unity Editor. (local space is defined by vectors as parent) (pointMarking has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawPointLocal_vecAsParent_prioText_func
+ drawPointLocal_vecAsParent_prioText_func
+ Encapsulated in a function: Draw a PointLocal in the Unity Editor. (local space is defined by vectors as parent) (text parameter has raised priority)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawPointTag_func
+ drawPointTag_func
+ Encapsulated in a function: Draw a PointTag in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PointTag
+ WithThisName
+
+
+
+
+
+
+
+ drawVector_func
+ drawVector_func
+ Encapsulated in a function: Draw a Vector in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Vector
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorFrom_func
+ drawVectorFrom_func
+ Encapsulated in a function: Draw a VectorFrom in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorFrom
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorTo_func
+ drawVectorTo_func
+ Encapsulated in a function: Draw a VectorTo in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorTo
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorCircled_vecToVec_func
+ drawVectorCircled_vecToVec_func
+ Encapsulated in a function: Draw a VectorCircled in the Unity Editor. (via toStartVector and toEndVector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorCircled_fromQuatUp_func
+ drawVectorCircled_fromQuatUp_func
+ Encapsulated in a function: Draw a VectorCircled in the Unity Editor. (quaternion-forward defines turnAxis, vector starts at quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorCircled_relToQuatUp_func
+ drawVectorCircled_relToQuatUp_func
+ Encapsulated in a function: Draw a VectorCircled in the Unity Editor. (quaternion-forward defines turnAxis, start and end angles measured relative to quaternion-up)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorCircled_aroundRayAxis_func
+ drawVectorCircled_aroundRayAxis_func
+ Encapsulated in a function: Draw a VectorCircled in the Unity Editor. (via Ray as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorCircled_aroundVecAxis_func
+ drawVectorCircled_aroundVecAxis_func
+ Encapsulated in a function: Draw a VectorCircled in the Unity Editor. (via Vector as turnAxis)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawIcon_rotViaVec_func
+ drawIcon_rotViaVec_func
+ Encapsulated in a function: Draw an Icon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Icon
+ WithThisName
+
+
+
+
+
+
+
+ drawIcon_rotViaQuat_func
+ drawIcon_rotViaQuat_func
+ Encapsulated in a function: Draw an Icon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Icon
+ WithThisName
+
+
+
+
+
+
+
+ drawDot_func
+ drawDot_func
+ Encapsulated in a function: Draw a Dot in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Dot
+ WithThisName
+
+
+
+
+
+
+
+ drawMovingArrowsRay_func
+ drawMovingArrowsRay_func
+ Encapsulated in a function: Draw a MovingArrowsRay in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn MovingArrowsRay
+ WithThisName
+
+
+
+
+
+
+
+ drawMovingArrowsLine_func
+ drawMovingArrowsLine_func
+ Encapsulated in a function: Draw a MovingArrowsLine in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn MovingArrowsLine
+ WithThisName
+
+
+
+
+
+
+
+ drawRayWithAlternatingColors_func
+ drawRayWithAlternatingColors_func
+ Encapsulated in a function: Draw a RayWithAlternatingColors in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayWithAlternatingColors
+ WithThisName
+
+
+
+
+
+
+
+ drawLineWithAlternatingColors_func
+ drawLineWithAlternatingColors_func
+ Encapsulated in a function: Draw a LineWithAlternatingColors in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineWithAlternatingColors
+ WithThisName
+
+
+
+
+
+
+
+ drawBlinkingRay_func
+ drawBlinkingRay_func
+ Encapsulated in a function: Draw a BlinkingRay in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BlinkingRay
+ WithThisName
+
+
+
+
+
+
+
+ drawBlinkingLine_func
+ drawBlinkingLine_func
+ Encapsulated in a function: Draw a BlinkingLine in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BlinkingLine
+ WithThisName
+
+
+
+
+
+
+
+ drawRayUnderTension_func
+ drawRayUnderTension_func
+ Encapsulated in a function: Draw a RayUnderTension in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayUnderTension
+ WithThisName
+
+
+
+
+
+
+
+ drawLineUnderTension_func
+ drawLineUnderTension_func
+ Encapsulated in a function: Draw a LineUnderTension in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LineUnderTension
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic_go_go_func
+ drawBezierSegmentQuadratic_go_go_func
+ Encapsulated in a function: Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 2 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic_tr_tr_func
+ drawBezierSegmentQuadratic_tr_tr_func
+ Encapsulated in a function: Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 2 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic_go_go_go_func
+ drawBezierSegmentQuadratic_go_go_go_func
+ Encapsulated in a function: Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 3 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic_tr_tr_tr_func
+ drawBezierSegmentQuadratic_tr_tr_tr_func
+ Encapsulated in a function: Draw a BezierSegmentQuadratic in the Unity Editor. (defined by 3 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentQuadratic_vec_func
+ drawBezierSegmentQuadratic_vec_func
+ Encapsulated in a function: Draw a BezierSegmentQuadratic in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentQuadratic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentCubic_go_go_func
+ drawBezierSegmentCubic_go_go_func
+ Encapsulated in a function: Draw a BezierSegmentCubic in the Unity Editor. (defined by 2 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentCubic_tr_tr_func
+ drawBezierSegmentCubic_tr_tr_func
+ Encapsulated in a function: Draw a BezierSegmentCubic in the Unity Editor. (defined by 2 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentCubic_go_go_go_func
+ drawBezierSegmentCubic_go_go_go_func
+ Encapsulated in a function: Draw a BezierSegmentCubic in the Unity Editor. (defined by 3 gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentCubic_tr_tr_tr_func
+ drawBezierSegmentCubic_tr_tr_tr_func
+ Encapsulated in a function: Draw a BezierSegmentCubic in the Unity Editor. (defined by 3 transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSegmentCubic_vec_func
+ drawBezierSegmentCubic_vec_func
+ Encapsulated in a function: Draw a BezierSegmentCubic in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSegmentCubic
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline_goArray_func
+ drawBezierSpline_goArray_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from array of gameobjects)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline_goList_func
+ drawBezierSpline_goList_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from list of gameobjects)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned;
+ string text = null;
+ float width = 0.0f;
+ bool closeGapFromEndToStart = false;
+ int straightSubDivisionsPerSegment = 50;
+ float textSize = 0.1f;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics.BezierSpline(points, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline_trArray_func
+ drawBezierSpline_trArray_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from array of transforms)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline_trList_func
+ drawBezierSpline_trList_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from list of transforms)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned;
+ string text = null;
+ float width = 0.0f;
+ bool closeGapFromEndToStart = false;
+ int straightSubDivisionsPerSegment = 50;
+ float textSize = 0.1f;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics.BezierSpline(points, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline_vecArray_func
+ drawBezierSpline_vecArray_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from array of vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
+
+ drawBezierSpline_vecList_func
+ drawBezierSpline_vecList_func
+ Encapsulated in a function: Draw a BezierSpline in the Unity Editor. (control points from list of vectors)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ DrawBasics.BezierPosInterpretation interpretationOfList = DrawBasics.BezierPosInterpretation.start_control1_control2_endIsNextStart;
+ string text = null;
+ float width = 0.0f;
+ bool closeGapFromEndToStart = false;
+ int straightSubDivisionsPerSegment = 50;
+ float textSize = 0.1f;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawBasics.BezierSpline(points, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BezierSpline
+ WithThisName
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawBasics_func.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawBasics_func.snippet.meta
new file mode 100644
index 0000000..93731f9
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawBasics_func.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 52e17f1fc31243c44b5e129039562168
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawEngineBasics.snippet b/Editor/DrawDebugLibrary/code snippets/drawEngineBasics.snippet
new file mode 100644
index 0000000..339c662
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawEngineBasics.snippet
@@ -0,0 +1,4633 @@
+
+
+
+
+ drawVectorVisualization
+ drawVectorVisualization
+ Draw a VectorVisualization in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorVisualization
+ vectorVisualization
+
+
+
+
+
+
+
+ drawVectorFromVisualization
+ drawVectorFromVisualization
+ Draw a VectorFromVisualization in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorFromVisualization
+ vectorFromVisualization
+
+
+
+
+
+
+
+ drawVectorToVisualization
+ drawVectorToVisualization
+ Draw a VectorToVisualization in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorToVisualization
+ vectorToVisualization
+
+
+
+
+
+
+
+ drawPositionVisualization_go
+ drawPositionVisualization_go
+ Draw a PositionVisualization in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualization
+ positionVisualization
+
+
+
+
+
+
+
+ drawPositionVisualization_tr
+ drawPositionVisualization_tr
+ Draw a PositionVisualization in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualization
+ positionVisualization
+
+
+
+
+
+
+
+ drawPositionVisualization_vec
+ drawPositionVisualization_vec
+ Draw a PositionVisualization in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualization
+ positionVisualization
+
+
+
+
+
+
+
+ drawVectorVisualizationLocal
+ drawVectorVisualizationLocal
+ Draw a VectorVisualizationLocal in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorVisualizationLocal
+ vectorVisualizationLocal
+
+
+
+
+
+
+
+ drawVectorFromVisualizationLocal
+ drawVectorFromVisualizationLocal
+ Draw a VectorFromVisualizationLocal in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorFromVisualizationLocal
+ vectorFromVisualizationLocal
+
+
+
+
+
+
+
+ drawVectorToVisualizationLocal
+ drawVectorToVisualizationLocal
+ Draw a VectorToVisualizationLocal in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorToVisualizationLocal
+ vectorToVisualizationLocal
+
+
+
+
+
+
+
+ drawPositionVisualizationLocal_go
+ drawPositionVisualizationLocal_go
+ Draw a PositionVisualizationLocal in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualizationLocal
+ positionVisualizationLocal
+
+
+
+
+
+
+
+ drawPositionVisualizationLocal_tr
+ drawPositionVisualizationLocal_tr
+ Draw a PositionVisualizationLocal in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualizationLocal
+ positionVisualizationLocal
+
+
+
+
+
+
+
+ drawPositionVisualizationLocal_vec
+ drawPositionVisualizationLocal_vec
+ Draw a PositionVisualizationLocal in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualizationLocal
+ positionVisualizationLocal
+
+
+
+
+
+
+
+ drawScale_go
+ drawScale_go
+ Draw a Scale in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Scale
+ scale
+
+
+
+
+
+
+
+ drawScale_tr
+ drawScale_tr
+ Draw a Scale in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Scale
+ scale
+
+
+
+
+
+
+
+ drawScale_vec
+ drawScale_vec
+ Draw a Scale in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Scale
+ scale
+
+
+
+
+
+
+
+ drawLocalScale_go
+ drawLocalScale_go
+ Draw a LocalScale in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalScale
+ localScale
+
+
+
+
+
+
+
+ drawLocalScale_tr
+ drawLocalScale_tr
+ Draw a LocalScale in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalScale
+ localScale
+
+
+
+
+
+
+
+ drawLocalScale_vec
+ drawLocalScale_vec
+ Draw a LocalScale in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalScale
+ localScale
+
+
+
+
+
+
+
+ drawQuaternion_go
+ drawQuaternion_go
+ Draw a Quaternion in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Quaternion
+ quaternion
+
+
+
+
+
+
+
+ drawQuaternion_tr
+ drawQuaternion_tr
+ Draw a Quaternion in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Quaternion
+ quaternion
+
+
+
+
+
+
+
+ drawQuaternion_quat
+ drawQuaternion_quat
+ Draw a Quaternion in the Unity Editor. (of quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Quaternion
+ quaternion
+
+
+
+
+
+
+
+ drawQuaternionLocal_go
+ drawQuaternionLocal_go
+ Draw a QuaternionLocal in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn QuaternionLocal
+ quaternionLocal
+
+
+
+
+
+
+
+ drawQuaternionLocal_tr
+ drawQuaternionLocal_tr
+ Draw a QuaternionLocal in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn QuaternionLocal
+ quaternionLocal
+
+
+
+
+
+
+
+ drawQuaternionLocal_quat
+ drawQuaternionLocal_quat
+ Draw a QuaternionLocal in the Unity Editor. (of quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn QuaternionLocal
+ quaternionLocal
+
+
+
+
+
+
+
+ drawEuler_go
+ drawEuler_go
+ Draw an Euler in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Euler
+ euler
+
+
+
+
+
+
+
+ drawEuler_tr
+ drawEuler_tr
+ Draw an Euler in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Euler
+ euler
+
+
+
+
+
+
+
+ drawEuler_vec
+ drawEuler_vec
+ Draw an Euler in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Euler
+ euler
+
+
+
+
+
+
+
+ drawEuler_quat
+ drawEuler_quat
+ Draw an Euler in the Unity Editor. (of quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Euler
+ euler
+
+
+
+
+
+
+
+ drawEulerLocal_go
+ drawEulerLocal_go
+ Draw an EulerLocal in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EulerLocal
+ eulerLocal
+
+
+
+
+
+
+
+ drawEulerLocal_tr
+ drawEulerLocal_tr
+ Draw an EulerLocal in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EulerLocal
+ eulerLocal
+
+
+
+
+
+
+
+ drawEulerLocal_vec
+ drawEulerLocal_vec
+ Draw an EulerLocal in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EulerLocal
+ eulerLocal
+
+
+
+
+
+
+
+ drawEulerLocal_quat
+ drawEulerLocal_quat
+ Draw an EulerLocal in the Unity Editor. (of quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EulerLocal
+ eulerLocal
+
+
+
+
+
+
+
+ drawBounds_go
+ drawBounds_go
+ Draw Bounds in the Unity Editor. (of mesh on gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bounds
+ bounds
+
+
+
+
+
+
+
+ drawLocalBounds_go
+ drawLocalBounds_go
+ Draw LocalBounds in the Unity Editor. (of mesh on gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalBounds
+ localBounds
+
+
+
+
+
+
+
+ drawBounds_tr
+ drawBounds_tr
+ Draw Bounds in the Unity Editor. (of mesh on transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bounds
+ bounds
+
+
+
+
+
+
+
+ drawLocalBounds_tr
+ drawLocalBounds_tr
+ Draw LocalBounds in the Unity Editor. (of mesh on transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalBounds
+ localBounds
+
+
+
+
+
+
+
+ drawBounds_b
+ drawBounds_b
+ Draw Bounds in the Unity Editor. (of bounds struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bounds
+ bounds
+
+
+
+
+
+
+
+ drawLocalBounds_b
+ drawLocalBounds_b
+ Draw LocalBounds in the Unity Editor. (of bounds struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalBounds
+ localBounds
+
+
+
+
+
+
+
+ drawDotProduct
+ drawDotProduct
+ Draw a DotProduct in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DotProduct
+ dotProduct
+
+
+
+
+
+
+
+ drawCrossProduct
+ drawCrossProduct
+ Draw a CrossProduct in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CrossProduct
+ crossProduct
+
+
+
+
+
+
+
+ drawTagGameObject
+ drawTagGameObject
+ Draw TagGameObject in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TagGameObject
+ tagGameObject
+
+
+
+
+
+
+
+ drawTagGameObjectScreenspace
+ drawTagGameObjectScreenspace
+ Draw TagGameObjectScreenspace in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TagGameObjectScreenspace
+ tagGameObjectScreenspace
+
+
+
+
+
+
+
+ drawTagGameObjectScreenspace_cam
+ drawTagGameObjectScreenspace_cam
+ Draw TagGameObjectScreenspace in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TagGameObjectScreenspace
+ tagGameObjectScreenspace
+
+
+
+
+
+
+
+ drawCamera_rotViaQuat
+ drawCamera_rotViaQuat
+ Draw a Camera in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Camera
+ camera
+
+
+
+
+
+
+
+ drawCamera_rotViaVec
+ drawCamera_rotViaVec
+ Draw a Camera in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Camera
+ camera
+
+
+
+
+
+
+
+ drawCamera_cam
+ drawCamera_cam
+ Draw a Camera in the Unity Editor. (explicitly defining the visualized camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Camera
+ camera
+
+
+
+
+
+
+
+ drawCamFrustum_rotViaQuat
+ drawCamFrustum_rotViaQuat
+ Draw a CamFrustum in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CamFrustum
+ camFrustum
+
+
+
+
+
+
+
+ drawCamFrustum_rotViaVec
+ drawCamFrustum_rotViaVec
+ Draw a CamFrustum in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CamFrustum
+ camFrustum
+
+
+
+
+
+
+
+ drawCamFrustum_cam
+ drawCamFrustum_cam
+ Draw a CamFrustum in the Unity Editor. (explicitly defining the visualized camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CamFrustum
+ camFrustum
+
+
+
+
+
+
+
+ drawBoolDisplayer2D
+ drawBoolDisplayer2D
+ Draw a BoolDisplayer2D in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayer2D
+ boolDisplayer2D
+
+
+
+
+
+
+
+ drawBoolDisplayer
+ drawBoolDisplayer
+ Draw a BoolDisplayer in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayer
+ boolDisplayer
+
+
+
+
+
+
+
+ drawBoolDisplayerScreenspace_3Dpos
+ drawBoolDisplayerScreenspace_3Dpos
+ Draw a BoolDisplayerScreenspace in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayerScreenspace
+ boolDisplayerScreenspace
+
+
+
+
+
+
+
+ drawBoolDisplayerScreenspace_3Dpos_cam
+ drawBoolDisplayerScreenspace_3Dpos_cam
+ Draw a BoolDisplayerScreenspace in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayerScreenspace
+ boolDisplayerScreenspace
+
+
+
+
+
+
+
+ drawBoolDisplayerScreenspace_2Dpos
+ drawBoolDisplayerScreenspace_2Dpos
+ Draw a BoolDisplayerScreenspace in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayerScreenspace
+ boolDisplayerScreenspace
+
+
+
+
+
+
+
+ drawBoolDisplayerScreenspace_2Dpos_cam
+ drawBoolDisplayerScreenspace_2Dpos_cam
+ Draw a BoolDisplayerScreenspace in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayerScreenspace
+ boolDisplayerScreenspace
+
+
+
+
+
+
+
+ drawRayLineExtended_ray
+ drawRayLineExtended_ray
+ Draw a RayLineExtended in the Unity Editor. (defined by ray)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtended
+ rayLineExtended
+
+
+
+
+
+
+
+ drawRayLineExtended_vec
+ drawRayLineExtended_vec
+ Draw a RayLineExtended in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtended
+ rayLineExtended
+
+
+
+
+
+
+
+ drawRayLineExtended2D_ray
+ drawRayLineExtended2D_ray
+ Draw a RayLineExtended2D in the Unity Editor. (defined by ray)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtended2D
+ rayLineExtended2D
+
+
+
+
+
+
+
+ drawRayLineExtended2D_vec
+ drawRayLineExtended2D_vec
+ Draw a RayLineExtended2D in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtended2D
+ rayLineExtended2D
+
+
+
+
+
+
+
+ drawRayLineExtendedScreenspace
+ drawRayLineExtendedScreenspace
+ Draw a RayLineExtendedScreenspace in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtendedScreenspace
+ rayLineExtendedScreenspace
+
+
+
+
+
+
+
+ drawRayLineExtendedScreenspace_cam
+ drawRayLineExtendedScreenspace_cam
+ Draw a RayLineExtendedScreenspace in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtendedScreenspace
+ rayLineExtendedScreenspace
+
+
+
+
+
+
+
+ drawCoordinateAxesGizmo
+ drawCoordinateAxesGizmo
+ Draw a CoordinateAxesGizmo in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CoordinateAxesGizmo
+ coordinateAxesGizmo
+
+
+
+
+
+
+
+ drawCoordinateAxesGizmoLocal_go
+ drawCoordinateAxesGizmoLocal_go
+ Draw a CoordinateAxesGizmoLocal in the Unity Editor. (local space is defined by gameobject as parent)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CoordinateAxesGizmoLocal
+ coordinateAxesGizmoLocal
+
+
+
+
+
+
+
+ drawCoordinateAxesGizmoLocal_tr
+ drawCoordinateAxesGizmoLocal_tr
+ Draw a CoordinateAxesGizmoLocal in the Unity Editor. (local space is defined by transform as parent)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CoordinateAxesGizmoLocal
+ coordinateAxesGizmoLocal
+
+
+
+
+
+
+
+ drawCoordinateAxesGizmoLocal_vecQuat
+ drawCoordinateAxesGizmoLocal_vecQuat
+ Draw a CoordinateAxesGizmoLocal in the Unity Editor. (local space is defined via vectors and quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CoordinateAxesGizmoLocal
+ coordinateAxesGizmoLocal
+
+
+
+
+
+
+
+ drawGridPlanes_tr
+ drawGridPlanes_tr
+ Draw GridPlanes in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanes
+ gridPlanes
+
+
+
+
+
+
+
+ drawGridPlanes_vec
+ drawGridPlanes_vec
+ Draw GridPlanes in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanes
+ gridPlanes
+
+
+
+
+
+
+
+ drawXGridPlanes_tr
+ drawXGridPlanes_tr
+ Draw XGridPlanes in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanes
+ xGridPlanes
+
+
+
+
+
+
+
+ drawXGridPlanes_vec
+ drawXGridPlanes_vec
+ Draw XGridPlanes in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanes
+ xGridPlanes
+
+
+
+
+
+
+
+ drawYGridPlanes_tr
+ drawYGridPlanes_tr
+ Draw YGridPlanes in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanes
+ yGridPlanes
+
+
+
+
+
+
+
+ drawYGridPlanes_vec
+ drawYGridPlanes_vec
+ Draw YGridPlanes in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanes
+ yGridPlanes
+
+
+
+
+
+
+
+ drawZGridPlanes_tr
+ drawZGridPlanes_tr
+ Draw ZGridPlanes in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanes
+ zGridPlanes
+
+
+
+
+
+
+
+ drawZGridPlanes_vec
+ drawZGridPlanes_vec
+ Draw ZGridPlanes in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanes
+ zGridPlanes
+
+
+
+
+
+
+
+ drawGridPlanesLocal_parentSpace_trPos
+ drawGridPlanesLocal_parentSpace_trPos
+ Draw GridPlanesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanesLocal
+ gridPlanesLocal
+
+
+
+
+
+
+
+ drawGridPlanesLocal_trSpace_vecPos
+ drawGridPlanesLocal_trSpace_vecPos
+ Draw GridPlanesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanesLocal
+ gridPlanesLocal
+
+
+
+
+
+
+
+ drawXGridPlanesLocal_parentSpace_trPos
+ drawXGridPlanesLocal_parentSpace_trPos
+ Draw XGridPlanesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanesLocal
+ xGridPlanesLocal
+
+
+
+
+
+
+
+ drawXGridPlanesLocal_trSpace_vecPos
+ drawXGridPlanesLocal_trSpace_vecPos
+ Draw XGridPlanesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanesLocal
+ xGridPlanesLocal
+
+
+
+
+
+
+
+ drawYGridPlanesLocal_parentSpace_trPos
+ drawYGridPlanesLocal_parentSpace_trPos
+ Draw YGridPlanesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanesLocal
+ yGridPlanesLocal
+
+
+
+
+
+
+
+ drawYGridPlanesLocal_trSpace_vecPos
+ drawYGridPlanesLocal_trSpace_vecPos
+ Draw YGridPlanesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanesLocal
+ yGridPlanesLocal
+
+
+
+
+
+
+
+ drawZGridPlanesLocal_parentSpace_trPos
+ drawZGridPlanesLocal_parentSpace_trPos
+ Draw ZGridPlanesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanesLocal
+ zGridPlanesLocal
+
+
+
+
+
+
+
+ drawZGridPlanesLocal_trSpace_vecPos
+ drawZGridPlanesLocal_trSpace_vecPos
+ Draw ZGridPlanesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanesLocal
+ zGridPlanesLocal
+
+
+
+
+
+
+
+ drawGridPlanesLocal_vecQuatSpace_trPos
+ drawGridPlanesLocal_vecQuatSpace_trPos
+ Draw GridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanesLocal
+ gridPlanesLocal
+
+
+
+
+
+
+
+ drawGridPlanesLocal_vecQuatSpace_vecPos
+ drawGridPlanesLocal_vecQuatSpace_vecPos
+ Draw GridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanesLocal
+ gridPlanesLocal
+
+
+
+
+
+
+
+ drawXGridPlanesLocal_vecQuatSpace_trPos
+ drawXGridPlanesLocal_vecQuatSpace_trPos
+ Draw XGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanesLocal
+ xGridPlanesLocal
+
+
+
+
+
+
+
+ drawXGridPlanesLocal_vecQuatSpace_vecPos
+ drawXGridPlanesLocal_vecQuatSpace_vecPos
+ Draw XGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanesLocal
+ xGridPlanesLocal
+
+
+
+
+
+
+
+ drawYGridPlanesLocal_vecQuatSpace_trPos
+ drawYGridPlanesLocal_vecQuatSpace_trPos
+ Draw YGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanesLocal
+ yGridPlanesLocal
+
+
+
+
+
+
+
+ drawYGridPlanesLocal_vecQuatSpace_vecPos
+ drawYGridPlanesLocal_vecQuatSpace_vecPos
+ Draw YGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanesLocal
+ yGridPlanesLocal
+
+
+
+
+
+
+
+ drawZGridPlanesLocal_vecQuatSpace_trPos
+ drawZGridPlanesLocal_vecQuatSpace_trPos
+ Draw ZGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanesLocal
+ zGridPlanesLocal
+
+
+
+
+
+
+
+ drawZGridPlanesLocal_vecQuatSpace_vecPos
+ drawZGridPlanesLocal_vecQuatSpace_vecPos
+ Draw ZGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanesLocal
+ zGridPlanesLocal
+
+
+
+
+
+
+
+ drawGridLines_tr
+ drawGridLines_tr
+ Draw GridLines in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLines
+ gridLines
+
+
+
+
+
+
+
+ drawGridLines_vec
+ drawGridLines_vec
+ Draw GridLines in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLines
+ gridLines
+
+
+
+
+
+
+
+ drawXGridLines_tr
+ drawXGridLines_tr
+ Draw XGridLines in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLines
+ xGridLines
+
+
+
+
+
+
+
+ drawXGridLines_vec
+ drawXGridLines_vec
+ Draw XGridLines in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLines
+ xGridLines
+
+
+
+
+
+
+
+ drawYGridLines_tr
+ drawYGridLines_tr
+ Draw YGridLines in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLines
+ yGridLines
+
+
+
+
+
+
+
+ drawYGridLines_vec
+ drawYGridLines_vec
+ Draw YGridLines in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLines
+ yGridLines
+
+
+
+
+
+
+
+ drawZGridLines_tr
+ drawZGridLines_tr
+ Draw ZGridLines in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLines
+ zGridLines
+
+
+
+
+
+
+
+ drawZGridLines_vec
+ drawZGridLines_vec
+ Draw ZGridLines in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLines
+ zGridLines
+
+
+
+
+
+
+
+ drawGridLinesLocal_parentSpace_trPos
+ drawGridLinesLocal_parentSpace_trPos
+ Draw GridLinesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLinesLocal
+ gridLinesLocal
+
+
+
+
+
+
+
+ drawGridLinesLocal_trSpace_vecPos
+ drawGridLinesLocal_trSpace_vecPos
+ Draw GridLinesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLinesLocal
+ gridLinesLocal
+
+
+
+
+
+
+
+ drawXGridLinesLocal_parentSpace_trPos
+ drawXGridLinesLocal_parentSpace_trPos
+ Draw XGridLinesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLinesLocal
+ xGridLinesLocal
+
+
+
+
+
+
+
+ drawXGridLinesLocal_trSpace_vecPos
+ drawXGridLinesLocal_trSpace_vecPos
+ Draw XGridLinesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLinesLocal
+ xGridLinesLocal
+
+
+
+
+
+
+
+ drawYGridLinesLocal_parentSpace_trPos
+ drawYGridLinesLocal_parentSpace_trPos
+ Draw YGridLinesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLinesLocal
+ yGridLinesLocal
+
+
+
+
+
+
+
+ drawYGridLinesLocal_trSpace_vecPos
+ drawYGridLinesLocal_trSpace_vecPos
+ Draw YGridLinesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLinesLocal
+ yGridLinesLocal
+
+
+
+
+
+
+
+ drawZGridLinesLocal_parentSpace_trPos
+ drawZGridLinesLocal_parentSpace_trPos
+ Draw ZGridLinesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLinesLocal
+ zGridLinesLocal
+
+
+
+
+
+
+
+ drawZGridLinesLocal_trSpace_vecPos
+ drawZGridLinesLocal_trSpace_vecPos
+ Draw ZGridLinesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLinesLocal
+ zGridLinesLocal
+
+
+
+
+
+
+
+ drawGridLinesLocal_vecQuatSpace_trPos
+ drawGridLinesLocal_vecQuatSpace_trPos
+ Draw GridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLinesLocal
+ gridLinesLocal
+
+
+
+
+
+
+
+ drawGridLinesLocal_vecQuatSpace_vecPos
+ drawGridLinesLocal_vecQuatSpace_vecPos
+ Draw GridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLinesLocal
+ gridLinesLocal
+
+
+
+
+
+
+
+ drawXGridLinesLocal_vecQuatSpace_trPos
+ drawXGridLinesLocal_vecQuatSpace_trPos
+ Draw XGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLinesLocal
+ xGridLinesLocal
+
+
+
+
+
+
+
+ drawXGridLinesLocal_vecQuatSpace_vecPos
+ drawXGridLinesLocal_vecQuatSpace_vecPos
+ Draw XGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLinesLocal
+ xGridLinesLocal
+
+
+
+
+
+
+
+ drawYGridLinesLocal_vecQuatSpace_trPos
+ drawYGridLinesLocal_vecQuatSpace_trPos
+ Draw YGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLinesLocal
+ yGridLinesLocal
+
+
+
+
+
+
+
+ drawYGridLinesLocal_vecQuatSpace_vecPos
+ drawYGridLinesLocal_vecQuatSpace_vecPos
+ Draw YGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLinesLocal
+ yGridLinesLocal
+
+
+
+
+
+
+
+ drawZGridLinesLocal_vecQuatSpace_trPos
+ drawZGridLinesLocal_vecQuatSpace_trPos
+ Draw ZGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLinesLocal
+ zGridLinesLocal
+
+
+
+
+
+
+
+ drawZGridLinesLocal_vecQuatSpace_vecPos
+ drawZGridLinesLocal_vecQuatSpace_vecPos
+ Draw ZGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLinesLocal
+ zGridLinesLocal
+
+
+
+
+
+
+
+ drawGridScreenspace
+ drawGridScreenspace
+ Draw GridScreenspace in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridScreenspace
+ gridScreenspace
+
+
+
+
+
+
+
+ drawGridScreenspace_cam
+ drawGridScreenspace_cam
+ Draw GridScreenspace in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridScreenspace
+ gridScreenspace
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawEngineBasics.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawEngineBasics.snippet.meta
new file mode 100644
index 0000000..ff6af61
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawEngineBasics.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 0a9e57153cb40714da59a87a4d0c7b28
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawEngineBasics_func.snippet b/Editor/DrawDebugLibrary/code snippets/drawEngineBasics_func.snippet
new file mode 100644
index 0000000..883c5d7
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawEngineBasics_func.snippet
@@ -0,0 +1,4978 @@
+
+
+
+
+ drawVectorVisualization_func
+ drawVectorVisualization_func
+ Encapsulated in a function: Draw a VectorVisualization in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorVisualization
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorFromVisualization_func
+ drawVectorFromVisualization_func
+ Encapsulated in a function: Draw a VectorFromVisualization in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorFromVisualization
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorToVisualization_func
+ drawVectorToVisualization_func
+ Encapsulated in a function: Draw a VectorToVisualization in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorToVisualization
+ WithThisName
+
+
+
+
+
+
+
+ drawPositionVisualization_go_func
+ drawPositionVisualization_go_func
+ Encapsulated in a function: Draw a PositionVisualization in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualization
+ WithThisName
+
+
+
+
+
+
+
+ drawPositionVisualization_tr_func
+ drawPositionVisualization_tr_func
+ Encapsulated in a function: Draw a PositionVisualization in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualization
+ WithThisName
+
+
+
+
+
+
+
+ drawPositionVisualization_vec_func
+ drawPositionVisualization_vec_func
+ Encapsulated in a function: Draw a PositionVisualization in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualization
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorVisualizationLocal_func
+ drawVectorVisualizationLocal_func
+ Encapsulated in a function: Draw a VectorVisualizationLocal in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorVisualizationLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorFromVisualizationLocal_func
+ drawVectorFromVisualizationLocal_func
+ Encapsulated in a function: Draw a VectorFromVisualizationLocal in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorFromVisualizationLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawVectorToVisualizationLocal_func
+ drawVectorToVisualizationLocal_func
+ Encapsulated in a function: Draw a VectorToVisualizationLocal in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn VectorToVisualizationLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawPositionVisualizationLocal_go_func
+ drawPositionVisualizationLocal_go_func
+ Encapsulated in a function: Draw a PositionVisualizationLocal in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualizationLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawPositionVisualizationLocal_tr_func
+ drawPositionVisualizationLocal_tr_func
+ Encapsulated in a function: Draw a PositionVisualizationLocal in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualizationLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawPositionVisualizationLocal_vec_func
+ drawPositionVisualizationLocal_vec_func
+ Encapsulated in a function: Draw a PositionVisualizationLocal in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn PositionVisualizationLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawScale_go_func
+ drawScale_go_func
+ Encapsulated in a function: Draw a Scale in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Scale
+ WithThisName
+
+
+
+
+
+
+
+ drawScale_tr_func
+ drawScale_tr_func
+ Encapsulated in a function: Draw a Scale in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Scale
+ WithThisName
+
+
+
+
+
+
+
+ drawScale_vec_func
+ drawScale_vec_func
+ Encapsulated in a function: Draw a Scale in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Scale
+ WithThisName
+
+
+
+
+
+
+
+ drawLocalScale_go_func
+ drawLocalScale_go_func
+ Encapsulated in a function: Draw a LocalScale in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalScale
+ WithThisName
+
+
+
+
+
+
+
+ drawLocalScale_tr_func
+ drawLocalScale_tr_func
+ Encapsulated in a function: Draw a LocalScale in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalScale
+ WithThisName
+
+
+
+
+
+
+
+ drawLocalScale_vec_func
+ drawLocalScale_vec_func
+ Encapsulated in a function: Draw a LocalScale in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalScale
+ WithThisName
+
+
+
+
+
+
+
+ drawQuaternion_go_func
+ drawQuaternion_go_func
+ Encapsulated in a function: Draw a Quaternion in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Quaternion
+ WithThisName
+
+
+
+
+
+
+
+ drawQuaternion_tr_func
+ drawQuaternion_tr_func
+ Encapsulated in a function: Draw a Quaternion in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Quaternion
+ WithThisName
+
+
+
+
+
+
+
+ drawQuaternion_quat_func
+ drawQuaternion_quat_func
+ Encapsulated in a function: Draw a Quaternion in the Unity Editor. (of quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Quaternion
+ WithThisName
+
+
+
+
+
+
+
+ drawQuaternionLocal_go_func
+ drawQuaternionLocal_go_func
+ Encapsulated in a function: Draw a QuaternionLocal in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn QuaternionLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawQuaternionLocal_tr_func
+ drawQuaternionLocal_tr_func
+ Encapsulated in a function: Draw a QuaternionLocal in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn QuaternionLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawQuaternionLocal_quat_func
+ drawQuaternionLocal_quat_func
+ Encapsulated in a function: Draw a QuaternionLocal in the Unity Editor. (of quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn QuaternionLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawEuler_go_func
+ drawEuler_go_func
+ Encapsulated in a function: Draw an Euler in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Euler
+ WithThisName
+
+
+
+
+
+
+
+ drawEuler_tr_func
+ drawEuler_tr_func
+ Encapsulated in a function: Draw an Euler in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Euler
+ WithThisName
+
+
+
+
+
+
+
+ drawEuler_vec_func
+ drawEuler_vec_func
+ Encapsulated in a function: Draw an Euler in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Euler
+ WithThisName
+
+
+
+
+
+
+
+ drawEuler_quat_func
+ drawEuler_quat_func
+ Encapsulated in a function: Draw an Euler in the Unity Editor. (of quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Euler
+ WithThisName
+
+
+
+
+
+
+
+ drawEulerLocal_go_func
+ drawEulerLocal_go_func
+ Encapsulated in a function: Draw an EulerLocal in the Unity Editor. (of gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EulerLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawEulerLocal_tr_func
+ drawEulerLocal_tr_func
+ Encapsulated in a function: Draw an EulerLocal in the Unity Editor. (of transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EulerLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawEulerLocal_vec_func
+ drawEulerLocal_vec_func
+ Encapsulated in a function: Draw an EulerLocal in the Unity Editor. (of vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EulerLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawEulerLocal_quat_func
+ drawEulerLocal_quat_func
+ Encapsulated in a function: Draw an EulerLocal in the Unity Editor. (of quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EulerLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawBounds_go_func
+ drawBounds_go_func
+ Encapsulated in a function: Draw Bounds in the Unity Editor. (of mesh on gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bounds
+ WithThisName
+
+
+
+
+
+
+
+ drawLocalBounds_go_func
+ drawLocalBounds_go_func
+ Encapsulated in a function: Draw LocalBounds in the Unity Editor. (of mesh on gameobject)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalBounds
+ WithThisName
+
+
+
+
+
+
+
+ drawBounds_tr_func
+ drawBounds_tr_func
+ Encapsulated in a function: Draw Bounds in the Unity Editor. (of mesh on transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bounds
+ WithThisName
+
+
+
+
+
+
+
+ drawLocalBounds_tr_func
+ drawLocalBounds_tr_func
+ Encapsulated in a function: Draw LocalBounds in the Unity Editor. (of mesh on transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalBounds
+ WithThisName
+
+
+
+
+
+
+
+ drawBounds_b_func
+ drawBounds_b_func
+ Encapsulated in a function: Draw Bounds in the Unity Editor. (of bounds struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bounds
+ WithThisName
+
+
+
+
+
+
+
+ drawLocalBounds_b_func
+ drawLocalBounds_b_func
+ Encapsulated in a function: Draw LocalBounds in the Unity Editor. (of bounds struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LocalBounds
+ WithThisName
+
+
+
+
+
+
+
+ drawDotProduct_func
+ drawDotProduct_func
+ Encapsulated in a function: Draw a DotProduct in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DotProduct
+ WithThisName
+
+
+
+
+
+
+
+ drawCrossProduct_func
+ drawCrossProduct_func
+ Encapsulated in a function: Draw a CrossProduct in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CrossProduct
+ WithThisName
+
+
+
+
+
+
+
+ drawTagGameObject_func
+ drawTagGameObject_func
+ Encapsulated in a function: Draw TagGameObject in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TagGameObject
+ WithThisName
+
+
+
+
+
+
+
+ drawTagGameObjectScreenspace_func
+ drawTagGameObjectScreenspace_func
+ Encapsulated in a function: Draw TagGameObjectScreenspace in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TagGameObjectScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTagGameObjectScreenspace_cam_func
+ drawTagGameObjectScreenspace_cam_func
+ Encapsulated in a function: Draw TagGameObjectScreenspace in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TagGameObjectScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawCamera_rotViaQuat_func
+ drawCamera_rotViaQuat_func
+ Encapsulated in a function: Draw a Camera in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Camera
+ WithThisName
+
+
+
+
+
+
+
+ drawCamera_rotViaVec_func
+ drawCamera_rotViaVec_func
+ Encapsulated in a function: Draw a Camera in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Camera
+ WithThisName
+
+
+
+
+
+
+
+ drawCamera_cam_func
+ drawCamera_cam_func
+ Encapsulated in a function: Draw a Camera in the Unity Editor. (explicitly defining the visualized camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Camera
+ WithThisName
+
+
+
+
+
+
+
+ drawCamFrustum_rotViaQuat_func
+ drawCamFrustum_rotViaQuat_func
+ Encapsulated in a function: Draw a CamFrustum in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CamFrustum
+ WithThisName
+
+
+
+
+
+
+
+ drawCamFrustum_rotViaVec_func
+ drawCamFrustum_rotViaVec_func
+ Encapsulated in a function: Draw a CamFrustum in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CamFrustum
+ WithThisName
+
+
+
+
+
+
+
+ drawCamFrustum_cam_func
+ drawCamFrustum_cam_func
+ Encapsulated in a function: Draw a CamFrustum in the Unity Editor. (explicitly defining the visualized camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CamFrustum
+ WithThisName
+
+
+
+
+
+
+
+ drawBoolDisplayer2D_func
+ drawBoolDisplayer2D_func
+ Encapsulated in a function: Draw a BoolDisplayer2D in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayer2D
+ WithThisName
+
+
+
+
+
+
+
+ drawBoolDisplayer_func
+ drawBoolDisplayer_func
+ Encapsulated in a function: Draw a BoolDisplayer in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayer
+ WithThisName
+
+
+
+
+
+
+
+ drawBoolDisplayerScreenspace_3Dpos_func
+ drawBoolDisplayerScreenspace_3Dpos_func
+ Encapsulated in a function: Draw a BoolDisplayerScreenspace in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayerScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawBoolDisplayerScreenspace_3Dpos_cam_func
+ drawBoolDisplayerScreenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw a BoolDisplayerScreenspace in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayerScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawBoolDisplayerScreenspace_2Dpos_func
+ drawBoolDisplayerScreenspace_2Dpos_func
+ Encapsulated in a function: Draw a BoolDisplayerScreenspace in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayerScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawBoolDisplayerScreenspace_2Dpos_cam_func
+ drawBoolDisplayerScreenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw a BoolDisplayerScreenspace in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoolDisplayerScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawRayLineExtended_ray_func
+ drawRayLineExtended_ray_func
+ Encapsulated in a function: Draw a RayLineExtended in the Unity Editor. (defined by ray)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtended
+ WithThisName
+
+
+
+
+
+
+
+ drawRayLineExtended_vec_func
+ drawRayLineExtended_vec_func
+ Encapsulated in a function: Draw a RayLineExtended in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtended
+ WithThisName
+
+
+
+
+
+
+
+ drawRayLineExtended2D_ray_func
+ drawRayLineExtended2D_ray_func
+ Encapsulated in a function: Draw a RayLineExtended2D in the Unity Editor. (defined by ray)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtended2D
+ WithThisName
+
+
+
+
+
+
+
+ drawRayLineExtended2D_vec_func
+ drawRayLineExtended2D_vec_func
+ Encapsulated in a function: Draw a RayLineExtended2D in the Unity Editor. (defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtended2D
+ WithThisName
+
+
+
+
+
+
+
+ drawRayLineExtendedScreenspace_func
+ drawRayLineExtendedScreenspace_func
+ Encapsulated in a function: Draw a RayLineExtendedScreenspace in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtendedScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawRayLineExtendedScreenspace_cam_func
+ drawRayLineExtendedScreenspace_cam_func
+ Encapsulated in a function: Draw a RayLineExtendedScreenspace in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RayLineExtendedScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawCoordinateAxesGizmo_func
+ drawCoordinateAxesGizmo_func
+ Encapsulated in a function: Draw a CoordinateAxesGizmo in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CoordinateAxesGizmo
+ WithThisName
+
+
+
+
+
+
+
+ drawCoordinateAxesGizmoLocal_go_func
+ drawCoordinateAxesGizmoLocal_go_func
+ Encapsulated in a function: Draw a CoordinateAxesGizmoLocal in the Unity Editor. (local space is defined by gameobject as parent)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CoordinateAxesGizmoLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawCoordinateAxesGizmoLocal_tr_func
+ drawCoordinateAxesGizmoLocal_tr_func
+ Encapsulated in a function: Draw a CoordinateAxesGizmoLocal in the Unity Editor. (local space is defined by transform as parent)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CoordinateAxesGizmoLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawCoordinateAxesGizmoLocal_vecQuat_func
+ drawCoordinateAxesGizmoLocal_vecQuat_func
+ Encapsulated in a function: Draw a CoordinateAxesGizmoLocal in the Unity Editor. (local space is defined via vectors and quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CoordinateAxesGizmoLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawGridPlanes_tr_func
+ drawGridPlanes_tr_func
+ Encapsulated in a function: Draw GridPlanes in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanes
+ WithThisName
+
+
+
+
+
+
+
+ drawGridPlanes_vec_func
+ drawGridPlanes_vec_func
+ Encapsulated in a function: Draw GridPlanes in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanes
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridPlanes_tr_func
+ drawXGridPlanes_tr_func
+ Encapsulated in a function: Draw XGridPlanes in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanes
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridPlanes_vec_func
+ drawXGridPlanes_vec_func
+ Encapsulated in a function: Draw XGridPlanes in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanes
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridPlanes_tr_func
+ drawYGridPlanes_tr_func
+ Encapsulated in a function: Draw YGridPlanes in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanes
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridPlanes_vec_func
+ drawYGridPlanes_vec_func
+ Encapsulated in a function: Draw YGridPlanes in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanes
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridPlanes_tr_func
+ drawZGridPlanes_tr_func
+ Encapsulated in a function: Draw ZGridPlanes in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanes
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridPlanes_vec_func
+ drawZGridPlanes_vec_func
+ Encapsulated in a function: Draw ZGridPlanes in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanes
+ WithThisName
+
+
+
+
+
+
+
+ drawGridPlanesLocal_parentSpace_trPos_func
+ drawGridPlanesLocal_parentSpace_trPos_func
+ Encapsulated in a function: Draw GridPlanesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawGridPlanesLocal_trSpace_vecPos_func
+ drawGridPlanesLocal_trSpace_vecPos_func
+ Encapsulated in a function: Draw GridPlanesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridPlanesLocal_parentSpace_trPos_func
+ drawXGridPlanesLocal_parentSpace_trPos_func
+ Encapsulated in a function: Draw XGridPlanesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridPlanesLocal_trSpace_vecPos_func
+ drawXGridPlanesLocal_trSpace_vecPos_func
+ Encapsulated in a function: Draw XGridPlanesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridPlanesLocal_parentSpace_trPos_func
+ drawYGridPlanesLocal_parentSpace_trPos_func
+ Encapsulated in a function: Draw YGridPlanesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridPlanesLocal_trSpace_vecPos_func
+ drawYGridPlanesLocal_trSpace_vecPos_func
+ Encapsulated in a function: Draw YGridPlanesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridPlanesLocal_parentSpace_trPos_func
+ drawZGridPlanesLocal_parentSpace_trPos_func
+ Encapsulated in a function: Draw ZGridPlanesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridPlanesLocal_trSpace_vecPos_func
+ drawZGridPlanesLocal_trSpace_vecPos_func
+ Encapsulated in a function: Draw ZGridPlanesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawGridPlanesLocal_vecQuatSpace_trPos_func
+ drawGridPlanesLocal_vecQuatSpace_trPos_func
+ Encapsulated in a function: Draw GridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawGridPlanesLocal_vecQuatSpace_vecPos_func
+ drawGridPlanesLocal_vecQuatSpace_vecPos_func
+ Encapsulated in a function: Draw GridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridPlanesLocal_vecQuatSpace_trPos_func
+ drawXGridPlanesLocal_vecQuatSpace_trPos_func
+ Encapsulated in a function: Draw XGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridPlanesLocal_vecQuatSpace_vecPos_func
+ drawXGridPlanesLocal_vecQuatSpace_vecPos_func
+ Encapsulated in a function: Draw XGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridPlanesLocal_vecQuatSpace_trPos_func
+ drawYGridPlanesLocal_vecQuatSpace_trPos_func
+ Encapsulated in a function: Draw YGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridPlanesLocal_vecQuatSpace_vecPos_func
+ drawYGridPlanesLocal_vecQuatSpace_vecPos_func
+ Encapsulated in a function: Draw YGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridPlanesLocal_vecQuatSpace_trPos_func
+ drawZGridPlanesLocal_vecQuatSpace_trPos_func
+ Encapsulated in a function: Draw ZGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridPlanesLocal_vecQuatSpace_vecPos_func
+ drawZGridPlanesLocal_vecQuatSpace_vecPos_func
+ Encapsulated in a function: Draw ZGridPlanesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridPlanesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawGridLines_tr_func
+ drawGridLines_tr_func
+ Encapsulated in a function: Draw GridLines in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLines
+ WithThisName
+
+
+
+
+
+
+
+ drawGridLines_vec_func
+ drawGridLines_vec_func
+ Encapsulated in a function: Draw GridLines in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLines
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridLines_tr_func
+ drawXGridLines_tr_func
+ Encapsulated in a function: Draw XGridLines in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLines
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridLines_vec_func
+ drawXGridLines_vec_func
+ Encapsulated in a function: Draw XGridLines in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLines
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridLines_tr_func
+ drawYGridLines_tr_func
+ Encapsulated in a function: Draw YGridLines in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLines
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridLines_vec_func
+ drawYGridLines_vec_func
+ Encapsulated in a function: Draw YGridLines in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLines
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridLines_tr_func
+ drawZGridLines_tr_func
+ Encapsulated in a function: Draw ZGridLines in the Unity Editor. (around transform's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLines
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridLines_vec_func
+ drawZGridLines_vec_func
+ Encapsulated in a function: Draw ZGridLines in the Unity Editor. (around vector's position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLines
+ WithThisName
+
+
+
+
+
+
+
+ drawGridLinesLocal_parentSpace_trPos_func
+ drawGridLinesLocal_parentSpace_trPos_func
+ Encapsulated in a function: Draw GridLinesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawGridLinesLocal_trSpace_vecPos_func
+ drawGridLinesLocal_trSpace_vecPos_func
+ Encapsulated in a function: Draw GridLinesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridLinesLocal_parentSpace_trPos_func
+ drawXGridLinesLocal_parentSpace_trPos_func
+ Encapsulated in a function: Draw XGridLinesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridLinesLocal_trSpace_vecPos_func
+ drawXGridLinesLocal_trSpace_vecPos_func
+ Encapsulated in a function: Draw XGridLinesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridLinesLocal_parentSpace_trPos_func
+ drawYGridLinesLocal_parentSpace_trPos_func
+ Encapsulated in a function: Draw YGridLinesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridLinesLocal_trSpace_vecPos_func
+ drawYGridLinesLocal_trSpace_vecPos_func
+ Encapsulated in a function: Draw YGridLinesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridLinesLocal_parentSpace_trPos_func
+ drawZGridLinesLocal_parentSpace_trPos_func
+ Encapsulated in a function: Draw ZGridLinesLocal in the Unity Editor. (local space from transfrom parent, position from transfrom itself)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridLinesLocal_trSpace_vecPos_func
+ drawZGridLinesLocal_trSpace_vecPos_func
+ Encapsulated in a function: Draw ZGridLinesLocal in the Unity Editor. (local space from transfrom, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawGridLinesLocal_vecQuatSpace_trPos_func
+ drawGridLinesLocal_vecQuatSpace_trPos_func
+ Encapsulated in a function: Draw GridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawGridLinesLocal_vecQuatSpace_vecPos_func
+ drawGridLinesLocal_vecQuatSpace_vecPos_func
+ Encapsulated in a function: Draw GridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridLinesLocal_vecQuatSpace_trPos_func
+ drawXGridLinesLocal_vecQuatSpace_trPos_func
+ Encapsulated in a function: Draw XGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawXGridLinesLocal_vecQuatSpace_vecPos_func
+ drawXGridLinesLocal_vecQuatSpace_vecPos_func
+ Encapsulated in a function: Draw XGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn XGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridLinesLocal_vecQuatSpace_trPos_func
+ drawYGridLinesLocal_vecQuatSpace_trPos_func
+ Encapsulated in a function: Draw YGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawYGridLinesLocal_vecQuatSpace_vecPos_func
+ drawYGridLinesLocal_vecQuatSpace_vecPos_func
+ Encapsulated in a function: Draw YGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn YGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridLinesLocal_vecQuatSpace_trPos_func
+ drawZGridLinesLocal_vecQuatSpace_trPos_func
+ Encapsulated in a function: Draw ZGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawZGridLinesLocal_vecQuatSpace_vecPos_func
+ drawZGridLinesLocal_vecQuatSpace_vecPos_func
+ Encapsulated in a function: Draw ZGridLinesLocal in the Unity Editor. (local space from vectors+quaternion, position from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ZGridLinesLocal
+ WithThisName
+
+
+
+
+
+
+
+ drawGridScreenspace_func
+ drawGridScreenspace_func
+ Encapsulated in a function: Draw GridScreenspace in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawGridScreenspace_cam_func
+ drawGridScreenspace_cam_func
+ Encapsulated in a function: Draw GridScreenspace in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GridScreenspace
+ WithThisName
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawEngineBasics_func.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawEngineBasics_func.snippet.meta
new file mode 100644
index 0000000..dc996c8
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawEngineBasics_func.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: c44f4a6761c0c9647a71a90238fb32f8
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawLogs.snippet b/Editor/DrawDebugLibrary/code snippets/drawLogs.snippet
new file mode 100644
index 0000000..f1780cf
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawLogs.snippet
@@ -0,0 +1,202 @@
+
+
+
+
+ drawLogsAtGameObject
+ drawLogsAtGameObject
+ Draw LogsAtGameObject in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LogsAtGameObject
+ logsAtGameObject
+
+
+
+
+
+
+
+ drawLogsAtGameObjectScreenspace
+ drawLogsAtGameObjectScreenspace
+ Draw LogsAtGameObjectScreenspace in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LogsAtGameObjectScreenspace
+ logsAtGameObjectScreenspace
+
+
+
+
+
+
+
+ drawLogsAtGameObjectScreenspace_cam
+ drawLogsAtGameObjectScreenspace_cam
+ Draw LogsAtGameObjectScreenspace in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LogsAtGameObjectScreenspace
+ logsAtGameObjectScreenspace
+
+
+
+
+
+
+
+ drawLogsOnScreen
+ drawLogsOnScreen
+ Draw LogsOnScreen in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LogsOnScreen
+ logsOnScreen
+
+
+
+
+
+
+
+ drawLogsOnScreen_cam
+ drawLogsOnScreen_cam
+ Draw LogsOnScreen in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LogsOnScreen
+ logsOnScreen
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawLogs.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawLogs.snippet.meta
new file mode 100644
index 0000000..2ce8718
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawLogs.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 25816cd2b1986ac4cb001ea0a3802d79
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawLogs_func.snippet b/Editor/DrawDebugLibrary/code snippets/drawLogs_func.snippet
new file mode 100644
index 0000000..7aa4617
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawLogs_func.snippet
@@ -0,0 +1,217 @@
+
+
+
+
+ drawLogsAtGameObject_func
+ drawLogsAtGameObject_func
+ Encapsulated in a function: Draw LogsAtGameObject in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LogsAtGameObject
+ WithThisName
+
+
+
+
+
+
+
+ drawLogsAtGameObjectScreenspace_func
+ drawLogsAtGameObjectScreenspace_func
+ Encapsulated in a function: Draw LogsAtGameObjectScreenspace in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LogsAtGameObjectScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawLogsAtGameObjectScreenspace_cam_func
+ drawLogsAtGameObjectScreenspace_cam_func
+ Encapsulated in a function: Draw LogsAtGameObjectScreenspace in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LogsAtGameObjectScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawLogsOnScreen_func
+ drawLogsOnScreen_func
+ Encapsulated in a function: Draw LogsOnScreen in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LogsOnScreen
+ WithThisName
+
+
+
+
+
+
+
+ drawLogsOnScreen_cam_func
+ drawLogsOnScreen_cam_func
+ Encapsulated in a function: Draw LogsOnScreen in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LogsOnScreen
+ WithThisName
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawLogs_func.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawLogs_func.snippet.meta
new file mode 100644
index 0000000..6520364
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawLogs_func.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 767574db6964a3d45b3e8c4e720b39f7
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawMeasurements.snippet b/Editor/DrawDebugLibrary/code snippets/drawMeasurements.snippet
new file mode 100644
index 0000000..aac3f7a
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawMeasurements.snippet
@@ -0,0 +1,940 @@
+
+
+
+
+ drawDistance
+ drawDistance
+ Draw a Distance in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Distance
+ distance
+
+
+
+
+
+
+
+ drawAngle
+ drawAngle
+ Draw an Angle in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Angle
+ angle
+
+
+
+
+
+
+
+ drawAngleSpan
+ drawAngleSpan
+ Draw an AngleSpan in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleSpan
+ angleSpan
+
+
+
+
+
+
+
+ drawDistancePointToLine_ray
+ drawDistancePointToLine_ray
+ Draw a DistancePointToLine in the Unity Editor. (line defined by ray)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToLine
+ distancePointToLine
+
+
+
+
+
+
+
+ drawDistancePointToLine_vec
+ drawDistancePointToLine_vec
+ Draw a DistancePointToLine in the Unity Editor. (line defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToLine
+ distancePointToLine
+
+
+
+
+
+
+
+ drawDistanceLineToLine_ray
+ drawDistanceLineToLine_ray
+ Draw a DistanceLineToLine in the Unity Editor. (lines defined by rays)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceLineToLine
+ distanceLineToLine
+
+
+
+
+
+
+
+ drawDistanceLineToLine_vec
+ drawDistanceLineToLine_vec
+ Draw a DistanceLineToLine in the Unity Editor. (lines defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceLineToLine
+ distanceLineToLine
+
+
+
+
+
+
+
+ drawDistancePerpToOrthoViewDir
+ drawDistancePerpToOrthoViewDir
+ Draw a DistancePerpToOrthoViewDir in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePerpToOrthoViewDir
+ distancePerpToOrthoViewDir
+
+
+
+
+
+
+
+ drawDistanceAlongOrthoViewDir
+ drawDistanceAlongOrthoViewDir
+ Draw a DistanceAlongOrthoViewDir in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceAlongOrthoViewDir
+ distanceAlongOrthoViewDir
+
+
+
+
+
+
+
+ drawDistancePointToPlane_tr
+ drawDistancePointToPlane_tr
+ Draw a DistancePointToPlane in the Unity Editor. (plane defined by transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToPlane
+ distancePointToPlane
+
+
+
+
+
+
+
+ drawDistancePointToPlane_pl
+ drawDistancePointToPlane_pl
+ Draw a DistancePointToPlane in the Unity Editor. (plane defined by plane struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToPlane
+ distancePointToPlane
+
+
+
+
+
+
+
+ drawDistancePointToPlane_vec
+ drawDistancePointToPlane_vec
+ Draw a DistancePointToPlane in the Unity Editor. (plane defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToPlane
+ distancePointToPlane
+
+
+
+
+
+
+
+ drawAngleLineToPlane_ray_tr
+ drawAngleLineToPlane_ray_tr
+ Draw an AngleLineToPlane in the Unity Editor. (line defined by ray, plane defined by transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ angleLineToPlane
+
+
+
+
+
+
+
+ drawAngleLineToPlane_ray_pl
+ drawAngleLineToPlane_ray_pl
+ Draw an AngleLineToPlane in the Unity Editor. (line defined by ray, plane defined by plane struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ angleLineToPlane
+
+
+
+
+
+
+
+ drawAngleLineToPlane_ray_vec
+ drawAngleLineToPlane_ray_vec
+ Draw an AngleLineToPlane in the Unity Editor. (line defined by ray, plane defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ angleLineToPlane
+
+
+
+
+
+
+
+ drawAngleLineToPlane_vec_tr
+ drawAngleLineToPlane_vec_tr
+ Draw an AngleLineToPlane in the Unity Editor. (line defined by vectors, plane defined by transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ angleLineToPlane
+
+
+
+
+
+
+
+ drawAngleLineToPlane_vec_pl
+ drawAngleLineToPlane_vec_pl
+ Draw an AngleLineToPlane in the Unity Editor. (line defined by vectors, plane defined by plane struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ angleLineToPlane
+
+
+
+
+
+
+
+ drawAngleLineToPlane_vec_vec
+ drawAngleLineToPlane_vec_vec
+ Draw an AngleLineToPlane in the Unity Editor. (line defined by vectors, plane defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ angleLineToPlane
+
+
+
+
+
+
+
+ drawAnglePlaneToPlane_tr
+ drawAnglePlaneToPlane_tr
+ Draw an AnglePlaneToPlane in the Unity Editor. (planes defined by transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AnglePlaneToPlane
+ anglePlaneToPlane
+
+
+
+
+
+
+
+ drawAnglePlaneToPlane_pl
+ drawAnglePlaneToPlane_pl
+ Draw an AnglePlaneToPlane in the Unity Editor. (planes defined by plane structs)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AnglePlaneToPlane
+ anglePlaneToPlane
+
+
+
+
+
+
+
+ drawAnglePlaneToPlane_vec
+ drawAnglePlaneToPlane_vec
+ Draw an AnglePlaneToPlane in the Unity Editor. (planes defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AnglePlaneToPlane
+ anglePlaneToPlane
+
+
+
+
+
+
+
+ drawDistanceThreshold
+ drawDistanceThreshold
+ Draw DistanceThreshold in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceThreshold
+ distanceThreshold
+
+
+
+
+
+
+
+ drawDistanceThresholds
+ drawDistanceThresholds
+ Draw DistanceThresholds in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceThresholds
+ distanceThresholds
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawMeasurements.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawMeasurements.snippet.meta
new file mode 100644
index 0000000..a5a7464
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawMeasurements.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 6cee829548990bd408da0d379f8bf9fd
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D.snippet b/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D.snippet
new file mode 100644
index 0000000..e832384
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D.snippet
@@ -0,0 +1,383 @@
+
+
+
+
+ drawDistance2D
+ drawDistance2D
+ Draw a Distance in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Distance
+ distance
+
+
+
+
+
+
+
+ drawAngle2D
+ drawAngle2D
+ Draw an Angle in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Angle
+ angle
+
+
+
+
+
+
+
+ drawAngleSpan2D
+ drawAngleSpan2D
+ Draw an AngleSpan in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleSpan
+ angleSpan
+
+
+
+
+
+
+
+ drawDistancePointToLine2D_ray
+ drawDistancePointToLine2D_ray
+ Draw a DistancePointToLine in the Unity Editor. (line defined by ray)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToLine
+ distancePointToLine
+
+
+
+
+
+
+
+ drawDistancePointToLine2D_vec
+ drawDistancePointToLine2D_vec
+ Draw a DistancePointToLine in the Unity Editor. (line defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToLine
+ distancePointToLine
+
+
+
+
+
+
+
+ drawAngleLineToLine2D_ray
+ drawAngleLineToLine2D_ray
+ Draw an AngleLineToLine in the Unity Editor. (lines defined by rays)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToLine
+ angleLineToLine
+
+
+
+
+
+
+
+ drawAngleLineToLine2D_vec
+ drawAngleLineToLine2D_vec
+ Draw an AngleLineToLine in the Unity Editor. (lines defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToLine
+ angleLineToLine
+
+
+
+
+
+
+
+ drawDistanceThreshold2D
+ drawDistanceThreshold2D
+ Draw DistanceThreshold in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceThreshold
+ distanceThreshold
+
+
+
+
+
+
+
+ drawDistanceThresholds2D
+ drawDistanceThresholds2D
+ Draw DistanceThresholds in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceThresholds
+ distanceThresholds
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D.snippet.meta
new file mode 100644
index 0000000..d558762
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 340017e511c8ac74e94c66e44717e95f
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D_func.snippet b/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D_func.snippet
new file mode 100644
index 0000000..dc7e316
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D_func.snippet
@@ -0,0 +1,410 @@
+
+
+
+
+ drawDistance2D_func
+ drawDistance2D_func
+ Encapsulated in a function: Draw a Distance in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Distance
+ WithThisName
+
+
+
+
+
+
+
+ drawAngle2D_func
+ drawAngle2D_func
+ Encapsulated in a function: Draw an Angle in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Angle
+ WithThisName
+
+
+
+
+
+
+
+ drawAngleSpan2D_func
+ drawAngleSpan2D_func
+ Encapsulated in a function: Draw an AngleSpan in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleSpan
+ WithThisName
+
+
+
+
+
+
+
+ drawDistancePointToLine2D_ray_func
+ drawDistancePointToLine2D_ray_func
+ Encapsulated in a function: Draw a DistancePointToLine in the Unity Editor. (line defined by ray)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToLine
+ WithThisName
+
+
+
+
+
+
+
+ drawDistancePointToLine2D_vec_func
+ drawDistancePointToLine2D_vec_func
+ Encapsulated in a function: Draw a DistancePointToLine in the Unity Editor. (line defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToLine
+ WithThisName
+
+
+
+
+
+
+
+ drawAngleLineToLine2D_ray_func
+ drawAngleLineToLine2D_ray_func
+ Encapsulated in a function: Draw an AngleLineToLine in the Unity Editor. (lines defined by rays)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToLine
+ WithThisName
+
+
+
+
+
+
+
+ drawAngleLineToLine2D_vec_func
+ drawAngleLineToLine2D_vec_func
+ Encapsulated in a function: Draw an AngleLineToLine in the Unity Editor. (lines defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToLine
+ WithThisName
+
+
+
+
+
+
+
+ drawDistanceThreshold2D_func
+ drawDistanceThreshold2D_func
+ Encapsulated in a function: Draw DistanceThreshold in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceThreshold
+ WithThisName
+
+
+
+
+
+
+
+ drawDistanceThresholds2D_func
+ drawDistanceThresholds2D_func
+ Encapsulated in a function: Draw DistanceThresholds in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceThresholds
+ WithThisName
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D_func.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D_func.snippet.meta
new file mode 100644
index 0000000..0591db2
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawMeasurements2D_func.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d3ee7dbed886b61488b82b7097c81c4e
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawMeasurements_func.snippet b/Editor/DrawDebugLibrary/code snippets/drawMeasurements_func.snippet
new file mode 100644
index 0000000..16fcea9
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawMeasurements_func.snippet
@@ -0,0 +1,1009 @@
+
+
+
+
+ drawDistance_func
+ drawDistance_func
+ Encapsulated in a function: Draw a Distance in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Distance
+ WithThisName
+
+
+
+
+
+
+
+ drawAngle_func
+ drawAngle_func
+ Encapsulated in a function: Draw an Angle in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Angle
+ WithThisName
+
+
+
+
+
+
+
+ drawAngleSpan_func
+ drawAngleSpan_func
+ Encapsulated in a function: Draw an AngleSpan in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleSpan
+ WithThisName
+
+
+
+
+
+
+
+ drawDistancePointToLine_ray_func
+ drawDistancePointToLine_ray_func
+ Encapsulated in a function: Draw a DistancePointToLine in the Unity Editor. (line defined by ray)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToLine
+ WithThisName
+
+
+
+
+
+
+
+ drawDistancePointToLine_vec_func
+ drawDistancePointToLine_vec_func
+ Encapsulated in a function: Draw a DistancePointToLine in the Unity Editor. (line defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToLine
+ WithThisName
+
+
+
+
+
+
+
+ drawDistanceLineToLine_ray_func
+ drawDistanceLineToLine_ray_func
+ Encapsulated in a function: Draw a DistanceLineToLine in the Unity Editor. (lines defined by rays)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceLineToLine
+ WithThisName
+
+
+
+
+
+
+
+ drawDistanceLineToLine_vec_func
+ drawDistanceLineToLine_vec_func
+ Encapsulated in a function: Draw a DistanceLineToLine in the Unity Editor. (lines defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceLineToLine
+ WithThisName
+
+
+
+
+
+
+
+ drawDistancePerpToOrthoViewDir_func
+ drawDistancePerpToOrthoViewDir_func
+ Encapsulated in a function: Draw a DistancePerpToOrthoViewDir in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePerpToOrthoViewDir
+ WithThisName
+
+
+
+
+
+
+
+ drawDistanceAlongOrthoViewDir_func
+ drawDistanceAlongOrthoViewDir_func
+ Encapsulated in a function: Draw a DistanceAlongOrthoViewDir in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceAlongOrthoViewDir
+ WithThisName
+
+
+
+
+
+
+
+ drawDistancePointToPlane_tr_func
+ drawDistancePointToPlane_tr_func
+ Encapsulated in a function: Draw a DistancePointToPlane in the Unity Editor. (plane defined by transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawDistancePointToPlane_pl_func
+ drawDistancePointToPlane_pl_func
+ Encapsulated in a function: Draw a DistancePointToPlane in the Unity Editor. (plane defined by plane struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawDistancePointToPlane_vec_func
+ drawDistancePointToPlane_vec_func
+ Encapsulated in a function: Draw a DistancePointToPlane in the Unity Editor. (plane defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistancePointToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawAngleLineToPlane_ray_tr_func
+ drawAngleLineToPlane_ray_tr_func
+ Encapsulated in a function: Draw an AngleLineToPlane in the Unity Editor. (line defined by ray, plane defined by transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawAngleLineToPlane_ray_pl_func
+ drawAngleLineToPlane_ray_pl_func
+ Encapsulated in a function: Draw an AngleLineToPlane in the Unity Editor. (line defined by ray, plane defined by plane struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawAngleLineToPlane_ray_vec_func
+ drawAngleLineToPlane_ray_vec_func
+ Encapsulated in a function: Draw an AngleLineToPlane in the Unity Editor. (line defined by ray, plane defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawAngleLineToPlane_vec_tr_func
+ drawAngleLineToPlane_vec_tr_func
+ Encapsulated in a function: Draw an AngleLineToPlane in the Unity Editor. (line defined by vectors, plane defined by transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawAngleLineToPlane_vec_pl_func
+ drawAngleLineToPlane_vec_pl_func
+ Encapsulated in a function: Draw an AngleLineToPlane in the Unity Editor. (line defined by vectors, plane defined by plane struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawAngleLineToPlane_vec_vec_func
+ drawAngleLineToPlane_vec_vec_func
+ Encapsulated in a function: Draw an AngleLineToPlane in the Unity Editor. (line defined by vectors, plane defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AngleLineToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawAnglePlaneToPlane_tr_func
+ drawAnglePlaneToPlane_tr_func
+ Encapsulated in a function: Draw an AnglePlaneToPlane in the Unity Editor. (planes defined by transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AnglePlaneToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawAnglePlaneToPlane_pl_func
+ drawAnglePlaneToPlane_pl_func
+ Encapsulated in a function: Draw an AnglePlaneToPlane in the Unity Editor. (planes defined by plane structs)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AnglePlaneToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawAnglePlaneToPlane_vec_func
+ drawAnglePlaneToPlane_vec_func
+ Encapsulated in a function: Draw an AnglePlaneToPlane in the Unity Editor. (planes defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn AnglePlaneToPlane
+ WithThisName
+
+
+
+
+
+
+
+ drawDistanceThreshold_func
+ drawDistanceThreshold_func
+ Encapsulated in a function: Draw DistanceThreshold in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceThreshold
+ WithThisName
+
+
+
+
+
+
+
+ drawDistanceThresholds_func
+ drawDistanceThresholds_func
+ Encapsulated in a function: Draw DistanceThresholds in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn DistanceThresholds
+ WithThisName
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawMeasurements_func.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawMeasurements_func.snippet.meta
new file mode 100644
index 0000000..b136aed
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawMeasurements_func.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2d0ccc893ca930143913f29eb216254c
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawPhysics.snippet b/Editor/DrawDebugLibrary/code snippets/drawPhysics.snippet
new file mode 100644
index 0000000..ab23329
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawPhysics.snippet
@@ -0,0 +1,1290 @@
+
+
+
+
+ drawBoxCast
+ drawBoxCast
+ Draw a BoxCast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCast
+ boxCast
+
+
+
+
+
+
+
+ drawBoxCast_outInfo
+ drawBoxCast_outInfo
+ Draw a BoxCast in the Unity Editor. (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCast
+ boxCast
+
+
+
+
+
+
+
+ drawBoxCastAll
+ drawBoxCastAll
+ Draw a BoxCastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCastAll
+ boxCastAll
+
+
+
+
+
+
+
+ drawBoxCastNonAlloc
+ drawBoxCastNonAlloc
+ Draw a BoxCastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCastNonAlloc
+ boxCastNonAlloc
+
+
+
+
+
+
+
+ drawCapsuleCast_outInfo
+ drawCapsuleCast_outInfo
+ Draw a CapsuleCast in the Unity Editor. (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCast
+ capsuleCast
+
+
+
+
+
+
+
+ drawCapsuleCast
+ drawCapsuleCast
+ Draw a CapsuleCast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCast
+ capsuleCast
+
+
+
+
+
+
+
+ drawCapsuleCastAll
+ drawCapsuleCastAll
+ Draw a CapsuleCastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCastAll
+ capsuleCastAll
+
+
+
+
+
+
+
+ drawCapsuleCastNonAlloc
+ drawCapsuleCastNonAlloc
+ Draw a CapsuleCastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCastNonAlloc
+ capsuleCastNonAlloc
+
+
+
+
+
+
+
+ drawLinecast_outInfo
+ drawLinecast_outInfo
+ Draw a Linecast in the Unity Editor. (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Linecast
+ linecast
+
+
+
+
+
+
+
+ drawLinecast
+ drawLinecast
+ Draw a Linecast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Linecast
+ linecast
+
+
+
+
+
+
+
+ drawRaycast_ray_outInfo
+ drawRaycast_ray_outInfo
+ Draw a Raycast in the Unity Editor. (direction defined by ray struct) (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ raycast
+
+
+
+
+
+
+
+ drawRaycast_ray
+ drawRaycast_ray
+ Draw a Raycast in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ raycast
+
+
+
+
+
+
+
+ drawRaycast_vec_outInfo
+ drawRaycast_vec_outInfo
+ Draw a Raycast in the Unity Editor. (direction defined by vectors) (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ raycast
+
+
+
+
+
+
+
+ drawRaycast_vec
+ drawRaycast_vec
+ Draw a Raycast in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ raycast
+
+
+
+
+
+
+
+ drawRaycastAll_vec
+ drawRaycastAll_vec
+ Draw a RaycastAll in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastAll
+ raycastAll
+
+
+
+
+
+
+
+ drawRaycastAll_ray
+ drawRaycastAll_ray
+ Draw a RaycastAll in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastAll
+ raycastAll
+
+
+
+
+
+
+
+ drawRaycastNonAlloc_ray
+ drawRaycastNonAlloc_ray
+ Draw a RaycastNonAlloc in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastNonAlloc
+ raycastNonAlloc
+
+
+
+
+
+
+
+ drawRaycastNonAlloc_vec
+ drawRaycastNonAlloc_vec
+ Draw a RaycastNonAlloc in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastNonAlloc
+ raycastNonAlloc
+
+
+
+
+
+
+
+ drawSphereCast_ray
+ drawSphereCast_ray
+ Draw a SphereCast in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCast
+ sphereCast
+
+
+
+
+
+
+
+ drawSphereCast_ray_outInfo
+ drawSphereCast_ray_outInfo
+ Draw a SphereCast in the Unity Editor. (direction defined by ray struct) (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCast
+ sphereCast
+
+
+
+
+
+
+
+ drawSphereCast_vec
+ drawSphereCast_vec
+ Draw a SphereCast in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCast
+ sphereCast
+
+
+
+
+
+
+
+ drawSphereCast_vec_outInfo
+ drawSphereCast_vec_outInfo
+ Draw a SphereCast in the Unity Editor. (direction defined by vectors) (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCast
+ sphereCast
+
+
+
+
+
+
+
+ drawSphereCastAll_ray
+ drawSphereCastAll_ray
+ Draw a SphereCastAll in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCastAll
+ sphereCastAll
+
+
+
+
+
+
+
+ drawSphereCastAll_vec
+ drawSphereCastAll_vec
+ Draw a SphereCastAll in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCastAll
+ sphereCastAll
+
+
+
+
+
+
+
+ drawSphereCastNonAlloc_ray
+ drawSphereCastNonAlloc_ray
+ Draw a SphereCastNonAlloc in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCastNonAlloc
+ sphereCastNonAlloc
+
+
+
+
+
+
+
+ drawSphereCastNonAlloc_vec
+ drawSphereCastNonAlloc_vec
+ Draw a SphereCastNonAlloc in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCastNonAlloc
+ sphereCastNonAlloc
+
+
+
+
+
+
+
+ drawCheckBox
+ drawCheckBox
+ Draw CheckBox in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CheckBox
+ checkBox
+
+
+
+
+
+
+
+ drawCheckCapsule
+ drawCheckCapsule
+ Draw CheckCapsule in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CheckCapsule
+ checkCapsule
+
+
+
+
+
+
+
+ drawCheckSphere
+ drawCheckSphere
+ Draw CheckSphere in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CheckSphere
+ checkSphere
+
+
+
+
+
+
+
+ drawOverlapBox
+ drawOverlapBox
+ Draw OverlapBox in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBox
+ overlapBox
+
+
+
+
+
+
+
+ drawOverlapBoxNonAlloc
+ drawOverlapBoxNonAlloc
+ Draw OverlapBoxNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBoxNonAlloc
+ overlapBoxNonAlloc
+
+
+
+
+
+
+
+ drawOverlapCapsule
+ drawOverlapCapsule
+ Draw OverlapCapsule in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsule
+ overlapCapsule
+
+
+
+
+
+
+
+ drawOverlapCapsuleNonAlloc
+ drawOverlapCapsuleNonAlloc
+ Draw OverlapCapsuleNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsuleNonAlloc
+ overlapCapsuleNonAlloc
+
+
+
+
+
+
+
+ drawOverlapSphere
+ drawOverlapSphere
+ Draw OverlapSphere in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapSphere
+ overlapSphere
+
+
+
+
+
+
+
+ drawOverlapSphereNonAlloc
+ drawOverlapSphereNonAlloc
+ Draw OverlapSphereNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapSphereNonAlloc
+ overlapSphereNonAlloc
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawPhysics.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawPhysics.snippet.meta
new file mode 100644
index 0000000..5799047
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawPhysics.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 96e77762a628f604a9dbf7839e59942d
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawPhysics2D.snippet b/Editor/DrawDebugLibrary/code snippets/drawPhysics2D.snippet
new file mode 100644
index 0000000..e4dccc1
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawPhysics2D.snippet
@@ -0,0 +1,1956 @@
+
+
+
+
+ drawBoxCast2D
+ drawBoxCast2D
+ Draw a BoxCast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCast
+ boxCast
+
+
+
+
+
+
+
+ drawBoxCast2D_conFil_array
+ drawBoxCast2D_conFil_array
+ Draw a BoxCast in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCast
+ boxCast
+
+
+
+
+
+
+
+ drawBoxCast2D_conFil_list
+ drawBoxCast2D_conFil_list
+ Draw a BoxCast in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results_of_$name$ = ;
+ float distance_of_$name$ = float.PositiveInfinity;
+ string nameTag_of_$name$ = null;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = false;
+ DrawPhysics2D.BoxCast(origin_of_$name$, size_of_$name$, angle_of_$name$, direction_of_$name$, contactFilter_of_$name$, results_of_$name$, distance_of_$name$, nameTag_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCast
+ boxCast
+
+
+
+
+
+
+
+ drawBoxCastAll2D
+ drawBoxCastAll2D
+ Draw a BoxCastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCastAll
+ boxCastAll
+
+
+
+
+
+
+
+ drawBoxCastNonAlloc2D
+ drawBoxCastNonAlloc2D
+ Draw a BoxCastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCastNonAlloc
+ boxCastNonAlloc
+
+
+
+
+
+
+
+ drawCapsuleCast2D
+ drawCapsuleCast2D
+ Draw a CapsuleCast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCast
+ capsuleCast
+
+
+
+
+
+
+
+ drawCapsuleCast2D_conFil_array
+ drawCapsuleCast2D_conFil_array
+ Draw a CapsuleCast in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCast
+ capsuleCast
+
+
+
+
+
+
+
+ drawCapsuleCast2D_conFil_list
+ drawCapsuleCast2D_conFil_list
+ Draw a CapsuleCast in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results_of_$name$ = ;
+ float distance_of_$name$ = float.PositiveInfinity;
+ string nameTag_of_$name$ = null;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = false;
+ DrawPhysics2D.CapsuleCast(origin_of_$name$, size_of_$name$, capsuleDirection_of_$name$, angle_of_$name$, direction_of_$name$, contactFilter_of_$name$, results_of_$name$, distance_of_$name$, nameTag_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCast
+ capsuleCast
+
+
+
+
+
+
+
+ drawCapsuleCastAll2D
+ drawCapsuleCastAll2D
+ Draw a CapsuleCastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCastAll
+ capsuleCastAll
+
+
+
+
+
+
+
+ drawCapsuleCastNonAlloc2D
+ drawCapsuleCastNonAlloc2D
+ Draw a CapsuleCastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCastNonAlloc
+ capsuleCastNonAlloc
+
+
+
+
+
+
+
+ drawCircleCast2D
+ drawCircleCast2D
+ Draw a CircleCast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleCast
+ circleCast
+
+
+
+
+
+
+
+ drawCircleCast2D_conFil_array
+ drawCircleCast2D_conFil_array
+ Draw a CircleCast in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleCast
+ circleCast
+
+
+
+
+
+
+
+ drawCircleCast2D_conFil_list
+ drawCircleCast2D_conFil_list
+ Draw a CircleCast in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results_of_$name$ = ;
+ float distance_of_$name$ = float.PositiveInfinity;
+ string nameTag_of_$name$ = null;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = false;
+ DrawPhysics2D.CircleCast(origin_of_$name$, radius_of_$name$, direction_of_$name$, contactFilter_of_$name$, results_of_$name$, distance_of_$name$, nameTag_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleCast
+ circleCast
+
+
+
+
+
+
+
+ drawCircleCastAll2D
+ drawCircleCastAll2D
+ Draw a CircleCastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleCastAll
+ circleCastAll
+
+
+
+
+
+
+
+ drawCircleCastNonAlloc2D
+ drawCircleCastNonAlloc2D
+ Draw a CircleCastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleCastNonAlloc
+ circleCastNonAlloc
+
+
+
+
+
+
+
+ drawGetRayIntersection2D
+ drawGetRayIntersection2D
+ Draw GetRayIntersection in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GetRayIntersection
+ getRayIntersection
+
+
+
+
+
+
+
+ drawGetRayIntersectionAll2D
+ drawGetRayIntersectionAll2D
+ Draw GetRayIntersectionAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GetRayIntersectionAll
+ getRayIntersectionAll
+
+
+
+
+
+
+
+ drawGetRayIntersectionNonAlloc2D
+ drawGetRayIntersectionNonAlloc2D
+ Draw GetRayIntersectionNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GetRayIntersectionNonAlloc
+ getRayIntersectionNonAlloc
+
+
+
+
+
+
+
+ drawLinecast2D
+ drawLinecast2D
+ Draw a Linecast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Linecast
+ linecast
+
+
+
+
+
+
+
+ drawLinecast2D_conFil_array
+ drawLinecast2D_conFil_array
+ Draw a Linecast in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Linecast
+ linecast
+
+
+
+
+
+
+
+ drawLinecast2D_conFil_list
+ drawLinecast2D_conFil_list
+ Draw a Linecast in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results_of_$name$ = ;
+ string nameTag_of_$name$ = null;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = false;
+ DrawPhysics2D.Linecast(start_of_$name$, end_of_$name$, contactFilter_of_$name$, results_of_$name$, nameTag_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Linecast
+ linecast
+
+
+
+
+
+
+
+ drawLinecastAll2D
+ drawLinecastAll2D
+ Draw a LinecastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LinecastAll
+ linecastAll
+
+
+
+
+
+
+
+ drawLinecastNonAlloc2D
+ drawLinecastNonAlloc2D
+ Draw a LinecastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LinecastNonAlloc
+ linecastNonAlloc
+
+
+
+
+
+
+
+ drawRaycast2D
+ drawRaycast2D
+ Draw a Raycast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ raycast
+
+
+
+
+
+
+
+ drawRaycast2D_conFil_array
+ drawRaycast2D_conFil_array
+ Draw a Raycast in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ raycast
+
+
+
+
+
+
+
+ drawRaycast2D_conFil_list
+ drawRaycast2D_conFil_list
+ Draw a Raycast in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results_of_$name$ = ;
+ float distance_of_$name$ = float.PositiveInfinity;
+ string nameTag_of_$name$ = null;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = false;
+ DrawPhysics2D.Raycast(origin_of_$name$, direction_of_$name$, contactFilter_of_$name$, results_of_$name$, distance_of_$name$, nameTag_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ raycast
+
+
+
+
+
+
+
+ drawRaycastAll2D
+ drawRaycastAll2D
+ Draw a RaycastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastAll
+ raycastAll
+
+
+
+
+
+
+
+ drawRaycastNonAlloc2D
+ drawRaycastNonAlloc2D
+ Draw a RaycastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastNonAlloc
+ raycastNonAlloc
+
+
+
+
+
+
+
+ drawOverlapArea2D
+ drawOverlapArea2D
+ Draw OverlapArea in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapArea
+ overlapArea
+
+
+
+
+
+
+
+ drawOverlapArea2D_conFil_array
+ drawOverlapArea2D_conFil_array
+ Draw OverlapArea in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapArea
+ overlapArea
+
+
+
+
+
+
+
+ drawOverlapArea2D_conFil_list
+ drawOverlapArea2D_conFil_list
+ Draw OverlapArea in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results_of_$name$ = ;
+ string nameTag_of_$name$ = null;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = false;
+ DrawPhysics2D.OverlapArea(pointA_of_$name$, pointB_of_$name$, contactFilter_of_$name$, results_of_$name$, nameTag_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapArea
+ overlapArea
+
+
+
+
+
+
+
+ drawOverlapAreaAll2D
+ drawOverlapAreaAll2D
+ Draw OverlapAreaAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapAreaAll
+ overlapAreaAll
+
+
+
+
+
+
+
+ drawOverlapAreaNonAlloc2D
+ drawOverlapAreaNonAlloc2D
+ Draw OverlapAreaNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapAreaNonAlloc
+ overlapAreaNonAlloc
+
+
+
+
+
+
+
+ drawOverlapBox2D
+ drawOverlapBox2D
+ Draw OverlapBox in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBox
+ overlapBox
+
+
+
+
+
+
+
+ drawOverlapBox2D_conFil_array
+ drawOverlapBox2D_conFil_array
+ Draw OverlapBox in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBox
+ overlapBox
+
+
+
+
+
+
+
+ drawOverlapBox2D_conFil_list
+ drawOverlapBox2D_conFil_list
+ Draw OverlapBox in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results_of_$name$ = ;
+ string nameTag_of_$name$ = null;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = false;
+ DrawPhysics2D.OverlapBox(point_of_$name$, size_of_$name$, angle_of_$name$, contactFilter_of_$name$, results_of_$name$, nameTag_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBox
+ overlapBox
+
+
+
+
+
+
+
+ drawOverlapBoxAll2D
+ drawOverlapBoxAll2D
+ Draw OverlapBoxAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBoxAll
+ overlapBoxAll
+
+
+
+
+
+
+
+ drawOverlapBoxNonAlloc2D
+ drawOverlapBoxNonAlloc2D
+ Draw OverlapBoxNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBoxNonAlloc
+ overlapBoxNonAlloc
+
+
+
+
+
+
+
+ drawOverlapCapsule2D
+ drawOverlapCapsule2D
+ Draw OverlapCapsule in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsule
+ overlapCapsule
+
+
+
+
+
+
+
+ drawOverlapCapsule2D_conFil_array
+ drawOverlapCapsule2D_conFil_array
+ Draw OverlapCapsule in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsule
+ overlapCapsule
+
+
+
+
+
+
+
+ drawOverlapCapsule2D_conFil_list
+ drawOverlapCapsule2D_conFil_list
+ Draw OverlapCapsule in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results_of_$name$ = ;
+ string nameTag_of_$name$ = null;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = false;
+ DrawPhysics2D.OverlapCapsule(point_of_$name$, size_of_$name$, direction_of_$name$, angle_of_$name$, contactFilter_of_$name$, results_of_$name$, nameTag_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsule
+ overlapCapsule
+
+
+
+
+
+
+
+ drawOverlapCapsuleAll2D
+ drawOverlapCapsuleAll2D
+ Draw OverlapCapsuleAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsuleAll
+ overlapCapsuleAll
+
+
+
+
+
+
+
+ drawOverlapCapsuleNonAlloc2D
+ drawOverlapCapsuleNonAlloc2D
+ Draw OverlapCapsuleNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsuleNonAlloc
+ overlapCapsuleNonAlloc
+
+
+
+
+
+
+
+ drawOverlapCircle2D
+ drawOverlapCircle2D
+ Draw OverlapCircle in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCircle
+ overlapCircle
+
+
+
+
+
+
+
+ drawOverlapCircle2D_conFil_array
+ drawOverlapCircle2D_conFil_array
+ Draw OverlapCircle in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCircle
+ overlapCircle
+
+
+
+
+
+
+
+ drawOverlapCircle2D_conFil_list
+ drawOverlapCircle2D_conFil_list
+ Draw OverlapCircle in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results_of_$name$ = ;
+ string nameTag_of_$name$ = null;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = false;
+ DrawPhysics2D.OverlapCircle(point_of_$name$, radius_of_$name$, contactFilter_of_$name$, results_of_$name$, nameTag_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCircle
+ overlapCircle
+
+
+
+
+
+
+
+ drawOverlapCircleAll2D
+ drawOverlapCircleAll2D
+ Draw OverlapCircleAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCircleAll
+ overlapCircleAll
+
+
+
+
+
+
+
+ drawOverlapCircleNonAlloc2D
+ drawOverlapCircleNonAlloc2D
+ Draw OverlapCircleNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCircleNonAlloc
+ overlapCircleNonAlloc
+
+
+
+
+
+
+
+ drawOverlapPoint2D
+ drawOverlapPoint2D
+ Draw OverlapPoint in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapPoint
+ overlapPoint
+
+
+
+
+
+
+
+ drawOverlapPoint2D_conFil_array
+ drawOverlapPoint2D_conFil_array
+ Draw OverlapPoint in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapPoint
+ overlapPoint
+
+
+
+
+
+
+
+ drawOverlapPoint2D_conFil_list
+ drawOverlapPoint2D_conFil_list
+ Draw OverlapPoint in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results_of_$name$ = ;
+ string nameTag_of_$name$ = null;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = false;
+ DrawPhysics2D.OverlapPoint(point_of_$name$, contactFilter_of_$name$, results_of_$name$, nameTag_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapPoint
+ overlapPoint
+
+
+
+
+
+
+
+ drawOverlapPointAll2D
+ drawOverlapPointAll2D
+ Draw OverlapPointAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapPointAll
+ overlapPointAll
+
+
+
+
+
+
+
+ drawOverlapPointNonAlloc2D
+ drawOverlapPointNonAlloc2D
+ Draw OverlapPointNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapPointNonAlloc
+ overlapPointNonAlloc
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawPhysics2D.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawPhysics2D.snippet.meta
new file mode 100644
index 0000000..47d0817
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawPhysics2D.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: bae756d6b3c653c4281c25cce684522b
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawPhysics2D_func.snippet b/Editor/DrawDebugLibrary/code snippets/drawPhysics2D_func.snippet
new file mode 100644
index 0000000..a4fc9c3
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawPhysics2D_func.snippet
@@ -0,0 +1,2115 @@
+
+
+
+
+ drawBoxCast2D_func
+ drawBoxCast2D_func
+ Encapsulated in a function: Draw a BoxCast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCast
+ WithThisName
+
+
+
+
+
+
+
+ drawBoxCast2D_conFil_array_func
+ drawBoxCast2D_conFil_array_func
+ Encapsulated in a function: Draw a BoxCast in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCast
+ WithThisName
+
+
+
+
+
+
+
+ drawBoxCast2D_conFil_list_func
+ drawBoxCast2D_conFil_list_func
+ Encapsulated in a function: Draw a BoxCast in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results = ;
+ float distance = float.PositiveInfinity;
+ string nameTag = null;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = false;
+ return DrawPhysics2D.BoxCast(origin, size, angle, direction, contactFilter, results, distance, nameTag, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCast
+ WithThisName
+
+
+
+
+
+
+
+ drawBoxCastAll2D_func
+ drawBoxCastAll2D_func
+ Encapsulated in a function: Draw a BoxCastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCastAll
+ WithThisName
+
+
+
+
+
+
+
+ drawBoxCastNonAlloc2D_func
+ drawBoxCastNonAlloc2D_func
+ Encapsulated in a function: Draw a BoxCastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCastNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsuleCast2D_func
+ drawCapsuleCast2D_func
+ Encapsulated in a function: Draw a CapsuleCast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCast
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsuleCast2D_conFil_array_func
+ drawCapsuleCast2D_conFil_array_func
+ Encapsulated in a function: Draw a CapsuleCast in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCast
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsuleCast2D_conFil_list_func
+ drawCapsuleCast2D_conFil_list_func
+ Encapsulated in a function: Draw a CapsuleCast in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results = ;
+ float distance = float.PositiveInfinity;
+ string nameTag = null;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = false;
+ return DrawPhysics2D.CapsuleCast(origin, size, capsuleDirection, angle, direction, contactFilter, results, distance, nameTag, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCast
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsuleCastAll2D_func
+ drawCapsuleCastAll2D_func
+ Encapsulated in a function: Draw a CapsuleCastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCastAll
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsuleCastNonAlloc2D_func
+ drawCapsuleCastNonAlloc2D_func
+ Encapsulated in a function: Draw a CapsuleCastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCastNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleCast2D_func
+ drawCircleCast2D_func
+ Encapsulated in a function: Draw a CircleCast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleCast
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleCast2D_conFil_array_func
+ drawCircleCast2D_conFil_array_func
+ Encapsulated in a function: Draw a CircleCast in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleCast
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleCast2D_conFil_list_func
+ drawCircleCast2D_conFil_list_func
+ Encapsulated in a function: Draw a CircleCast in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results = ;
+ float distance = float.PositiveInfinity;
+ string nameTag = null;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = false;
+ return DrawPhysics2D.CircleCast(origin, radius, direction, contactFilter, results, distance, nameTag, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleCast
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleCastAll2D_func
+ drawCircleCastAll2D_func
+ Encapsulated in a function: Draw a CircleCastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleCastAll
+ WithThisName
+
+
+
+
+
+
+
+ drawCircleCastNonAlloc2D_func
+ drawCircleCastNonAlloc2D_func
+ Encapsulated in a function: Draw a CircleCastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CircleCastNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawGetRayIntersection2D_func
+ drawGetRayIntersection2D_func
+ Encapsulated in a function: Draw GetRayIntersection in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GetRayIntersection
+ WithThisName
+
+
+
+
+
+
+
+ drawGetRayIntersectionAll2D_func
+ drawGetRayIntersectionAll2D_func
+ Encapsulated in a function: Draw GetRayIntersectionAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GetRayIntersectionAll
+ WithThisName
+
+
+
+
+
+
+
+ drawGetRayIntersectionNonAlloc2D_func
+ drawGetRayIntersectionNonAlloc2D_func
+ Encapsulated in a function: Draw GetRayIntersectionNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn GetRayIntersectionNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawLinecast2D_func
+ drawLinecast2D_func
+ Encapsulated in a function: Draw a Linecast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Linecast
+ WithThisName
+
+
+
+
+
+
+
+ drawLinecast2D_conFil_array_func
+ drawLinecast2D_conFil_array_func
+ Encapsulated in a function: Draw a Linecast in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Linecast
+ WithThisName
+
+
+
+
+
+
+
+ drawLinecast2D_conFil_list_func
+ drawLinecast2D_conFil_list_func
+ Encapsulated in a function: Draw a Linecast in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results = ;
+ string nameTag = null;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = false;
+ return DrawPhysics2D.Linecast(start, end, contactFilter, results, nameTag, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Linecast
+ WithThisName
+
+
+
+
+
+
+
+ drawLinecastAll2D_func
+ drawLinecastAll2D_func
+ Encapsulated in a function: Draw a LinecastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LinecastAll
+ WithThisName
+
+
+
+
+
+
+
+ drawLinecastNonAlloc2D_func
+ drawLinecastNonAlloc2D_func
+ Encapsulated in a function: Draw a LinecastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn LinecastNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycast2D_func
+ drawRaycast2D_func
+ Encapsulated in a function: Draw a Raycast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycast2D_conFil_array_func
+ drawRaycast2D_conFil_array_func
+ Encapsulated in a function: Draw a Raycast in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycast2D_conFil_list_func
+ drawRaycast2D_conFil_list_func
+ Encapsulated in a function: Draw a Raycast in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results = ;
+ float distance = float.PositiveInfinity;
+ string nameTag = null;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = false;
+ return DrawPhysics2D.Raycast(origin, direction, contactFilter, results, distance, nameTag, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycastAll2D_func
+ drawRaycastAll2D_func
+ Encapsulated in a function: Draw a RaycastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastAll
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycastNonAlloc2D_func
+ drawRaycastNonAlloc2D_func
+ Encapsulated in a function: Draw a RaycastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapArea2D_func
+ drawOverlapArea2D_func
+ Encapsulated in a function: Draw OverlapArea in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapArea
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapArea2D_conFil_array_func
+ drawOverlapArea2D_conFil_array_func
+ Encapsulated in a function: Draw OverlapArea in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapArea
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapArea2D_conFil_list_func
+ drawOverlapArea2D_conFil_list_func
+ Encapsulated in a function: Draw OverlapArea in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results = ;
+ string nameTag = null;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = false;
+ return DrawPhysics2D.OverlapArea(pointA, pointB, contactFilter, results, nameTag, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapArea
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapAreaAll2D_func
+ drawOverlapAreaAll2D_func
+ Encapsulated in a function: Draw OverlapAreaAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapAreaAll
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapAreaNonAlloc2D_func
+ drawOverlapAreaNonAlloc2D_func
+ Encapsulated in a function: Draw OverlapAreaNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapAreaNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapBox2D_func
+ drawOverlapBox2D_func
+ Encapsulated in a function: Draw OverlapBox in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBox
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapBox2D_conFil_array_func
+ drawOverlapBox2D_conFil_array_func
+ Encapsulated in a function: Draw OverlapBox in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBox
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapBox2D_conFil_list_func
+ drawOverlapBox2D_conFil_list_func
+ Encapsulated in a function: Draw OverlapBox in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results = ;
+ string nameTag = null;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = false;
+ return DrawPhysics2D.OverlapBox(point, size, angle, contactFilter, results, nameTag, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBox
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapBoxAll2D_func
+ drawOverlapBoxAll2D_func
+ Encapsulated in a function: Draw OverlapBoxAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBoxAll
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapBoxNonAlloc2D_func
+ drawOverlapBoxNonAlloc2D_func
+ Encapsulated in a function: Draw OverlapBoxNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBoxNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCapsule2D_func
+ drawOverlapCapsule2D_func
+ Encapsulated in a function: Draw OverlapCapsule in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCapsule2D_conFil_array_func
+ drawOverlapCapsule2D_conFil_array_func
+ Encapsulated in a function: Draw OverlapCapsule in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCapsule2D_conFil_list_func
+ drawOverlapCapsule2D_conFil_list_func
+ Encapsulated in a function: Draw OverlapCapsule in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results = ;
+ string nameTag = null;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = false;
+ return DrawPhysics2D.OverlapCapsule(point, size, direction, angle, contactFilter, results, nameTag, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCapsuleAll2D_func
+ drawOverlapCapsuleAll2D_func
+ Encapsulated in a function: Draw OverlapCapsuleAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsuleAll
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCapsuleNonAlloc2D_func
+ drawOverlapCapsuleNonAlloc2D_func
+ Encapsulated in a function: Draw OverlapCapsuleNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsuleNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCircle2D_func
+ drawOverlapCircle2D_func
+ Encapsulated in a function: Draw OverlapCircle in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCircle2D_conFil_array_func
+ drawOverlapCircle2D_conFil_array_func
+ Encapsulated in a function: Draw OverlapCircle in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCircle2D_conFil_list_func
+ drawOverlapCircle2D_conFil_list_func
+ Encapsulated in a function: Draw OverlapCircle in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results = ;
+ string nameTag = null;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = false;
+ return DrawPhysics2D.OverlapCircle(point, radius, contactFilter, results, nameTag, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCircleAll2D_func
+ drawOverlapCircleAll2D_func
+ Encapsulated in a function: Draw OverlapCircleAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCircleAll
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCircleNonAlloc2D_func
+ drawOverlapCircleNonAlloc2D_func
+ Encapsulated in a function: Draw OverlapCircleNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCircleNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapPoint2D_func
+ drawOverlapPoint2D_func
+ Encapsulated in a function: Draw OverlapPoint in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapPoint
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapPoint2D_conFil_array_func
+ drawOverlapPoint2D_conFil_array_func
+ Encapsulated in a function: Draw OverlapPoint in the Unity Editor. (specified via ContactFilter2D) (hit results via array)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapPoint
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapPoint2D_conFil_list_func
+ drawOverlapPoint2D_conFil_list_func
+ Encapsulated in a function: Draw OverlapPoint in the Unity Editor. (specified via ContactFilter2D) (hit results via list)
+ Draw XXL
+
+
+
+ results = ;
+ string nameTag = null;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = false;
+ return DrawPhysics2D.OverlapPoint(point, contactFilter, results, nameTag, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapPoint
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapPointAll2D_func
+ drawOverlapPointAll2D_func
+ Encapsulated in a function: Draw OverlapPointAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapPointAll
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapPointNonAlloc2D_func
+ drawOverlapPointNonAlloc2D_func
+ Encapsulated in a function: Draw OverlapPointNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapPointNonAlloc
+ WithThisName
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawPhysics2D_func.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawPhysics2D_func.snippet.meta
new file mode 100644
index 0000000..a2066b3
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawPhysics2D_func.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: fffa22eb13936fd469e2e654df7bb986
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawPhysics_func.snippet b/Editor/DrawDebugLibrary/code snippets/drawPhysics_func.snippet
new file mode 100644
index 0000000..f999f35
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawPhysics_func.snippet
@@ -0,0 +1,1395 @@
+
+
+
+
+ drawBoxCast_func
+ drawBoxCast_func
+ Encapsulated in a function: Draw a BoxCast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCast
+ WithThisName
+
+
+
+
+
+
+
+ drawBoxCast_outInfo_func
+ drawBoxCast_outInfo_func
+ Encapsulated in a function: Draw a BoxCast in the Unity Editor. (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCast
+ WithThisName
+
+
+
+
+
+
+
+ drawBoxCastAll_func
+ drawBoxCastAll_func
+ Encapsulated in a function: Draw a BoxCastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCastAll
+ WithThisName
+
+
+
+
+
+
+
+ drawBoxCastNonAlloc_func
+ drawBoxCastNonAlloc_func
+ Encapsulated in a function: Draw a BoxCastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn BoxCastNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsuleCast_outInfo_func
+ drawCapsuleCast_outInfo_func
+ Encapsulated in a function: Draw a CapsuleCast in the Unity Editor. (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCast
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsuleCast_func
+ drawCapsuleCast_func
+ Encapsulated in a function: Draw a CapsuleCast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCast
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsuleCastAll_func
+ drawCapsuleCastAll_func
+ Encapsulated in a function: Draw a CapsuleCastAll in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCastAll
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsuleCastNonAlloc_func
+ drawCapsuleCastNonAlloc_func
+ Encapsulated in a function: Draw a CapsuleCastNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CapsuleCastNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawLinecast_outInfo_func
+ drawLinecast_outInfo_func
+ Encapsulated in a function: Draw a Linecast in the Unity Editor. (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Linecast
+ WithThisName
+
+
+
+
+
+
+
+ drawLinecast_func
+ drawLinecast_func
+ Encapsulated in a function: Draw a Linecast in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Linecast
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycast_ray_outInfo_func
+ drawRaycast_ray_outInfo_func
+ Encapsulated in a function: Draw a Raycast in the Unity Editor. (direction defined by ray struct) (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycast_ray_func
+ drawRaycast_ray_func
+ Encapsulated in a function: Draw a Raycast in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycast_vec_outInfo_func
+ drawRaycast_vec_outInfo_func
+ Encapsulated in a function: Draw a Raycast in the Unity Editor. (direction defined by vectors) (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycast_vec_func
+ drawRaycast_vec_func
+ Encapsulated in a function: Draw a Raycast in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Raycast
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycastAll_vec_func
+ drawRaycastAll_vec_func
+ Encapsulated in a function: Draw a RaycastAll in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastAll
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycastAll_ray_func
+ drawRaycastAll_ray_func
+ Encapsulated in a function: Draw a RaycastAll in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastAll
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycastNonAlloc_ray_func
+ drawRaycastNonAlloc_ray_func
+ Encapsulated in a function: Draw a RaycastNonAlloc in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawRaycastNonAlloc_vec_func
+ drawRaycastNonAlloc_vec_func
+ Encapsulated in a function: Draw a RaycastNonAlloc in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RaycastNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawSphereCast_ray_func
+ drawSphereCast_ray_func
+ Encapsulated in a function: Draw a SphereCast in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCast
+ WithThisName
+
+
+
+
+
+
+
+ drawSphereCast_ray_outInfo_func
+ drawSphereCast_ray_outInfo_func
+ Encapsulated in a function: Draw a SphereCast in the Unity Editor. (direction defined by ray struct) (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCast
+ WithThisName
+
+
+
+
+
+
+
+ drawSphereCast_vec_func
+ drawSphereCast_vec_func
+ Encapsulated in a function: Draw a SphereCast in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCast
+ WithThisName
+
+
+
+
+
+
+
+ drawSphereCast_vec_outInfo_func
+ drawSphereCast_vec_outInfo_func
+ Encapsulated in a function: Draw a SphereCast in the Unity Editor. (direction defined by vectors) (with 'out' paramter that supplies 'RaycastHit hitInfo')
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCast
+ WithThisName
+
+
+
+
+
+
+
+ drawSphereCastAll_ray_func
+ drawSphereCastAll_ray_func
+ Encapsulated in a function: Draw a SphereCastAll in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCastAll
+ WithThisName
+
+
+
+
+
+
+
+ drawSphereCastAll_vec_func
+ drawSphereCastAll_vec_func
+ Encapsulated in a function: Draw a SphereCastAll in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCastAll
+ WithThisName
+
+
+
+
+
+
+
+ drawSphereCastNonAlloc_ray_func
+ drawSphereCastNonAlloc_ray_func
+ Encapsulated in a function: Draw a SphereCastNonAlloc in the Unity Editor. (direction defined by ray struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCastNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawSphereCastNonAlloc_vec_func
+ drawSphereCastNonAlloc_vec_func
+ Encapsulated in a function: Draw a SphereCastNonAlloc in the Unity Editor. (direction defined by vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn SphereCastNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawCheckBox_func
+ drawCheckBox_func
+ Encapsulated in a function: Draw CheckBox in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CheckBox
+ WithThisName
+
+
+
+
+
+
+
+ drawCheckCapsule_func
+ drawCheckCapsule_func
+ Encapsulated in a function: Draw CheckCapsule in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CheckCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawCheckSphere_func
+ drawCheckSphere_func
+ Encapsulated in a function: Draw CheckSphere in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CheckSphere
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapBox_func
+ drawOverlapBox_func
+ Encapsulated in a function: Draw OverlapBox in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBox
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapBoxNonAlloc_func
+ drawOverlapBoxNonAlloc_func
+ Encapsulated in a function: Draw OverlapBoxNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapBoxNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCapsule_func
+ drawOverlapCapsule_func
+ Encapsulated in a function: Draw OverlapCapsule in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapCapsuleNonAlloc_func
+ drawOverlapCapsuleNonAlloc_func
+ Encapsulated in a function: Draw OverlapCapsuleNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapCapsuleNonAlloc
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapSphere_func
+ drawOverlapSphere_func
+ Encapsulated in a function: Draw OverlapSphere in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapSphere
+ WithThisName
+
+
+
+
+
+
+
+ drawOverlapSphereNonAlloc_func
+ drawOverlapSphereNonAlloc_func
+ Encapsulated in a function: Draw OverlapSphereNonAlloc in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn OverlapSphereNonAlloc
+ WithThisName
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawPhysics_func.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawPhysics_func.snippet.meta
new file mode 100644
index 0000000..c44f1a0
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawPhysics_func.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: c973f2196d11ebe41905edc3f753c737
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawScreenspace.snippet b/Editor/DrawDebugLibrary/code snippets/drawScreenspace.snippet
new file mode 100644
index 0000000..af55476
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawScreenspace.snippet
@@ -0,0 +1,4335 @@
+
+
+
+
+ drawScreenLine
+ drawScreenLine
+ Draw a ScreenLine in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLine
+ screenLine
+
+
+
+
+
+
+
+ drawScreenLine_cam
+ drawScreenLine_cam
+ Draw a ScreenLine in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLine
+ screenLine
+
+
+
+
+
+
+
+ drawScreenRay
+ drawScreenRay
+ Draw a ScreenRay in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRay
+ screenRay
+
+
+
+
+
+
+
+ drawScreenRay_cam
+ drawScreenRay_cam
+ Draw a ScreenRay in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRay
+ screenRay
+
+
+
+
+
+
+
+ drawScreenLineFrom
+ drawScreenLineFrom
+ Draw a ScreenLineFrom in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineFrom
+ screenLineFrom
+
+
+
+
+
+
+
+ drawScreenLineFrom_cam
+ drawScreenLineFrom_cam
+ Draw a ScreenLineFrom in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineFrom
+ screenLineFrom
+
+
+
+
+
+
+
+ drawScreenLineTo
+ drawScreenLineTo
+ Draw a ScreenLineTo in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineTo
+ screenLineTo
+
+
+
+
+
+
+
+ drawScreenLineTo_cam
+ drawScreenLineTo_cam
+ Draw a ScreenLineTo in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineTo
+ screenLineTo
+
+
+
+
+
+
+
+ drawScreenLineColFade
+ drawScreenLineColFade
+ Draw a ScreenLineColFade in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineColFade
+ screenLineColFade
+
+
+
+
+
+
+
+ drawScreenLineColFade_cam
+ drawScreenLineColFade_cam
+ Draw a ScreenLineColFade in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineColFade
+ screenLineColFade
+
+
+
+
+
+
+
+ drawScreenRayColFade
+ drawScreenRayColFade
+ Draw a ScreenRayColFade in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayColFade
+ screenRayColFade
+
+
+
+
+
+
+
+ drawScreenRayColFade_cam
+ drawScreenRayColFade_cam
+ Draw a ScreenRayColFade in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayColFade
+ screenRayColFade
+
+
+
+
+
+
+
+ drawScreenLineFromColFade
+ drawScreenLineFromColFade
+ Draw a ScreenLineFromColFade in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineFromColFade
+ screenLineFromColFade
+
+
+
+
+
+
+
+ drawScreenLineFromColFade_cam
+ drawScreenLineFromColFade_cam
+ Draw a ScreenLineFromColFade in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineFromColFade
+ screenLineFromColFade
+
+
+
+
+
+
+
+ drawScreenLineToColFade
+ drawScreenLineToColFade
+ Draw a ScreenLineToColFade in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineToColFade
+ screenLineToColFade
+
+
+
+
+
+
+
+ drawScreenLineToColFade_cam
+ drawScreenLineToColFade_cam
+ Draw a ScreenLineToColFade in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineToColFade
+ screenLineToColFade
+
+
+
+
+
+
+
+ drawScreenLineCircled_angleToAngle
+ drawScreenLineCircled_angleToAngle
+ Draw a ScreenLineCircled in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineCircled
+ screenLineCircled
+
+
+
+
+
+
+
+ drawScreenLineCircled_angleToAngle_cam
+ drawScreenLineCircled_angleToAngle_cam
+ Draw a ScreenLineCircled in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineCircled
+ screenLineCircled
+
+
+
+
+
+
+
+ drawScreenLineCircled_angleFromStartPos
+ drawScreenLineCircled_angleFromStartPos
+ Draw a ScreenLineCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineCircled
+ screenLineCircled
+
+
+
+
+
+
+
+ drawScreenLineCircled_angleFromStartPos_cam
+ drawScreenLineCircled_angleFromStartPos_cam
+ Draw a ScreenLineCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineCircled
+ screenLineCircled
+
+
+
+
+
+
+
+ drawScreenCircleSegment_angleToAngle
+ drawScreenCircleSegment_angleToAngle
+ Draw a ScreenCircleSegment in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircleSegment
+ screenCircleSegment
+
+
+
+
+
+
+
+ drawScreenCircleSegment_angleToAngle_cam
+ drawScreenCircleSegment_angleToAngle_cam
+ Draw a ScreenCircleSegment in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircleSegment
+ screenCircleSegment
+
+
+
+
+
+
+
+ drawScreenCircleSegment_angleFromStartPos
+ drawScreenCircleSegment_angleFromStartPos
+ Draw a ScreenCircleSegment in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircleSegment
+ screenCircleSegment
+
+
+
+
+
+
+
+ drawScreenCircleSegment_angleFromStartPos_cam
+ drawScreenCircleSegment_angleFromStartPos_cam
+ Draw a ScreenCircleSegment in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircleSegment
+ screenCircleSegment
+
+
+
+
+
+
+
+ drawScreenLineString_array
+ drawScreenLineString_array
+ Draw a ScreenLineString in the Unity Editor. (points defined via array) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineString
+ screenLineString
+
+
+
+
+
+
+
+ drawScreenLineString_array_cam
+ drawScreenLineString_array_cam
+ Draw a ScreenLineString in the Unity Editor. (points defined via array) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineString
+ screenLineString
+
+
+
+
+
+
+
+ drawScreenLineString_list
+ drawScreenLineString_list
+ Draw a ScreenLineString in the Unity Editor. (points defined via list) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ bool closeGapBetweenLastAndFirstPoint_of_$name$ = false;
+ float width_relToViewportHeight_of_$name$ = 0.0f;
+ string text_of_$name$ = null;
+ bool drawPointerIfOffscreen_of_$name$ = false;
+ DrawBasics.LineStyle style_of_$name$ = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor_of_$name$ = 1.0f;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawScreenspace.LineString(points_of_$name$, color_of_$name$, closeGapBetweenLastAndFirstPoint_of_$name$, width_relToViewportHeight_of_$name$, text_of_$name$, drawPointerIfOffscreen_of_$name$, style_of_$name$, stylePatternScaleFactor_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineString
+ screenLineString
+
+
+
+
+
+
+
+ drawScreenLineString_list_cam
+ drawScreenLineString_list_cam
+ Draw a ScreenLineString in the Unity Editor. (points defined via list) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ points_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ bool closeGapBetweenLastAndFirstPoint_of_$name$ = false;
+ float width_relToViewportHeight_of_$name$ = 0.0f;
+ string text_of_$name$ = null;
+ bool drawPointerIfOffscreen_of_$name$ = false;
+ DrawBasics.LineStyle style_of_$name$ = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor_of_$name$ = 1.0f;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawScreenspace.LineString(targetCamera_of_$name$, points_of_$name$, color_of_$name$, closeGapBetweenLastAndFirstPoint_of_$name$, width_relToViewportHeight_of_$name$, text_of_$name$, drawPointerIfOffscreen_of_$name$, style_of_$name$, stylePatternScaleFactor_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineString
+ screenLineString
+
+
+
+
+
+
+
+ drawScreenLineStringColFade_array
+ drawScreenLineStringColFade_array
+ Draw a ScreenLineStringColFade in the Unity Editor. (points defined via array) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineStringColFade
+ screenLineStringColFade
+
+
+
+
+
+
+
+ drawScreenLineStringColFade_array_cam
+ drawScreenLineStringColFade_array_cam
+ Draw a ScreenLineStringColFade in the Unity Editor. (points defined via array) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineStringColFade
+ screenLineStringColFade
+
+
+
+
+
+
+
+ drawScreenLineStringColFade_list
+ drawScreenLineStringColFade_list
+ Draw a ScreenLineStringColFade in the Unity Editor. (points defined via list) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color startColor_of_$name$ = ;
+ Color endColor_of_$name$ = ;
+ bool closeGapBetweenLastAndFirstPoint_of_$name$ = false;
+ float width_relToViewportHeight_of_$name$ = 0.0f;
+ string text_of_$name$ = null;
+ bool drawPointerIfOffscreen_of_$name$ = false;
+ DrawBasics.LineStyle style_of_$name$ = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor_of_$name$ = 1.0f;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawScreenspace.LineStringColorFade(points_of_$name$, startColor_of_$name$, endColor_of_$name$, closeGapBetweenLastAndFirstPoint_of_$name$, width_relToViewportHeight_of_$name$, text_of_$name$, drawPointerIfOffscreen_of_$name$, style_of_$name$, stylePatternScaleFactor_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineStringColFade
+ screenLineStringColFade
+
+
+
+
+
+
+
+ drawScreenLineStringColFade_list_cam
+ drawScreenLineStringColFade_list_cam
+ Draw a ScreenLineStringColFade in the Unity Editor. (points defined via list) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ points_of_$name$ = ;
+ Color startColor_of_$name$ = ;
+ Color endColor_of_$name$ = ;
+ bool closeGapBetweenLastAndFirstPoint_of_$name$ = false;
+ float width_relToViewportHeight_of_$name$ = 0.0f;
+ string text_of_$name$ = null;
+ bool drawPointerIfOffscreen_of_$name$ = false;
+ DrawBasics.LineStyle style_of_$name$ = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor_of_$name$ = 1.0f;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawScreenspace.LineStringColorFade(targetCamera_of_$name$, points_of_$name$, startColor_of_$name$, endColor_of_$name$, closeGapBetweenLastAndFirstPoint_of_$name$, width_relToViewportHeight_of_$name$, text_of_$name$, drawPointerIfOffscreen_of_$name$, style_of_$name$, stylePatternScaleFactor_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineStringColFade
+ screenLineStringColFade
+
+
+
+
+
+
+
+ drawScreenShape_3Dpos
+ drawScreenShape_3Dpos
+ Draw a ScreenShape in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenShape
+ screenShape
+
+
+
+
+
+
+
+ drawScreenShape_3Dpos_cam
+ drawScreenShape_3Dpos_cam
+ Draw a ScreenShape in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenShape
+ screenShape
+
+
+
+
+
+
+
+ drawScreenShape_2Dpos
+ drawScreenShape_2Dpos
+ Draw a ScreenShape in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenShape
+ screenShape
+
+
+
+
+
+
+
+ drawScreenShape_2Dpos_cam
+ drawScreenShape_2Dpos_cam
+ Draw a ScreenShape in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenShape
+ screenShape
+
+
+
+
+
+
+
+ drawScreenRectangle_rect
+ drawScreenRectangle_rect
+ Draw a ScreenRectangle in the Unity Editor. (defined via rect struct) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRectangle
+ screenRectangle
+
+
+
+
+
+
+
+ drawScreenRectangle_rect_cam
+ drawScreenRectangle_rect_cam
+ Draw a ScreenRectangle in the Unity Editor. (defined via rect struct) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRectangle
+ screenRectangle
+
+
+
+
+
+
+
+ drawScreenRectangle_vecFloat
+ drawScreenRectangle_vecFloat
+ Draw a ScreenRectangle in the Unity Editor. (defined via vector and floats) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRectangle
+ screenRectangle
+
+
+
+
+
+
+
+ drawScreenRectangle_vecFloat_cam
+ drawScreenRectangle_vecFloat_cam
+ Draw a ScreenRectangle in the Unity Editor. (defined via vector and floats) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRectangle
+ screenRectangle
+
+
+
+
+
+
+
+ drawScreenBox_rect
+ drawScreenBox_rect
+ Draw a ScreenBox in the Unity Editor. (defined via rect struct) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ screenBox
+
+
+
+
+
+
+
+ drawScreenBox_rect_cam
+ drawScreenBox_rect_cam
+ Draw a ScreenBox in the Unity Editor. (defined via rect struct) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ screenBox
+
+
+
+
+
+
+
+ drawScreenBox_3Dpos_vec
+ drawScreenBox_3Dpos_vec
+ Draw a ScreenBox in the Unity Editor. (position defined in 3D worldspace) (defined via vectors) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ screenBox
+
+
+
+
+
+
+
+ drawScreenBox_3Dpos_vec_cam
+ drawScreenBox_3Dpos_vec_cam
+ Draw a ScreenBox in the Unity Editor. (position defined in 3D worldspace) (defined via vectors) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ screenBox
+
+
+
+
+
+
+
+ drawScreenBox_2Dpos_vec
+ drawScreenBox_2Dpos_vec
+ Draw a ScreenBox in the Unity Editor. (position defined in 2D screenspace) (defined via vectors) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ screenBox
+
+
+
+
+
+
+
+ drawScreenBox_2Dpos_vec_cam
+ drawScreenBox_2Dpos_vec_cam
+ Draw a ScreenBox in the Unity Editor. (position defined in 2D screenspace) (defined via vectors) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ screenBox
+
+
+
+
+
+
+
+ drawScreenCircle_rect
+ drawScreenCircle_rect
+ Draw a ScreenCircle in the Unity Editor. (defined via rect struct) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ screenCircle
+
+
+
+
+
+
+
+ drawScreenCircle_rect_cam
+ drawScreenCircle_rect_cam
+ Draw a ScreenCircle in the Unity Editor. (defined via rect struct) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ screenCircle
+
+
+
+
+
+
+
+ drawScreenCircle_3Dpos_vecRad
+ drawScreenCircle_3Dpos_vecRad
+ Draw a ScreenCircle in the Unity Editor. (position defined in 3D worldspace) (defined via vector and float as radius) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ screenCircle
+
+
+
+
+
+
+
+ drawScreenCircle_3Dpos_vecRad_cam
+ drawScreenCircle_3Dpos_vecRad_cam
+ Draw a ScreenCircle in the Unity Editor. (position defined in 3D worldspace) (defined via vector and float as radius) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ screenCircle
+
+
+
+
+
+
+
+ drawScreenCircle_2Dpos_vecRad
+ drawScreenCircle_2Dpos_vecRad
+ Draw a ScreenCircle in the Unity Editor. (position defined in 2D screenspace) (defined via vector and float as radius) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ screenCircle
+
+
+
+
+
+
+
+ drawScreenCircle_2Dpos_vecRad_cam
+ drawScreenCircle_2Dpos_vecRad_cam
+ Draw a ScreenCircle in the Unity Editor. (position defined in 2D screenspace) (defined via vector and float as radius) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ screenCircle
+
+
+
+
+
+
+
+ drawScreenCapsule_3Dpos_vecC1C2Pos
+ drawScreenCapsule_3Dpos_vecC1C2Pos
+ Draw a ScreenCapsule in the Unity Editor. (position defined in 3D worldspace) (defined via position of circle1 and circle2) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ screenCapsule
+
+
+
+
+
+
+
+ drawScreenCapsule_3Dpos_vecC1C2Pos_cam
+ drawScreenCapsule_3Dpos_vecC1C2Pos_cam
+ Draw a ScreenCapsule in the Unity Editor. (position defined in 3D worldspace) (defined via position of circle1 and circle2) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ screenCapsule
+
+
+
+
+
+
+
+ drawScreenCapsule_2Dpos_vecC1C2Pos
+ drawScreenCapsule_2Dpos_vecC1C2Pos
+ Draw a ScreenCapsule in the Unity Editor. (position defined in 2D screenspace) (defined via position of circle1 and circle2) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ screenCapsule
+
+
+
+
+
+
+
+ drawScreenCapsule_2Dpos_vecC1C2Pos_cam
+ drawScreenCapsule_2Dpos_vecC1C2Pos_cam
+ Draw a ScreenCapsule in the Unity Editor. (position defined in 2D screenspace) (defined via position of circle1 and circle2) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ screenCapsule
+
+
+
+
+
+
+
+ drawScreenCapsule_rect
+ drawScreenCapsule_rect
+ Draw a ScreenCapsule in the Unity Editor. (defined via rect struct) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ screenCapsule
+
+
+
+
+
+
+
+ drawScreenCapsule_rect_cam
+ drawScreenCapsule_rect_cam
+ Draw a ScreenCapsule in the Unity Editor. (defined via rect struct) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ screenCapsule
+
+
+
+
+
+
+
+ drawScreenCapsule_3Dpos_vecPosSize
+ drawScreenCapsule_3Dpos_vecPosSize
+ Draw a ScreenCapsule in the Unity Editor. (position defined in 3D worldspace) (defined via center position and size from vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ screenCapsule
+
+
+
+
+
+
+
+ drawScreenCapsule_3Dpos_vecPosSize_cam
+ drawScreenCapsule_3Dpos_vecPosSize_cam
+ Draw a ScreenCapsule in the Unity Editor. (position defined in 3D worldspace) (defined via center position and size from vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ screenCapsule
+
+
+
+
+
+
+
+ drawScreenCapsule_2Dpos_vecPosSize
+ drawScreenCapsule_2Dpos_vecPosSize
+ Draw a ScreenCapsule in the Unity Editor. (position defined in 2D screenspace) (defined via center position and size from vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ screenCapsule
+
+
+
+
+
+
+
+ drawScreenCapsule_2Dpos_vecPosSize_cam
+ drawScreenCapsule_2Dpos_vecPosSize_cam
+ Draw a ScreenCapsule in the Unity Editor. (position defined in 2D screenspace) (defined via center position and size from vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ screenCapsule
+
+
+
+
+
+
+
+ drawScreenPointArray
+ drawScreenPointArray
+ Draw a ScreenPointArray in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointArray
+ screenPointArray
+
+
+
+
+
+
+
+ drawScreenPointArray_cam
+ drawScreenPointArray_cam
+ Draw a ScreenPointArray in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointArray
+ screenPointArray
+
+
+
+
+
+
+
+ drawScreenPointList
+ drawScreenPointList
+ Draw a ScreenPointList in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+ points_of_$name$ = $end$;
+ Color color_of_$name$ = default(Color);
+ float sizeOfMarkingCross_relToViewportHeight_of_$name$ = 0.1f;
+ float markingCrossLinesWidth_relToViewportHeight_of_$name$ = 0.0f;
+ bool drawCoordsAsText_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawScreenspace.PointList(points_of_$name$, color_of_$name$, sizeOfMarkingCross_relToViewportHeight_of_$name$, markingCrossLinesWidth_relToViewportHeight_of_$name$, drawCoordsAsText_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointList
+ screenPointList
+
+
+
+
+
+
+
+ drawScreenPointList_cam
+ drawScreenPointList_cam
+ Draw a ScreenPointList in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ points_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ float sizeOfMarkingCross_relToViewportHeight_of_$name$ = 0.1f;
+ float markingCrossLinesWidth_relToViewportHeight_of_$name$ = 0.0f;
+ bool drawCoordsAsText_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawScreenspace.PointList(targetCamera_of_$name$, points_of_$name$, color_of_$name$, sizeOfMarkingCross_relToViewportHeight_of_$name$, markingCrossLinesWidth_relToViewportHeight_of_$name$, drawCoordsAsText_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointList
+ screenPointList
+
+
+
+
+
+
+
+ drawScreenPoint
+ drawScreenPoint
+ Draw a ScreenPoint in the Unity Editor. (pointMarking has raised priority) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPoint
+ screenPoint
+
+
+
+
+
+
+
+ drawScreenPoint_cam
+ drawScreenPoint_cam
+ Draw a ScreenPoint in the Unity Editor. (pointMarking has raised priority) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPoint
+ screenPoint
+
+
+
+
+
+
+
+ drawScreenPoint_prioText
+ drawScreenPoint_prioText
+ Draw a ScreenPoint in the Unity Editor. (text parameter has raised priority) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPoint
+ screenPoint
+
+
+
+
+
+
+
+ drawScreenPoint_prioText_cam
+ drawScreenPoint_prioText_cam
+ Draw a ScreenPoint in the Unity Editor. (text parameter has raised priority) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPoint
+ screenPoint
+
+
+
+
+
+
+
+ drawScreenPointTag_3Dpos
+ drawScreenPointTag_3Dpos
+ Draw a ScreenPointTag in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointTag
+ screenPointTag
+
+
+
+
+
+
+
+ drawScreenPointTag_3Dpos_cam
+ drawScreenPointTag_3Dpos_cam
+ Draw a ScreenPointTag in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointTag
+ screenPointTag
+
+
+
+
+
+
+
+ drawScreenPointTag_2Dpos
+ drawScreenPointTag_2Dpos
+ Draw a ScreenPointTag in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointTag
+ screenPointTag
+
+
+
+
+
+
+
+ drawScreenPointTag_2Dpos_cam
+ drawScreenPointTag_2Dpos_cam
+ Draw a ScreenPointTag in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointTag
+ screenPointTag
+
+
+
+
+
+
+
+ drawScreenVector
+ drawScreenVector
+ Draw a ScreenVector in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVector
+ screenVector
+
+
+
+
+
+
+
+ drawScreenVector_cam
+ drawScreenVector_cam
+ Draw a ScreenVector in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVector
+ screenVector
+
+
+
+
+
+
+
+ drawScreenVectorFrom
+ drawScreenVectorFrom
+ Draw a ScreenVectorFrom in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorFrom
+ screenVectorFrom
+
+
+
+
+
+
+
+ drawScreenVectorFrom_cam
+ drawScreenVectorFrom_cam
+ Draw a ScreenVectorFrom in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorFrom
+ screenVectorFrom
+
+
+
+
+
+
+
+ drawScreenVectorTo
+ drawScreenVectorTo
+ Draw a ScreenVectorTo in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorTo
+ screenVectorTo
+
+
+
+
+
+
+
+ drawScreenVectorTo_cam
+ drawScreenVectorTo_cam
+ Draw a ScreenVectorTo in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorTo
+ screenVectorTo
+
+
+
+
+
+
+
+ drawScreenVectorCircled_angleToAngle
+ drawScreenVectorCircled_angleToAngle
+ Draw a ScreenVectorCircled in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorCircled
+ screenVectorCircled
+
+
+
+
+
+
+
+ drawScreenVectorCircled_angleToAngle_cam
+ drawScreenVectorCircled_angleToAngle_cam
+ Draw a ScreenVectorCircled in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorCircled
+ screenVectorCircled
+
+
+
+
+
+
+
+ drawScreenVectorCircled_angleFromStartPos
+ drawScreenVectorCircled_angleFromStartPos
+ Draw a ScreenVectorCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorCircled
+ screenVectorCircled
+
+
+
+
+
+
+
+ drawScreenVectorCircled_angleFromStartPos_cam
+ drawScreenVectorCircled_angleFromStartPos_cam
+ Draw a ScreenVectorCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorCircled
+ screenVectorCircled
+
+
+
+
+
+
+
+ drawScreenIcon_3Dpos
+ drawScreenIcon_3Dpos
+ Draw a ScreenIcon in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenIcon
+ screenIcon
+
+
+
+
+
+
+
+ drawScreenIcon_3Dpos_cam
+ drawScreenIcon_3Dpos_cam
+ Draw a ScreenIcon in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenIcon
+ screenIcon
+
+
+
+
+
+
+
+ drawScreenIcon_2Dpos
+ drawScreenIcon_2Dpos
+ Draw a ScreenIcon in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenIcon
+ screenIcon
+
+
+
+
+
+
+
+ drawScreenIcon_2Dpos_cam
+ drawScreenIcon_2Dpos_cam
+ Draw a ScreenIcon in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenIcon
+ screenIcon
+
+
+
+
+
+
+
+ drawScreenDot_3Dpos
+ drawScreenDot_3Dpos
+ Draw a ScreenDot in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenDot
+ screenDot
+
+
+
+
+
+
+
+ drawScreenDot_3Dpos_cam
+ drawScreenDot_3Dpos_cam
+ Draw a ScreenDot in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenDot
+ screenDot
+
+
+
+
+
+
+
+ drawScreenDot_2Dpos
+ drawScreenDot_2Dpos
+ Draw a ScreenDot in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenDot
+ screenDot
+
+
+
+
+
+
+
+ drawScreenDot_2Dpos_cam
+ drawScreenDot_2Dpos_cam
+ Draw a ScreenDot in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenDot
+ screenDot
+
+
+
+
+
+
+
+ drawScreenMovingArrowsRay
+ drawScreenMovingArrowsRay
+ Draw a ScreenMovingArrowsRay in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenMovingArrowsRay
+ screenMovingArrowsRay
+
+
+
+
+
+
+
+ drawScreenMovingArrowsRay_cam
+ drawScreenMovingArrowsRay_cam
+ Draw a ScreenMovingArrowsRay in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenMovingArrowsRay
+ screenMovingArrowsRay
+
+
+
+
+
+
+
+ drawScreenMovingArrowsLine
+ drawScreenMovingArrowsLine
+ Draw a ScreenMovingArrowsLine in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenMovingArrowsLine
+ screenMovingArrowsLine
+
+
+
+
+
+
+
+ drawScreenMovingArrowsLine_cam
+ drawScreenMovingArrowsLine_cam
+ Draw a ScreenMovingArrowsLine in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenMovingArrowsLine
+ screenMovingArrowsLine
+
+
+
+
+
+
+
+ drawScreenRayWithAlternatingColors
+ drawScreenRayWithAlternatingColors
+ Draw a ScreenRayWithAlternatingColors in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayWithAlternatingColors
+ screenRayWithAlternatingColors
+
+
+
+
+
+
+
+ drawScreenRayWithAlternatingColors_cam
+ drawScreenRayWithAlternatingColors_cam
+ Draw a ScreenRayWithAlternatingColors in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayWithAlternatingColors
+ screenRayWithAlternatingColors
+
+
+
+
+
+
+
+ drawScreenLineWithAlternatingColors
+ drawScreenLineWithAlternatingColors
+ Draw a ScreenLineWithAlternatingColors in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineWithAlternatingColors
+ screenLineWithAlternatingColors
+
+
+
+
+
+
+
+ drawScreenLineWithAlternatingColors_cam
+ drawScreenLineWithAlternatingColors_cam
+ Draw a ScreenLineWithAlternatingColors in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineWithAlternatingColors
+ screenLineWithAlternatingColors
+
+
+
+
+
+
+
+ drawScreenBlinkingRay
+ drawScreenBlinkingRay
+ Draw a ScreenBlinkingRay in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBlinkingRay
+ screenBlinkingRay
+
+
+
+
+
+
+
+ drawScreenBlinkingRay_cam
+ drawScreenBlinkingRay_cam
+ Draw a ScreenBlinkingRay in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBlinkingRay
+ screenBlinkingRay
+
+
+
+
+
+
+
+ drawScreenBlinkingLine
+ drawScreenBlinkingLine
+ Draw a ScreenBlinkingLine in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBlinkingLine
+ screenBlinkingLine
+
+
+
+
+
+
+
+ drawScreenBlinkingLine_cam
+ drawScreenBlinkingLine_cam
+ Draw a ScreenBlinkingLine in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBlinkingLine
+ screenBlinkingLine
+
+
+
+
+
+
+
+ drawScreenRayUnderTension
+ drawScreenRayUnderTension
+ Draw a ScreenRayUnderTension in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayUnderTension
+ screenRayUnderTension
+
+
+
+
+
+
+
+ drawScreenRayUnder_cam
+ drawScreenRayUnder_cam
+ Draw a ScreenRayUnder in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayUnder
+ screenRayUnder
+
+
+
+
+
+
+
+ drawScreenLineUnder
+ drawScreenLineUnder
+ Draw a ScreenLineUnder in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineUnder
+ screenLineUnder
+
+
+
+
+
+
+
+ drawScreenLineUnder_cam
+ drawScreenLineUnder_cam
+ Draw a ScreenLineUnder in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineUnder
+ screenLineUnder
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawScreenspace.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawScreenspace.snippet.meta
new file mode 100644
index 0000000..aacaa4e
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawScreenspace.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 96608cce3a4b5a94cb81f51a2d6bc164
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawScreenspace_func.snippet b/Editor/DrawDebugLibrary/code snippets/drawScreenspace_func.snippet
new file mode 100644
index 0000000..1779d05
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawScreenspace_func.snippet
@@ -0,0 +1,4659 @@
+
+
+
+
+ drawScreenLine_func
+ drawScreenLine_func
+ Encapsulated in a function: Draw a ScreenLine in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLine
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLine_cam_func
+ drawScreenLine_cam_func
+ Encapsulated in a function: Draw a ScreenLine in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLine
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRay_func
+ drawScreenRay_func
+ Encapsulated in a function: Draw a ScreenRay in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRay
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRay_cam_func
+ drawScreenRay_cam_func
+ Encapsulated in a function: Draw a ScreenRay in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRay
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineFrom_func
+ drawScreenLineFrom_func
+ Encapsulated in a function: Draw a ScreenLineFrom in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineFrom
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineFrom_cam_func
+ drawScreenLineFrom_cam_func
+ Encapsulated in a function: Draw a ScreenLineFrom in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineFrom
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineTo_func
+ drawScreenLineTo_func
+ Encapsulated in a function: Draw a ScreenLineTo in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineTo
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineTo_cam_func
+ drawScreenLineTo_cam_func
+ Encapsulated in a function: Draw a ScreenLineTo in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineTo
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineColFade_func
+ drawScreenLineColFade_func
+ Encapsulated in a function: Draw a ScreenLineColFade in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineColFade_cam_func
+ drawScreenLineColFade_cam_func
+ Encapsulated in a function: Draw a ScreenLineColFade in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRayColFade_func
+ drawScreenRayColFade_func
+ Encapsulated in a function: Draw a ScreenRayColFade in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRayColFade_cam_func
+ drawScreenRayColFade_cam_func
+ Encapsulated in a function: Draw a ScreenRayColFade in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineFromColFade_func
+ drawScreenLineFromColFade_func
+ Encapsulated in a function: Draw a ScreenLineFromColFade in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineFromColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineFromColFade_cam_func
+ drawScreenLineFromColFade_cam_func
+ Encapsulated in a function: Draw a ScreenLineFromColFade in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineFromColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineToColFade_func
+ drawScreenLineToColFade_func
+ Encapsulated in a function: Draw a ScreenLineToColFade in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineToColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineToColFade_cam_func
+ drawScreenLineToColFade_cam_func
+ Encapsulated in a function: Draw a ScreenLineToColFade in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineToColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineCircled_angleToAngle_func
+ drawScreenLineCircled_angleToAngle_func
+ Encapsulated in a function: Draw a ScreenLineCircled in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineCircled_angleToAngle_cam_func
+ drawScreenLineCircled_angleToAngle_cam_func
+ Encapsulated in a function: Draw a ScreenLineCircled in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineCircled_angleFromStartPos_func
+ drawScreenLineCircled_angleFromStartPos_func
+ Encapsulated in a function: Draw a ScreenLineCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineCircled_angleFromStartPos_cam_func
+ drawScreenLineCircled_angleFromStartPos_cam_func
+ Encapsulated in a function: Draw a ScreenLineCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCircleSegment_angleToAngle_func
+ drawScreenCircleSegment_angleToAngle_func
+ Encapsulated in a function: Draw a ScreenCircleSegment in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCircleSegment_angleToAngle_cam_func
+ drawScreenCircleSegment_angleToAngle_cam_func
+ Encapsulated in a function: Draw a ScreenCircleSegment in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCircleSegment_angleFromStartPos_func
+ drawScreenCircleSegment_angleFromStartPos_func
+ Encapsulated in a function: Draw a ScreenCircleSegment in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCircleSegment_angleFromStartPos_cam_func
+ drawScreenCircleSegment_angleFromStartPos_cam_func
+ Encapsulated in a function: Draw a ScreenCircleSegment in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircleSegment
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineString_array_func
+ drawScreenLineString_array_func
+ Encapsulated in a function: Draw a ScreenLineString in the Unity Editor. (points defined via array) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineString
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineString_array_cam_func
+ drawScreenLineString_array_cam_func
+ Encapsulated in a function: Draw a ScreenLineString in the Unity Editor. (points defined via array) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineString
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineString_list_func
+ drawScreenLineString_list_func
+ Encapsulated in a function: Draw a ScreenLineString in the Unity Editor. (points defined via list) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ bool closeGapBetweenLastAndFirstPoint = false;
+ float width_relToViewportHeight = 0.0f;
+ string text = null;
+ bool drawPointerIfOffscreen = false;
+ DrawBasics.LineStyle style = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor = 1.0f;
+ float durationInSec = 0.0f;
+ DrawScreenspace.LineString(points, color, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineString
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineString_list_cam_func
+ drawScreenLineString_list_cam_func
+ Encapsulated in a function: Draw a ScreenLineString in the Unity Editor. (points defined via list) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ points = ;
+ Color color = default(Color);
+ bool closeGapBetweenLastAndFirstPoint = false;
+ float width_relToViewportHeight = 0.0f;
+ string text = null;
+ bool drawPointerIfOffscreen = false;
+ DrawBasics.LineStyle style = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor = 1.0f;
+ float durationInSec = 0.0f;
+ DrawScreenspace.LineString(targetCamera, points, color, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineString
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineStringColFade_array_func
+ drawScreenLineStringColFade_array_func
+ Encapsulated in a function: Draw a ScreenLineStringColFade in the Unity Editor. (points defined via array) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineStringColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineStringColFade_array_cam_func
+ drawScreenLineStringColFade_array_cam_func
+ Encapsulated in a function: Draw a ScreenLineStringColFade in the Unity Editor. (points defined via array) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineStringColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineStringColFade_list_func
+ drawScreenLineStringColFade_list_func
+ Encapsulated in a function: Draw a ScreenLineStringColFade in the Unity Editor. (points defined via list) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color startColor = ;
+ Color endColor = ;
+ bool closeGapBetweenLastAndFirstPoint = false;
+ float width_relToViewportHeight = 0.0f;
+ string text = null;
+ bool drawPointerIfOffscreen = false;
+ DrawBasics.LineStyle style = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor = 1.0f;
+ float durationInSec = 0.0f;
+ DrawScreenspace.LineStringColorFade(points, startColor, endColor, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineStringColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineStringColFade_list_cam_func
+ drawScreenLineStringColFade_list_cam_func
+ Encapsulated in a function: Draw a ScreenLineStringColFade in the Unity Editor. (points defined via list) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ points = ;
+ Color startColor = ;
+ Color endColor = ;
+ bool closeGapBetweenLastAndFirstPoint = false;
+ float width_relToViewportHeight = 0.0f;
+ string text = null;
+ bool drawPointerIfOffscreen = false;
+ DrawBasics.LineStyle style = DrawBasics.LineStyle.solid;
+ float stylePatternScaleFactor = 1.0f;
+ float durationInSec = 0.0f;
+ DrawScreenspace.LineStringColorFade(targetCamera, points, startColor, endColor, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineStringColFade
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenShape_3Dpos_func
+ drawScreenShape_3Dpos_func
+ Encapsulated in a function: Draw a ScreenShape in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenShape
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenShape_3Dpos_cam_func
+ drawScreenShape_3Dpos_cam_func
+ Encapsulated in a function: Draw a ScreenShape in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenShape
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenShape_2Dpos_func
+ drawScreenShape_2Dpos_func
+ Encapsulated in a function: Draw a ScreenShape in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenShape
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenShape_2Dpos_cam_func
+ drawScreenShape_2Dpos_cam_func
+ Encapsulated in a function: Draw a ScreenShape in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenShape
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRectangle_rect_func
+ drawScreenRectangle_rect_func
+ Encapsulated in a function: Draw a ScreenRectangle in the Unity Editor. (defined via rect struct) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRectangle
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRectangle_rect_cam_func
+ drawScreenRectangle_rect_cam_func
+ Encapsulated in a function: Draw a ScreenRectangle in the Unity Editor. (defined via rect struct) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRectangle
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRectangle_vecFloat_func
+ drawScreenRectangle_vecFloat_func
+ Encapsulated in a function: Draw a ScreenRectangle in the Unity Editor. (defined via vector and floats) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRectangle
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRectangle_vecFloat_cam_func
+ drawScreenRectangle_vecFloat_cam_func
+ Encapsulated in a function: Draw a ScreenRectangle in the Unity Editor. (defined via vector and floats) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRectangle
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenBox_rect_func
+ drawScreenBox_rect_func
+ Encapsulated in a function: Draw a ScreenBox in the Unity Editor. (defined via rect struct) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenBox_rect_cam_func
+ drawScreenBox_rect_cam_func
+ Encapsulated in a function: Draw a ScreenBox in the Unity Editor. (defined via rect struct) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenBox_3Dpos_vec_func
+ drawScreenBox_3Dpos_vec_func
+ Encapsulated in a function: Draw a ScreenBox in the Unity Editor. (position defined in 3D worldspace) (defined via vectors) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenBox_3Dpos_vec_cam_func
+ drawScreenBox_3Dpos_vec_cam_func
+ Encapsulated in a function: Draw a ScreenBox in the Unity Editor. (position defined in 3D worldspace) (defined via vectors) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenBox_2Dpos_vec_func
+ drawScreenBox_2Dpos_vec_func
+ Encapsulated in a function: Draw a ScreenBox in the Unity Editor. (position defined in 2D screenspace) (defined via vectors) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenBox_2Dpos_vec_cam_func
+ drawScreenBox_2Dpos_vec_cam_func
+ Encapsulated in a function: Draw a ScreenBox in the Unity Editor. (position defined in 2D screenspace) (defined via vectors) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBox
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCircle_rect_func
+ drawScreenCircle_rect_func
+ Encapsulated in a function: Draw a ScreenCircle in the Unity Editor. (defined via rect struct) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCircle_rect_cam_func
+ drawScreenCircle_rect_cam_func
+ Encapsulated in a function: Draw a ScreenCircle in the Unity Editor. (defined via rect struct) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCircle_3Dpos_vecRad_func
+ drawScreenCircle_3Dpos_vecRad_func
+ Encapsulated in a function: Draw a ScreenCircle in the Unity Editor. (position defined in 3D worldspace) (defined via vector and float as radius) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCircle_3Dpos_vecRad_cam_func
+ drawScreenCircle_3Dpos_vecRad_cam_func
+ Encapsulated in a function: Draw a ScreenCircle in the Unity Editor. (position defined in 3D worldspace) (defined via vector and float as radius) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCircle_2Dpos_vecRad_func
+ drawScreenCircle_2Dpos_vecRad_func
+ Encapsulated in a function: Draw a ScreenCircle in the Unity Editor. (position defined in 2D screenspace) (defined via vector and float as radius) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCircle_2Dpos_vecRad_cam_func
+ drawScreenCircle_2Dpos_vecRad_cam_func
+ Encapsulated in a function: Draw a ScreenCircle in the Unity Editor. (position defined in 2D screenspace) (defined via vector and float as radius) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCapsule_3Dpos_vecC1C2Pos_func
+ drawScreenCapsule_3Dpos_vecC1C2Pos_func
+ Encapsulated in a function: Draw a ScreenCapsule in the Unity Editor. (position defined in 3D worldspace) (defined via position of circle1 and circle2) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCapsule_3Dpos_vecC1C2Pos_cam_func
+ drawScreenCapsule_3Dpos_vecC1C2Pos_cam_func
+ Encapsulated in a function: Draw a ScreenCapsule in the Unity Editor. (position defined in 3D worldspace) (defined via position of circle1 and circle2) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCapsule_2Dpos_vecC1C2Pos_func
+ drawScreenCapsule_2Dpos_vecC1C2Pos_func
+ Encapsulated in a function: Draw a ScreenCapsule in the Unity Editor. (position defined in 2D screenspace) (defined via position of circle1 and circle2) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCapsule_2Dpos_vecC1C2Pos_cam_func
+ drawScreenCapsule_2Dpos_vecC1C2Pos_cam_func
+ Encapsulated in a function: Draw a ScreenCapsule in the Unity Editor. (position defined in 2D screenspace) (defined via position of circle1 and circle2) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCapsule_rect_func
+ drawScreenCapsule_rect_func
+ Encapsulated in a function: Draw a ScreenCapsule in the Unity Editor. (defined via rect struct) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCapsule_rect_cam_func
+ drawScreenCapsule_rect_cam_func
+ Encapsulated in a function: Draw a ScreenCapsule in the Unity Editor. (defined via rect struct) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCapsule_3Dpos_vecPosSize_func
+ drawScreenCapsule_3Dpos_vecPosSize_func
+ Encapsulated in a function: Draw a ScreenCapsule in the Unity Editor. (position defined in 3D worldspace) (defined via center position and size from vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCapsule_3Dpos_vecPosSize_cam_func
+ drawScreenCapsule_3Dpos_vecPosSize_cam_func
+ Encapsulated in a function: Draw a ScreenCapsule in the Unity Editor. (position defined in 3D worldspace) (defined via center position and size from vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCapsule_2Dpos_vecPosSize_func
+ drawScreenCapsule_2Dpos_vecPosSize_func
+ Encapsulated in a function: Draw a ScreenCapsule in the Unity Editor. (position defined in 2D screenspace) (defined via center position and size from vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenCapsule_2Dpos_vecPosSize_cam_func
+ drawScreenCapsule_2Dpos_vecPosSize_cam_func
+ Encapsulated in a function: Draw a ScreenCapsule in the Unity Editor. (position defined in 2D screenspace) (defined via center position and size from vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPointArray_func
+ drawScreenPointArray_func
+ Encapsulated in a function: Draw a ScreenPointArray in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointArray
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPointArray_cam_func
+ drawScreenPointArray_cam_func
+ Encapsulated in a function: Draw a ScreenPointArray in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointArray
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPointList_func
+ drawScreenPointList_func
+ Encapsulated in a function: Draw a ScreenPointList in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+ points = $end$;
+ Color color = default(Color);
+ float sizeOfMarkingCross_relToViewportHeight = 0.1f;
+ float markingCrossLinesWidth_relToViewportHeight = 0.0f;
+ bool drawCoordsAsText = true;
+ float durationInSec = 0.0f;
+ DrawScreenspace.PointList(points, color, sizeOfMarkingCross_relToViewportHeight, markingCrossLinesWidth_relToViewportHeight, drawCoordsAsText, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointList
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPointList_cam_func
+ drawScreenPointList_cam_func
+ Encapsulated in a function: Draw a ScreenPointList in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ points = ;
+ Color color = default(Color);
+ float sizeOfMarkingCross_relToViewportHeight = 0.1f;
+ float markingCrossLinesWidth_relToViewportHeight = 0.0f;
+ bool drawCoordsAsText = true;
+ float durationInSec = 0.0f;
+ DrawScreenspace.PointList(targetCamera, points, color, sizeOfMarkingCross_relToViewportHeight, markingCrossLinesWidth_relToViewportHeight, drawCoordsAsText, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointList
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPoint_func
+ drawScreenPoint_func
+ Encapsulated in a function: Draw a ScreenPoint in the Unity Editor. (pointMarking has raised priority) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPoint
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPoint_cam_func
+ drawScreenPoint_cam_func
+ Encapsulated in a function: Draw a ScreenPoint in the Unity Editor. (pointMarking has raised priority) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPoint
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPoint_prioText_func
+ drawScreenPoint_prioText_func
+ Encapsulated in a function: Draw a ScreenPoint in the Unity Editor. (text parameter has raised priority) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPoint
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPoint_prioText_cam_func
+ drawScreenPoint_prioText_cam_func
+ Encapsulated in a function: Draw a ScreenPoint in the Unity Editor. (text parameter has raised priority) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPoint
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPointTag_3Dpos_func
+ drawScreenPointTag_3Dpos_func
+ Encapsulated in a function: Draw a ScreenPointTag in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointTag
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPointTag_3Dpos_cam_func
+ drawScreenPointTag_3Dpos_cam_func
+ Encapsulated in a function: Draw a ScreenPointTag in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointTag
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPointTag_2Dpos_func
+ drawScreenPointTag_2Dpos_func
+ Encapsulated in a function: Draw a ScreenPointTag in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointTag
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenPointTag_2Dpos_cam_func
+ drawScreenPointTag_2Dpos_cam_func
+ Encapsulated in a function: Draw a ScreenPointTag in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenPointTag
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenVector_func
+ drawScreenVector_func
+ Encapsulated in a function: Draw a ScreenVector in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVector
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenVector_cam_func
+ drawScreenVector_cam_func
+ Encapsulated in a function: Draw a ScreenVector in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVector
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenVectorFrom_func
+ drawScreenVectorFrom_func
+ Encapsulated in a function: Draw a ScreenVectorFrom in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorFrom
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenVectorFrom_cam_func
+ drawScreenVectorFrom_cam_func
+ Encapsulated in a function: Draw a ScreenVectorFrom in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorFrom
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenVectorTo_func
+ drawScreenVectorTo_func
+ Encapsulated in a function: Draw a ScreenVectorTo in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorTo
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenVectorTo_cam_func
+ drawScreenVectorTo_cam_func
+ Encapsulated in a function: Draw a ScreenVectorTo in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorTo
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenVectorCircled_angleToAngle_func
+ drawScreenVectorCircled_angleToAngle_func
+ Encapsulated in a function: Draw a ScreenVectorCircled in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenVectorCircled_angleToAngle_cam_func
+ drawScreenVectorCircled_angleToAngle_cam_func
+ Encapsulated in a function: Draw a ScreenVectorCircled in the Unity Editor. (turnCenter defined as position, angles relative to screens upwardDir) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenVectorCircled_angleFromStartPos_func
+ drawScreenVectorCircled_angleFromStartPos_func
+ Encapsulated in a function: Draw a ScreenVectorCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenVectorCircled_angleFromStartPos_cam_func
+ drawScreenVectorCircled_angleFromStartPos_cam_func
+ Encapsulated in a function: Draw a ScreenVectorCircled in the Unity Editor. (turnCenter and startPosition defined as positions, angle as float) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenVectorCircled
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenIcon_3Dpos_func
+ drawScreenIcon_3Dpos_func
+ Encapsulated in a function: Draw a ScreenIcon in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenIcon
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenIcon_3Dpos_cam_func
+ drawScreenIcon_3Dpos_cam_func
+ Encapsulated in a function: Draw a ScreenIcon in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenIcon
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenIcon_2Dpos_func
+ drawScreenIcon_2Dpos_func
+ Encapsulated in a function: Draw a ScreenIcon in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenIcon
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenIcon_2Dpos_cam_func
+ drawScreenIcon_2Dpos_cam_func
+ Encapsulated in a function: Draw a ScreenIcon in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenIcon
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenDot_3Dpos_func
+ drawScreenDot_3Dpos_func
+ Encapsulated in a function: Draw a ScreenDot in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenDot
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenDot_3Dpos_cam_func
+ drawScreenDot_3Dpos_cam_func
+ Encapsulated in a function: Draw a ScreenDot in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenDot
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenDot_2Dpos_func
+ drawScreenDot_2Dpos_func
+ Encapsulated in a function: Draw a ScreenDot in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenDot
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenDot_2Dpos_cam_func
+ drawScreenDot_2Dpos_cam_func
+ Encapsulated in a function: Draw a ScreenDot in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenDot
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenMovingArrowsRay_func
+ drawScreenMovingArrowsRay_func
+ Encapsulated in a function: Draw a ScreenMovingArrowsRay in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenMovingArrowsRay
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenMovingArrowsRay_cam_func
+ drawScreenMovingArrowsRay_cam_func
+ Encapsulated in a function: Draw a ScreenMovingArrowsRay in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenMovingArrowsRay
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenMovingArrowsLine_func
+ drawScreenMovingArrowsLine_func
+ Encapsulated in a function: Draw a ScreenMovingArrowsLine in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenMovingArrowsLine
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenMovingArrowsLine_cam_func
+ drawScreenMovingArrowsLine_cam_func
+ Encapsulated in a function: Draw a ScreenMovingArrowsLine in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenMovingArrowsLine
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRayWithAlternatingColors_func
+ drawScreenRayWithAlternatingColors_func
+ Encapsulated in a function: Draw a ScreenRayWithAlternatingColors in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayWithAlternatingColors
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRayWithAlternatingColors_cam_func
+ drawScreenRayWithAlternatingColors_cam_func
+ Encapsulated in a function: Draw a ScreenRayWithAlternatingColors in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayWithAlternatingColors
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineWithAlternatingColors_func
+ drawScreenLineWithAlternatingColors_func
+ Encapsulated in a function: Draw a ScreenLineWithAlternatingColors in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineWithAlternatingColors
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineWithAlternatingColors_cam_func
+ drawScreenLineWithAlternatingColors_cam_func
+ Encapsulated in a function: Draw a ScreenLineWithAlternatingColors in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineWithAlternatingColors
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenBlinkingRay_func
+ drawScreenBlinkingRay_func
+ Encapsulated in a function: Draw a ScreenBlinkingRay in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBlinkingRay
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenBlinkingRay_cam_func
+ drawScreenBlinkingRay_cam_func
+ Encapsulated in a function: Draw a ScreenBlinkingRay in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBlinkingRay
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenBlinkingLine_func
+ drawScreenBlinkingLine_func
+ Encapsulated in a function: Draw a ScreenBlinkingLine in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBlinkingLine
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenBlinkingLine_cam_func
+ drawScreenBlinkingLine_cam_func
+ Encapsulated in a function: Draw a ScreenBlinkingLine in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenBlinkingLine
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRayUnderTension_func
+ drawScreenRayUnderTension_func
+ Encapsulated in a function: Draw a ScreenRayUnderTension in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayUnderTension
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenRayUnder_cam_func
+ drawScreenRayUnder_cam_func
+ Encapsulated in a function: Draw a ScreenRayUnder in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenRayUnder
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineUnder_func
+ drawScreenLineUnder_func
+ Encapsulated in a function: Draw a ScreenLineUnder in the Unity Editor. (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineUnder
+ WithThisName
+
+
+
+
+
+
+
+ drawScreenLineUnder_cam_func
+ drawScreenLineUnder_cam_func
+ Encapsulated in a function: Draw a ScreenLineUnder in the Unity Editor. (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ScreenLineUnder
+ WithThisName
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawScreenspace_func.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawScreenspace_func.snippet.meta
new file mode 100644
index 0000000..46eaaec
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawScreenspace_func.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 699e067d28063634783fc15a7ab9fd60
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawShapes.snippet b/Editor/DrawDebugLibrary/code snippets/drawShapes.snippet
new file mode 100644
index 0000000..5c64732
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawShapes.snippet
@@ -0,0 +1,4610 @@
+
+
+
+
+ drawRegularPolygon_rotViaQuat
+ drawRegularPolygon_rotViaQuat
+ Draw a RegularPolygon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RegularPolygon
+ regularPolygon
+
+
+
+
+
+
+
+ drawRegularPolygon_rotViaVec
+ drawRegularPolygon_rotViaVec
+ Draw a RegularPolygon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RegularPolygon
+ regularPolygon
+
+
+
+
+
+
+
+ drawTriangle_rotViaQuat
+ drawTriangle_rotViaQuat
+ Draw a Triangle in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Triangle
+ triangle
+
+
+
+
+
+
+
+ drawTriangle_rotViaVec
+ drawTriangle_rotViaVec
+ Draw a Triangle in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Triangle
+ triangle
+
+
+
+
+
+
+
+ drawSquare_rotViaQuat
+ drawSquare_rotViaQuat
+ Draw a Square in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Square
+ square
+
+
+
+
+
+
+
+ drawSquare_rotViaVec
+ drawSquare_rotViaVec
+ Draw a Square in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Square
+ square
+
+
+
+
+
+
+
+ drawPentagon_rotViaQuat
+ drawPentagon_rotViaQuat
+ Draw a Pentagon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pentagon
+ pentagon
+
+
+
+
+
+
+
+ drawPentagon_rotViaVec
+ drawPentagon_rotViaVec
+ Draw a Pentagon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pentagon
+ pentagon
+
+
+
+
+
+
+
+ drawHexagon_rotViaQuat
+ drawHexagon_rotViaQuat
+ Draw a Hexagon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Hexagon
+ hexagon
+
+
+
+
+
+
+
+ drawHexagon_rotViaVec
+ drawHexagon_rotViaVec
+ Draw a Hexagon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Hexagon
+ hexagon
+
+
+
+
+
+
+
+ drawSeptagon_rotViaQuat
+ drawSeptagon_rotViaQuat
+ Draw a Septagon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Septagon
+ septagon
+
+
+
+
+
+
+
+ drawSeptagon_rotViaVec
+ drawSeptagon_rotViaVec
+ Draw a Septagon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Septagon
+ septagon
+
+
+
+
+
+
+
+ drawOctagon_rotViaQuat
+ drawOctagon_rotViaQuat
+ Draw an Octagon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Octagon
+ octagon
+
+
+
+
+
+
+
+ drawOctagon_rotViaVec
+ drawOctagon_rotViaVec
+ Draw an Octagon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Octagon
+ octagon
+
+
+
+
+
+
+
+ drawDecagon_rotViaQuat
+ drawDecagon_rotViaQuat
+ Draw a Decagon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Decagon
+ decagon
+
+
+
+
+
+
+
+ drawDecagon_rotViaVec
+ drawDecagon_rotViaVec
+ Draw a Decagon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Decagon
+ decagon
+
+
+
+
+
+
+
+ drawCircle_rotViaQuat
+ drawCircle_rotViaQuat
+ Draw a Circle in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle
+ circle
+
+
+
+
+
+
+
+ drawCircle_rotViaVec
+ drawCircle_rotViaVec
+ Draw a Circle in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle
+ circle
+
+
+
+
+
+
+
+ drawEllipse_rotViaQuat
+ drawEllipse_rotViaQuat
+ Draw an Ellipse in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ellipse
+ ellipse
+
+
+
+
+
+
+
+ drawEllipse_rotViaVec
+ drawEllipse_rotViaVec
+ Draw an Ellipse in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ellipse
+ ellipse
+
+
+
+
+
+
+
+ drawStar_rotViaQuat
+ drawStar_rotViaQuat
+ Draw a Star in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Star
+ star
+
+
+
+
+
+
+
+ drawStar_rotViaVec
+ drawStar_rotViaVec
+ Draw a Star in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Star
+ star
+
+
+
+
+
+
+
+ drawFlatCapsule_vecC1C2Pos
+ drawFlatCapsule_vecC1C2Pos
+ Draw a FlatCapsule in the Unity Editor. (capsule defined via position of circle1 and circle2)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatCapsule
+ flatCapsule
+
+
+
+
+
+
+
+ drawFlatCapsule_rotViaQuat
+ drawFlatCapsule_rotViaQuat
+ Draw a FlatCapsule in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatCapsule
+ flatCapsule
+
+
+
+
+
+
+
+ drawFlatCapsule_rotViaVec
+ drawFlatCapsule_rotViaVec
+ Draw a FlatCapsule in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatCapsule
+ flatCapsule
+
+
+
+
+
+
+
+ drawPlane_tr
+ drawPlane_tr
+ Draw a Plane in the Unity Editor. (defined via transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Plane
+ plane
+
+
+
+
+
+
+
+ drawPlane_pl
+ drawPlane_pl
+ Draw a Plane in the Unity Editor. (defined via plane struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Plane
+ plane
+
+
+
+
+
+
+
+ drawPlane_vec
+ drawPlane_vec
+ Draw a Plane in the Unity Editor. (defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Plane
+ plane
+
+
+
+
+
+
+
+ drawRhombusAroundCenter
+ drawRhombusAroundCenter
+ Draw a RhombusAroundCenter in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RhombusAroundCenter
+ rhombusAroundCenter
+
+
+
+
+
+
+
+ drawRhombus
+ drawRhombus
+ Draw a Rhombus in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Rhombus
+ rhombus
+
+
+
+
+
+
+
+ drawCube_tr
+ drawCube_tr
+ Draw a Cube in the Unity Editor. (defined via transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cube
+ cube
+
+
+
+
+
+
+
+ drawCube_vecQuat
+ drawCube_vecQuat
+ Draw a Cube in the Unity Editor. pos defined via vector, rot defined via quaternion
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cube
+ cube
+
+
+
+
+
+
+
+ drawCube_vecVec
+ drawCube_vecVec
+ Draw a Cube in the Unity Editor. both pos and rot defined via vectors
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cube
+ cube
+
+
+
+
+
+
+
+ drawCubeFilled_tr_alpha
+ drawCubeFilled_tr_alpha
+ Draw a CubeFilled in the Unity Editor. (pos/size/rot from transform) (fill color same as strut color except lower alpha)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ cubeFilled
+
+
+
+
+
+
+
+ drawCubeFilled_vecQuat_alpha
+ drawCubeFilled_vecQuat_alpha
+ Draw a CubeFilled in the Unity Editor. (pos from vector, rot from quaternion) (fill color same as strut color except lower alpha)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ cubeFilled
+
+
+
+
+
+
+
+ drawCubeFilled_vecVec_alpha
+ drawCubeFilled_vecVec_alpha
+ Draw a CubeFilled in the Unity Editor. (pos/size/rot from vectors) (fill color same as strut color except lower alpha)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ cubeFilled
+
+
+
+
+
+
+
+ drawCubeFilled_tr_2col
+ drawCubeFilled_tr_2col
+ Draw a CubeFilled in the Unity Editor. (pos/size/rot from transform) (fill color is different from strut color)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ cubeFilled
+
+
+
+
+
+
+
+ drawCubeFilled_vecQuat_2col
+ drawCubeFilled_vecQuat_2col
+ Draw a CubeFilled in the Unity Editor. (pos from vector, rot from quaternion) (fill color is different from strut color)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ cubeFilled
+
+
+
+
+
+
+
+ drawCubeFilled_vecVec_2col
+ drawCubeFilled_vecVec_2col
+ Draw a CubeFilled in the Unity Editor. (pos/size/rot from vectors) (fill color is different from strut color)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ cubeFilled
+
+
+
+
+
+
+
+ drawSphere_tr
+ drawSphere_tr
+ Draw a Sphere in the Unity Editor. (pos/size/rot from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Sphere
+ sphere
+
+
+
+
+
+
+
+ drawSphere_vecQuat
+ drawSphere_vecQuat
+ Draw a Sphere in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Sphere
+ sphere
+
+
+
+
+
+
+
+ drawSphere_vecVec
+ drawSphere_vecVec
+ Draw a Sphere in the Unity Editor. (pos/size/rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Sphere
+ sphere
+
+
+
+
+
+
+
+ drawEllipsoid_tr
+ drawEllipsoid_tr
+ Draw an Ellipsoid in the Unity Editor. (pos/size/rot from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ellipsoid
+ ellipsoid
+
+
+
+
+
+
+
+ drawEllipsoid_vecQuat
+ drawEllipsoid_vecQuat
+ Draw an Ellipsoid in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ellipsoid
+ ellipsoid
+
+
+
+
+
+
+
+ drawEllipsoid_vecVec
+ drawEllipsoid_vecVec
+ Draw an Ellipsoid in the Unity Editor. (pos/size/rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ellipsoid
+ ellipsoid
+
+
+
+
+
+
+
+ drawEllipsoidNonUniform_vecQuat
+ drawEllipsoidNonUniform_vecQuat
+ Draw an EllipsoidNonUniform in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EllipsoidNonUniform
+ ellipsoidNonUniform
+
+
+
+
+
+
+
+ drawEllipsoidNonUniform_vecVec
+ drawEllipsoidNonUniform_vecVec
+ Draw an EllipsoidNonUniform in the Unity Editor. (pos/rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EllipsoidNonUniform
+ ellipsoidNonUniform
+
+
+
+
+
+
+
+ drawCapsule_vecC1C2Pos
+ drawCapsule_vecC1C2Pos
+ Draw a Capsule in the Unity Editor. (defined via position of circle1 and circle2)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ capsule
+
+
+
+
+
+
+
+ drawCapsule_tr
+ drawCapsule_tr
+ Draw a Capsule in the Unity Editor. (defined via transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ capsule
+
+
+
+
+
+
+
+ drawCapsule_vecVecQuat
+ drawCapsule_vecVecQuat
+ Draw a Capsule in the Unity Editor. (pos from vector, size from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ capsule
+
+
+
+
+
+
+
+ drawCapsule_vecVecVec
+ drawCapsule_vecVecVec
+ Draw a Capsule in the Unity Editor. (pos/size/rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ capsule
+
+
+
+
+
+
+
+ drawCapsule_vecRadQuat
+ drawCapsule_vecRadQuat
+ Draw a Capsule in the Unity Editor. (pos from vector, radius from float, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ capsule
+
+
+
+
+
+
+
+ drawCapsule_vecRadVec
+ drawCapsule_vecRadVec
+ Draw a Capsule in the Unity Editor. (pos from vector, radius from float, rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ capsule
+
+
+
+
+
+
+
+ drawPyramid_apexAnglesQuat
+ drawPyramid_apexAnglesQuat
+ Draw a Pyramid in the Unity Editor. (defined via apex pos and angles from there, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ pyramid
+
+
+
+
+
+
+
+ drawPyramid_apexAnglesVec
+ drawPyramid_apexAnglesVec
+ Draw a Pyramid in the Unity Editor. (defined via apex pos and angles from there, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ pyramid
+
+
+
+
+
+
+
+ drawPyramid_baseRectQuat
+ drawPyramid_baseRectQuat
+ Draw a Pyramid in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ pyramid
+
+
+
+
+
+
+
+ drawPyramid_baseRectVec
+ drawPyramid_baseRectVec
+ Draw a Pyramid in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ pyramid
+
+
+
+
+
+
+
+ drawPyramid_vecVecQuat
+ drawPyramid_vecVecQuat
+ Draw a Pyramid in the Unity Editor. (pos+size via vectors, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ pyramid
+
+
+
+
+
+
+
+ drawPyramid_vecFloatQuat
+ drawPyramid_vecFloatQuat
+ Draw a Pyramid in the Unity Editor. (pos via vector, size via floats, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ pyramid
+
+
+
+
+
+
+
+ drawPyramid_vecFloatVec
+ drawPyramid_vecFloatVec
+ Draw a Pyramid in the Unity Editor. (pos via vector, size via floats, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ pyramid
+
+
+
+
+
+
+
+ drawCone_apexAnglesQuat
+ drawCone_apexAnglesQuat
+ Draw a Cone in the Unity Editor. (defined via apex pos and angles from there, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cone
+ cone
+
+
+
+
+
+
+
+ drawCone_apexAnglesVec
+ drawCone_apexAnglesVec
+ Draw a Cone in the Unity Editor. (defined via apex pos and angles from there, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cone
+ cone
+
+
+
+
+
+
+
+ drawCone_vecVecQuat
+ drawCone_vecVecQuat
+ Draw a Cone in the Unity Editor. (pos+size via vectors, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cone
+ cone
+
+
+
+
+
+
+
+ drawCone_vecFloatQuat
+ drawCone_vecFloatQuat
+ Draw a Cone in the Unity Editor. (pos via vector, size via floats, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cone
+ cone
+
+
+
+
+
+
+
+ drawCone_vecFloatVec
+ drawCone_vecFloatVec
+ Draw a Cone in the Unity Editor. (pos via vector, size via floats, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cone
+ cone
+
+
+
+
+
+
+
+ drawConeFilled_apexAnglesQuat
+ drawConeFilled_apexAnglesQuat
+ Draw a ConeFilled in the Unity Editor. (defined via apex pos and angles from there, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ConeFilled
+ coneFilled
+
+
+
+
+
+
+
+ drawConeFilled_apexAnglesVec
+ drawConeFilled_apexAnglesVec
+ Draw a ConeFilled in the Unity Editor. (defined via apex pos and angles from there, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ConeFilled
+ coneFilled
+
+
+
+
+
+
+
+ drawConeFilled_vecVecQuat
+ drawConeFilled_vecVecQuat
+ Draw a ConeFilled in the Unity Editor. (pos+size via vectors, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ConeFilled
+ coneFilled
+
+
+
+
+
+
+
+ drawConeFilled_vecFloatQuat
+ drawConeFilled_vecFloatQuat
+ Draw a ConeFilled in the Unity Editor. (pos via vector, size via floats, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ConeFilled
+ coneFilled
+
+
+
+
+
+
+
+ drawConeFilled_vecFloatVec
+ drawConeFilled_vecFloatVec
+ Draw a ConeFilled in the Unity Editor. (pos via vector, size via floats, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ConeFilled
+ coneFilled
+
+
+
+
+
+
+
+ drawBipyramid_baseRectQuat
+ drawBipyramid_baseRectQuat
+ Draw a Bipyramid in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bipyramid
+ bipyramid
+
+
+
+
+
+
+
+ drawBipyramid_baseRectVec
+ drawBipyramid_baseRectVec
+ Draw a Bipyramid in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bipyramid
+ bipyramid
+
+
+
+
+
+
+
+ drawBipyramid_vecVecQuat
+ drawBipyramid_vecVecQuat
+ Draw a Bipyramid in the Unity Editor. (pos+size via vectors, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bipyramid
+ bipyramid
+
+
+
+
+
+
+
+ drawBipyramid_vecFloatQuat
+ drawBipyramid_vecFloatQuat
+ Draw a Bipyramid in the Unity Editor. (pos via vector, size via floats, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bipyramid
+ bipyramid
+
+
+
+
+
+
+
+ drawBipyramid_vecFloatVec
+ drawBipyramid_vecFloatVec
+ Draw a Bipyramid in the Unity Editor. (pos via vector, size via floats, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bipyramid
+ bipyramid
+
+
+
+
+
+
+
+ drawCylinder_baseRectQuat
+ drawCylinder_baseRectQuat
+ Draw a Cylinder in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cylinder
+ cylinder
+
+
+
+
+
+
+
+ drawCylinder_baseRectVec
+ drawCylinder_baseRectVec
+ Draw a Cylinder in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cylinder
+ cylinder
+
+
+
+
+
+
+
+ drawCylinder_vecVecQuat
+ drawCylinder_vecVecQuat
+ Draw a Cylinder in the Unity Editor. (pos+size via vectors, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cylinder
+ cylinder
+
+
+
+
+
+
+
+ drawCylinder_vecFloatQuat
+ drawCylinder_vecFloatQuat
+ Draw a Cylinder in the Unity Editor. (pos via vector, size via floats, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cylinder
+ cylinder
+
+
+
+
+
+
+
+ drawCylinder_vecFloatVec
+ drawCylinder_vecFloatVec
+ Draw a Cylinder in the Unity Editor. (pos via vector, size via floats, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cylinder
+ cylinder
+
+
+
+
+
+
+
+ drawExtrusion_baseRectQuat
+ drawExtrusion_baseRectQuat
+ Draw an Extrusion in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Extrusion
+ extrusion
+
+
+
+
+
+
+
+ drawExtrusion_baseRectVec
+ drawExtrusion_baseRectVec
+ Draw an Extrusion in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Extrusion
+ extrusion
+
+
+
+
+
+
+
+ drawExtrusion_vecQuat
+ drawExtrusion_vecQuat
+ Draw an Extrusion in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Extrusion
+ extrusion
+
+
+
+
+
+
+
+ drawExtrusion_vecVec
+ drawExtrusion_vecVec
+ Draw an Extrusion in the Unity Editor. (pos + rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Extrusion
+ extrusion
+
+
+
+
+
+
+
+ drawFrustum_cam
+ drawFrustum_cam
+ Draw a Frustum in the Unity Editor. (specified via a camera component)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ frustum
+
+
+
+
+
+
+
+ drawFrustum_apexAndAngles_rotViaQuat
+ drawFrustum_apexAndAngles_rotViaQuat
+ Draw a Frustum in the Unity Editor. (defined via apex pos and angles from there, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ frustum
+
+
+
+
+
+
+
+ drawFrustum_apexAndAngles_rotViaVec
+ drawFrustum_apexAndAngles_rotViaVec
+ Draw a Frustum in the Unity Editor. (defined via apex pos and angles from there, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ frustum
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlaneRect_rotViaQuat
+ drawFrustum_bigClipPlaneRect_rotViaQuat
+ Draw a Frustum in the Unity Editor. (defined via rect struct as big clip plane, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ frustum
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlaneRect_rotViaVec
+ drawFrustum_bigClipPlaneRect_rotViaVec
+ Draw a Frustum in the Unity Editor. (defined via rect struct as big clip plane, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ frustum
+
+
+
+
+
+
+
+ drawFrustum_hull
+ drawFrustum_hull
+ Draw a Frustum in the Unity Editor. (defined via pos/size/rot of a hull box)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ frustum
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlanePos_distanceToSmallAndApex_rotViaQuat
+ drawFrustum_bigClipPlanePos_distanceToSmallAndApex_rotViaQuat
+ Draw a Frustum in the Unity Editor. (defined via big clip plane center and distances to small clip plane and apex, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ frustum
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlanePos_distanceToSmallAndApex_rotViaVec
+ drawFrustum_bigClipPlanePos_distanceToSmallAndApex_rotViaVec
+ Draw a Frustum in the Unity Editor. (defined via big clip plane center and distances to small clip plane and apex, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ frustum
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlanePos_sizeFactorToSmall_rotViaQuat
+ drawFrustum_bigClipPlanePos_sizeFactorToSmall_rotViaQuat
+ Draw a Frustum in the Unity Editor. (defined via big clip plane center and size scale factor for small clip plane, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ frustum
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlanePos_sizeFactorToSmall_rotViaVec
+ drawFrustum_bigClipPlanePos_sizeFactorToSmall_rotViaVec
+ Draw a Frustum in the Unity Editor. (defined via big clip plane center and size scale factor for small clip plane, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ frustum
+
+
+
+
+
+
+
+ drawFrustum_clipPlanesPos
+ drawFrustum_clipPlanesPos
+ Draw a Frustum in the Unity Editor. (defined via position of big and of small clip plane)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ frustum
+
+
+
+
+
+
+
+ drawFlatShape_baseRectQuat
+ drawFlatShape_baseRectQuat
+ Draw a FlatShape in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatShape
+ flatShape
+
+
+
+
+
+
+
+ drawFlatShape_baseRectVec
+ drawFlatShape_baseRectVec
+ Draw a FlatShape in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatShape
+ flatShape
+
+
+
+
+
+
+
+ drawFlatShape_vecQuat
+ drawFlatShape_vecQuat
+ Draw a FlatShape in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatShape
+ flatShape
+
+
+
+
+
+
+
+ drawFlatShape_vecVec
+ drawFlatShape_vecVec
+ Draw a FlatShape in the Unity Editor. (pos + rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatShape
+ flatShape
+
+
+
+
+
+
+
+ drawRectangle_baseRectQuat
+ drawRectangle_baseRectQuat
+ Draw a Rectangle in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Rectangle
+ rectangle
+
+
+
+
+
+
+
+ drawRectangle_baseRectVec
+ drawRectangle_baseRectVec
+ Draw a Rectangle in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Rectangle
+ rectangle
+
+
+
+
+
+
+
+ drawRectangle_vecQuat
+ drawRectangle_vecQuat
+ Draw a Rectangle in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Rectangle
+ rectangle
+
+
+
+
+
+
+
+ drawRectangle_vecVec
+ drawRectangle_vecVec
+ Draw a Rectangle in the Unity Editor. (pos + rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Rectangle
+ rectangle
+
+
+
+
+
+
+
+ drawBox2D_rect
+ drawBox2D_rect
+ Draw a Box2D in the Unity Editor. (defined via rect struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Box2D
+ box2D
+
+
+
+
+
+
+
+ drawBox2D_vec
+ drawBox2D_vec
+ Draw a Box2D in the Unity Editor. (defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Box2D
+ box2D
+
+
+
+
+
+
+
+ drawCircle2D_rect
+ drawCircle2D_rect
+ Draw a Circle2D in the Unity Editor. (defined via rect struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle2D
+ circle2D
+
+
+
+
+
+
+
+ drawCircle2D_vecRad
+ drawCircle2D_vecRad
+ Draw a Circle2D in the Unity Editor. (defined via vector and float as radius)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle2D
+ circle2D
+
+
+
+
+
+
+
+ drawCapsule2D_vecC1C2Pos
+ drawCapsule2D_vecC1C2Pos
+ Draw a Capsule2D in the Unity Editor. (defined via position of circle1 and circle2)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule2D
+ capsule2D
+
+
+
+
+
+
+
+ drawCapsule2D_rect
+ drawCapsule2D_rect
+ Draw a Capsule2D in the Unity Editor. (defined via rect struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule2D
+ capsule2D
+
+
+
+
+
+
+
+ drawCapsule2D_vecPosSize
+ drawCapsule2D_vecPosSize
+ Draw a Capsule2D in the Unity Editor. (defined via center position and size from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule2D
+ capsule2D
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawShapes.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawShapes.snippet.meta
new file mode 100644
index 0000000..fa84455
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawShapes.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: cc5a54140a7981f4ca82bd53b8d3472d
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawShapes_func.snippet b/Editor/DrawDebugLibrary/code snippets/drawShapes_func.snippet
new file mode 100644
index 0000000..57acbff
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawShapes_func.snippet
@@ -0,0 +1,4940 @@
+
+
+
+
+ drawRegularPolygon_rotViaQuat_func
+ drawRegularPolygon_rotViaQuat_func
+ Encapsulated in a function: Draw a RegularPolygon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RegularPolygon
+ WithThisName
+
+
+
+
+
+
+
+ drawRegularPolygon_rotViaVec_func
+ drawRegularPolygon_rotViaVec_func
+ Encapsulated in a function: Draw a RegularPolygon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RegularPolygon
+ WithThisName
+
+
+
+
+
+
+
+ drawTriangle_rotViaQuat_func
+ drawTriangle_rotViaQuat_func
+ Encapsulated in a function: Draw a Triangle in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Triangle
+ WithThisName
+
+
+
+
+
+
+
+ drawTriangle_rotViaVec_func
+ drawTriangle_rotViaVec_func
+ Encapsulated in a function: Draw a Triangle in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Triangle
+ WithThisName
+
+
+
+
+
+
+
+ drawSquare_rotViaQuat_func
+ drawSquare_rotViaQuat_func
+ Encapsulated in a function: Draw a Square in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Square
+ WithThisName
+
+
+
+
+
+
+
+ drawSquare_rotViaVec_func
+ drawSquare_rotViaVec_func
+ Encapsulated in a function: Draw a Square in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Square
+ WithThisName
+
+
+
+
+
+
+
+ drawPentagon_rotViaQuat_func
+ drawPentagon_rotViaQuat_func
+ Encapsulated in a function: Draw a Pentagon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pentagon
+ WithThisName
+
+
+
+
+
+
+
+ drawPentagon_rotViaVec_func
+ drawPentagon_rotViaVec_func
+ Encapsulated in a function: Draw a Pentagon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pentagon
+ WithThisName
+
+
+
+
+
+
+
+ drawHexagon_rotViaQuat_func
+ drawHexagon_rotViaQuat_func
+ Encapsulated in a function: Draw a Hexagon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Hexagon
+ WithThisName
+
+
+
+
+
+
+
+ drawHexagon_rotViaVec_func
+ drawHexagon_rotViaVec_func
+ Encapsulated in a function: Draw a Hexagon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Hexagon
+ WithThisName
+
+
+
+
+
+
+
+ drawSeptagon_rotViaQuat_func
+ drawSeptagon_rotViaQuat_func
+ Encapsulated in a function: Draw a Septagon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Septagon
+ WithThisName
+
+
+
+
+
+
+
+ drawSeptagon_rotViaVec_func
+ drawSeptagon_rotViaVec_func
+ Encapsulated in a function: Draw a Septagon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Septagon
+ WithThisName
+
+
+
+
+
+
+
+ drawOctagon_rotViaQuat_func
+ drawOctagon_rotViaQuat_func
+ Encapsulated in a function: Draw an Octagon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Octagon
+ WithThisName
+
+
+
+
+
+
+
+ drawOctagon_rotViaVec_func
+ drawOctagon_rotViaVec_func
+ Encapsulated in a function: Draw an Octagon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Octagon
+ WithThisName
+
+
+
+
+
+
+
+ drawDecagon_rotViaQuat_func
+ drawDecagon_rotViaQuat_func
+ Encapsulated in a function: Draw a Decagon in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Decagon
+ WithThisName
+
+
+
+
+
+
+
+ drawDecagon_rotViaVec_func
+ drawDecagon_rotViaVec_func
+ Encapsulated in a function: Draw a Decagon in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Decagon
+ WithThisName
+
+
+
+
+
+
+
+ drawCircle_rotViaQuat_func
+ drawCircle_rotViaQuat_func
+ Encapsulated in a function: Draw a Circle in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle
+ WithThisName
+
+
+
+
+
+
+
+ drawCircle_rotViaVec_func
+ drawCircle_rotViaVec_func
+ Encapsulated in a function: Draw a Circle in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle
+ WithThisName
+
+
+
+
+
+
+
+ drawEllipse_rotViaQuat_func
+ drawEllipse_rotViaQuat_func
+ Encapsulated in a function: Draw an Ellipse in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ellipse
+ WithThisName
+
+
+
+
+
+
+
+ drawEllipse_rotViaVec_func
+ drawEllipse_rotViaVec_func
+ Encapsulated in a function: Draw an Ellipse in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ellipse
+ WithThisName
+
+
+
+
+
+
+
+ drawStar_rotViaQuat_func
+ drawStar_rotViaQuat_func
+ Encapsulated in a function: Draw a Star in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Star
+ WithThisName
+
+
+
+
+
+
+
+ drawStar_rotViaVec_func
+ drawStar_rotViaVec_func
+ Encapsulated in a function: Draw a Star in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Star
+ WithThisName
+
+
+
+
+
+
+
+ drawFlatCapsule_vecC1C2Pos_func
+ drawFlatCapsule_vecC1C2Pos_func
+ Encapsulated in a function: Draw a FlatCapsule in the Unity Editor. (capsule defined via position of circle1 and circle2)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawFlatCapsule_rotViaQuat_func
+ drawFlatCapsule_rotViaQuat_func
+ Encapsulated in a function: Draw a FlatCapsule in the Unity Editor. (the rotation is defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawFlatCapsule_rotViaVec_func
+ drawFlatCapsule_rotViaVec_func
+ Encapsulated in a function: Draw a FlatCapsule in the Unity Editor. (the rotation is defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatCapsule
+ WithThisName
+
+
+
+
+
+
+
+ drawPlane_tr_func
+ drawPlane_tr_func
+ Encapsulated in a function: Draw a Plane in the Unity Editor. (defined via transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Plane
+ WithThisName
+
+
+
+
+
+
+
+ drawPlane_pl_func
+ drawPlane_pl_func
+ Encapsulated in a function: Draw a Plane in the Unity Editor. (defined via plane struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Plane
+ WithThisName
+
+
+
+
+
+
+
+ drawPlane_vec_func
+ drawPlane_vec_func
+ Encapsulated in a function: Draw a Plane in the Unity Editor. (defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Plane
+ WithThisName
+
+
+
+
+
+
+
+ drawRhombusAroundCenter_func
+ drawRhombusAroundCenter_func
+ Encapsulated in a function: Draw a RhombusAroundCenter in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn RhombusAroundCenter
+ WithThisName
+
+
+
+
+
+
+
+ drawRhombus_func
+ drawRhombus_func
+ Encapsulated in a function: Draw a Rhombus in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Rhombus
+ WithThisName
+
+
+
+
+
+
+
+ drawCube_tr_func
+ drawCube_tr_func
+ Encapsulated in a function: Draw a Cube in the Unity Editor. (defined via transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cube
+ WithThisName
+
+
+
+
+
+
+
+ drawCube_vecQuat_func
+ drawCube_vecQuat_func
+ Encapsulated in a function: Draw a Cube in the Unity Editor. pos defined via vector, rot defined via quaternion
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cube
+ WithThisName
+
+
+
+
+
+
+
+ drawCube_vecVec_func
+ drawCube_vecVec_func
+ Encapsulated in a function: Draw a Cube in the Unity Editor. both pos and rot defined via vectors
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cube
+ WithThisName
+
+
+
+
+
+
+
+ drawCubeFilled_tr_alpha_func
+ drawCubeFilled_tr_alpha_func
+ Encapsulated in a function: Draw a CubeFilled in the Unity Editor. (pos/size/rot from transform) (fill color same as strut color except lower alpha)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ WithThisName
+
+
+
+
+
+
+
+ drawCubeFilled_vecQuat_alpha_func
+ drawCubeFilled_vecQuat_alpha_func
+ Encapsulated in a function: Draw a CubeFilled in the Unity Editor. (pos from vector, rot from quaternion) (fill color same as strut color except lower alpha)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ WithThisName
+
+
+
+
+
+
+
+ drawCubeFilled_vecVec_alpha_func
+ drawCubeFilled_vecVec_alpha_func
+ Encapsulated in a function: Draw a CubeFilled in the Unity Editor. (pos/size/rot from vectors) (fill color same as strut color except lower alpha)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ WithThisName
+
+
+
+
+
+
+
+ drawCubeFilled_tr_2col_func
+ drawCubeFilled_tr_2col_func
+ Encapsulated in a function: Draw a CubeFilled in the Unity Editor. (pos/size/rot from transform) (fill color is different from strut color)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ WithThisName
+
+
+
+
+
+
+
+ drawCubeFilled_vecQuat_2col_func
+ drawCubeFilled_vecQuat_2col_func
+ Encapsulated in a function: Draw a CubeFilled in the Unity Editor. (pos from vector, rot from quaternion) (fill color is different from strut color)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ WithThisName
+
+
+
+
+
+
+
+ drawCubeFilled_vecVec_2col_func
+ drawCubeFilled_vecVec_2col_func
+ Encapsulated in a function: Draw a CubeFilled in the Unity Editor. (pos/size/rot from vectors) (fill color is different from strut color)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn CubeFilled
+ WithThisName
+
+
+
+
+
+
+
+ drawSphere_tr_func
+ drawSphere_tr_func
+ Encapsulated in a function: Draw a Sphere in the Unity Editor. (pos/size/rot from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Sphere
+ WithThisName
+
+
+
+
+
+
+
+ drawSphere_vecQuat_func
+ drawSphere_vecQuat_func
+ Encapsulated in a function: Draw a Sphere in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Sphere
+ WithThisName
+
+
+
+
+
+
+
+ drawSphere_vecVec_func
+ drawSphere_vecVec_func
+ Encapsulated in a function: Draw a Sphere in the Unity Editor. (pos/size/rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Sphere
+ WithThisName
+
+
+
+
+
+
+
+ drawEllipsoid_tr_func
+ drawEllipsoid_tr_func
+ Encapsulated in a function: Draw an Ellipsoid in the Unity Editor. (pos/size/rot from transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ellipsoid
+ WithThisName
+
+
+
+
+
+
+
+ drawEllipsoid_vecQuat_func
+ drawEllipsoid_vecQuat_func
+ Encapsulated in a function: Draw an Ellipsoid in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ellipsoid
+ WithThisName
+
+
+
+
+
+
+
+ drawEllipsoid_vecVec_func
+ drawEllipsoid_vecVec_func
+ Encapsulated in a function: Draw an Ellipsoid in the Unity Editor. (pos/size/rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Ellipsoid
+ WithThisName
+
+
+
+
+
+
+
+ drawEllipsoidNonUniform_vecQuat_func
+ drawEllipsoidNonUniform_vecQuat_func
+ Encapsulated in a function: Draw an EllipsoidNonUniform in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EllipsoidNonUniform
+ WithThisName
+
+
+
+
+
+
+
+ drawEllipsoidNonUniform_vecVec_func
+ drawEllipsoidNonUniform_vecVec_func
+ Encapsulated in a function: Draw an EllipsoidNonUniform in the Unity Editor. (pos/rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn EllipsoidNonUniform
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule_vecC1C2Pos_func
+ drawCapsule_vecC1C2Pos_func
+ Encapsulated in a function: Draw a Capsule in the Unity Editor. (defined via position of circle1 and circle2)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule_tr_func
+ drawCapsule_tr_func
+ Encapsulated in a function: Draw a Capsule in the Unity Editor. (defined via transform)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule_vecVecQuat_func
+ drawCapsule_vecVecQuat_func
+ Encapsulated in a function: Draw a Capsule in the Unity Editor. (pos from vector, size from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule_vecVecVec_func
+ drawCapsule_vecVecVec_func
+ Encapsulated in a function: Draw a Capsule in the Unity Editor. (pos/size/rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule_vecRadQuat_func
+ drawCapsule_vecRadQuat_func
+ Encapsulated in a function: Draw a Capsule in the Unity Editor. (pos from vector, radius from float, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule_vecRadVec_func
+ drawCapsule_vecRadVec_func
+ Encapsulated in a function: Draw a Capsule in the Unity Editor. (pos from vector, radius from float, rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule
+ WithThisName
+
+
+
+
+
+
+
+ drawPyramid_apexAnglesQuat_func
+ drawPyramid_apexAnglesQuat_func
+ Encapsulated in a function: Draw a Pyramid in the Unity Editor. (defined via apex pos and angles from there, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawPyramid_apexAnglesVec_func
+ drawPyramid_apexAnglesVec_func
+ Encapsulated in a function: Draw a Pyramid in the Unity Editor. (defined via apex pos and angles from there, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawPyramid_baseRectQuat_func
+ drawPyramid_baseRectQuat_func
+ Encapsulated in a function: Draw a Pyramid in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawPyramid_baseRectVec_func
+ drawPyramid_baseRectVec_func
+ Encapsulated in a function: Draw a Pyramid in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawPyramid_vecVecQuat_func
+ drawPyramid_vecVecQuat_func
+ Encapsulated in a function: Draw a Pyramid in the Unity Editor. (pos+size via vectors, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawPyramid_vecFloatQuat_func
+ drawPyramid_vecFloatQuat_func
+ Encapsulated in a function: Draw a Pyramid in the Unity Editor. (pos via vector, size via floats, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawPyramid_vecFloatVec_func
+ drawPyramid_vecFloatVec_func
+ Encapsulated in a function: Draw a Pyramid in the Unity Editor. (pos via vector, size via floats, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Pyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawCone_apexAnglesQuat_func
+ drawCone_apexAnglesQuat_func
+ Encapsulated in a function: Draw a Cone in the Unity Editor. (defined via apex pos and angles from there, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cone
+ WithThisName
+
+
+
+
+
+
+
+ drawCone_apexAnglesVec_func
+ drawCone_apexAnglesVec_func
+ Encapsulated in a function: Draw a Cone in the Unity Editor. (defined via apex pos and angles from there, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cone
+ WithThisName
+
+
+
+
+
+
+
+ drawCone_vecVecQuat_func
+ drawCone_vecVecQuat_func
+ Encapsulated in a function: Draw a Cone in the Unity Editor. (pos+size via vectors, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cone
+ WithThisName
+
+
+
+
+
+
+
+ drawCone_vecFloatQuat_func
+ drawCone_vecFloatQuat_func
+ Encapsulated in a function: Draw a Cone in the Unity Editor. (pos via vector, size via floats, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cone
+ WithThisName
+
+
+
+
+
+
+
+ drawCone_vecFloatVec_func
+ drawCone_vecFloatVec_func
+ Encapsulated in a function: Draw a Cone in the Unity Editor. (pos via vector, size via floats, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cone
+ WithThisName
+
+
+
+
+
+
+
+ drawConeFilled_apexAnglesQuat_func
+ drawConeFilled_apexAnglesQuat_func
+ Encapsulated in a function: Draw a ConeFilled in the Unity Editor. (defined via apex pos and angles from there, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ConeFilled
+ WithThisName
+
+
+
+
+
+
+
+ drawConeFilled_apexAnglesVec_func
+ drawConeFilled_apexAnglesVec_func
+ Encapsulated in a function: Draw a ConeFilled in the Unity Editor. (defined via apex pos and angles from there, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ConeFilled
+ WithThisName
+
+
+
+
+
+
+
+ drawConeFilled_vecVecQuat_func
+ drawConeFilled_vecVecQuat_func
+ Encapsulated in a function: Draw a ConeFilled in the Unity Editor. (pos+size via vectors, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ConeFilled
+ WithThisName
+
+
+
+
+
+
+
+ drawConeFilled_vecFloatQuat_func
+ drawConeFilled_vecFloatQuat_func
+ Encapsulated in a function: Draw a ConeFilled in the Unity Editor. (pos via vector, size via floats, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ConeFilled
+ WithThisName
+
+
+
+
+
+
+
+ drawConeFilled_vecFloatVec_func
+ drawConeFilled_vecFloatVec_func
+ Encapsulated in a function: Draw a ConeFilled in the Unity Editor. (pos via vector, size via floats, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ConeFilled
+ WithThisName
+
+
+
+
+
+
+
+ drawBipyramid_baseRectQuat_func
+ drawBipyramid_baseRectQuat_func
+ Encapsulated in a function: Draw a Bipyramid in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bipyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawBipyramid_baseRectVec_func
+ drawBipyramid_baseRectVec_func
+ Encapsulated in a function: Draw a Bipyramid in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bipyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawBipyramid_vecVecQuat_func
+ drawBipyramid_vecVecQuat_func
+ Encapsulated in a function: Draw a Bipyramid in the Unity Editor. (pos+size via vectors, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bipyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawBipyramid_vecFloatQuat_func
+ drawBipyramid_vecFloatQuat_func
+ Encapsulated in a function: Draw a Bipyramid in the Unity Editor. (pos via vector, size via floats, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bipyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawBipyramid_vecFloatVec_func
+ drawBipyramid_vecFloatVec_func
+ Encapsulated in a function: Draw a Bipyramid in the Unity Editor. (pos via vector, size via floats, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Bipyramid
+ WithThisName
+
+
+
+
+
+
+
+ drawCylinder_baseRectQuat_func
+ drawCylinder_baseRectQuat_func
+ Encapsulated in a function: Draw a Cylinder in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cylinder
+ WithThisName
+
+
+
+
+
+
+
+ drawCylinder_baseRectVec_func
+ drawCylinder_baseRectVec_func
+ Encapsulated in a function: Draw a Cylinder in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cylinder
+ WithThisName
+
+
+
+
+
+
+
+ drawCylinder_vecVecQuat_func
+ drawCylinder_vecVecQuat_func
+ Encapsulated in a function: Draw a Cylinder in the Unity Editor. (pos+size via vectors, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cylinder
+ WithThisName
+
+
+
+
+
+
+
+ drawCylinder_vecFloatQuat_func
+ drawCylinder_vecFloatQuat_func
+ Encapsulated in a function: Draw a Cylinder in the Unity Editor. (pos via vector, size via floats, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cylinder
+ WithThisName
+
+
+
+
+
+
+
+ drawCylinder_vecFloatVec_func
+ drawCylinder_vecFloatVec_func
+ Encapsulated in a function: Draw a Cylinder in the Unity Editor. (pos via vector, size via floats, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Cylinder
+ WithThisName
+
+
+
+
+
+
+
+ drawExtrusion_baseRectQuat_func
+ drawExtrusion_baseRectQuat_func
+ Encapsulated in a function: Draw an Extrusion in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Extrusion
+ WithThisName
+
+
+
+
+
+
+
+ drawExtrusion_baseRectVec_func
+ drawExtrusion_baseRectVec_func
+ Encapsulated in a function: Draw an Extrusion in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Extrusion
+ WithThisName
+
+
+
+
+
+
+
+ drawExtrusion_vecQuat_func
+ drawExtrusion_vecQuat_func
+ Encapsulated in a function: Draw an Extrusion in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Extrusion
+ WithThisName
+
+
+
+
+
+
+
+ drawExtrusion_vecVec_func
+ drawExtrusion_vecVec_func
+ Encapsulated in a function: Draw an Extrusion in the Unity Editor. (pos + rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Extrusion
+ WithThisName
+
+
+
+
+
+
+
+ drawFrustum_cam_func
+ drawFrustum_cam_func
+ Encapsulated in a function: Draw a Frustum in the Unity Editor. (specified via a camera component)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ WithThisName
+
+
+
+
+
+
+
+ drawFrustum_apexAndAngles_rotViaQuat_func
+ drawFrustum_apexAndAngles_rotViaQuat_func
+ Encapsulated in a function: Draw a Frustum in the Unity Editor. (defined via apex pos and angles from there, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ WithThisName
+
+
+
+
+
+
+
+ drawFrustum_apexAndAngles_rotViaVec_func
+ drawFrustum_apexAndAngles_rotViaVec_func
+ Encapsulated in a function: Draw a Frustum in the Unity Editor. (defined via apex pos and angles from there, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ WithThisName
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlaneRect_rotViaQuat_func
+ drawFrustum_bigClipPlaneRect_rotViaQuat_func
+ Encapsulated in a function: Draw a Frustum in the Unity Editor. (defined via rect struct as big clip plane, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ WithThisName
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlaneRect_rotViaVec_func
+ drawFrustum_bigClipPlaneRect_rotViaVec_func
+ Encapsulated in a function: Draw a Frustum in the Unity Editor. (defined via rect struct as big clip plane, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ WithThisName
+
+
+
+
+
+
+
+ drawFrustum_hull_func
+ drawFrustum_hull_func
+ Encapsulated in a function: Draw a Frustum in the Unity Editor. (defined via pos/size/rot of a hull box)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ WithThisName
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlanePos_distanceToSmallAndApex_rotViaQuat_func
+ drawFrustum_bigClipPlanePos_distanceToSmallAndApex_rotViaQuat_func
+ Encapsulated in a function: Draw a Frustum in the Unity Editor. (defined via big clip plane center and distances to small clip plane and apex, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ WithThisName
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlanePos_distanceToSmallAndApex_rotViaVec_func
+ drawFrustum_bigClipPlanePos_distanceToSmallAndApex_rotViaVec_func
+ Encapsulated in a function: Draw a Frustum in the Unity Editor. (defined via big clip plane center and distances to small clip plane and apex, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ WithThisName
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlanePos_sizeFactorToSmall_rotViaQuat_func
+ drawFrustum_bigClipPlanePos_sizeFactorToSmall_rotViaQuat_func
+ Encapsulated in a function: Draw a Frustum in the Unity Editor. (defined via big clip plane center and size scale factor for small clip plane, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ WithThisName
+
+
+
+
+
+
+
+ drawFrustum_bigClipPlanePos_sizeFactorToSmall_rotViaVec_func
+ drawFrustum_bigClipPlanePos_sizeFactorToSmall_rotViaVec_func
+ Encapsulated in a function: Draw a Frustum in the Unity Editor. (defined via big clip plane center and size scale factor for small clip plane, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ WithThisName
+
+
+
+
+
+
+
+ drawFrustum_clipPlanesPos_func
+ drawFrustum_clipPlanesPos_func
+ Encapsulated in a function: Draw a Frustum in the Unity Editor. (defined via position of big and of small clip plane)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Frustum
+ WithThisName
+
+
+
+
+
+
+
+ drawFlatShape_baseRectQuat_func
+ drawFlatShape_baseRectQuat_func
+ Encapsulated in a function: Draw a FlatShape in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatShape
+ WithThisName
+
+
+
+
+
+
+
+ drawFlatShape_baseRectVec_func
+ drawFlatShape_baseRectVec_func
+ Encapsulated in a function: Draw a FlatShape in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatShape
+ WithThisName
+
+
+
+
+
+
+
+ drawFlatShape_vecQuat_func
+ drawFlatShape_vecQuat_func
+ Encapsulated in a function: Draw a FlatShape in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatShape
+ WithThisName
+
+
+
+
+
+
+
+ drawFlatShape_vecVec_func
+ drawFlatShape_vecVec_func
+ Encapsulated in a function: Draw a FlatShape in the Unity Editor. (pos + rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn FlatShape
+ WithThisName
+
+
+
+
+
+
+
+ drawRectangle_baseRectQuat_func
+ drawRectangle_baseRectQuat_func
+ Encapsulated in a function: Draw a Rectangle in the Unity Editor. (defined via rect struct as base, rotation via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Rectangle
+ WithThisName
+
+
+
+
+
+
+
+ drawRectangle_baseRectVec_func
+ drawRectangle_baseRectVec_func
+ Encapsulated in a function: Draw a Rectangle in the Unity Editor. (defined via rect struct as base, rotation via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Rectangle
+ WithThisName
+
+
+
+
+
+
+
+ drawRectangle_vecQuat_func
+ drawRectangle_vecQuat_func
+ Encapsulated in a function: Draw a Rectangle in the Unity Editor. (pos from vector, rot from quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Rectangle
+ WithThisName
+
+
+
+
+
+
+
+ drawRectangle_vecVec_func
+ drawRectangle_vecVec_func
+ Encapsulated in a function: Draw a Rectangle in the Unity Editor. (pos + rot from vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Rectangle
+ WithThisName
+
+
+
+
+
+
+
+ drawBox2D_rect_func
+ drawBox2D_rect_func
+ Encapsulated in a function: Draw a Box2D in the Unity Editor. (defined via rect struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Box2D
+ WithThisName
+
+
+
+
+
+
+
+ drawBox2D_vec_func
+ drawBox2D_vec_func
+ Encapsulated in a function: Draw a Box2D in the Unity Editor. (defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Box2D
+ WithThisName
+
+
+
+
+
+
+
+ drawCircle2D_rect_func
+ drawCircle2D_rect_func
+ Encapsulated in a function: Draw a Circle2D in the Unity Editor. (defined via rect struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle2D
+ WithThisName
+
+
+
+
+
+
+
+ drawCircle2D_vecRad_func
+ drawCircle2D_vecRad_func
+ Encapsulated in a function: Draw a Circle2D in the Unity Editor. (defined via vector and float as radius)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Circle2D
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule2D_vecC1C2Pos_func
+ drawCapsule2D_vecC1C2Pos_func
+ Encapsulated in a function: Draw a Capsule2D in the Unity Editor. (defined via position of circle1 and circle2)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule2D
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule2D_rect_func
+ drawCapsule2D_rect_func
+ Encapsulated in a function: Draw a Capsule2D in the Unity Editor. (defined via rect struct)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule2D
+ WithThisName
+
+
+
+
+
+
+
+ drawCapsule2D_vecPosSize_func
+ drawCapsule2D_vecPosSize_func
+ Encapsulated in a function: Draw a Capsule2D in the Unity Editor. (defined via center position and size from vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Capsule2D
+ WithThisName
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawShapes_func.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawShapes_func.snippet.meta
new file mode 100644
index 0000000..1ecced2
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawShapes_func.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: a74eae24b1e87d04da1a0a997ce7cefd
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawText.snippet b/Editor/DrawDebugLibrary/code snippets/drawText.snippet
new file mode 100644
index 0000000..f71192c
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawText.snippet
@@ -0,0 +1,4581 @@
+
+
+
+
+ drawTextScreenspace_3Dpos_dirViaVec
+ drawTextScreenspace_3Dpos_dirViaVec
+ Draw TextScreenspace in the Unity Editor. (position defined in 3D worldspace) (text direction defined via vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ textScreenspace
+
+
+
+
+
+
+
+ drawTextScreenspace_3Dpos_dirViaVec_cam
+ drawTextScreenspace_3Dpos_dirViaVec_cam
+ Draw TextScreenspace in the Unity Editor. (position defined in 3D worldspace) (text direction defined via vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ textScreenspace
+
+
+
+
+
+
+
+ drawTextScreenspace_2Dpos_dirViaVec
+ drawTextScreenspace_2Dpos_dirViaVec
+ Draw TextScreenspace in the Unity Editor. (position defined in 2D screenspace) (text direction defined via vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ textScreenspace
+
+
+
+
+
+
+
+ drawTextScreenspace_2Dpos_dirViaVec_cam
+ drawTextScreenspace_2Dpos_dirViaVec_cam
+ Draw TextScreenspace in the Unity Editor. (position defined in 2D screenspace) (text direction defined via vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ textScreenspace
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_3Dpos_dirViaVec
+ drawTextScreenspaceFramed_3Dpos_dirViaVec
+ Draw TextScreenspaceFramed in the Unity Editor. (position defined in 3D worldspace) (text direction defined via vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ textScreenspaceFramed
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_3Dpos_dirViaVec_cam
+ drawTextScreenspaceFramed_3Dpos_dirViaVec_cam
+ Draw TextScreenspaceFramed in the Unity Editor. (position defined in 3D worldspace) (text direction defined via vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ textScreenspaceFramed
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_2Dpos_dirViaVec
+ drawTextScreenspaceFramed_2Dpos_dirViaVec
+ Draw TextScreenspaceFramed in the Unity Editor. (position defined in 2D screenspace) (text direction defined via vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ textScreenspaceFramed
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_2Dpos_dirViaVec_cam
+ drawTextScreenspaceFramed_2Dpos_dirViaVec_cam
+ Draw TextScreenspaceFramed in the Unity Editor. (position defined in 2D screenspace) (text direction defined via vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ textScreenspaceFramed
+
+
+
+
+
+
+
+ drawTextScreenspace_3Dpos_dirViaAngle
+ drawTextScreenspace_3Dpos_dirViaAngle
+ Draw TextScreenspace in the Unity Editor. (position defined in 3D worldspace) (text direction defined via angle) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ textScreenspace
+
+
+
+
+
+
+
+ drawTextScreenspace_3Dpos_dirViaAngle_cam
+ drawTextScreenspace_3Dpos_dirViaAngle_cam
+ Draw TextScreenspace in the Unity Editor. (position defined in 3D worldspace) (text direction defined via angle) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ textScreenspace
+
+
+
+
+
+
+
+ drawTextScreenspace_2Dpos_dirViaAngle
+ drawTextScreenspace_2Dpos_dirViaAngle
+ Draw TextScreenspace in the Unity Editor. (position defined in 2D screenspace) (text direction defined via angle) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ textScreenspace
+
+
+
+
+
+
+
+ drawTextScreenspace_2Dpos_dirViaAngle_cam
+ drawTextScreenspace_2Dpos_dirViaAngle_cam
+ Draw TextScreenspace in the Unity Editor. (position defined in 2D screenspace) (text direction defined via angle) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ textScreenspace
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_3Dpos_dirViaAngle
+ drawTextScreenspaceFramed_3Dpos_dirViaAngle
+ Draw TextScreenspaceFramed in the Unity Editor. (position defined in 3D worldspace) (text direction defined via angle) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ textScreenspaceFramed
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_3Dpos_dirViaAngle_cam
+ drawTextScreenspaceFramed_3Dpos_dirViaAngle_cam
+ Draw TextScreenspaceFramed in the Unity Editor. (position defined in 3D worldspace) (text direction defined via angle) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ textScreenspaceFramed
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_2Dpos_dirViaAngle
+ drawTextScreenspaceFramed_2Dpos_dirViaAngle
+ Draw TextScreenspaceFramed in the Unity Editor. (position defined in 2D screenspace) (text direction defined via angle) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ textScreenspaceFramed
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_2Dpos_dirViaAngle_cam
+ drawTextScreenspaceFramed_2Dpos_dirViaAngle_cam
+ Draw TextScreenspaceFramed in the Unity Editor. (position defined in 2D screenspace) (text direction defined via angle) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ textScreenspaceFramed
+
+
+
+
+
+
+
+ drawText2D_dirViaVec
+ drawText2D_dirViaVec
+ Draw Text2D in the Unity Editor. (text direction defined via vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text2D
+ text2D
+
+
+
+
+
+
+
+ drawText2DFramed_dirViaVec
+ drawText2DFramed_dirViaVec
+ Draw Text2DFramed in the Unity Editor. (text direction defined via vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text2DFramed
+ text2DFramed
+
+
+
+
+
+
+
+ drawText2D_dirViaAngle
+ drawText2D_dirViaAngle
+ Draw Text2D in the Unity Editor. (text direction defined via angle)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text2D
+ text2D
+
+
+
+
+
+
+
+ drawText2DFramed_dirViaAngle
+ drawText2DFramed_dirViaAngle
+ Draw Text2DFramed in the Unity Editor. (text direction defined via angle)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text2DFramed
+ text2DFramed
+
+
+
+
+
+
+
+ drawText_dirViaQuat
+ drawText_dirViaQuat
+ Draw Text in the Unity Editor. (text direction defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text
+ text
+
+
+
+
+
+
+
+ drawTextFramed_dirViaQuat
+ drawTextFramed_dirViaQuat
+ Draw TextFramed in the Unity Editor. (text direction defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextFramed
+ textFramed
+
+
+
+
+
+
+
+ drawText_dirViaVec
+ drawText_dirViaVec
+ Draw Text in the Unity Editor. (text direction defined via vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text
+ text
+
+
+
+
+
+
+
+ drawTextFramed_dirViaVec
+ drawTextFramed_dirViaVec
+ Draw TextFramed in the Unity Editor. (text direction defined via vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextFramed
+ textFramed
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_viaStartPos
+ drawTextOnCircleScreenspace_viaStartPos
+ Draw TextOnCircleScreenspace in the Unity Editor. (defined via text start position, instead of circle center position) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ textOnCircleScreenspace
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_viaStartPos_cam
+ drawTextOnCircleScreenspace_viaStartPos_cam
+ Draw TextOnCircleScreenspace in the Unity Editor. (defined via text start position, instead of circle center position) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ textOnCircleScreenspace
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_dirViaVecUp
+ drawTextOnCircleScreenspace_dirViaVecUp
+ Draw TextOnCircleScreenspace in the Unity Editor. (text initial upDirection defined via vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ textOnCircleScreenspace
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_dirViaVecUp_cam
+ drawTextOnCircleScreenspace_dirViaVecUp_cam
+ Draw TextOnCircleScreenspace in the Unity Editor. (text initial upDirection defined via vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ textOnCircleScreenspace
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_dirViaAngle
+ drawTextOnCircleScreenspace_dirViaAngle
+ Draw TextOnCircleScreenspace in the Unity Editor. (initial text direction defined via angle) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ textOnCircleScreenspace
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_dirViaAngle_cam
+ drawTextOnCircleScreenspace_dirViaAngle_cam
+ Draw TextOnCircleScreenspace in the Unity Editor. (initial text direction defined via angle) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ textOnCircleScreenspace
+
+
+
+
+
+
+
+ drawTextOnCircle2D_viaStartPos
+ drawTextOnCircle2D_viaStartPos
+ Draw TextOnCircle2D in the Unity Editor. (defined via text start position, instead of circle center position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle2D
+ textOnCircle2D
+
+
+
+
+
+
+
+ drawTextOnCircle2D_dirViaVecUp
+ drawTextOnCircle2D_dirViaVecUp
+ Draw TextOnCircle2D in the Unity Editor. (text initial upDirection defined via vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle2D
+ textOnCircle2D
+
+
+
+
+
+
+
+ drawTextOnCircle2D_dirViaAngle
+ drawTextOnCircle2D_dirViaAngle
+ Draw TextOnCircle2D in the Unity Editor. (initial text direction defined via angle)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle2D
+ textOnCircle2D
+
+
+
+
+
+
+
+ drawTextOnCircle_viaStartPos
+ drawTextOnCircle_viaStartPos
+ Draw TextOnCircle in the Unity Editor. (defined via text start position, instead of circle center position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle
+ textOnCircle
+
+
+
+
+
+
+
+ drawTextOnCircle_viaQuat
+ drawTextOnCircle_viaQuat
+ Draw TextOnCircle in the Unity Editor. (orientation defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle
+ textOnCircle
+
+
+
+
+
+
+
+ drawTextOnCircle_viaVec
+ drawTextOnCircle_viaVec
+ Draw TextOnCircle in the Unity Editor. (orientation defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle
+ textOnCircle
+
+
+
+
+
+
+
+ drawArrayOfBool
+ drawArrayOfBool
+ Draw ArrayOfBool in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ arrayOfBool
+
+
+
+
+
+
+
+ drawArrayOfBool_in2D
+ drawArrayOfBool_in2D
+ Draw ArrayOfBool in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ arrayOfBool
+
+
+
+
+
+
+
+ drawArrayOfBool_screenspace_3Dpos
+ drawArrayOfBool_screenspace_3Dpos
+ Draw ArrayOfBool in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ arrayOfBool
+
+
+
+
+
+
+
+ drawArrayOfBool_screenspace_3Dpos_cam
+ drawArrayOfBool_screenspace_3Dpos_cam
+ Draw ArrayOfBool in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ arrayOfBool
+
+
+
+
+
+
+
+ drawArrayOfBool_screenspace_2Dpos
+ drawArrayOfBool_screenspace_2Dpos
+ Draw ArrayOfBool in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ arrayOfBool
+
+
+
+
+
+
+
+ drawArrayOfBool_screenspace_2Dpos_cam
+ drawArrayOfBool_screenspace_2Dpos_cam
+ Draw ArrayOfBool in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ arrayOfBool
+
+
+
+
+
+
+
+ drawListOfBool
+ drawListOfBool
+ Draw ListOfBool in the Unity Editor.
+ Draw XXL
+
+
+
+ boolList_of_$name$ = $end$;
+ Vector3 position_of_$name$ = default(Vector3);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ Quaternion rotation_of_$name$ = default(Quaternion);
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList(boolList_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, rotation_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ listOfBool
+
+
+
+
+
+
+
+ drawListOfBool_in2D
+ drawListOfBool_in2D
+ Draw ListOfBool in the Unity Editor.
+ Draw XXL
+
+
+
+ boolList_of_$name$ = $end$;
+ Vector2 position_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList2D(boolList_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, custom_zPos_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ listOfBool
+
+
+
+
+
+
+
+ drawListOfBool_screenspace_3Dpos
+ drawListOfBool_screenspace_3Dpos
+ Draw ListOfBool in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ boolList_of_$name$ = $end$;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(boolList_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ listOfBool
+
+
+
+
+
+
+
+ drawListOfBool_screenspace_3Dpos_cam
+ drawListOfBool_screenspace_3Dpos_cam
+ Draw ListOfBool in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ boolList_of_$name$ = ;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, boolList_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ listOfBool
+
+
+
+
+
+
+
+ drawListOfBool_screenspace_2Dpos
+ drawListOfBool_screenspace_2Dpos
+ Draw ListOfBool in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ boolList_of_$name$ = $end$;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(boolList_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ listOfBool
+
+
+
+
+
+
+
+ drawListOfBool_screenspace_2Dpos_cam
+ drawListOfBool_screenspace_2Dpos_cam
+ Draw ListOfBool in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ boolList_of_$name$ = ;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, boolList_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ listOfBool
+
+
+
+
+
+
+
+ drawArrayOfInt
+ drawArrayOfInt
+ Draw ArrayOfInt in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ arrayOfInt
+
+
+
+
+
+
+
+ drawArrayOfInt_in2D
+ drawArrayOfInt_in2D
+ Draw ArrayOfInt in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ arrayOfInt
+
+
+
+
+
+
+
+ drawArrayOfInt_screenspace_3Dpos
+ drawArrayOfInt_screenspace_3Dpos
+ Draw ArrayOfInt in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ arrayOfInt
+
+
+
+
+
+
+
+ drawArrayOfInt_screenspace_3Dpos_cam
+ drawArrayOfInt_screenspace_3Dpos_cam
+ Draw ArrayOfInt in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ arrayOfInt
+
+
+
+
+
+
+
+ drawArrayOfInt_screenspace_2Dpos
+ drawArrayOfInt_screenspace_2Dpos
+ Draw ArrayOfInt in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ arrayOfInt
+
+
+
+
+
+
+
+ drawArrayOfInt_screenspace_2Dpos_cam
+ drawArrayOfInt_screenspace_2Dpos_cam
+ Draw ArrayOfInt in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ arrayOfInt
+
+
+
+
+
+
+
+ drawListOfInt
+ drawListOfInt
+ Draw ListOfInt in the Unity Editor.
+ Draw XXL
+
+
+
+ intList_of_$name$ = $end$;
+ Vector3 position_of_$name$ = default(Vector3);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ Quaternion rotation_of_$name$ = default(Quaternion);
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList(intList_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, rotation_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ listOfInt
+
+
+
+
+
+
+
+ drawListOfInt_in2D
+ drawListOfInt_in2D
+ Draw ListOfInt in the Unity Editor.
+ Draw XXL
+
+
+
+ intList_of_$name$ = $end$;
+ Vector2 position_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList2D(intList_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, custom_zPos_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ listOfInt
+
+
+
+
+
+
+
+ drawListOfInt_screenspace_3Dpos
+ drawListOfInt_screenspace_3Dpos
+ Draw ListOfInt in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ intList_of_$name$ = $end$;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(intList_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ listOfInt
+
+
+
+
+
+
+
+ drawListOfInt_screenspace_3Dpos_cam
+ drawListOfInt_screenspace_3Dpos_cam
+ Draw ListOfInt in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ intList_of_$name$ = ;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, intList_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ listOfInt
+
+
+
+
+
+
+
+ drawListOfInt_screenspace_2Dpos
+ drawListOfInt_screenspace_2Dpos
+ Draw ListOfInt in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ intList_of_$name$ = $end$;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(intList_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ listOfInt
+
+
+
+
+
+
+
+ drawListOfInt_screenspace_2Dpos_cam
+ drawListOfInt_screenspace_2Dpos_cam
+ Draw ListOfInt in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ intList_of_$name$ = ;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, intList_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ listOfInt
+
+
+
+
+
+
+
+ drawArrayOfFloat
+ drawArrayOfFloat
+ Draw ArrayOfFloat in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ arrayOfFloat
+
+
+
+
+
+
+
+ drawArrayOfFloat_in2D
+ drawArrayOfFloat_in2D
+ Draw ArrayOfFloat in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ arrayOfFloat
+
+
+
+
+
+
+
+ drawArrayOfFloat_screenspace_3Dpos
+ drawArrayOfFloat_screenspace_3Dpos
+ Draw ArrayOfFloat in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ arrayOfFloat
+
+
+
+
+
+
+
+ drawArrayOfFloat_screenspace_3Dpos_cam
+ drawArrayOfFloat_screenspace_3Dpos_cam
+ Draw ArrayOfFloat in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ arrayOfFloat
+
+
+
+
+
+
+
+ drawArrayOfFloat_screenspace_2Dpos
+ drawArrayOfFloat_screenspace_2Dpos
+ Draw ArrayOfFloat in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ arrayOfFloat
+
+
+
+
+
+
+
+ drawArrayOfFloat_screenspace_2Dpos_cam
+ drawArrayOfFloat_screenspace_2Dpos_cam
+ Draw ArrayOfFloat in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ arrayOfFloat
+
+
+
+
+
+
+
+ drawListOfFloat
+ drawListOfFloat
+ Draw ListOfFloat in the Unity Editor.
+ Draw XXL
+
+
+
+ floatList_of_$name$ = $end$;
+ Vector3 position_of_$name$ = default(Vector3);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ Quaternion rotation_of_$name$ = default(Quaternion);
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList(floatList_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, rotation_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ listOfFloat
+
+
+
+
+
+
+
+ drawListOfFloat_in2D
+ drawListOfFloat_in2D
+ Draw ListOfFloat in the Unity Editor.
+ Draw XXL
+
+
+
+ floatList_of_$name$ = $end$;
+ Vector2 position_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList2D(floatList_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, custom_zPos_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ listOfFloat
+
+
+
+
+
+
+
+ drawListOfFloat_screenspace_3Dpos
+ drawListOfFloat_screenspace_3Dpos
+ Draw ListOfFloat in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ floatList_of_$name$ = $end$;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(floatList_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ listOfFloat
+
+
+
+
+
+
+
+ drawListOfFloat_screenspace_3Dpos_cam
+ drawListOfFloat_screenspace_3Dpos_cam
+ Draw ListOfFloat in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ floatList_of_$name$ = ;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, floatList_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ listOfFloat
+
+
+
+
+
+
+
+ drawListOfFloat_screenspace_2Dpos
+ drawListOfFloat_screenspace_2Dpos
+ Draw ListOfFloat in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ floatList_of_$name$ = $end$;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(floatList_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ listOfFloat
+
+
+
+
+
+
+
+ drawListOfFloat_screenspace_2Dpos_cam
+ drawListOfFloat_screenspace_2Dpos_cam
+ Draw ListOfFloat in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ floatList_of_$name$ = ;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, floatList_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ listOfFloat
+
+
+
+
+
+
+
+ drawArrayOfString
+ drawArrayOfString
+ Draw ArrayOfString in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ arrayOfString
+
+
+
+
+
+
+
+ drawArrayOfString_in2D
+ drawArrayOfString_in2D
+ Draw ArrayOfString in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ arrayOfString
+
+
+
+
+
+
+
+ drawArrayOfString_screenspace_3Dpos
+ drawArrayOfString_screenspace_3Dpos
+ Draw ArrayOfString in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ arrayOfString
+
+
+
+
+
+
+
+ drawArrayOfString_screenspace_3Dpos_cam
+ drawArrayOfString_screenspace_3Dpos_cam
+ Draw ArrayOfString in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ arrayOfString
+
+
+
+
+
+
+
+ drawArrayOfString_screenspace_2Dpos
+ drawArrayOfString_screenspace_2Dpos
+ Draw ArrayOfString in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ arrayOfString
+
+
+
+
+
+
+
+ drawArrayOfString_screenspace_2Dpos_cam
+ drawArrayOfString_screenspace_2Dpos_cam
+ Draw ArrayOfString in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ arrayOfString
+
+
+
+
+
+
+
+ drawListOfString
+ drawListOfString
+ Draw ListOfString in the Unity Editor.
+ Draw XXL
+
+
+
+ stringList_of_$name$ = $end$;
+ Vector3 position_of_$name$ = default(Vector3);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ Quaternion rotation_of_$name$ = default(Quaternion);
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList(stringList_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, rotation_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ listOfString
+
+
+
+
+
+
+
+ drawListOfString_in2D
+ drawListOfString_in2D
+ Draw ListOfString in the Unity Editor.
+ Draw XXL
+
+
+
+ stringList_of_$name$ = $end$;
+ Vector2 position_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList2D(stringList_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, custom_zPos_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ listOfString
+
+
+
+
+
+
+
+ drawListOfString_screenspace_3Dpos
+ drawListOfString_screenspace_3Dpos
+ Draw ListOfString in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ stringList_of_$name$ = $end$;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(stringList_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ listOfString
+
+
+
+
+
+
+
+ drawListOfString_screenspace_3Dpos_cam
+ drawListOfString_screenspace_3Dpos_cam
+ Draw ListOfString in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ stringList_of_$name$ = ;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, stringList_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ listOfString
+
+
+
+
+
+
+
+ drawListOfString_screenspace_2Dpos
+ drawListOfString_screenspace_2Dpos
+ Draw ListOfString in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ stringList_of_$name$ = $end$;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(stringList_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ listOfString
+
+
+
+
+
+
+
+ drawListOfString_screenspace_2Dpos_cam
+ drawListOfString_screenspace_2Dpos_cam
+ Draw ListOfString in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ stringList_of_$name$ = ;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, stringList_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ listOfString
+
+
+
+
+
+
+
+ drawArrayOfVector2
+ drawArrayOfVector2
+ Draw ArrayOfVector2 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ arrayOfVector2
+
+
+
+
+
+
+
+ drawArrayOfVector2_in2D
+ drawArrayOfVector2_in2D
+ Draw ArrayOfVector2 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ arrayOfVector2
+
+
+
+
+
+
+
+ drawArrayOfVector2_screenspace_3Dpos
+ drawArrayOfVector2_screenspace_3Dpos
+ Draw ArrayOfVector2 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ arrayOfVector2
+
+
+
+
+
+
+
+ drawArrayOfVector2_screenspace_3Dpos_cam
+ drawArrayOfVector2_screenspace_3Dpos_cam
+ Draw ArrayOfVector2 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ arrayOfVector2
+
+
+
+
+
+
+
+ drawArrayOfVector2_screenspace_2Dpos
+ drawArrayOfVector2_screenspace_2Dpos
+ Draw ArrayOfVector2 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ arrayOfVector2
+
+
+
+
+
+
+
+ drawArrayOfVector2_screenspace_2Dpos_cam
+ drawArrayOfVector2_screenspace_2Dpos_cam
+ Draw ArrayOfVector2 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ arrayOfVector2
+
+
+
+
+
+
+
+ drawListOfVector2
+ drawListOfVector2
+ Draw ListOfVector2 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector2List_of_$name$ = $end$;
+ Vector3 position_of_$name$ = default(Vector3);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ Quaternion rotation_of_$name$ = default(Quaternion);
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList(vector2List_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, rotation_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ listOfVector2
+
+
+
+
+
+
+
+ drawListOfVector2_in2D
+ drawListOfVector2_in2D
+ Draw ListOfVector2 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector2List_of_$name$ = $end$;
+ Vector2 position_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList2D(vector2List_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, custom_zPos_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ listOfVector2
+
+
+
+
+
+
+
+ drawListOfVector2_screenspace_3Dpos
+ drawListOfVector2_screenspace_3Dpos
+ Draw ListOfVector2 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector2List_of_$name$ = $end$;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(vector2List_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ listOfVector2
+
+
+
+
+
+
+
+ drawListOfVector2_screenspace_3Dpos_cam
+ drawListOfVector2_screenspace_3Dpos_cam
+ Draw ListOfVector2 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector2List_of_$name$ = ;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, vector2List_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ listOfVector2
+
+
+
+
+
+
+
+ drawListOfVector2_screenspace_2Dpos
+ drawListOfVector2_screenspace_2Dpos
+ Draw ListOfVector2 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector2List_of_$name$ = $end$;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(vector2List_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ listOfVector2
+
+
+
+
+
+
+
+ drawListOfVector2_screenspace_2Dpos_cam
+ drawListOfVector2_screenspace_2Dpos_cam
+ Draw ListOfVector2 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector2List_of_$name$ = ;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, vector2List_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ listOfVector2
+
+
+
+
+
+
+
+ drawArrayOfVector3
+ drawArrayOfVector3
+ Draw ArrayOfVector3 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ arrayOfVector3
+
+
+
+
+
+
+
+ drawArrayOfVector3_in2D
+ drawArrayOfVector3_in2D
+ Draw ArrayOfVector3 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ arrayOfVector3
+
+
+
+
+
+
+
+ drawArrayOfVector3_screenspace_3Dpos
+ drawArrayOfVector3_screenspace_3Dpos
+ Draw ArrayOfVector3 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ arrayOfVector3
+
+
+
+
+
+
+
+ drawArrayOfVector3_screenspace_3Dpos_cam
+ drawArrayOfVector3_screenspace_3Dpos_cam
+ Draw ArrayOfVector3 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ arrayOfVector3
+
+
+
+
+
+
+
+ drawArrayOfVector3_screenspace_2Dpos
+ drawArrayOfVector3_screenspace_2Dpos
+ Draw ArrayOfVector3 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ arrayOfVector3
+
+
+
+
+
+
+
+ drawArrayOfVector3_screenspace_2Dpos_cam
+ drawArrayOfVector3_screenspace_2Dpos_cam
+ Draw ArrayOfVector3 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ arrayOfVector3
+
+
+
+
+
+
+
+ drawListOfVector3
+ drawListOfVector3
+ Draw ListOfVector3 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector3List_of_$name$ = $end$;
+ Vector3 position_of_$name$ = default(Vector3);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ Quaternion rotation_of_$name$ = default(Quaternion);
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList(vector3List_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, rotation_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ listOfVector3
+
+
+
+
+
+
+
+ drawListOfVector3_in2D
+ drawListOfVector3_in2D
+ Draw ListOfVector3 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector3List_of_$name$ = $end$;
+ Vector2 position_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList2D(vector3List_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, custom_zPos_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ listOfVector3
+
+
+
+
+
+
+
+ drawListOfVector3_screenspace_3Dpos
+ drawListOfVector3_screenspace_3Dpos
+ Draw ListOfVector3 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector3List_of_$name$ = $end$;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(vector3List_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ listOfVector3
+
+
+
+
+
+
+
+ drawListOfVector3_screenspace_3Dpos_cam
+ drawListOfVector3_screenspace_3Dpos_cam
+ Draw ListOfVector3 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector3List_of_$name$ = ;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, vector3List_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ listOfVector3
+
+
+
+
+
+
+
+ drawListOfVector3_screenspace_2Dpos
+ drawListOfVector3_screenspace_2Dpos
+ Draw ListOfVector3 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector3List_of_$name$ = $end$;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(vector3List_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ listOfVector3
+
+
+
+
+
+
+
+ drawListOfVector3_screenspace_2Dpos_cam
+ drawListOfVector3_screenspace_2Dpos_cam
+ Draw ListOfVector3 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector3List_of_$name$ = ;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, vector3List_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ listOfVector3
+
+
+
+
+
+
+
+ drawArrayOfVector4
+ drawArrayOfVector4
+ Draw ArrayOfVector4 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ arrayOfVector4
+
+
+
+
+
+
+
+ drawArrayOfVector4_in2D
+ drawArrayOfVector4_in2D
+ Draw ArrayOfVector4 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ arrayOfVector4
+
+
+
+
+
+
+
+ drawArrayOfVector4_screenspace_3Dpos
+ drawArrayOfVector4_screenspace_3Dpos
+ Draw ArrayOfVector4 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ arrayOfVector4
+
+
+
+
+
+
+
+ drawArrayOfVector4_screenspace_3Dpos_cam
+ drawArrayOfVector4_screenspace_3Dpos_cam
+ Draw ArrayOfVector4 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ arrayOfVector4
+
+
+
+
+
+
+
+ drawArrayOfVector4_screenspace_2Dpos
+ drawArrayOfVector4_screenspace_2Dpos
+ Draw ArrayOfVector4 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ arrayOfVector4
+
+
+
+
+
+
+
+ drawArrayOfVector4_screenspace_2Dpos_cam
+ drawArrayOfVector4_screenspace_2Dpos_cam
+ Draw ArrayOfVector4 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ arrayOfVector4
+
+
+
+
+
+
+
+ drawListOfVector4
+ drawListOfVector4
+ Draw ListOfVector4 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector4List_of_$name$ = $end$;
+ Vector3 position_of_$name$ = default(Vector3);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ Quaternion rotation_of_$name$ = default(Quaternion);
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList(vector4List_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, rotation_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ listOfVector4
+
+
+
+
+
+
+
+ drawListOfVector4_in2D
+ drawListOfVector4_in2D
+ Draw ListOfVector4 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector4List_of_$name$ = $end$;
+ Vector2 position_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_of_$name$ = 0.05f;
+ float forceHeightOfWholeTableBox_of_$name$ = 0.0f;
+ float custom_zPos_of_$name$ = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft_of_$name$ = true;
+ float durationInSec_of_$name$ = 0.0f;
+ bool hiddenByNearerObjects_of_$name$ = true;
+ DrawText.WriteList2D(vector4List_of_$name$, position_of_$name$, color_of_$name$, title_of_$name$, textSize_of_$name$, forceHeightOfWholeTableBox_of_$name$, custom_zPos_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$, hiddenByNearerObjects_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ listOfVector4
+
+
+
+
+
+
+
+ drawListOfVector4_screenspace_3Dpos
+ drawListOfVector4_screenspace_3Dpos
+ Draw ListOfVector4 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector4List_of_$name$ = $end$;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(vector4List_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ listOfVector4
+
+
+
+
+
+
+
+ drawListOfVector4_screenspace_3Dpos_cam
+ drawListOfVector4_screenspace_3Dpos_cam
+ Draw ListOfVector4 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector4List_of_$name$ = ;
+ Vector3 position_in3DWorldspace_of_$name$ = ;
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, vector4List_of_$name$, position_in3DWorldspace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ listOfVector4
+
+
+
+
+
+
+
+ drawListOfVector4_screenspace_2Dpos
+ drawListOfVector4_screenspace_2Dpos
+ Draw ListOfVector4 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector4List_of_$name$ = $end$;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(vector4List_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ listOfVector4
+
+
+
+
+
+
+
+ drawListOfVector4_screenspace_2Dpos_cam
+ drawListOfVector4_screenspace_2Dpos_cam
+ Draw ListOfVector4 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector4List_of_$name$ = ;
+ Vector2 position_in2DViewportSpace_of_$name$ = default(Vector2);
+ Color color_of_$name$ = default(Color);
+ string title_of_$name$ = null;
+ float textSize_relToViewportHeight_of_$name$ = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight_of_$name$ = 0.0f;
+ bool position_isTopLeft_notLowLeft_of_$name$ = false;
+ float durationInSec_of_$name$ = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera_of_$name$, vector4List_of_$name$, position_in2DViewportSpace_of_$name$, color_of_$name$, title_of_$name$, textSize_relToViewportHeight_of_$name$, forceHeightOfWholeTableBox_relToViewportHeight_of_$name$, position_isTopLeft_notLowLeft_of_$name$, durationInSec_of_$name$);
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ listOfVector4
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawText.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawText.snippet.meta
new file mode 100644
index 0000000..9cb21d0
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawText.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2879fc731d36c254485ca450810e577b
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/DrawDebugLibrary/code snippets/drawText_func.snippet b/Editor/DrawDebugLibrary/code snippets/drawText_func.snippet
new file mode 100644
index 0000000..c8c5145
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawText_func.snippet
@@ -0,0 +1,4941 @@
+
+
+
+
+ drawTextScreenspace_3Dpos_dirViaVec_func
+ drawTextScreenspace_3Dpos_dirViaVec_func
+ Encapsulated in a function: Draw TextScreenspace in the Unity Editor. (position defined in 3D worldspace) (text direction defined via vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspace_3Dpos_dirViaVec_cam_func
+ drawTextScreenspace_3Dpos_dirViaVec_cam_func
+ Encapsulated in a function: Draw TextScreenspace in the Unity Editor. (position defined in 3D worldspace) (text direction defined via vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspace_2Dpos_dirViaVec_func
+ drawTextScreenspace_2Dpos_dirViaVec_func
+ Encapsulated in a function: Draw TextScreenspace in the Unity Editor. (position defined in 2D screenspace) (text direction defined via vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspace_2Dpos_dirViaVec_cam_func
+ drawTextScreenspace_2Dpos_dirViaVec_cam_func
+ Encapsulated in a function: Draw TextScreenspace in the Unity Editor. (position defined in 2D screenspace) (text direction defined via vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_3Dpos_dirViaVec_func
+ drawTextScreenspaceFramed_3Dpos_dirViaVec_func
+ Encapsulated in a function: Draw TextScreenspaceFramed in the Unity Editor. (position defined in 3D worldspace) (text direction defined via vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_3Dpos_dirViaVec_cam_func
+ drawTextScreenspaceFramed_3Dpos_dirViaVec_cam_func
+ Encapsulated in a function: Draw TextScreenspaceFramed in the Unity Editor. (position defined in 3D worldspace) (text direction defined via vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_2Dpos_dirViaVec_func
+ drawTextScreenspaceFramed_2Dpos_dirViaVec_func
+ Encapsulated in a function: Draw TextScreenspaceFramed in the Unity Editor. (position defined in 2D screenspace) (text direction defined via vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_2Dpos_dirViaVec_cam_func
+ drawTextScreenspaceFramed_2Dpos_dirViaVec_cam_func
+ Encapsulated in a function: Draw TextScreenspaceFramed in the Unity Editor. (position defined in 2D screenspace) (text direction defined via vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspace_3Dpos_dirViaAngle_func
+ drawTextScreenspace_3Dpos_dirViaAngle_func
+ Encapsulated in a function: Draw TextScreenspace in the Unity Editor. (position defined in 3D worldspace) (text direction defined via angle) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspace_3Dpos_dirViaAngle_cam_func
+ drawTextScreenspace_3Dpos_dirViaAngle_cam_func
+ Encapsulated in a function: Draw TextScreenspace in the Unity Editor. (position defined in 3D worldspace) (text direction defined via angle) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspace_2Dpos_dirViaAngle_func
+ drawTextScreenspace_2Dpos_dirViaAngle_func
+ Encapsulated in a function: Draw TextScreenspace in the Unity Editor. (position defined in 2D screenspace) (text direction defined via angle) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspace_2Dpos_dirViaAngle_cam_func
+ drawTextScreenspace_2Dpos_dirViaAngle_cam_func
+ Encapsulated in a function: Draw TextScreenspace in the Unity Editor. (position defined in 2D screenspace) (text direction defined via angle) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_3Dpos_dirViaAngle_func
+ drawTextScreenspaceFramed_3Dpos_dirViaAngle_func
+ Encapsulated in a function: Draw TextScreenspaceFramed in the Unity Editor. (position defined in 3D worldspace) (text direction defined via angle) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_3Dpos_dirViaAngle_cam_func
+ drawTextScreenspaceFramed_3Dpos_dirViaAngle_cam_func
+ Encapsulated in a function: Draw TextScreenspaceFramed in the Unity Editor. (position defined in 3D worldspace) (text direction defined via angle) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_2Dpos_dirViaAngle_func
+ drawTextScreenspaceFramed_2Dpos_dirViaAngle_func
+ Encapsulated in a function: Draw TextScreenspaceFramed in the Unity Editor. (position defined in 2D screenspace) (text direction defined via angle) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawTextScreenspaceFramed_2Dpos_dirViaAngle_cam_func
+ drawTextScreenspaceFramed_2Dpos_dirViaAngle_cam_func
+ Encapsulated in a function: Draw TextScreenspaceFramed in the Unity Editor. (position defined in 2D screenspace) (text direction defined via angle) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextScreenspaceFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawText2D_dirViaVec_func
+ drawText2D_dirViaVec_func
+ Encapsulated in a function: Draw Text2D in the Unity Editor. (text direction defined via vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text2D
+ WithThisName
+
+
+
+
+
+
+
+ drawText2DFramed_dirViaVec_func
+ drawText2DFramed_dirViaVec_func
+ Encapsulated in a function: Draw Text2DFramed in the Unity Editor. (text direction defined via vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text2DFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawText2D_dirViaAngle_func
+ drawText2D_dirViaAngle_func
+ Encapsulated in a function: Draw Text2D in the Unity Editor. (text direction defined via angle)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text2D
+ WithThisName
+
+
+
+
+
+
+
+ drawText2DFramed_dirViaAngle_func
+ drawText2DFramed_dirViaAngle_func
+ Encapsulated in a function: Draw Text2DFramed in the Unity Editor. (text direction defined via angle)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text2DFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawText_dirViaQuat_func
+ drawText_dirViaQuat_func
+ Encapsulated in a function: Draw Text in the Unity Editor. (text direction defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text
+ WithThisName
+
+
+
+
+
+
+
+ drawTextFramed_dirViaQuat_func
+ drawTextFramed_dirViaQuat_func
+ Encapsulated in a function: Draw TextFramed in the Unity Editor. (text direction defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawText_dirViaVec_func
+ drawText_dirViaVec_func
+ Encapsulated in a function: Draw Text in the Unity Editor. (text direction defined via vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn Text
+ WithThisName
+
+
+
+
+
+
+
+ drawTextFramed_dirViaVec_func
+ drawTextFramed_dirViaVec_func
+ Encapsulated in a function: Draw TextFramed in the Unity Editor. (text direction defined via vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextFramed
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_viaStartPos_func
+ drawTextOnCircleScreenspace_viaStartPos_func
+ Encapsulated in a function: Draw TextOnCircleScreenspace in the Unity Editor. (defined via text start position, instead of circle center position) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_viaStartPos_cam_func
+ drawTextOnCircleScreenspace_viaStartPos_cam_func
+ Encapsulated in a function: Draw TextOnCircleScreenspace in the Unity Editor. (defined via text start position, instead of circle center position) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_dirViaVecUp_func
+ drawTextOnCircleScreenspace_dirViaVecUp_func
+ Encapsulated in a function: Draw TextOnCircleScreenspace in the Unity Editor. (text initial upDirection defined via vector) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_dirViaVecUp_cam_func
+ drawTextOnCircleScreenspace_dirViaVecUp_cam_func
+ Encapsulated in a function: Draw TextOnCircleScreenspace in the Unity Editor. (text initial upDirection defined via vector) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_dirViaAngle_func
+ drawTextOnCircleScreenspace_dirViaAngle_func
+ Encapsulated in a function: Draw TextOnCircleScreenspace in the Unity Editor. (initial text direction defined via angle) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircleScreenspace_dirViaAngle_cam_func
+ drawTextOnCircleScreenspace_dirViaAngle_cam_func
+ Encapsulated in a function: Draw TextOnCircleScreenspace in the Unity Editor. (initial text direction defined via angle) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircleScreenspace
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircle2D_viaStartPos_func
+ drawTextOnCircle2D_viaStartPos_func
+ Encapsulated in a function: Draw TextOnCircle2D in the Unity Editor. (defined via text start position, instead of circle center position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle2D
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircle2D_dirViaVecUp_func
+ drawTextOnCircle2D_dirViaVecUp_func
+ Encapsulated in a function: Draw TextOnCircle2D in the Unity Editor. (text initial upDirection defined via vector)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle2D
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircle2D_dirViaAngle_func
+ drawTextOnCircle2D_dirViaAngle_func
+ Encapsulated in a function: Draw TextOnCircle2D in the Unity Editor. (initial text direction defined via angle)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle2D
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircle_viaStartPos_func
+ drawTextOnCircle_viaStartPos_func
+ Encapsulated in a function: Draw TextOnCircle in the Unity Editor. (defined via text start position, instead of circle center position)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircle_viaQuat_func
+ drawTextOnCircle_viaQuat_func
+ Encapsulated in a function: Draw TextOnCircle in the Unity Editor. (orientation defined via quaternion)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawTextOnCircle_viaVec_func
+ drawTextOnCircle_viaVec_func
+ Encapsulated in a function: Draw TextOnCircle in the Unity Editor. (orientation defined via vectors)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn TextOnCircle
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfBool_func
+ drawArrayOfBool_func
+ Encapsulated in a function: Draw ArrayOfBool in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfBool_in2D_func
+ drawArrayOfBool_in2D_func
+ Encapsulated in a function: Draw ArrayOfBool in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfBool_screenspace_3Dpos_func
+ drawArrayOfBool_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ArrayOfBool in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfBool_screenspace_3Dpos_cam_func
+ drawArrayOfBool_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfBool in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfBool_screenspace_2Dpos_func
+ drawArrayOfBool_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ArrayOfBool in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfBool_screenspace_2Dpos_cam_func
+ drawArrayOfBool_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfBool in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfBool_func
+ drawListOfBool_func
+ Encapsulated in a function: Draw ListOfBool in the Unity Editor.
+ Draw XXL
+
+
+
+ boolList = $end$;
+ Vector3 position = default(Vector3);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ Quaternion rotation = default(Quaternion);
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList(boolList, position, color, title, textSize, forceHeightOfWholeTableBox, rotation, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfBool_in2D_func
+ drawListOfBool_in2D_func
+ Encapsulated in a function: Draw ListOfBool in the Unity Editor.
+ Draw XXL
+
+
+
+ boolList = $end$;
+ Vector2 position = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ float custom_zPos = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList2D(boolList, position, color, title, textSize, forceHeightOfWholeTableBox, custom_zPos, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfBool_screenspace_3Dpos_func
+ drawListOfBool_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ListOfBool in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ boolList = $end$;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(boolList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfBool_screenspace_3Dpos_cam_func
+ drawListOfBool_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ListOfBool in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ boolList = ;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, boolList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfBool_screenspace_2Dpos_func
+ drawListOfBool_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ListOfBool in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ boolList = $end$;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(boolList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfBool_screenspace_2Dpos_cam_func
+ drawListOfBool_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ListOfBool in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ boolList = ;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, boolList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfBool
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfInt_func
+ drawArrayOfInt_func
+ Encapsulated in a function: Draw ArrayOfInt in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfInt_in2D_func
+ drawArrayOfInt_in2D_func
+ Encapsulated in a function: Draw ArrayOfInt in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfInt_screenspace_3Dpos_func
+ drawArrayOfInt_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ArrayOfInt in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfInt_screenspace_3Dpos_cam_func
+ drawArrayOfInt_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfInt in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfInt_screenspace_2Dpos_func
+ drawArrayOfInt_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ArrayOfInt in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfInt_screenspace_2Dpos_cam_func
+ drawArrayOfInt_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfInt in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfInt_func
+ drawListOfInt_func
+ Encapsulated in a function: Draw ListOfInt in the Unity Editor.
+ Draw XXL
+
+
+
+ intList = $end$;
+ Vector3 position = default(Vector3);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ Quaternion rotation = default(Quaternion);
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList(intList, position, color, title, textSize, forceHeightOfWholeTableBox, rotation, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfInt_in2D_func
+ drawListOfInt_in2D_func
+ Encapsulated in a function: Draw ListOfInt in the Unity Editor.
+ Draw XXL
+
+
+
+ intList = $end$;
+ Vector2 position = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ float custom_zPos = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList2D(intList, position, color, title, textSize, forceHeightOfWholeTableBox, custom_zPos, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfInt_screenspace_3Dpos_func
+ drawListOfInt_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ListOfInt in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ intList = $end$;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(intList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfInt_screenspace_3Dpos_cam_func
+ drawListOfInt_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ListOfInt in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ intList = ;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, intList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfInt_screenspace_2Dpos_func
+ drawListOfInt_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ListOfInt in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ intList = $end$;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(intList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfInt_screenspace_2Dpos_cam_func
+ drawListOfInt_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ListOfInt in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ intList = ;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, intList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfInt
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfFloat_func
+ drawArrayOfFloat_func
+ Encapsulated in a function: Draw ArrayOfFloat in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfFloat_in2D_func
+ drawArrayOfFloat_in2D_func
+ Encapsulated in a function: Draw ArrayOfFloat in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfFloat_screenspace_3Dpos_func
+ drawArrayOfFloat_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ArrayOfFloat in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfFloat_screenspace_3Dpos_cam_func
+ drawArrayOfFloat_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfFloat in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfFloat_screenspace_2Dpos_func
+ drawArrayOfFloat_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ArrayOfFloat in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfFloat_screenspace_2Dpos_cam_func
+ drawArrayOfFloat_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfFloat in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfFloat_func
+ drawListOfFloat_func
+ Encapsulated in a function: Draw ListOfFloat in the Unity Editor.
+ Draw XXL
+
+
+
+ floatList = $end$;
+ Vector3 position = default(Vector3);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ Quaternion rotation = default(Quaternion);
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList(floatList, position, color, title, textSize, forceHeightOfWholeTableBox, rotation, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfFloat_in2D_func
+ drawListOfFloat_in2D_func
+ Encapsulated in a function: Draw ListOfFloat in the Unity Editor.
+ Draw XXL
+
+
+
+ floatList = $end$;
+ Vector2 position = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ float custom_zPos = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList2D(floatList, position, color, title, textSize, forceHeightOfWholeTableBox, custom_zPos, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfFloat_screenspace_3Dpos_func
+ drawListOfFloat_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ListOfFloat in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ floatList = $end$;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(floatList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfFloat_screenspace_3Dpos_cam_func
+ drawListOfFloat_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ListOfFloat in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ floatList = ;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, floatList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfFloat_screenspace_2Dpos_func
+ drawListOfFloat_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ListOfFloat in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ floatList = $end$;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(floatList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfFloat_screenspace_2Dpos_cam_func
+ drawListOfFloat_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ListOfFloat in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ floatList = ;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, floatList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfFloat
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfString_func
+ drawArrayOfString_func
+ Encapsulated in a function: Draw ArrayOfString in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfString_in2D_func
+ drawArrayOfString_in2D_func
+ Encapsulated in a function: Draw ArrayOfString in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfString_screenspace_3Dpos_func
+ drawArrayOfString_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ArrayOfString in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfString_screenspace_3Dpos_cam_func
+ drawArrayOfString_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfString in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfString_screenspace_2Dpos_func
+ drawArrayOfString_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ArrayOfString in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfString_screenspace_2Dpos_cam_func
+ drawArrayOfString_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfString in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfString_func
+ drawListOfString_func
+ Encapsulated in a function: Draw ListOfString in the Unity Editor.
+ Draw XXL
+
+
+
+ stringList = $end$;
+ Vector3 position = default(Vector3);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ Quaternion rotation = default(Quaternion);
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList(stringList, position, color, title, textSize, forceHeightOfWholeTableBox, rotation, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfString_in2D_func
+ drawListOfString_in2D_func
+ Encapsulated in a function: Draw ListOfString in the Unity Editor.
+ Draw XXL
+
+
+
+ stringList = $end$;
+ Vector2 position = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ float custom_zPos = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList2D(stringList, position, color, title, textSize, forceHeightOfWholeTableBox, custom_zPos, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfString_screenspace_3Dpos_func
+ drawListOfString_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ListOfString in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ stringList = $end$;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(stringList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfString_screenspace_3Dpos_cam_func
+ drawListOfString_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ListOfString in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ stringList = ;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, stringList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfString_screenspace_2Dpos_func
+ drawListOfString_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ListOfString in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ stringList = $end$;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(stringList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfString_screenspace_2Dpos_cam_func
+ drawListOfString_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ListOfString in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ stringList = ;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, stringList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfString
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector2_func
+ drawArrayOfVector2_func
+ Encapsulated in a function: Draw ArrayOfVector2 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector2_in2D_func
+ drawArrayOfVector2_in2D_func
+ Encapsulated in a function: Draw ArrayOfVector2 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector2_screenspace_3Dpos_func
+ drawArrayOfVector2_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ArrayOfVector2 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector2_screenspace_3Dpos_cam_func
+ drawArrayOfVector2_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfVector2 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector2_screenspace_2Dpos_func
+ drawArrayOfVector2_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ArrayOfVector2 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector2_screenspace_2Dpos_cam_func
+ drawArrayOfVector2_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfVector2 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector2_func
+ drawListOfVector2_func
+ Encapsulated in a function: Draw ListOfVector2 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector2List = $end$;
+ Vector3 position = default(Vector3);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ Quaternion rotation = default(Quaternion);
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList(vector2List, position, color, title, textSize, forceHeightOfWholeTableBox, rotation, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector2_in2D_func
+ drawListOfVector2_in2D_func
+ Encapsulated in a function: Draw ListOfVector2 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector2List = $end$;
+ Vector2 position = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ float custom_zPos = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList2D(vector2List, position, color, title, textSize, forceHeightOfWholeTableBox, custom_zPos, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector2_screenspace_3Dpos_func
+ drawListOfVector2_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ListOfVector2 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector2List = $end$;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(vector2List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector2_screenspace_3Dpos_cam_func
+ drawListOfVector2_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ListOfVector2 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector2List = ;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, vector2List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector2_screenspace_2Dpos_func
+ drawListOfVector2_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ListOfVector2 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector2List = $end$;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(vector2List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector2_screenspace_2Dpos_cam_func
+ drawListOfVector2_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ListOfVector2 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector2List = ;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, vector2List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector2
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector3_func
+ drawArrayOfVector3_func
+ Encapsulated in a function: Draw ArrayOfVector3 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector3_in2D_func
+ drawArrayOfVector3_in2D_func
+ Encapsulated in a function: Draw ArrayOfVector3 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector3_screenspace_3Dpos_func
+ drawArrayOfVector3_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ArrayOfVector3 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector3_screenspace_3Dpos_cam_func
+ drawArrayOfVector3_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfVector3 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector3_screenspace_2Dpos_func
+ drawArrayOfVector3_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ArrayOfVector3 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector3_screenspace_2Dpos_cam_func
+ drawArrayOfVector3_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfVector3 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector3_func
+ drawListOfVector3_func
+ Encapsulated in a function: Draw ListOfVector3 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector3List = $end$;
+ Vector3 position = default(Vector3);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ Quaternion rotation = default(Quaternion);
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList(vector3List, position, color, title, textSize, forceHeightOfWholeTableBox, rotation, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector3_in2D_func
+ drawListOfVector3_in2D_func
+ Encapsulated in a function: Draw ListOfVector3 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector3List = $end$;
+ Vector2 position = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ float custom_zPos = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList2D(vector3List, position, color, title, textSize, forceHeightOfWholeTableBox, custom_zPos, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector3_screenspace_3Dpos_func
+ drawListOfVector3_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ListOfVector3 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector3List = $end$;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(vector3List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector3_screenspace_3Dpos_cam_func
+ drawListOfVector3_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ListOfVector3 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector3List = ;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, vector3List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector3_screenspace_2Dpos_func
+ drawListOfVector3_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ListOfVector3 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector3List = $end$;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(vector3List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector3_screenspace_2Dpos_cam_func
+ drawListOfVector3_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ListOfVector3 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector3List = ;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, vector3List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector3
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector4_func
+ drawArrayOfVector4_func
+ Encapsulated in a function: Draw ArrayOfVector4 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector4_in2D_func
+ drawArrayOfVector4_in2D_func
+ Encapsulated in a function: Draw ArrayOfVector4 in the Unity Editor.
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector4_screenspace_3Dpos_func
+ drawArrayOfVector4_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ArrayOfVector4 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector4_screenspace_3Dpos_cam_func
+ drawArrayOfVector4_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfVector4 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector4_screenspace_2Dpos_func
+ drawArrayOfVector4_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ArrayOfVector4 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ WithThisName
+
+
+
+
+
+
+
+ drawArrayOfVector4_screenspace_2Dpos_cam_func
+ drawArrayOfVector4_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ArrayOfVector4 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ArrayOfVector4
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector4_func
+ drawListOfVector4_func
+ Encapsulated in a function: Draw ListOfVector4 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector4List = $end$;
+ Vector3 position = default(Vector3);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ Quaternion rotation = default(Quaternion);
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList(vector4List, position, color, title, textSize, forceHeightOfWholeTableBox, rotation, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector4_in2D_func
+ drawListOfVector4_in2D_func
+ Encapsulated in a function: Draw ListOfVector4 in the Unity Editor.
+ Draw XXL
+
+
+
+ vector4List = $end$;
+ Vector2 position = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize = 0.05f;
+ float forceHeightOfWholeTableBox = 0.0f;
+ float custom_zPos = float.PositiveInfinity;
+ bool position_isTopLeft_notLowLeft = true;
+ float durationInSec = 0.0f;
+ bool hiddenByNearerObjects = true;
+ DrawText.WriteList2D(vector4List, position, color, title, textSize, forceHeightOfWholeTableBox, custom_zPos, position_isTopLeft_notLowLeft, durationInSec, hiddenByNearerObjects);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector4_screenspace_3Dpos_func
+ drawListOfVector4_screenspace_3Dpos_func
+ Encapsulated in a function: Draw ListOfVector4 in the Unity Editor. (position defined in 3D worldspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector4List = $end$;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(vector4List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector4_screenspace_3Dpos_cam_func
+ drawListOfVector4_screenspace_3Dpos_cam_func
+ Encapsulated in a function: Draw ListOfVector4 in the Unity Editor. (position defined in 3D worldspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector4List = ;
+ Vector3 position_in3DWorldspace = ;
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, vector4List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector4_screenspace_2Dpos_func
+ drawListOfVector4_screenspace_2Dpos_func
+ Encapsulated in a function: Draw ListOfVector4 in the Unity Editor. (position defined in 2D screenspace) (automatic detection of target camera)
+ Draw XXL
+
+
+
+ vector4List = $end$;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(vector4List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ WithThisName
+
+
+
+
+
+
+
+ drawListOfVector4_screenspace_2Dpos_cam_func
+ drawListOfVector4_screenspace_2Dpos_cam_func
+ Encapsulated in a function: Draw ListOfVector4 in the Unity Editor. (position defined in 2D screenspace) (explicitly defining the target camera)
+ Draw XXL
+
+
+
+ vector4List = ;
+ Vector2 position_in2DViewportSpace = default(Vector2);
+ Color color = default(Color);
+ string title = null;
+ float textSize_relToViewportHeight = 0.025f;
+ float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f;
+ bool position_isTopLeft_notLowLeft = false;
+ float durationInSec = 0.0f;
+ DrawText.WriteListScreenspace(screenCamera, vector4List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+ ]]>
+
+
+
+ DrawXXL
+
+
+
+
+ name
+ Name of drawn ListOfVector4
+ WithThisName
+
+
+
+
+
+
diff --git a/Editor/DrawDebugLibrary/code snippets/drawText_func.snippet.meta b/Editor/DrawDebugLibrary/code snippets/drawText_func.snippet.meta
new file mode 100644
index 0000000..881a7dc
--- /dev/null
+++ b/Editor/DrawDebugLibrary/code snippets/drawText_func.snippet.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 02c5327a35011c94380ab649cf192916
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Editor/XericLibraryEditor.dll b/Editor/XericLibraryEditor.dll
index ab20fe4..a131db0 100644
Binary files a/Editor/XericLibraryEditor.dll and b/Editor/XericLibraryEditor.dll differ
diff --git a/Runtime/DrawDebugLibrary.meta b/Runtime/DrawDebugLibrary.meta
new file mode 100644
index 0000000..9acbc50
--- /dev/null
+++ b/Runtime/DrawDebugLibrary.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: bd689af0756ca4742853b83a72f12416
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawBasics.cs b/Runtime/DrawDebugLibrary/DrawBasics.cs
new file mode 100644
index 0000000..de51e9c
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawBasics.cs
@@ -0,0 +1,1350 @@
+namespace DrawXXL
+{
+ using System.Collections.Generic;
+ using UnityEngine;
+
+ public class DrawBasics
+ {
+ public enum AutomaticAmplitudeAndTextAlignment
+ {
+ vertical,
+ perpendicularToCamera
+ };
+ public static AutomaticAmplitudeAndTextAlignment automaticAmplitudeAndTextAlignment = AutomaticAmplitudeAndTextAlignment.vertical;
+
+ public enum AutomaticTextDirectionOfLines
+ {
+ towardsLineEnd,
+ leftToRightInScreen
+ };
+ public static AutomaticTextDirectionOfLines automaticTextDirectionOfLines = AutomaticTextDirectionOfLines.leftToRightInScreen;
+
+ public enum CameraForAutomaticOrientation
+ {
+ sceneViewCamera,
+ gameViewCamera
+ };
+ public static CameraForAutomaticOrientation cameraForAutomaticOrientation = CameraForAutomaticOrientation.sceneViewCamera;
+
+ public enum LineStyle { solid, invisible, dotted, dottedDense, dottedWide, dashed, dashedLong, dotDash, dotDashLong, twoDash, disconnectedAnchors, spiral, sine, zigzag, rhombus, doubleRhombus, electricNoise, electricImpulses, freeHand2D, freeHand3D, arrows, alternatingColorStripes };
+
+ public enum BezierPosInterpretation
+ {
+ start_control1_control2_endIsNextStart,
+ start_control1_endIsNextStart,
+ onlySegmentStartPoints_backwardForwardIsAligned,
+ onlySegmentStartPoints_backwardForwardIsMirrored,
+ onlySegmentStartPoints_backwardForwardIsKinked
+ };
+
+ private static int maxAllowedDrawnLinesPerFrame =
+#if UnityEditor
+ 60000
+#else
+ 200000;
+#endif
+ public static int MaxAllowedDrawnLinesPerFrame
+ {
+ get { return maxAllowedDrawnLinesPerFrame; }
+ set
+ {
+ if (value < UtilitiesDXXL_DrawBasics.maxMaxAllowedDrawnLinesPerFrame)
+ {
+ maxAllowedDrawnLinesPerFrame = value;
+ }
+ else
+ {
+ Debug.LogError("The upper threshold of 'MaxAllowedDrawnLinesPerFrame' is currently " + UtilitiesDXXL_DrawBasics.maxMaxAllowedDrawnLinesPerFrame + ". You tried to set it to " + value + ". Was that intentional?");
+ }
+ }
+ }
+
+ public enum UsedUnityLineDrawingMethod
+ {
+ debugLinesInPlayMode_gizmoLinesInEditModeAndPlaymodePauses,
+ debugLines,
+ gizmoLines,
+ handlesLines,
+ wireMesh,
+ disabled
+ };
+ public static UsedUnityLineDrawingMethod usedUnityLineDrawingMethod = UsedUnityLineDrawingMethod.debugLines;
+
+ public enum LengthInterpretation { relativeToLineLength, absoluteUnits };
+ public static LengthInterpretation endPlates_sizeInterpretation = LengthInterpretation.relativeToLineLength;
+ public static LengthInterpretation coneLength_interpretation_forStraightVectors = LengthInterpretation.relativeToLineLength;
+ public static LengthInterpretation coneLength_interpretation_forCircledVectors = LengthInterpretation.relativeToLineLength;
+ public static bool disableEndPlates_atLineStart = false;
+ public static bool disableEndPlates_atLineEnd = false;
+
+ public enum MaxLinesExceededNotificationOnScreenType { ExplanationText, WarningSymbol, None };
+ public static MaxLinesExceededNotificationOnScreenType maxLinesExceededNotificationOnScreenType = MaxLinesExceededNotificationOnScreenType.ExplanationText; //if you have problems with too many lines per frame and want to raise the "maxDrawnLinesPerFrame_preventingProgramFreeze"-value, then you can set this to "true". This replaces the warning text on screen which informs you of the exceeded limit with a simple warning-symbol. This saves around 7500 lines that would be used to draw the warning text which you then can use for your own draw operations.
+ public enum MaxLinesExceededNotificationInLogConsoleType { Error, Warning, Log, None };
+ public static MaxLinesExceededNotificationInLogConsoleType maxLinesExceededNotificationInLogConsoleType = MaxLinesExceededNotificationInLogConsoleType.Error; //if you want to keep your console clean from warnings that state that you have exceeded the maxLinesPerFrameL-Limit. see also "logType_forExceededMaxLinesConsoleMessage"
+
+
+ private static float lineLength_aboveWhichToAutoEnlargeThePattern = 20.0f; //this prevents high computational effort for long lines that have a very fine grained pattern, which would result in drawing many single lines to compose the long patterned line.
+ //static float lineLengthSqr_aboveWhichToAutoEnlargeThePattern = lineLength_aboveWhichToAutoEnlargeThePattern * lineLength_aboveWhichToAutoEnlargeThePattern; //not precalculated, so that "lineLength_aboveWhichToAutoEnlargeThePattern" can be changed during runtime
+ public static float LineLength_aboveWhichToAutoEnlargeThePattern
+ {
+ get { return lineLength_aboveWhichToAutoEnlargeThePattern; }
+ set
+ {
+ lineLength_aboveWhichToAutoEnlargeThePattern = Mathf.Max(value, 0.1f);
+ }
+ }
+
+ public static bool autoEnlargeBigPatternsLater_whichDistortsPatternSizeRatios = false;
+ public static Color defaultColor = Color.white;
+ public static Color defaultColor2_ofAlternatingColorLines = UtilitiesDXXL_Colors.red_boolFalse;
+ public static float thinestPossibleNonZeroWidthLine = 0.00005f;
+
+ private static float density_ofThickLines = 100.0f;
+ public static float Density_ofThickLines
+ {
+ get { return density_ofThickLines; }
+ set
+ {
+ density_ofThickLines = value;
+ UtilitiesDXXL_DrawBasics.lowThreshold_ofLineWidth_forNumberOfThinLinesThatComposeTheThickLine = 0.6f / value;
+ }
+ }
+
+ private static float stylePatternScaleFactor_alongLineDir_ignoringAmplitude = 1.0f;
+ public static float StylePatternScaleFactor_alongLineDir_ignoringAmplitude //Many line drawing function have a parameter called "stylePatternScaleFactor" (e.g. DrawBasics.Line), which can be used to scale line styles (link zu lineStyle-global enum)), so that they remain well recognizable even for far view distances. It keeps the general shape of the pattern, but only scales its size. Additionally to these "stylePatternScaleFactor" parameters there is the global setting "StylePatternScaleFactor_alongLineDir_ignoringAmplitude". This also scales the line styles, but only along the line direction, while the amplitude remains the same. It can be used e.g. to change the winding density of a spiral line. Both patternScaleFactors can also be used in conjunction.
+ {
+ get { return stylePatternScaleFactor_alongLineDir_ignoringAmplitude; }
+ set
+ {
+ if (UtilitiesDXXL_Math.FloatIsValid(value))
+ {
+ stylePatternScaleFactor_alongLineDir_ignoringAmplitude = Mathf.Max(value, 0.01f);
+ }
+ else
+ {
+ Debug.LogError("Cannot set 'StylePatternScaleFactor_alongLineDir_ignoringAmplitude' to the invalid value of " + value);
+ }
+ }
+ }
+
+
+ private static Vector3 default_textOffsetDirection_forPointTags = UtilitiesDXXL_DrawBasics.default_default_textOffsetDirection_forPointTags;
+ public static Vector3 Default_textOffsetDirection_forPointTags //This is used by "DrawBasics.PointTag()" and "DrawBasics2D.PointTag()", if the "textOffsetDirection" parameter is not specified. It works in conjunction with "DrawText.automaticTextOrientation". That means: The z component should be 0 in most cases, which results in effectively a 2D vector inside the xy-plane. This 2D vector is then automatically rotated to fit the desired workflow as specified by "DrawText.automaticTextOrientation", e.g. rotated to screenspace if "DrawText.automaticTextOrientation" is at its default setting of of "screen". A z value would change the vector direction perpendicular to the 2D plane which "DrawText.automaticTextOrientation" specifies. "DrawBasics2D.PointTag()" ignores the z component in any case. The length of the vector is ignored. Only the direction has effect.
+ {
+ get { return default_textOffsetDirection_forPointTags; }
+ set
+ {
+ if (UtilitiesDXXL_Math.ApproximatelyZero(value))
+ {
+ Debug.LogError("Cannot set 'default_textOffsetDirection_forPointTags' to zero.");
+ }
+ else
+ {
+ default_textOffsetDirection_forPointTags = value;
+ }
+ }
+ }
+
+ public static bool drawerComponentsAutomaticallyProceedOneFrameStepOnPauseStarts_toPreventFrozenOverlayDraw = false; //With this setting you can change the behaviour of drawing components, that seem to draw twice when pausing a game. For example if you use a Text Drawer Component and write "some test text", then pause the game and change the text to "another test text", then both is displayed ("some test text" and "another test text") seemingly as overlay. The reason for this is that Draw XXL components use Debug.DrawLine() for drawing when the game runs and Gizmo.DrawLine() when the game pauses. Otherwise the drawing could not be changed during pauses. Though lines from Debug.DrawLine() don't get cleared during pauses, instead they remain fixed until the pause ends. With this setting it is possible to prevent that overlay, because the drawer components(link) automatically proceed one frame when the game is paused, in which they skip the drawing with Debug.DrawLine(), so that it is not displayed during the game pause.
// If this is enabled and you have a Draw XXL drawer component in your Scene, then everytime the game pauses it will automatically perform an additional "proceed one frame step", as it can also be done by the right one of the three play/pause-buttons on the upper end inside the Unity Editor. For cases where you want to pause the game at a specific defined frame (via Debug.Break() somewhere in your code) and this is enabled, then your game pause actually ends up one frame later. If you want to end up in the frame where you called your Debug.Break() then you should leave this setting at its default disabled state. // see also "DrawCharts.chartInspectorComponentsAutomaticallyProceedOneFrameStepOnPauseStarts_toPreventFrozenOverlayDraw" which does the same for Chart Inspector components.
+ public static int strokeWidth_forCoordinateTexts_onPointVisualiation_inPPM = 0; //This can be set before drawing point visualizations via "Point","PointLocal","PointArray" or "PointList" (etc.), but not the equivalents in "DrawScreenspace"). The coordiante values that are drawn as text alongside these point visualization will use this value for their stroke width, given that the "drawCoordsAsText" parameter is active. It can be useful in busy environments with lots of lines that intersect and protrude each other so that the text stays distinct and readable. For example "DrawEngineBasics.Grid*()" uses it. "inPPM" means that the stroke width is measured in parts per million of the text size, the same way as "DrawText.MarkupStrokeWidth()" and "richTextMarkup-strokeWidth" expect it.
+ public static bool initial_drawOnlyIfSelected_forComponents = false; //Most of the drawer and visualizer components have a checkbox saying "Draw only if selected", which, by is intially disabled. Depending on your use case it may be better if it is initially enabled, for example if you add GridVisualizers to many Gameobjects, but want to see the grid only around the currently selected Gameobject. You can change the initial value here with this setting.
+
+ private static float relSizeOfTextOnLines = 0.45f;
+ public static float RelSizeOfTextOnLines
+ {
+ get { return relSizeOfTextOnLines; }
+ set { relSizeOfTextOnLines = Mathf.Clamp(value, 0.01f, 1000.0f); }
+ }
+
+ public static bool shiftTextPosOnLines_toNonIntersecting = false;
+
+ public static float GlobalAlphaFactor
+ {
+ get { return DXXLWrapperForUntiysBuildInDrawLines.globalAlphaFactor; }
+ set
+ {
+ DXXLWrapperForUntiysBuildInDrawLines.globalAlphaFactor_is0 = (value <= 0.0f);
+ DXXLWrapperForUntiysBuildInDrawLines.globalAlphaFactor_is1 = Mathf.Approximately(value, 1.0f);
+ DXXLWrapperForUntiysBuildInDrawLines.globalAlphaFactor = value;
+ }
+ }
+
+ public enum IconType
+ {
+ //system/operate:
+ dataDisc,
+ saveData,
+ loadData,
+ folder,
+ saveToFolder,
+ loadFromFolder,
+ share,
+ trashcan,
+ optionsSettingsGear,
+ adjustOptionsSettings,
+ homeHouse,
+ profileFoto,
+ imageLandscape,
+ cursorPointer,
+ timeHourglassCursor,
+ cursorHand,
+ magnifier,
+ magnifierPlus,
+ magnifierMinus,
+ switchOnOff,
+ playButton,
+ pauseButton,
+ stopButton,
+ playPauseButton,
+ camera,
+ videoCamera,
+ music,
+ microphone,
+ audioSpeaker,
+ audioSpeakerMute,
+ megaphone,
+ wlan_wifi,
+ telephone,
+ battery,
+ cloud,
+ timeClock,
+ locationPin,
+ stars5Rate,
+
+ //human:
+ humanMale,
+ humanFemale,
+ thumbUp,
+ thumbDown,
+ speechBubble,
+ speechBubbleEmpty,
+ fist,
+ boxingGlove,
+
+ //nature/weather:
+ sun,
+ moonHalf,
+ moonFullPlanet,
+ stars3,
+ shootingStar,
+ rain,
+ wind,
+ snow,
+ iceIcicle,
+ lightning,
+ fire,
+ tree,
+ palm,
+ leaf,
+ animal,
+ bird,
+ fish,
+ mushroom,
+
+ //games:
+ heart,
+ trophy,
+ crown,
+ awardMedal,
+ star,
+ bomb,
+ bombExplosion,
+ health,
+ healthBox,
+ pill,
+ potion,
+ death,
+ gemDiamond,
+ gold,
+ coin,
+ coins,
+ moneyBills,
+ moneyBag,
+ presentGift,
+ chestTreasureBox_closed,
+ chestTreasureBox_open,
+ lootbox,
+ shoppingCart,
+ map,
+ compass,
+ car,
+ fuelStation,
+ fuelCan,
+ foodPlate,
+ foodMeat,
+ flag,
+ flagChequered,
+ crosshair,
+ ball,
+ dice,
+ tower,
+ jigsawPuzzle,
+ rocket,
+ magnet,
+ doorClosed,
+ doorOpen,
+ doorEnter,
+ doorLeave,
+ key,
+ lockLocked,
+ lockUnlocked,
+ gamepad,
+ joystick,
+ lightBulbOn,
+ lightBulbOff,
+
+ //tools/weapons:
+ pen,
+ gun,
+ bullet,
+ sword,
+ shield,
+ hammer,
+ shovel,
+ axe,
+ pickAxe,
+ arrow,
+ arrowBow,
+
+ //signs/warning:
+ warning,
+ fireWarning,
+ nukeNuclearWarning,
+ biohazardWarning,
+ emergencyExit,
+ logMessage,
+ logMessageError,
+ logMessageException,
+ logMessageAssertion,
+
+ //basics:
+ questionMark,
+ exclamationMark,
+ checkmarkChecked,
+ checkmarkUnchecked,
+ arrowLeft,
+ arrowRight,
+ arrowUp,
+ arrowDown,
+ up_oneStroke,
+ up_twoStroke,
+ up_threeStroke,
+ down_oneStroke,
+ down_twoStroke,
+ down_threeStroke,
+ left_oneStroke,
+ left_twoStroke,
+ left_threeStroke,
+ right_oneStroke,
+ right_twoStroke,
+ right_threeStroke,
+ circleDotFilled,
+ circleDotUnfilled,
+ unitCircle,
+ unitSquareCrossed,
+ unitSquare,
+ unitSquareIncl1Right,
+ unitSquareIncl2Right,
+ unitSquareIncl3Right,
+ unitSquareIncl4Right,
+ unitSquareIncl5Right,
+ unitSquareIncl6Right,
+
+ //miscellaneous:
+ leftHandRule,
+ rightHandRule
+ };
+
+ /// 从起点到终点绘制线段。
+ public static void Line(Vector3 start, Vector3 end, Color color = default(Color), float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Line_fadeableAnimSpeed.InternalDraw(start, end, color, width, text, style, stylePatternScaleFactor, animationSpeed, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 从起点沿方向绘制射线。
+ public static void Ray(Vector3 start, Vector3 direction, Color color = default(Color), float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Ray_fadeableAnimSpeed.InternalDraw(start, direction, color, width, text, style, stylePatternScaleFactor, animationSpeed, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 从起点沿方向向量绘制线段。
+ public static void LineFrom(Vector3 start, Vector3 direction, Color color = default(Color), float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ LineFrom_fadeableAnimSpeed.InternalDraw(start, direction, color, width, text, style, stylePatternScaleFactor, animationSpeed, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 根据方向向量和终点绘制线段。
+ public static void LineTo(Vector3 direction, Vector3 end, Color color = default(Color), float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ LineTo_fadeableAnimSpeed.InternalDraw(direction, end, color, width, text, style, stylePatternScaleFactor, animationSpeed, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制颜色从起点渐变到终点的线段。
+ public static void LineColorFade(Vector3 start, Vector3 end, Color startColor, Color endColor, float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Line_fadeableAnimSpeed.InternalDrawColorFade(start, end, startColor, endColor, width, text, style, stylePatternScaleFactor, animationSpeed, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制颜色从起点渐变到终点的射线。
+ public static void RayColorFade(Vector3 start, Vector3 direction, Color startColor, Color endColor, float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Ray_fadeableAnimSpeed.InternalDrawColorFade(start, direction, startColor, endColor, width, text, style, stylePatternScaleFactor, animationSpeed, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 带颜色渐变的 LineFrom,从起点沿方向绘制颜色渐变的线段。
+ public static void LineFrom_withColorFade(Vector3 start, Vector3 direction, Color startColor, Color endColor, float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ LineFrom_fadeableAnimSpeed.InternalDraw_withColorFade(start, direction, startColor, endColor, width, text, style, stylePatternScaleFactor, animationSpeed, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 带颜色渐变的 LineTo,根据方向和终点绘制颜色渐变的线段。
+ public static void LineTo_withColorFade(Vector3 direction, Vector3 end, Color startColor, Color endColor, float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ LineTo_fadeableAnimSpeed.InternalDraw_withColorFade(direction, end, startColor, endColor, width, text, style, stylePatternScaleFactor, animationSpeed, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 根据圆心和两个方向向量绘制圆弧线段。
+ public static void LineCircled(Vector3 circleCenter, Vector3 circleCenter_to_start, Vector3 circleCenter_to_end, Color color = default(Color), float forceRadius = 0.0f, float width = 0.0f, string text = null, bool useReflexAngleOver180deg = false, bool skipFallbackDisplayOfZeroAngles = false, bool flattenThickRoundLineIntoCirclePlane = true, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_LineCircled.LineCircled(circleCenter, circleCenter_to_start, circleCenter_to_end, color, forceRadius, width, text, useReflexAngleOver180deg, skipFallbackDisplayOfZeroAngles, flattenThickRoundLineIntoCirclePlane, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据圆心、旋转和角度绘制圆弧线段。
+ public static void LineCircled(Vector3 circleCenterPos, Quaternion orientation, float turnAngleDegCC_startingFromUp, float radius, Color color, float width = 0.0f, string text = null, bool skipFallbackDisplayOfZeroAngles = false, bool flattenThickRoundLineIntoCirclePlane = true, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(circleCenterPos, "circleCenterPos")) { return; }
+
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+
+ Vector3 startPos = circleCenterPos + orientation * Vector3.up * radius;
+ Vector3 turnAxis_origin = circleCenterPos;
+ Vector3 turnAxis_direction = orientation * Vector3.forward;
+ LineCircled(startPos, turnAxis_origin, turnAxis_direction, turnAngleDegCC_startingFromUp, color, width, text, skipFallbackDisplayOfZeroAngles, flattenThickRoundLineIntoCirclePlane, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据圆心、旋转和起止角度绘制圆弧线段。
+ public static void LineCircled(Vector3 circleCenterPos, Quaternion orientation, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius = 1.0f, Color color = default(Color), float width = 0.0f, string text = null, bool skipFallbackDisplayOfZeroAngles = false, bool flattenThickRoundLineIntoCirclePlane = true, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(startAngleDegCC_relativeToUp, "startAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(endAngleDegCC_relativeToUp, "endAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(circleCenterPos, "circleCenterPos")) { return; }
+
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+ Vector3 turnAxis_direction = orientation * Vector3.forward;
+ Quaternion fromOrientation_toOrientationSoThatTheStartAngleMarksTheRotationsUpwardDir = Quaternion.AngleAxis(startAngleDegCC_relativeToUp, turnAxis_direction);
+ float turnedAngleDegCC_fromStartAngle = endAngleDegCC_relativeToUp - startAngleDegCC_relativeToUp;
+ Vector3 startPos = circleCenterPos + fromOrientation_toOrientationSoThatTheStartAngleMarksTheRotationsUpwardDir * orientation * Vector3.up * radius;
+ Vector3 turnAxis_origin = circleCenterPos;
+ LineCircled(startPos, turnAxis_origin, turnAxis_direction, turnedAngleDegCC_fromStartAngle, color, width, text, skipFallbackDisplayOfZeroAngles, flattenThickRoundLineIntoCirclePlane, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据起点和旋转轴(Ray)绘制圆弧线段。
+ public static void LineCircled(Vector3 startPos, Ray turnAxis, float turnAngleDegCC, Color color = default(Color), float width = 0.0f, string text = null, bool skipFallbackDisplayOfZeroAngles = false, bool flattenThickRoundLineIntoCirclePlane = true, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ LineCircled(startPos, turnAxis.origin, turnAxis.direction, turnAngleDegCC, color, width, text, skipFallbackDisplayOfZeroAngles, flattenThickRoundLineIntoCirclePlane, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据起点、旋转轴原点和方向绘制圆弧线段。
+ public static void LineCircled(Vector3 startPos, Vector3 turnAxis_origin, Vector3 turnAxis_direction, float turnAngleDegCC, Color color = default(Color), float width = 0.0f, string text = null, bool skipFallbackDisplayOfZeroAngles = false, bool flattenThickRoundLineIntoCirclePlane = true, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_LineCircled.LineCircled(startPos, turnAxis_origin, turnAxis_direction, turnAngleDegCC, color, width, text, skipFallbackDisplayOfZeroAngles, flattenThickRoundLineIntoCirclePlane, durationInSec, hiddenByNearerObjects, false, minAngleDeg_withoutTextLineBreak, textAnchor);
+ }
+
+ /// 根据圆心和两个方向向量绘制扇形/圆弧段。
+ public static void CircleSegment(Vector3 centerOfCircle, Vector3 circleCenter_to_startPosOnPerimeter, Vector3 circleCenter_to_endPosOnPerimeter, Color color = default(Color), float forceRadius = 0.0f, string text = null, bool useReflexAngleOver180deg = false, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_LineCircled.CircleSegment(centerOfCircle, circleCenter_to_startPosOnPerimeter, circleCenter_to_endPosOnPerimeter, color, forceRadius, fillDensity, text, useReflexAngleOver180deg, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, minAngleDeg_withoutTextLineBreak, DrawText.TextAnchorCircledDXXL.LowerLeftOfWholeTextBlock, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据圆心、旋转和角度绘制扇形/圆弧段。
+ public static void CircleSegment(Vector3 centerOfCircle, Quaternion orientation, float turnAngleDegCC_startingFromUp, float radius, Color color, string text = null, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(centerOfCircle, "centerOfCircle")) { return; }
+
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+
+ Vector3 startPos = centerOfCircle + orientation * Vector3.up * radius;
+ Vector3 turnAxis_origin = centerOfCircle;
+ Vector3 turnAxis_direction = orientation * Vector3.forward;
+ CircleSegment(startPos, turnAxis_origin, turnAxis_direction, turnAngleDegCC_startingFromUp, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, minAngleDeg_withoutTextLineBreak, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据圆心、旋转和起止角度绘制扇形/圆弧段。
+ public static void CircleSegment(Vector3 centerOfCircle, Quaternion orientation, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius = 1.0f, Color color = default(Color), string text = null, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(startAngleDegCC_relativeToUp, "startAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(endAngleDegCC_relativeToUp, "endAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(centerOfCircle, "centerOfCircle")) { return; }
+
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+ Vector3 turnAxis_direction = orientation * Vector3.forward;
+ Quaternion fromOrientation_toOrientationSoThatTheStartAngleMarksTheRotationsUpwardDir = Quaternion.AngleAxis(startAngleDegCC_relativeToUp, turnAxis_direction);
+ float turnedAngleDegCC_fromStartAngle = endAngleDegCC_relativeToUp - startAngleDegCC_relativeToUp;
+ Vector3 startPos = centerOfCircle + fromOrientation_toOrientationSoThatTheStartAngleMarksTheRotationsUpwardDir * orientation * Vector3.up * radius;
+ Vector3 turnAxis_origin = centerOfCircle;
+ CircleSegment(startPos, turnAxis_origin, turnAxis_direction, turnedAngleDegCC_fromStartAngle, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, minAngleDeg_withoutTextLineBreak, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据起点和旋转轴(Ray)绘制扇形/圆弧段。
+ public static void CircleSegment(Vector3 startPos, Ray turnAxis, float turnAngleDegCC, Color color = default(Color), string text = null, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ CircleSegment(startPos, turnAxis.origin, turnAxis.direction, turnAngleDegCC, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, minAngleDeg_withoutTextLineBreak, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据圆周起点、圆心和法线绘制扇形/圆弧段。
+ public static void CircleSegment(Vector3 startPosOnPerimeter, Vector3 centerOfCircle, Vector3 normalOfCircle, float turnAngleDegCC, Color color = default(Color), string text = null, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_LineCircled.CircleSegment(startPosOnPerimeter, centerOfCircle, normalOfCircle, turnAngleDegCC, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, durationInSec, hiddenByNearerObjects, false, minAngleDeg_withoutTextLineBreak, DrawText.TextAnchorCircledDXXL.LowerLeftOfWholeTextBlock);
+ }
+
+ /// 通过点数组绘制连续折线。
+ public static void LineString(Vector3[] points, Color color = default(Color), bool closeGapBetweenLastAndFirstPoint = false, float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width, "width")) { return; }
+ width = UtilitiesDXXL_Math.AbsNonZeroValue(width);
+
+ if (points == null)
+ {
+ Debug.LogError("'points' is 'null'");
+ return;
+ }
+
+ if (points.Length == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ for (int i = 0; i < (points.Length - 1); i++)
+ {
+ Line_fadeableAnimSpeed.InternalDraw(points[i], points[i + 1], color, width, null, style, stylePatternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed.InternalDraw(points[points.Length - 1], points[0], color, width, null, style, stylePatternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (text != null && text != "")
+ {
+ TagLineString(text, points, width, color, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 通过点列表绘制连续折线。
+ public static void LineString(List points, Color color = default(Color), bool closeGapBetweenLastAndFirstPoint = false, float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width, "width")) { return; }
+ width = UtilitiesDXXL_Math.AbsNonZeroValue(width);
+ if (points == null)
+ {
+ Debug.LogError("'points' is 'null'");
+ return;
+ }
+
+ if (points.Count == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ for (int i = 0; i < (points.Count - 1); i++)
+ {
+ Line_fadeableAnimSpeed.InternalDraw(points[i], points[i + 1], color, width, null, style, stylePatternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed.InternalDraw(points[points.Count - 1], points[0], color, width, null, style, stylePatternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (text != null && text != "")
+ {
+ TagLineString(text, points, width, color, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 绘制颜色渐变的连续折线(点数组)。
+ public static void LineStringColorFade(Vector3[] points, Color startColor, Color endColor, bool closeGapBetweenLastAndFirstPoint = false, float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width, "width")) { return; }
+ width = UtilitiesDXXL_Math.AbsNonZeroValue(width);
+ if (points == null)
+ {
+ Debug.LogError("'points' is 'null'");
+ return;
+ }
+
+ if (points.Length == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ int iOffset_forColorFade = -1;
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ iOffset_forColorFade = 0;
+ }
+
+ for (int i = 0; i < (points.Length - 1); i++)
+ {
+ Color color = UtilitiesDXXL_DrawBasics.GetFadedColorFromSegments(startColor, endColor, i, points.Length + iOffset_forColorFade);
+ Line_fadeableAnimSpeed.InternalDraw(points[i], points[i + 1], color, width, null, style, stylePatternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed.InternalDraw(points[points.Length - 1], points[0], endColor, width, null, style, stylePatternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (text != null && text != "")
+ {
+ Color averageColor = Color.Lerp(startColor, endColor, 0.5f);
+ TagLineString(text, points, width, averageColor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 绘制颜色渐变的连续折线(点列表)。
+ public static void LineStringColorFade(List points, Color startColor, Color endColor, bool closeGapBetweenLastAndFirstPoint = false, float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width, "width")) { return; }
+ width = UtilitiesDXXL_Math.AbsNonZeroValue(width);
+ if (points == null)
+ {
+ Debug.LogError("'points' is 'null'");
+ return;
+ }
+
+ if (points.Count == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ int iOffset_forColorFade = -1;
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ iOffset_forColorFade = 0;
+ }
+
+ for (int i = 0; i < (points.Count - 1); i++)
+ {
+ Color color = UtilitiesDXXL_DrawBasics.GetFadedColorFromSegments(startColor, endColor, i, points.Count + iOffset_forColorFade);
+ Line_fadeableAnimSpeed.InternalDraw(points[i], points[i + 1], color, width, null, style, stylePatternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed.InternalDraw(points[points.Count - 1], points[0], endColor, width, null, style, stylePatternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (text != null && text != "")
+ {
+ Color averageColor = Color.Lerp(startColor, endColor, 0.5f);
+ TagLineString(text, points, width, averageColor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ static void TagLineString(string text, Vector3[] lineStringVerticesGlobal, float linesWidth, Color colorOfLines, bool textBlockAboveLine, float durationInSec, bool hiddenByNearerObjects)
+ {
+ if (text != null && text != "")
+ {
+ float xMin = UtilitiesDXXL_Math.GetLowestXComponent(lineStringVerticesGlobal);
+ float xMax = UtilitiesDXXL_Math.GetHighestXComponent(lineStringVerticesGlobal);
+ float yMin = UtilitiesDXXL_Math.GetLowestYComponent(lineStringVerticesGlobal);
+ float yMax = UtilitiesDXXL_Math.GetHighestYComponent(lineStringVerticesGlobal);
+ float zMin = UtilitiesDXXL_Math.GetLowestZComponent(lineStringVerticesGlobal);
+ float zMax = UtilitiesDXXL_Math.GetHighestZComponent(lineStringVerticesGlobal);
+ Vector3 virtualScale = new Vector3(xMax - xMin, yMax - yMin, zMax - zMin);
+ Vector3 centerPosition = lineStringVerticesGlobal[0];
+ for (int i = 0; i < lineStringVerticesGlobal.Length; i++)
+ {
+ UtilitiesDXXL_List.AddToAVectorList(ref UtilitiesDXXL_Shapes.verticesLocal, lineStringVerticesGlobal[i] - centerPosition, i);
+ }
+ Color invertedColor = UtilitiesDXXL_Colors.Invert_andAlphaTo1(colorOfLines);
+ UtilitiesDXXL_TextTagForPointCollection.TagPointCollection(text, null, centerPosition, lineStringVerticesGlobal.Length, 0.1f * linesWidth, virtualScale, invertedColor, invertedColor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ static void TagLineString(string text, List lineStringVerticesGlobal, float linesWidth, Color colorOfLines, bool textBlockAboveLine, float durationInSec, bool hiddenByNearerObjects)
+ {
+ if (text != null && text != "")
+ {
+ float xMin = UtilitiesDXXL_Math.GetLowestXComponent(lineStringVerticesGlobal);
+ float xMax = UtilitiesDXXL_Math.GetHighestXComponent(lineStringVerticesGlobal);
+ float yMin = UtilitiesDXXL_Math.GetLowestYComponent(lineStringVerticesGlobal);
+ float yMax = UtilitiesDXXL_Math.GetHighestYComponent(lineStringVerticesGlobal);
+ float zMin = UtilitiesDXXL_Math.GetLowestZComponent(lineStringVerticesGlobal);
+ float zMax = UtilitiesDXXL_Math.GetHighestZComponent(lineStringVerticesGlobal);
+ Vector3 virtualScale = new Vector3(xMax - xMin, yMax - yMin, zMax - zMin);
+ Vector3 centerPosition = lineStringVerticesGlobal[0];
+ for (int i = 0; i < lineStringVerticesGlobal.Count; i++)
+ {
+ UtilitiesDXXL_List.AddToAVectorList(ref UtilitiesDXXL_Shapes.verticesLocal, lineStringVerticesGlobal[i] - centerPosition, i);
+ }
+ Color invertedColor = UtilitiesDXXL_Colors.Invert_andAlphaTo1(colorOfLines);
+ UtilitiesDXXL_TextTagForPointCollection.TagPointCollection(text, null, centerPosition, lineStringVerticesGlobal.Count, 0.1f * linesWidth, virtualScale, invertedColor, invertedColor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 在多个点位置绘制标记十字。
+ public static void PointArray(Vector3[] points, Color color = default(Color), float sizeOfMarkingCross = 1.0f, float markingCrossLinesWidth = 0.0f, bool drawCoordsAsText = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+
+ for (int i = 0; i < points.Length; i++)
+ {
+ Point(points[i], color, sizeOfMarkingCross, Quaternion.identity, markingCrossLinesWidth, null, color, false, drawCoordsAsText, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 在多个点位置绘制标记十字(点列表)。
+ public static void PointList(List points, Color color = default(Color), float sizeOfMarkingCross = 1.0f, float markingCrossLinesWidth = 0.0f, bool drawCoordsAsText = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+
+ for (int i = 0; i < points.Count; i++)
+ {
+ Point(points[i], color, sizeOfMarkingCross, Quaternion.identity, markingCrossLinesWidth, null, color, false, drawCoordsAsText, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 在指定位置绘制带标记十字的点。
+ public static void Point(Vector3 position, Color markingCrossColor, float sizeOfMarkingCross = 1.0f, Quaternion rotation = default(Quaternion), float markingCrossLinesWidth = 0.0f, string text = null, Color textColor = default(Color), bool pointer_as_textAttachStyle = false, bool drawCoordsAsText = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Point(position, text, textColor, sizeOfMarkingCross, markingCrossLinesWidth, markingCrossColor, rotation, pointer_as_textAttachStyle, drawCoordsAsText, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在指定位置绘制带文本标记和标记十字的点。
+ public static void Point(Vector3 position, string text = null, Color textColor = default(Color), float sizeOfMarkingCross = 1.0f, float markingCrossLinesWidth = 0.0f, Color overwrite_markingCrossColor = default(Color), Quaternion rotation = default(Quaternion), bool pointer_as_textAttachStyle = true, bool drawCoordsAsText = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_DrawBasics.Point(false, position, text, textColor, sizeOfMarkingCross, markingCrossLinesWidth, overwrite_markingCrossColor, rotation, pointer_as_textAttachStyle, drawCoordsAsText, false, true, Vector3.zero, Quaternion.identity, Vector3.one, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在局部坐标点数组位置绘制标记十字(使用 Transform)。
+ public static void PointLocalArray(Vector3[] localPoints, Transform parentTransform, Color color = default(Color), float sizeOfMarkingCross_global = 1.0f, float markingCrossLinesWidth = 0.0f, bool drawCoordsAsText = true, bool additionallyDrawGlobalCoords = false, bool drawLocalOrigin = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(localPoints, "points")) { return; }
+ if (parentTransform == null)
+ {
+ PointArray(localPoints, color, sizeOfMarkingCross_global, markingCrossLinesWidth, drawCoordsAsText, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ for (int i = 0; i < localPoints.Length; i++)
+ {
+ PointLocal(localPoints[i], parentTransform.position, parentTransform.rotation, parentTransform.lossyScale, null, color, sizeOfMarkingCross_global, markingCrossLinesWidth, color, Quaternion.identity, false, drawCoordsAsText, additionallyDrawGlobalCoords, drawLocalOrigin, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ }
+ }
+
+ /// 在局部坐标点列表位置绘制标记十字(使用 Transform)。
+ public static void PointLocalList(List localPoints, Transform parentTransform, Color color = default(Color), float sizeOfMarkingCross_global = 1.0f, float markingCrossLinesWidth = 0.0f, bool drawCoordsAsText = true, bool additionallyDrawGlobalCoords = false, bool drawLocalOrigin = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(localPoints, "points")) { return; }
+ if (parentTransform == null)
+ {
+ PointList(localPoints, color, sizeOfMarkingCross_global, markingCrossLinesWidth, drawCoordsAsText, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ for (int i = 0; i < localPoints.Count; i++)
+ {
+ PointLocal(localPoints[i], parentTransform.position, parentTransform.rotation, parentTransform.lossyScale, null, color, sizeOfMarkingCross_global, markingCrossLinesWidth, color, Quaternion.identity, false, drawCoordsAsText, additionallyDrawGlobalCoords, drawLocalOrigin, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ }
+ }
+
+ /// 在局部坐标点数组位置绘制标记十字(直接指定父级变换)。
+ public static void PointLocalArray(Vector3[] localPoints, Vector3 parentPositionGlobal, Quaternion parentRotationGlobal, Vector3 parentScaleGlobal, Color color = default(Color), float sizeOfMarkingCross_global = 1.0f, float markingCrossLinesWidth = 0.0f, bool drawCoordsAsText = true, bool additionallyDrawGlobalCoords = false, bool drawLocalOrigin = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(localPoints, "points")) { return; }
+
+ for (int i = 0; i < localPoints.Length; i++)
+ {
+ PointLocal(localPoints[i], parentPositionGlobal, parentRotationGlobal, parentScaleGlobal, null, color, sizeOfMarkingCross_global, markingCrossLinesWidth, color, Quaternion.identity, false, drawCoordsAsText, additionallyDrawGlobalCoords, drawLocalOrigin, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 在局部坐标点列表位置绘制标记十字(直接指定父级变换)。
+ public static void PointLocalList(List localPoints, Vector3 parentPositionGlobal, Quaternion parentRotationGlobal, Vector3 parentScaleGlobal, Color color = default(Color), float sizeOfMarkingCross_global = 1.0f, float markingCrossLinesWidth = 0.0f, bool drawCoordsAsText = true, bool additionallyDrawGlobalCoords = false, bool drawLocalOrigin = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(localPoints, "points")) { return; }
+
+ for (int i = 0; i < localPoints.Count; i++)
+ {
+ PointLocal(localPoints[i], parentPositionGlobal, parentRotationGlobal, parentScaleGlobal, null, color, sizeOfMarkingCross_global, markingCrossLinesWidth, color, Quaternion.identity, false, drawCoordsAsText, additionallyDrawGlobalCoords, drawLocalOrigin, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 在局部坐标位置绘制标记十字(使用 Transform 和标记十字颜色)。
+ public static void PointLocal(Vector3 localPosition, Transform parentTransform, Color markingCrossColor, float sizeOfMarkingCross_global = 1.0f, Quaternion localRotation = default(Quaternion), float markingCrossLinesWidth = 0.0f, string text = null, Color textColor = default(Color), bool pointer_as_textAttachStyle = false, bool drawCoordsAsText = true, bool additionallyDrawGlobalCoords = false, bool drawLocalOrigin = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (parentTransform == null)
+ {
+ text = "[ parent transform that defines
the local space is 'null'
-> fallback to global coordinates]
" + text;
+ Point(localPosition, markingCrossColor, sizeOfMarkingCross_global, localRotation, markingCrossLinesWidth, text, textColor, pointer_as_textAttachStyle, drawCoordsAsText, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ PointLocal(localPosition, parentTransform.position, parentTransform.rotation, parentTransform.lossyScale, markingCrossColor, sizeOfMarkingCross_global, localRotation, markingCrossLinesWidth, text, textColor, pointer_as_textAttachStyle, drawCoordsAsText, additionallyDrawGlobalCoords, drawLocalOrigin, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 在局部坐标位置绘制标记十字(使用 Transform 和文本)。
+ public static void PointLocal(Vector3 localPosition, Transform parentTransform, string text = null, Color textColor = default(Color), float sizeOfMarkingCross_global = 1.0f, float markingCrossLinesWidth = 0.0f, Color overwrite_markingCrossColor = default(Color), Quaternion localRotation = default(Quaternion), bool pointer_as_textAttachStyle = true, bool drawCoordsAsText = true, bool additionallyDrawGlobalCoords = true, bool drawLocalOrigin = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (parentTransform == null)
+ {
+ text = "[ parent transform that defines
the local space is 'null'
-> fallback to global coordinates]
" + text;
+ Point(localPosition, text, textColor, sizeOfMarkingCross_global, markingCrossLinesWidth, overwrite_markingCrossColor, localRotation, pointer_as_textAttachStyle, drawCoordsAsText, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ PointLocal(localPosition, parentTransform.position, parentTransform.rotation, parentTransform.lossyScale, text, textColor, sizeOfMarkingCross_global, markingCrossLinesWidth, overwrite_markingCrossColor, localRotation, pointer_as_textAttachStyle, drawCoordsAsText, additionallyDrawGlobalCoords, drawLocalOrigin, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 在局部坐标位置绘制标记十字(直接指定父级变换和标记十字颜色)。
+ public static void PointLocal(Vector3 localPosition, Vector3 parentPositionGlobal, Quaternion parentRotationGlobal, Vector3 parentScaleGlobal, Color markingCrossColor, float sizeOfMarkingCross_global = 1.0f, Quaternion localRotation = default(Quaternion), float markingCrossLinesWidth = 0.0f, string text = null, Color textColor = default(Color), bool pointer_as_textAttachStyle = false, bool drawCoordsAsText = true, bool additionallyDrawGlobalCoords = false, bool drawLocalOrigin = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ PointLocal(localPosition, parentPositionGlobal, parentRotationGlobal, parentScaleGlobal, text, textColor, sizeOfMarkingCross_global, markingCrossLinesWidth, markingCrossColor, localRotation, pointer_as_textAttachStyle, drawCoordsAsText, additionallyDrawGlobalCoords, drawLocalOrigin, hideZDir, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在局部坐标位置绘制标记十字(直接指定父级变换和文本)。
+ public static void PointLocal(Vector3 localPosition, Vector3 parentPositionGlobal, Quaternion parentRotationGlobal, Vector3 parentScaleGlobal, string text = null, Color textColor = default(Color), float sizeOfMarkingCross_global = 1.0f, float markingCrossLinesWidth = 0.0f, Color overwrite_markingCrossColor = default(Color), Quaternion localRotation = default(Quaternion), bool pointer_as_textAttachStyle = true, bool drawCoordsAsText = true, bool additionallyDrawGlobalCoords = true, bool drawLocalOrigin = true, bool hideZDir = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_DrawBasics.Point(false, localPosition, text, textColor, sizeOfMarkingCross_global, markingCrossLinesWidth, overwrite_markingCrossColor, localRotation, pointer_as_textAttachStyle, drawCoordsAsText, additionallyDrawGlobalCoords, false, parentPositionGlobal, parentRotationGlobal, parentScaleGlobal, hideZDir, durationInSec, hiddenByNearerObjects);
+ if (drawLocalOrigin)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(sizeOfMarkingCross_global, "sizeOfMarkingCross_global")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(localPosition, "localPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(parentPositionGlobal, "parentPositionGlobal")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(parentScaleGlobal, "parentScaleGlobal")) { return; }
+
+ parentRotationGlobal = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(parentRotationGlobal);
+
+ Vector3 parentForward = parentRotationGlobal * Vector3.forward;
+ Vector3 parentUp = parentRotationGlobal * Vector3.up;
+ Vector3 parentRight = parentRotationGlobal * Vector3.right;
+ Vector3 worldPosition = parentPositionGlobal + parentRight * parentScaleGlobal.x * localPosition.x + parentUp * parentScaleGlobal.y * localPosition.y + parentForward * parentScaleGlobal.z * localPosition.z;
+ DrawConnection_fromLocalPoint_toLocalOrigin(parentPositionGlobal, worldPosition, 0.3f * sizeOfMarkingCross_global, parentRotationGlobal, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ static void DrawConnection_fromLocalPoint_toLocalOrigin(Vector3 originWorldPosition, Vector3 markedPointWorldPosition, float sizeOfMarkingCross, Quaternion parentRotationGlobal, float durationInSec, bool hiddenByNearerObjects)
+ {
+ Color originColor = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(Color.white, 0.2f);
+ UtilitiesDXXL_DrawBasics.Point(false, originWorldPosition, "local
origin", originColor, sizeOfMarkingCross, 0.0f, originColor, parentRotationGlobal, false, false, false, true, Vector3.zero, Quaternion.identity, Vector3.one, false, durationInSec, hiddenByNearerObjects);
+ Vector3 localOriginToMarkedPoint = markedPointWorldPosition - originWorldPosition;
+ float distanceToLocalOrigin = localOriginToMarkedPoint.magnitude;
+ Line_fadeableAnimSpeed.InternalDraw(originWorldPosition, markedPointWorldPosition, originColor, 0.0f, null, LineStyle.dashedLong, distanceToLocalOrigin, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ /// 在指定位置绘制带引出线的文本标签。
+ public static void PointTag(Vector3 position, string text = null, Color color = default(Color), float linesWidth = 0.0f, float size_asTextOffsetDistance = 1.0f, Vector3 textOffsetDirection = default(Vector3), float textSizeScaleFactor = 1.0f, bool skipConeDrawing = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_DrawBasics.PointTag(position, text, color, linesWidth, size_asTextOffsetDistance, textOffsetDirection, textSizeScaleFactor, skipConeDrawing, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制带箭头的向量(从起点到终点)。
+ public static void Vector(Vector3 vectorStartPos, Vector3 vectorEndPos, Color color = default(Color), float lineWidth = 0.0f, string text = null, float coneLength = 0.17f, bool pointerAtBothSides = false, bool flattenThickRoundLineIntoAmplitudePlane = false, Vector3 customAmplitudeAndTextDir = default(Vector3), bool addNormalizedMarkingText = false, float enlargeSmallTextToThisMinTextSize = 0.0f, bool writeComponentValuesAsText = false, float endPlates_size = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_DrawBasics.Vector(vectorStartPos, vectorEndPos, color, lineWidth, text, coneLength, pointerAtBothSides, flattenThickRoundLineIntoAmplitudePlane, addNormalizedMarkingText, enlargeSmallTextToThisMinTextSize, writeComponentValuesAsText, durationInSec, hiddenByNearerObjects, customAmplitudeAndTextDir, false, endPlates_size);
+ }
+
+ /// 从起点沿方向向量绘制带箭头的向量。
+ public static void VectorFrom(Vector3 vectorStartPos, Vector3 vector, Color color = default(Color), float lineWidth = 0.0f, string text = null, float coneLength = 0.17f, bool pointerAtBothSides = false, bool flattenThickRoundLineIntoAmplitudePlane = false, Vector3 customAmplitudeAndTextDir = default(Vector3), bool addNormalizedMarkingText = false, float enlargeSmallTextToThisMinTextSize = 0.0f, bool writeComponentValuesAsText = false, float endPlates_size = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_DrawBasics.VectorFrom(vectorStartPos, vector, color, lineWidth, text, coneLength, pointerAtBothSides, flattenThickRoundLineIntoAmplitudePlane, addNormalizedMarkingText, enlargeSmallTextToThisMinTextSize, writeComponentValuesAsText, durationInSec, hiddenByNearerObjects, customAmplitudeAndTextDir, false, endPlates_size);
+ }
+
+ /// 根据方向向量和终点绘制带箭头的向量。
+ public static void VectorTo(Vector3 vector, Vector3 vectorEndPos, Color color = default(Color), float lineWidth = 0.0f, string text = null, float coneLength = 0.17f, bool pointerAtBothSides = false, bool flattenThickRoundLineIntoAmplitudePlane = false, Vector3 customAmplitudeAndTextDir = default(Vector3), bool addNormalizedMarkingText = false, float enlargeSmallTextToThisMinTextSize = 0.0f, bool writeComponentValuesAsText = false, float endPlates_size = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorEndPos, "vectorEndPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vector, "vector")) { return; }
+ VectorFrom(vectorEndPos - vector, vector, color, lineWidth, text, coneLength, pointerAtBothSides, flattenThickRoundLineIntoAmplitudePlane, customAmplitudeAndTextDir, addNormalizedMarkingText, enlargeSmallTextToThisMinTextSize, writeComponentValuesAsText, endPlates_size, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据圆心和两个方向向量绘制带箭头的圆弧向量。
+ public static void VectorCircled(Vector3 circleCenter, Vector3 circleCenter_to_start, Vector3 circleCenter_to_end, Color color = default(Color), float forceRadius = 0.0f, float lineWidth = 0.0f, string text = null, bool useReflexAngleOver180deg = false, float coneLength = 0.17f, bool pointerAtBothSides = false, bool skipFallbackDisplayOfZeroAngles = false, bool flattenThickRoundLineIntoCirclePlane = true, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_LineCircled.VectorCircled(circleCenter, circleCenter_to_start, circleCenter_to_end, color, forceRadius, lineWidth, text, useReflexAngleOver180deg, coneLength, skipFallbackDisplayOfZeroAngles, pointerAtBothSides, flattenThickRoundLineIntoCirclePlane, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据圆心、旋转和角度绘制带箭头的圆弧向量。
+ public static void VectorCircled(Vector3 circleCenterPos, Quaternion orientation, float turnAngleDegCC_startingFromUp, float radius, Color color, float lineWidth = 0.0f, string text = null, float coneLength = 0.17f, bool pointerAtBothSides = false, bool skipFallbackDisplayOfZeroAngles = false, bool flattenThickRoundLineIntoCirclePlane = true, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(circleCenterPos, "circleCenterPos")) { return; }
+
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+
+ Vector3 startPos = circleCenterPos + orientation * Vector3.up * radius;
+ Vector3 turnAxis_origin = circleCenterPos;
+ Vector3 turnAxis_direction = orientation * Vector3.forward;
+ VectorCircled(startPos, turnAxis_origin, turnAxis_direction, turnAngleDegCC_startingFromUp, color, lineWidth, text, coneLength, pointerAtBothSides, skipFallbackDisplayOfZeroAngles, flattenThickRoundLineIntoCirclePlane, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据圆心、旋转和起止角度绘制带箭头的圆弧向量。
+ public static void VectorCircled(Vector3 circleCenterPos, Quaternion orientation, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius = 1.0f, Color color = default(Color), float lineWidth = 0.0f, string text = null, float coneLength = 0.17f, bool pointerAtBothSides = false, bool skipFallbackDisplayOfZeroAngles = false, bool flattenThickRoundLineIntoCirclePlane = true, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(startAngleDegCC_relativeToUp, "startAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(endAngleDegCC_relativeToUp, "endAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(circleCenterPos, "circleCenterPos")) { return; }
+
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+ Vector3 turnAxis_direction = orientation * Vector3.forward;
+ Quaternion fromOrientation_toOrientationSoThatTheStartAngleMarksTheRotationsUpwardDir = Quaternion.AngleAxis(startAngleDegCC_relativeToUp, turnAxis_direction);
+ float turnedAngleDegCC_fromStartAngle = endAngleDegCC_relativeToUp - startAngleDegCC_relativeToUp;
+ Vector3 startPos = circleCenterPos + fromOrientation_toOrientationSoThatTheStartAngleMarksTheRotationsUpwardDir * orientation * Vector3.up * radius;
+ Vector3 turnAxis_origin = circleCenterPos;
+ VectorCircled(startPos, turnAxis_origin, turnAxis_direction, turnedAngleDegCC_fromStartAngle, color, lineWidth, text, coneLength, pointerAtBothSides, skipFallbackDisplayOfZeroAngles, flattenThickRoundLineIntoCirclePlane, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据起点和旋转轴(Ray)绘制带箭头的圆弧向量。
+ public static void VectorCircled(Vector3 startPos, Ray turnAxis, float turnAngleDegCC, Color color = default(Color), float lineWidth = 0.0f, string text = null, float coneLength = 0.17f, bool pointerAtBothSides = false, bool skipFallbackDisplayOfZeroAngles = false, bool flattenThickRoundLineIntoCirclePlane = true, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ VectorCircled(startPos, turnAxis.origin, turnAxis.direction, turnAngleDegCC, color, lineWidth, text, coneLength, pointerAtBothSides, skipFallbackDisplayOfZeroAngles, flattenThickRoundLineIntoCirclePlane, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 根据起点、旋转轴原点和方向绘制带箭头的圆弧向量。
+ public static void VectorCircled(Vector3 startPos, Vector3 turnAxis_origin, Vector3 turnAxis_direction, float turnAngleDegCC, Color color = default(Color), float lineWidth = 0.0f, string text = null, float coneLength = 0.17f, bool pointerAtBothSides = false, bool skipFallbackDisplayOfZeroAngles = false, bool flattenThickRoundLineIntoCirclePlane = true, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_LineCircled.VectorCircled(startPos, turnAxis_origin, turnAxis_direction, turnAngleDegCC, color, lineWidth, text, coneLength, skipFallbackDisplayOfZeroAngles, pointerAtBothSides, flattenThickRoundLineIntoCirclePlane, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects, 1.0f);
+ }
+
+ /// 在指定位置绘制图标(通过法线和向上方向定义朝向)。
+ public static void Icon(Vector3 position, IconType icon, Color color, float size, string text, Vector3 normal, Vector3 up_insideIconPlane = default(Vector3), int strokeWidth_asPPMofSize = 0, bool mirrorHorizontally = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(position, "position")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(normal, "normal")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(up_insideIconPlane, "up_insideIconPlane")) { return; }
+
+ Quaternion rotation = UtilitiesDXXL_DrawBasics.GetRotationOfIcon(position, normal, up_insideIconPlane);
+ Icon(position, icon, color, size, text, rotation, strokeWidth_asPPMofSize, mirrorHorizontally, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在指定位置绘制图标(通过旋转定义朝向)。
+ public static void Icon(Vector3 position, IconType icon, Color color = default(Color), float size = 1.0f, string text = null, Quaternion rotation = default(Quaternion), int strokeWidth_asPPMofSize = 0, bool mirrorHorizontally = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_DrawBasics.Icon(position, icon, color, size, text, rotation, strokeWidth_asPPMofSize, mirrorHorizontally, durationInSec, hiddenByNearerObjects, 0.1f, 0.004f, true);
+ }
+
+ /// 绘制所有图标的图集并显示其名称。
+ public static void DrawAtlasOfAllIconsWithTheirNames(Vector3 position = default(Vector3), Color iconsColor = default(Color), Color textColor = default(Color), bool displayNameTexts = true, float sizeOfIconWall = 10.0f)
+ {
+ UtilitiesDXXL_CharsAndIcons.DrawAllIconsWithTheirNames(position, iconsColor, textColor, displayNameTexts, sizeOfIconWall);
+ }
+
+ /// 在指定位置绘制圆点。
+ public static void Dot(Vector3 position, float radius = 0.5f, Vector3 normal = default(Vector3), Color color = default(Color), string text = null, float density = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ UtilitiesDXXL_DrawBasics.Dot(position, radius, normal, color, text, density, durationInSec, hiddenByNearerObjects, true);
+ }
+
+ /// 绘制沿射线方向移动的箭头动画。
+ public static void MovingArrowsRay(Vector3 start, Vector3 direction, Color color = default(Color), float lineWidth = 0.05f, float distanceBetweenArrows = 0.5f, float lengthOfArrows = 0.15f, string text = null, float animationSpeed = 0.5f, bool backwardAnimationFlipsArrowDirection = true, bool flattenThickRoundLineIntoAmplitudePlane = true, Vector3 customAmplitudeAndTextDir = default(Vector3), float endPlates_size = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ MovingArrowsRay_fadeableAnimSpeed.InternalDraw(start, direction, color, lineWidth, distanceBetweenArrows, lengthOfArrows, text, animationSpeed, null, backwardAnimationFlipsArrowDirection, flattenThickRoundLineIntoAmplitudePlane, customAmplitudeAndTextDir, endPlates_size, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制沿线段方向移动的箭头动画。
+ public static void MovingArrowsLine(Vector3 start, Vector3 end, Color color = default(Color), float lineWidth = 0.05f, float distanceBetweenArrows = 0.5f, float lengthOfArrows = 0.15f, string text = null, float animationSpeed = 0.5f, bool backwardAnimationFlipsArrowDirection = true, bool flattenThickRoundLineIntoAmplitudePlane = true, Vector3 customAmplitudeAndTextDir = default(Vector3), float endPlates_size = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ MovingArrowsLine_fadeableAnimSpeed.InternalDraw(start, end, color, lineWidth, distanceBetweenArrows, lengthOfArrows, text, animationSpeed, null, backwardAnimationFlipsArrowDirection, flattenThickRoundLineIntoAmplitudePlane, customAmplitudeAndTextDir, endPlates_size, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制交替颜色的射线。
+ public static void RayWithAlternatingColors(Vector3 start, Vector3 direction, Color color1 = default(Color), Color color2 = default(Color), float width = 0.0f, float lengthOfStripes = 0.04f, string text = null, float animationSpeed = 0.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ RayWithAlternatingColors_fadeableAnimSpeed.InternalDraw(start, direction, color1, color2, width, lengthOfStripes, text, animationSpeed, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制交替颜色的线段。
+ public static void LineWithAlternatingColors(Vector3 start, Vector3 end, Color color1 = default(Color), Color color2 = default(Color), float width = 0.0f, float lengthOfStripes = 0.04f, string text = null, float animationSpeed = 0.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ LineWithAlternatingColors_fadeableAnimSpeed.InternalDraw(start, end, color1, color2, width, lengthOfStripes, text, animationSpeed, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制闪烁的射线。
+ public static void BlinkingRay(Vector3 start, Vector3 direction, Color primaryColor = default(Color), float blinkDurationInSec = 0.5f, float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, Color blinkColor = default(Color), float stylePatternScaleFactor = 1.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(direction, "direction")) { return; }
+
+ Vector3 end = start + direction;
+ BlinkingLine(start, end, primaryColor, blinkDurationInSec, width, text, style, blinkColor, stylePatternScaleFactor, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制闪烁的线段。
+ public static void BlinkingLine(Vector3 start, Vector3 end, Color primaryColor = default(Color), float blinkDurationInSec = 0.5f, float width = 0.0f, string text = null, LineStyle style = LineStyle.solid, Color blinkColor = default(Color), float stylePatternScaleFactor = 1.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(blinkDurationInSec, "blinkDurationInSec")) { return; }
+
+ blinkDurationInSec = Mathf.Max(blinkDurationInSec, UtilitiesDXXL_DrawBasics.min_blinkDurationInSec);
+ float passedBlinkIntervallsSinceStartup = UtilitiesDXXL_LineStyles.GetTime() / blinkDurationInSec;
+ primaryColor = UtilitiesDXXL_Colors.OverwriteDefaultColor(primaryColor);
+ if (UtilitiesDXXL_Math.CheckIf_givenNumberIs_evenNotOdd(Mathf.FloorToInt(passedBlinkIntervallsSinceStartup)))
+ {
+ Line_fadeableAnimSpeed.InternalDraw(start, end, primaryColor, width, text, style, stylePatternScaleFactor, 0.0f, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+ else
+ {
+ if (UtilitiesDXXL_Colors.IsDefaultColor(blinkColor))
+ {
+ Color alternatingBlinkColor = UtilitiesDXXL_Colors.Invert_andAlphaTo1(primaryColor);
+ alternatingBlinkColor = UtilitiesDXXL_Colors.OverwriteColorNearGreyWithBlack(alternatingBlinkColor);
+ Line_fadeableAnimSpeed.InternalDraw(start, end, alternatingBlinkColor, width, text, style, stylePatternScaleFactor, 0.0f, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+ else
+ {
+ Line_fadeableAnimSpeed.InternalDraw(start, end, blinkColor, width, text, style, stylePatternScaleFactor, 0.0f, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+ }
+ }
+
+ /// 绘制张力射线(根据拉伸/压缩状态改变颜色和样式)。
+ public static void RayUnderTension(Vector3 start, Vector3 direction, float relaxedLength = 1.0f, Color relaxedColor = default(Color), LineStyle style = LineStyle.spiral, float stretchFactor_forStretchedTensionColor = 2.0f, Color color_forStretchedTension = default(Color), float stretchFactor_forSqueezedTensionColor = 0.0f, Color color_forSqueezedTension = default(Color), float width = 0.0f, string text = null, float alphaOfReferenceLengthDisplay = 0.15f, float stylePatternScaleFactor = 1.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(direction, "direction")) { return; }
+ LineUnderTension(start, start + direction, relaxedLength, relaxedColor, style, stretchFactor_forStretchedTensionColor, color_forStretchedTension, stretchFactor_forSqueezedTensionColor, color_forSqueezedTension, width, text, alphaOfReferenceLengthDisplay, stylePatternScaleFactor, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, endPlates_size, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制张力线段(根据拉伸/压缩状态改变颜色和样式)。
+ public static void LineUnderTension(Vector3 start, Vector3 end, float relaxedLength = 1.0f, Color relaxedColor = default(Color), LineStyle style = LineStyle.spiral, float stretchFactor_forStretchedTensionColor = 2.0f, Color color_forStretchedTension = default(Color), float stretchFactor_forSqueezedTensionColor = 0.0f, Color color_forSqueezedTension = default(Color), float width = 0.0f, string text = null, float alphaOfReferenceLengthDisplay = 0.15f, float stylePatternScaleFactor = 1.0f, Vector3 customAmplitudeAndTextDir = default(Vector3), bool flattenThickRoundLineIntoAmplitudePlane = false, float endPlates_size = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+
+ bool parametersAreInvalid = UtilitiesDXXL_DrawBasics.GetSpecsOfLineUnderTension(out float tensionFactor, out Color usedColor, out float lineLength, start, end, relaxedLength, relaxedColor, color_forStretchedTension, color_forSqueezedTension, stretchFactor_forStretchedTensionColor, stretchFactor_forSqueezedTensionColor);
+ if (parametersAreInvalid) { return; }
+ UtilitiesDXXL_DrawBasics.TryDrawReferenceLengthDisplay_ofLineUnderTension(start, end, alphaOfReferenceLengthDisplay, relaxedLength, relaxedColor, lineLength, null, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.Line(start, end, usedColor, width, text, style, stylePatternScaleFactor, 0.0f, null, customAmplitudeAndTextDir, flattenThickRoundLineIntoAmplitudePlane, 0.0f, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines, null, false, endPlates_size, tensionFactor);
+ }
+
+ /// 绘制二次贝塞尔曲线(GameObject 指定起点方向和终点)。
+ public static void BezierSegmentQuadratic(GameObject startPositionAndDirection, GameObject endPosition, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPositionAndDirection, "startPositionAndDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ BezierSegmentQuadratic(startPositionAndDirection.transform, endPosition.transform, color, text, width, straightSubDivisions, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制二次贝塞尔曲线(Transform 指定起点方向和终点)。
+ public static void BezierSegmentQuadratic(Transform startPositionAndDirection, Transform endPosition, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPositionAndDirection, "startPositionAndDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ Vector3 controlPosInBetween = startPositionAndDirection.position + startPositionAndDirection.forward * startPositionAndDirection.localScale.z;
+ BezierSegmentQuadratic(startPositionAndDirection.position, endPosition.position, controlPosInBetween, color, text, width, straightSubDivisions, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制二次贝塞尔曲线(GameObject 指定起点、终点和控制点)。
+ public static void BezierSegmentQuadratic(GameObject startPosition, GameObject endPosition, GameObject controlPosInBetween, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosInBetween, "controlPosInBetween")) { return; }
+ BezierSegmentQuadratic(startPosition.transform.position, endPosition.transform.position, controlPosInBetween.transform.position, color, text, width, straightSubDivisions, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制二次贝塞尔曲线(Transform 指定起点、终点和控制点)。
+ public static void BezierSegmentQuadratic(Transform startPosition, Transform endPosition, Transform controlPosInBetween, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosInBetween, "controlPosInBetween")) { return; }
+ BezierSegmentQuadratic(startPosition.position, endPosition.position, controlPosInBetween.position, color, text, width, straightSubDivisions, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制二次贝塞尔曲线(Vector3 指定起点、终点和控制点)。
+ public static void BezierSegmentQuadratic(Vector3 startPosition, Vector3 endPosition, Vector3 controlPosInBetween, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(controlPosInBetween, "controlPosInBetween")) { return; }
+
+ UtilitiesDXXL_Bezier.BezierSegmentQuadratic(false, startPosition, endPosition, controlPosInBetween, color, text, width, straightSubDivisions, textSize, true, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制三次贝塞尔曲线(GameObject 指定起点方向和终点方向)。
+ public static void BezierSegmentCubic(GameObject startPositionAndDirection, GameObject endPositionAndDirection, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, bool closeGapFromEndToStart = false, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPositionAndDirection, "startPositionAndDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPositionAndDirection, "endPositionAndDirection")) { return; }
+ BezierSegmentCubic(startPositionAndDirection.transform, endPositionAndDirection.transform, color, text, width, straightSubDivisions, closeGapFromEndToStart, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制三次贝塞尔曲线(Transform 指定起点方向和终点方向)。
+ public static void BezierSegmentCubic(Transform startPositionAndDirection, Transform endPositionAndDirection, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, bool closeGapFromEndToStart = false, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPositionAndDirection, "startPositionAndDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPositionAndDirection, "endPositionAndDirection")) { return; }
+ Vector3 controlPosOfStartDirection = startPositionAndDirection.position + startPositionAndDirection.forward * startPositionAndDirection.localScale.z;
+ Vector3 controlPosOfEndDirection = endPositionAndDirection.position - endPositionAndDirection.forward * endPositionAndDirection.localScale.z;
+ BezierSegmentCubic(startPositionAndDirection.position, endPositionAndDirection.position, controlPosOfStartDirection, controlPosOfEndDirection, color, text, width, straightSubDivisions, closeGapFromEndToStart, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制三次贝塞尔曲线(GameObject 指定起点、终点和两个控制点)。
+ public static void BezierSegmentCubic(GameObject startPosition, GameObject endPosition, GameObject controlPosOfStartDirection, GameObject controlPosOfEndDirection, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, bool closeGapFromEndToStart = false, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosOfStartDirection, "controlPosOfStartDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosOfEndDirection, "controlPosOfEndDirection")) { return; }
+ BezierSegmentCubic(startPosition.transform.position, endPosition.transform.position, controlPosOfStartDirection.transform.position, controlPosOfEndDirection.transform.position, color, text, width, straightSubDivisions, closeGapFromEndToStart, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制三次贝塞尔曲线(Transform 指定起点、终点和两个控制点)。
+ public static void BezierSegmentCubic(Transform startPosition, Transform endPosition, Transform controlPosOfStartDirection, Transform controlPosOfEndDirection, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, bool closeGapFromEndToStart = false, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosOfStartDirection, "controlPosOfStartDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosOfEndDirection, "controlPosOfEndDirection")) { return; }
+ BezierSegmentCubic(startPosition.position, endPosition.position, controlPosOfStartDirection.position, controlPosOfEndDirection.position, color, text, width, straightSubDivisions, closeGapFromEndToStart, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制三次贝塞尔曲线(Vector3 指定起点、终点和两个控制点)。
+ public static void BezierSegmentCubic(Vector3 startPosition, Vector3 endPosition, Vector3 controlPosOfStartDirection, Vector3 controlPosOfEndDirection, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, bool closeGapFromEndToStart = false, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(controlPosOfStartDirection, "controlPosOfStartDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(controlPosOfEndDirection, "controlPosOfEndDirection")) { return; }
+
+ UtilitiesDXXL_Bezier.BezierSegmentCubic(false, startPosition, endPosition, controlPosOfStartDirection, controlPosOfEndDirection, color, text, width, straightSubDivisions, textSize, true, durationInSec, hiddenByNearerObjects);
+ if (closeGapFromEndToStart)
+ {
+ Vector3 startPos_to_startControlPos = controlPosOfStartDirection - startPosition;
+ Vector3 endPos_to_endControlPos = controlPosOfEndDirection - endPosition;
+ Vector3 controlPosOfStartDirection_ofSecondCurve = startPosition - startPos_to_startControlPos;
+ Vector3 controlPosOfEndDirection_ofSecondCurve = endPosition - endPos_to_endControlPos;
+ UtilitiesDXXL_Bezier.BezierSegmentCubic(false, startPosition, endPosition, controlPosOfStartDirection_ofSecondCurve, controlPosOfEndDirection_ofSecondCurve, color, null, width, straightSubDivisions, textSize, true, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex GetPositionsFromGameObjectsArray_preAllocated = UtilitiesDXXL_Bezier.GetPositionsFromGameObjectsArray;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform GetForwardControlPosFromGameObjectsArray_preAllocated = UtilitiesDXXL_Bezier.GetForwardControlPosFromGameObjectsArray;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform GetBackwardControlPosFromGameObjectsArray_preAllocated = UtilitiesDXXL_Bezier.GetBackwardControlPosFromGameObjectsArray;
+ /// 通过 GameObject 数组绘制贝塞尔样条曲线。
+ public static void BezierSpline(GameObject[] points, Color color = default(Color), BezierPosInterpretation interpretationOfArray = BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ UtilitiesDXXL_Bezier.BezierSpline(false, 0.0f, points, GetPositionsFromGameObjectsArray_preAllocated, GetForwardControlPosFromGameObjectsArray_preAllocated, GetBackwardControlPosFromGameObjectsArray_preAllocated, points.Length, color, interpretationOfArray, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex> GetPositionsFromGameObjectsList_preAllocated = UtilitiesDXXL_Bezier.GetPositionsFromGameObjectsList;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform> GetForwardControlPosFromGameObjectsList_preAllocated = UtilitiesDXXL_Bezier.GetForwardControlPosFromGameObjectsList;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform> GetBackwardControlPosFromGameObjectsList_preAllocated = UtilitiesDXXL_Bezier.GetBackwardControlPosFromGameObjectsList;
+ /// 通过 GameObject 列表绘制贝塞尔样条曲线。
+ public static void BezierSpline(List points, Color color = default(Color), BezierPosInterpretation interpretationOfList = BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ UtilitiesDXXL_Bezier.BezierSpline>(false, 0.0f, points, GetPositionsFromGameObjectsList_preAllocated, GetForwardControlPosFromGameObjectsList_preAllocated, GetBackwardControlPosFromGameObjectsList_preAllocated, points.Count, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex GetPositionsFromTransformsArray_preAllocated = UtilitiesDXXL_Bezier.GetPositionsFromTransformsArray;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform GetForwardControlPosFromTransformsArray_preAllocated = UtilitiesDXXL_Bezier.GetForwardControlPosFromTransformsArray;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform GetBackwardControlPosFromTransformsArray_preAllocated = UtilitiesDXXL_Bezier.GetBackwardControlPosFromTransformsArray;
+ /// 通过 Transform 数组绘制贝塞尔样条曲线。
+ public static void BezierSpline(Transform[] points, Color color = default(Color), BezierPosInterpretation interpretationOfArray = BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ UtilitiesDXXL_Bezier.BezierSpline(false, 0.0f, points, GetPositionsFromTransformsArray_preAllocated, GetForwardControlPosFromTransformsArray_preAllocated, GetBackwardControlPosFromTransformsArray_preAllocated, points.Length, color, interpretationOfArray, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex> GetPositionsFromTransformsList_preAllocated = UtilitiesDXXL_Bezier.GetPositionsFromTransformsList;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform> GetForwardControlPosFromTransformsList_preAllocated = UtilitiesDXXL_Bezier.GetForwardControlPosFromTransformsList;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform> GetBackwardControlPosFromTransformsList_preAllocated = UtilitiesDXXL_Bezier.GetBackwardControlPosFromTransformsList;
+ /// 通过 Transform 列表绘制贝塞尔样条曲线。
+ public static void BezierSpline(List points, Color color = default(Color), BezierPosInterpretation interpretationOfList = BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ UtilitiesDXXL_Bezier.BezierSpline>(false, 0.0f, points, GetPositionsFromTransformsList_preAllocated, GetForwardControlPosFromTransformsList_preAllocated, GetBackwardControlPosFromTransformsList_preAllocated, points.Count, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex GetPositionsFromVector3Array_preAllocated = UtilitiesDXXL_Bezier.GetPositionsFromVector3Array;
+ /// 通过 Vector3 数组绘制贝塞尔样条曲线。
+ public static void BezierSpline(Vector3[] points, Color color = default(Color), BezierPosInterpretation interpretationOfArray = BezierPosInterpretation.start_control1_control2_endIsNextStart, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //"interpretationOfArray": only "start_control1_control2_endIsNextStart" and "start_control1_endIsNextStart" are supported for the "BezierSpline" overloads that supply the spline positions as "Vector3". For the other "BezierPosInterpretation": Use a function overload that takes "Transform" or "GameObject"
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (interpretationOfArray == BezierPosInterpretation.start_control1_control2_endIsNextStart || interpretationOfArray == BezierPosInterpretation.start_control1_endIsNextStart)
+ {
+ UtilitiesDXXL_Bezier.BezierSpline(false, 0.0f, points, GetPositionsFromVector3Array_preAllocated, null, null, points.Length, color, interpretationOfArray, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ Debug.LogError("The specified interpretationOfArray ('" + interpretationOfArray + "') is not supported for BezierSpline() function overloads that take 'Vector3'-collections. You may choose an overload that takes 'Transform'- or 'GameObject'-collections.");
+ }
+ }
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex> GetPositionsFromVector3List_preAllocated = UtilitiesDXXL_Bezier.GetPositionsFromVector3List;
+ /// 通过 Vector3 列表绘制贝塞尔样条曲线。
+ public static void BezierSpline(List points, Color color = default(Color), BezierPosInterpretation interpretationOfList = BezierPosInterpretation.start_control1_control2_endIsNextStart, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //"interpretationOfArray": only "start_control1_control2_endIsNextStart" and "start_control1_endIsNextStart" are supported for the "BezierSpline" overloads that supply the spline positions as "Vector3". For the other "BezierPosInterpretation": Use a function overload that takes "Transform" or "GameObject"
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (interpretationOfList == BezierPosInterpretation.start_control1_control2_endIsNextStart || interpretationOfList == BezierPosInterpretation.start_control1_endIsNextStart)
+ {
+ UtilitiesDXXL_Bezier.BezierSpline>(false, 0.0f, points, GetPositionsFromVector3List_preAllocated, null, null, points.Count, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ Debug.LogError("The specified interpretationOfList ('" + interpretationOfList + "') is not supported for BezierSpline() function overloads that take 'Vector3'-collections. You may choose an overload that takes 'Transform'- or 'GameObject'-collections.");
+ }
+ }
+
+ /// 获取自当前周期开始以来已绘制的线段数量。
+ public static int GetNumberOfDrawnLinesSinceCycleStart()
+ {
+ return DXXLWrapperForUntiysBuildInDrawLines.DrawnLinesSinceFrameStart;
+ }
+
+ /// 全局覆盖 durationInSec 参数的开关。
+ public static void ToggleGlobalOverwriteFor_durationInSec(bool globalOverwriteIsEnabled, float valueOf_durationInSec_thatShouldAlwaysBeEnforced = 0.0f)
+ {
+ DXXLWrapperForUntiysBuildInDrawLines.ToggleGlobalOverwriteFor_durationInSec(globalOverwriteIsEnabled, valueOf_durationInSec_thatShouldAlwaysBeEnforced);
+ }
+
+ /// 全局覆盖 hiddenByNearerObjects 参数的开关。
+ public static void ToggleGlobalOverwriteFor_hiddenByNearerObjects(bool globalOverwriteIsEnabled, bool valueOf_hiddenByNearerObjects_thatShouldAlwaysBeEnforced = true)
+ {
+ DXXLWrapperForUntiysBuildInDrawLines.ToggleGlobalOverwriteFor_hiddenByNearerObjects(globalOverwriteIsEnabled, valueOf_hiddenByNearerObjects_thatShouldAlwaysBeEnforced);
+ }
+
+ /// 将屏幕空间的样式模式缩放因子转换为世界空间(基于线段起点和终点)。
+ public static float StylePatternScaleFactor_screenspaceToWorldspace(Vector3 positionOfLineStart, Vector3 positionOfLineEnd, float stylePatternScaleFactor_inScreenspace = 1.0f, Camera screenspaceDefiningCamera = null)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(positionOfLineStart, "positionOfLineStart")) { return 1.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(positionOfLineEnd, "positionOfLineEnd")) { return 1.0f; }
+
+ Vector3 centerOfLine = 0.5f * (positionOfLineStart + positionOfLineEnd);
+ return StylePatternScaleFactor_screenspaceToWorldspace(centerOfLine, stylePatternScaleFactor_inScreenspace, screenspaceDefiningCamera);
+ }
+
+ public static float StylePatternScaleFactor_screenspaceToWorldspace(Vector3 positionOfStyledObject, float stylePatternScaleFactor_inScreenspace = 1.0f, Camera screenspaceDefiningCamera = null)
+ {
+ //Many draw functions (e.g. like "DrawBasics.Line()"(link) have a "stylePatternScaleFactor" paramter, which scales the line style pattern, so different camera distances can be served with a recognizable pattern. This function can be used to generate "stylePatternScaleFactors" with which the line styles always appear with a constant screenspace pattern size. Just fill the return value of this function into the "stylePatternScaleFactor" parameter of the other drawing functions.
+ //The downside of fixed screenspace size patterns is, that if you change the camera position so that a line comes closer or gets farer, then the pattern is not "mounted/fixed" at the line start and end position, since the line changes its length on the screen, but the pattern remains with constant size in the screen. This can compromise the viewers intuitive perception of the line as an object in 3D space.
+ //The function is only a rough approximation, and the returned values may have a notable error span when "positionOfStyledObject" is more and more in a screen corner or for certain distances from the camera.
+ //"stylePatternScaleFactor_inScreenspace": scales the pattern inside the screenspace
+ //"screenspaceDefiningCamera": if it is not specified then "DrawScreenspace.defaultCameraForDrawing" or "DrawScreenspace.defaultScreenspaceWindowForDrawing" is used as fallback.
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(positionOfStyledObject, "positionOfStyledObject")) { return 1.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(stylePatternScaleFactor_inScreenspace, "stylePatternScaleFactor_inScreenspace")) { return 1.0f; }
+
+ stylePatternScaleFactor_inScreenspace = Mathf.Abs(stylePatternScaleFactor_inScreenspace);
+ stylePatternScaleFactor_inScreenspace = Mathf.Max(stylePatternScaleFactor_inScreenspace, 0.01f);
+
+ Camera usedCamera;
+ if (screenspaceDefiningCamera == null)
+ {
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out usedCamera, "DrawBasics.ScreenspaceStylePatternScaleFactor_to_WorldspaceStylePatternScaleFactor") == false) { return 1.0f; }
+ }
+ else
+ {
+ usedCamera = screenspaceDefiningCamera;
+ }
+
+ float distanceToCamera = (positionOfStyledObject - usedCamera.transform.position).magnitude;
+ //float diagonalExtentOfViewport_at_distanceFromCam = UtilitiesDXXL_Screenspace.Get_diagonalExtentOfViewport_at_distanceFromCam(usedCamera, distanceToCamera);
+ float diagonalExtentOfViewport_at_distanceFromCam = UtilitiesDXXL_Screenspace.Get_vertExtentOfViewport_at_distanceFromCam(usedCamera, distanceToCamera);
+ float stylePatternScaleFactor_inWorldspace = diagonalExtentOfViewport_at_distanceFromCam * stylePatternScaleFactor_inScreenspace;
+ stylePatternScaleFactor_inWorldspace = Mathf.Max(stylePatternScaleFactor_inWorldspace, UtilitiesDXXL_LineStyles.minStylePatternScaleFactor);
+ return stylePatternScaleFactor_inWorldspace;
+ }
+
+ }
+
+}
+
+
+
+
+
diff --git a/Runtime/DrawDebugLibrary/DrawBasics.cs.meta b/Runtime/DrawDebugLibrary/DrawBasics.cs.meta
new file mode 100644
index 0000000..101c608
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawBasics.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c21f47c57d3aec440a8bdea3d5e3cf58
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawBasics2D.cs b/Runtime/DrawDebugLibrary/DrawBasics2D.cs
new file mode 100644
index 0000000..7429c46
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawBasics2D.cs
@@ -0,0 +1,857 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System.Collections.Generic;
+
+ public class DrawBasics2D
+ {
+ private static float default_zPos_forDrawing = 0.0f;
+ public static float Default_zPos_forDrawing
+ {
+ get { return default_zPos_forDrawing; }
+ set
+ {
+ if (float.IsNaN(value) || float.IsInfinity(value))
+ {
+ Debug.LogError("Cannot set 'default_zPos_forDrawing' to " + value);
+ }
+ else
+ {
+ default_zPos_forDrawing = value;
+ }
+ }
+ }
+
+ /// 在2D平面上绘制一条线段。
+ public static void Line(Vector2 start, Vector2 end, Color color = default(Color), float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Line_fadeableAnimSpeed_2D.InternalDraw(start, end, color, width, text, style, custom_zPos, stylePatternScaleFactor, animationSpeed, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 在2D平面上绘制一条射线。
+ public static void Ray(Vector2 start, Vector2 direction, Color color = default(Color), float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Ray_fadeableAnimSpeed_2D.InternalDraw(start, direction, color, width, text, style, custom_zPos, stylePatternScaleFactor, animationSpeed, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 从起点沿指定方向绘制一条2D线段。
+ public static void LineFrom(Vector2 start, Vector2 direction, Color color = default(Color), float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ LineFrom_fadeableAnimSpeed_2D.InternalDraw(start, direction, color, width, text, style, custom_zPos, stylePatternScaleFactor, animationSpeed, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 从指定方向朝向终点绘制一条2D线段。
+ public static void LineTo(Vector2 direction, Vector2 end, Color color = default(Color), float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ LineTo_fadeableAnimSpeed_2D.InternalDraw(direction, end, color, width, text, style, custom_zPos, stylePatternScaleFactor, animationSpeed, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制一条颜色从起点渐变到终点的2D线段。
+ public static void LineColorFade(Vector2 start, Vector2 end, Color startColor, Color endColor, float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Line_fadeableAnimSpeed_2D.InternalDrawColorFade(start, end, startColor, endColor, width, text, style, custom_zPos, stylePatternScaleFactor, animationSpeed, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制一条颜色从起点渐变到终点的2D射线。
+ public static void RayColorFade(Vector2 start, Vector2 direction, Color startColor, Color endColor, float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Ray_fadeableAnimSpeed_2D.InternalDrawColorFade(start, direction, startColor, endColor, width, text, style, custom_zPos, stylePatternScaleFactor, animationSpeed, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 从起点沿方向绘制一条颜色渐变的2D线段。
+ public static void LineFrom_withColorFade(Vector2 start, Vector2 direction, Color startColor, Color endColor, float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ LineFrom_fadeableAnimSpeed_2D.InternalDraw_withColorFade(start, direction, startColor, endColor, width, text, style, custom_zPos, stylePatternScaleFactor, animationSpeed, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 朝向终点绘制一条颜色渐变的2D线段。
+ public static void LineTo_withColorFade(Vector2 direction, Vector2 end, Color startColor, Color endColor, float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ LineTo_fadeableAnimSpeed_2D.InternalDraw_withColorFade(direction, end, startColor, endColor, width, text, style, custom_zPos, stylePatternScaleFactor, animationSpeed, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 在2D平面上绘制一段圆弧线(通过圆心和起止方向向量)。
+ public static void LineCircled(Vector2 circleCenter, Vector2 circleCenter_to_start, Vector2 circleCenter_to_end, Color color = default(Color), float forceRadius = 0.0f, float width = 0.0f, string text = null, bool useReflexAngleOver180deg = false, float custom_zPos = float.PositiveInfinity, bool skipFallbackDisplayOfZeroAngles = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 circleCenterV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenter, zPos);
+ Vector3 circleCenter_to_startV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(circleCenter_to_start);
+ Vector3 circleCenter_to_endV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(circleCenter_to_end);
+ UtilitiesDXXL_LineCircled.LineCircled(circleCenterV3, circleCenter_to_startV3, circleCenter_to_endV3, color, forceRadius, width, text, useReflexAngleOver180deg, skipFallbackDisplayOfZeroAngles, true, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一段圆弧线(通过起点、圆心和转角)。
+ public static void LineCircled(Vector2 startPos, Vector2 circleCenter, float turnAngleDegCC, Color color = default(Color), float width = 0.0f, string text = null, float custom_zPos = float.PositiveInfinity, bool skipFallbackDisplayOfZeroAngles = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 startPosV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(startPos, zPos);
+ Vector3 turnAxis_originV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenter, zPos);
+ UtilitiesDXXL_LineCircled.LineCircled(startPosV3, turnAxis_originV3, Vector3.forward, turnAngleDegCC, color, width, text, skipFallbackDisplayOfZeroAngles, true, durationInSec, hiddenByNearerObjects, false, minAngleDeg_withoutTextLineBreak, textAnchor);
+ }
+
+ /// 在2D平面上绘制一段圆弧线(通过圆心、起始角度和结束角度)。
+ public static void LineCircled(Vector2 circleCenter, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius = 0.5f, Color color = default(Color), float width = 0.0f, string text = null, float custom_zPos = float.PositiveInfinity, bool skipFallbackDisplayOfZeroAngles = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(startAngleDegCC_relativeToUp, "startAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(endAngleDegCC_relativeToUp, "endAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 turnAxis_originV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenter, zPos);
+ float turnedAngleDegCC_fromStartAngle = endAngleDegCC_relativeToUp - startAngleDegCC_relativeToUp;
+ Quaternion rotation_fromUp_toLineStart = Quaternion.AngleAxis(startAngleDegCC_relativeToUp, Vector3.forward);
+ Vector3 cirleCenter_towards_lineStart_normalized = rotation_fromUp_toLineStart * Vector3.up;
+ Vector3 startPosV3 = turnAxis_originV3 + cirleCenter_towards_lineStart_normalized * radius;
+ UtilitiesDXXL_LineCircled.LineCircled(startPosV3, turnAxis_originV3, Vector3.forward, turnedAngleDegCC_fromStartAngle, color, width, text, skipFallbackDisplayOfZeroAngles, true, durationInSec, hiddenByNearerObjects, false, minAngleDeg_withoutTextLineBreak, textAnchor);
+ }
+
+ /// 在2D平面上绘制一个扇形(通过圆心和起止方向向量)。
+ public static void CircleSegment(Vector2 circleCenter, Vector2 circleCenter_to_startPosOnPerimeter, Vector2 circleCenter_to_endPosOnPerimeter, Color color = default(Color), float forceRadius = 0.0f, string text = null, bool useReflexAngleOver180deg = false, float custom_zPos = float.PositiveInfinity, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 circleCenterV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenter, zPos);
+ Vector3 circleCenter_to_startV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(circleCenter_to_startPosOnPerimeter);
+ Vector3 circleCenter_to_endV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(circleCenter_to_endPosOnPerimeter);
+ UtilitiesDXXL_LineCircled.CircleSegment(circleCenterV3, circleCenter_to_startV3, circleCenter_to_endV3, color, forceRadius, fillDensity, text, useReflexAngleOver180deg, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, minAngleDeg_withoutTextLineBreak, DrawText.TextAnchorCircledDXXL.LowerLeftOfWholeTextBlock, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个扇形(通过起点、圆心和转角)。
+ public static void CircleSegment(Vector2 startPosOnPerimeter, Vector2 circleCenter, float turnAngleDegCC, Color color = default(Color), string text = null, float custom_zPos = float.PositiveInfinity, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 startPosV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(startPosOnPerimeter, zPos);
+ Vector3 turnAxis_originV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenter, zPos);
+ UtilitiesDXXL_LineCircled.CircleSegment(startPosV3, turnAxis_originV3, Vector3.forward, turnAngleDegCC, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, durationInSec, hiddenByNearerObjects, false, minAngleDeg_withoutTextLineBreak, DrawText.TextAnchorCircledDXXL.LowerLeftOfWholeTextBlock);
+ }
+
+ /// 在2D平面上绘制一个扇形(通过圆心、起始角度和结束角度)。
+ public static void CircleSegment(Vector2 circleCenter, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius = 0.5f, Color color = default(Color), string text = null, float custom_zPos = float.PositiveInfinity, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(startAngleDegCC_relativeToUp, "startAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(endAngleDegCC_relativeToUp, "endAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 turnAxis_originV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenter, zPos);
+ float turnedAngleDegCC_fromStartAngle = endAngleDegCC_relativeToUp - startAngleDegCC_relativeToUp;
+ Quaternion rotation_fromUp_toLineStart = Quaternion.AngleAxis(startAngleDegCC_relativeToUp, Vector3.forward);
+ Vector3 cirleCenter_towards_lineStart_normalized = rotation_fromUp_toLineStart * Vector3.up;
+ Vector3 startPosV3 = turnAxis_originV3 + cirleCenter_towards_lineStart_normalized * radius;
+ UtilitiesDXXL_LineCircled.CircleSegment(startPosV3, turnAxis_originV3, Vector3.forward, turnedAngleDegCC_fromStartAngle, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, durationInSec, hiddenByNearerObjects, false, minAngleDeg_withoutTextLineBreak, DrawText.TextAnchorCircledDXXL.LowerLeftOfWholeTextBlock);
+ }
+
+ /// 通过一组点数组绘制一条2D折线。
+ public static void LineString(Vector2[] points, Color color = default(Color), bool closeGapBetweenLastAndFirstPoint = false, float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width, "width")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ width = UtilitiesDXXL_Math.AbsNonZeroValue(width);
+
+ if (points.Length == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ for (int i = 0; i < (points.Length - 1); i++)
+ {
+ Line_fadeableAnimSpeed_2D.InternalDraw(points[i], points[i + 1], color, width, null, style, zPos, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed_2D.InternalDraw(points[points.Length - 1], points[0], color, width, null, style, zPos, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (text != null && text != "")
+ {
+ TagLineString(zPos, text, points, width, color, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 通过一组点列表绘制一条2D折线。
+ public static void LineString(List points, Color color = default(Color), bool closeGapBetweenLastAndFirstPoint = false, float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width, "width")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ width = UtilitiesDXXL_Math.AbsNonZeroValue(width);
+
+ if (points.Count == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ for (int i = 0; i < (points.Count - 1); i++)
+ {
+ Line_fadeableAnimSpeed_2D.InternalDraw(points[i], points[i + 1], color, width, null, style, zPos, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed_2D.InternalDraw(points[points.Count - 1], points[0], color, width, null, style, zPos, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (text != null && text != "")
+ {
+ TagLineString(zPos, text, points, width, color, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 绘制一条颜色渐变的2D折线(使用点数组)。
+ public static void LineStringColorFade(Vector2[] points, Color startColor, Color endColor, bool closeGapBetweenLastAndFirstPoint = false, float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width, "width")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ width = UtilitiesDXXL_Math.AbsNonZeroValue(width);
+
+ if (points.Length == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ int iOffset_forColorFade = -1;
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ iOffset_forColorFade = 0;
+ }
+
+ for (int i = 0; i < (points.Length - 1); i++)
+ {
+ Color color = UtilitiesDXXL_DrawBasics.GetFadedColorFromSegments(startColor, endColor, i, points.Length + iOffset_forColorFade);
+ Line_fadeableAnimSpeed_2D.InternalDraw(points[i], points[i + 1], color, width, null, style, zPos, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed_2D.InternalDraw(points[points.Length - 1], points[0], endColor, width, null, style, zPos, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (text != null && text != "")
+ {
+ Color averageColor = Color.Lerp(startColor, endColor, 0.5f);
+ TagLineString(zPos, text, points, width, averageColor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 绘制一条颜色渐变的2D折线(使用点列表)。
+ public static void LineStringColorFade(List points, Color startColor, Color endColor, bool closeGapBetweenLastAndFirstPoint = false, float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width, "width")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ width = UtilitiesDXXL_Math.AbsNonZeroValue(width);
+
+ if (points.Count == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ int iOffset_forColorFade = -1;
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ iOffset_forColorFade = 0;
+ }
+
+ for (int i = 0; i < (points.Count - 1); i++)
+ {
+ Color color = UtilitiesDXXL_DrawBasics.GetFadedColorFromSegments(startColor, endColor, i, points.Count + iOffset_forColorFade);
+ Line_fadeableAnimSpeed_2D.InternalDraw(points[i], points[i + 1], color, width, null, style, zPos, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed_2D.InternalDraw(points[points.Count - 1], points[0], endColor, width, null, style, zPos, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (text != null && text != "")
+ {
+ Color averageColor = Color.Lerp(startColor, endColor, 0.5f);
+ TagLineString(zPos, text, points, width, averageColor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ static void TagLineString(float zPos, string text, Vector2[] lineStringVerticesGlobal, float linesWidth, Color colorOfLines, bool textBlockAboveLine, float durationInSec, bool hiddenByNearerObjects)
+ {
+ if (lineStringVerticesGlobal.Length <= 0)
+ {
+ Debug.LogError("lineStringVerticesGlobal has " + lineStringVerticesGlobal.Length + " items -> no 'drawTag' operation");
+ return;
+ }
+
+ if (text != null && text != "")
+ {
+ float xMin = UtilitiesDXXL_Math.GetLowestXComponent(lineStringVerticesGlobal);
+ float xMax = UtilitiesDXXL_Math.GetHighestXComponent(lineStringVerticesGlobal);
+ float yMin = UtilitiesDXXL_Math.GetLowestYComponent(lineStringVerticesGlobal);
+ float yMax = UtilitiesDXXL_Math.GetHighestYComponent(lineStringVerticesGlobal);
+ Vector3 virtualScale = new Vector3(xMax - xMin, yMax - yMin, 0.0f);
+ Vector3 centerPosition = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(lineStringVerticesGlobal[0], zPos);
+ for (int i = 0; i < lineStringVerticesGlobal.Length; i++)
+ {
+ UtilitiesDXXL_List.AddToAVectorList(ref UtilitiesDXXL_Shapes.verticesLocal, UtilitiesDXXL_DrawBasics2D.Position_V2toV3(lineStringVerticesGlobal[i], zPos) - centerPosition, i);
+ }
+ Color invertedColor = UtilitiesDXXL_Colors.Invert_andAlphaTo1(colorOfLines);
+ UtilitiesDXXL_TextTagForPointCollection.TagPointCollection(text, null, centerPosition, lineStringVerticesGlobal.Length, 0.1f * linesWidth, virtualScale, invertedColor, invertedColor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ static void TagLineString(float zPos, string text, List lineStringVerticesGlobal, float linesWidth, Color colorOfLines, bool textBlockAboveLine, float durationInSec, bool hiddenByNearerObjects)
+ {
+ if (lineStringVerticesGlobal.Count <= 0)
+ {
+ Debug.LogError("lineStringVerticesGlobal has " + lineStringVerticesGlobal.Count + " items -> no 'drawTag' operation");
+ return;
+ }
+
+ if (text != null && text != "")
+ {
+ float xMin = UtilitiesDXXL_Math.GetLowestXComponent(lineStringVerticesGlobal);
+ float xMax = UtilitiesDXXL_Math.GetHighestXComponent(lineStringVerticesGlobal);
+ float yMin = UtilitiesDXXL_Math.GetLowestYComponent(lineStringVerticesGlobal);
+ float yMax = UtilitiesDXXL_Math.GetHighestYComponent(lineStringVerticesGlobal);
+ Vector3 virtualScale = new Vector3(xMax - xMin, yMax - yMin, 0.0f);
+ Vector3 centerPosition = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(lineStringVerticesGlobal[0], zPos);
+ for (int i = 0; i < lineStringVerticesGlobal.Count; i++)
+ {
+ UtilitiesDXXL_List.AddToAVectorList(ref UtilitiesDXXL_Shapes.verticesLocal, UtilitiesDXXL_DrawBasics2D.Position_V2toV3(lineStringVerticesGlobal[i], zPos) - centerPosition, i);
+ }
+ Color invertedColor = UtilitiesDXXL_Colors.Invert_andAlphaTo1(colorOfLines);
+ UtilitiesDXXL_TextTagForPointCollection.TagPointCollection(text, null, centerPosition, lineStringVerticesGlobal.Count, 0.1f * linesWidth, virtualScale, invertedColor, invertedColor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 在2D平面上绘制一组点数组,每个点以十字标记表示。
+ public static void PointArray(Vector2[] points, Color color = default(Color), float sizeOfMarkingCross = 1.0f, float markingCrossLinesWidth = 0.0f, bool drawCoordsAsText = true, float custom_zPos = float.PositiveInfinity, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ for (int i = 0; i < points.Length; i++)
+ {
+ Point(points[i], color, sizeOfMarkingCross, 0.0f, markingCrossLinesWidth, null, color, zPos, false, drawCoordsAsText, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 在2D平面上绘制一组点列表,每个点以十字标记表示。
+ public static void PointList(List points, Color color = default(Color), float sizeOfMarkingCross = 1.0f, float markingCrossLinesWidth = 0.0f, bool drawCoordsAsText = true, float custom_zPos = float.PositiveInfinity, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ for (int i = 0; i < points.Count; i++)
+ {
+ Point(points[i], color, sizeOfMarkingCross, 0.0f, markingCrossLinesWidth, null, color, zPos, false, drawCoordsAsText, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 在2D平面上绘制一个点,以十字标记表示(指定十字颜色)。
+ public static void Point(Vector2 position, Color markingCrossColor, float sizeOfMarkingCross = 1.0f, float angleDegCC = 0.0f, float markingCrossLinesWidth = 0.0f, string text = null, Color textColor = default(Color), float custom_zPos = float.PositiveInfinity, bool pointer_as_textAttachStyle = false, bool drawCoordsAsText = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Point(position, text, textColor, sizeOfMarkingCross, markingCrossLinesWidth, zPos, markingCrossColor, angleDegCC, pointer_as_textAttachStyle, drawCoordsAsText, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个点,以十字标记表示(指定文本颜色)。
+ public static void Point(Vector2 position, string text = null, Color textColor = default(Color), float sizeOfMarkingCross = 1.0f, float markingCrossLinesWidth = 0.0f, float custom_zPos = float.PositiveInfinity, Color overwrite_markingCrossColor = default(Color), float angleDegCC = 0.0f, bool pointer_as_textAttachStyle = true, bool drawCoordsAsText = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 positionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(position, zPos);
+ Quaternion rotation = UtilitiesDXXL_DrawBasics2D.QuaternionFromAngle(angleDegCC);
+ UtilitiesDXXL_DrawBasics.Point(true, positionV3, text, textColor, sizeOfMarkingCross, markingCrossLinesWidth, overwrite_markingCrossColor, rotation, pointer_as_textAttachStyle, drawCoordsAsText, false, true, Vector3.zero, Quaternion.identity, Vector3.one, true, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上为指定位置绘制一个带标签的标注点。
+ public static void PointTag(Vector2 position, string text = null, Color color = default(Color), float linesWidth = 0.0f, float size_asTextOffsetDistance = 1.0f, Vector2 textOffsetDirection = default(Vector2), float custom_zPos = float.PositiveInfinity, float textSizeScaleFactor = 1.0f, bool skipConeDrawing = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 positionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(position, zPos);
+ Vector3 textOffsetDirV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(textOffsetDirection);
+ UtilitiesDXXL_DrawBasics2D.PointTag(positionV3, text, color, linesWidth, size_asTextOffsetDistance, textOffsetDirV3, textSizeScaleFactor, skipConeDrawing, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个从起点到终点的向量。
+ public static void Vector(Vector2 vectorStartPos, Vector2 vectorEndPos, Color color = default(Color), float lineWidth = 0.0f, string text = null, float coneLength = 0.17f, bool pointerAtBothSides = false, float custom_zPos = float.PositiveInfinity, bool addNormalizedMarkingText = false, float enlargeSmallTextToThisMinTextSize = 0.0f, bool writeComponentValuesAsText = false, float endPlates_size = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 vectorStartPosV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(vectorStartPos, zPos);
+ Vector3 vectorEndPosV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(vectorEndPos, zPos);
+ UtilitiesDXXL_DrawBasics.Vector(vectorStartPosV3, vectorEndPosV3, color, lineWidth, text, coneLength, pointerAtBothSides, true, addNormalizedMarkingText, enlargeSmallTextToThisMinTextSize, writeComponentValuesAsText, durationInSec, hiddenByNearerObjects, UtilitiesDXXL_DrawBasics2D.xyPlane_throughZero, true, endPlates_size);
+ }
+
+ /// 从起点沿指定方向绘制一个2D向量。
+ public static void VectorFrom(Vector2 vectorStartPos, Vector2 vector, Color color = default(Color), float lineWidth = 0.0f, string text = null, float coneLength = 0.17f, bool pointerAtBothSides = false, float custom_zPos = float.PositiveInfinity, bool addNormalizedMarkingText = false, float enlargeSmallTextToThisMinTextSize = 0.0f, bool writeComponentValuesAsText = false, float endPlates_size = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 vectorStartPosV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(vectorStartPos, zPos);
+ Vector3 vectorV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(vector);
+ UtilitiesDXXL_DrawBasics.VectorFrom(vectorStartPosV3, vectorV3, color, lineWidth, text, coneLength, pointerAtBothSides, true, addNormalizedMarkingText, enlargeSmallTextToThisMinTextSize, writeComponentValuesAsText, durationInSec, hiddenByNearerObjects, UtilitiesDXXL_DrawBasics2D.xyPlane_throughZero, true, endPlates_size);
+ }
+
+ /// 从指定方向朝向终点绘制一个2D向量。
+ public static void VectorTo(Vector2 vector, Vector2 vectorEndPos, Color color = default(Color), float lineWidth = 0.0f, string text = null, float coneLength = 0.17f, bool pointerAtBothSides = false, float custom_zPos = float.PositiveInfinity, bool addNormalizedMarkingText = false, float enlargeSmallTextToThisMinTextSize = 0.0f, bool writeComponentValuesAsText = false, float endPlates_size = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorEndPos, "vectorEndPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vector, "vector")) { return; }
+ VectorFrom(vectorEndPos - vector, vector, color, lineWidth, text, coneLength, pointerAtBothSides, custom_zPos, addNormalizedMarkingText, enlargeSmallTextToThisMinTextSize, writeComponentValuesAsText, endPlates_size, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个带箭头的圆弧向量(通过圆心和起止方向向量)。
+ public static void VectorCircled(Vector2 circleCenter, Vector2 circleCenter_to_start, Vector2 circleCenter_to_end, Color color = default(Color), float forceRadius = 0.0f, float lineWidth = 0.0f, string text = null, bool useReflexAngleOver180deg = false, float custom_zPos = float.PositiveInfinity, float coneLength = 0.17f, bool skipFallbackDisplayOfZeroAngles = false, bool pointerAtBothSides = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 circleCenterV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenter, zPos);
+ Vector3 circleCenter_to_startV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(circleCenter_to_start);
+ Vector3 circleCenter_to_endV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(circleCenter_to_end);
+ UtilitiesDXXL_LineCircled.VectorCircled(circleCenterV3, circleCenter_to_startV3, circleCenter_to_endV3, color, forceRadius, lineWidth, text, useReflexAngleOver180deg, coneLength, skipFallbackDisplayOfZeroAngles, pointerAtBothSides, true, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个带箭头的圆弧向量(通过起点、圆心和转角)。
+ public static void VectorCircled(Vector2 startPos, Vector2 circleCenter, float turnAngleDegCC, Color color = default(Color), float lineWidth = 0.0f, string text = null, float custom_zPos = float.PositiveInfinity, float coneLength = 0.17f, bool skipFallbackDisplayOfZeroAngles = false, bool pointerAtBothSides = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 startPosV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(startPos, zPos);
+ Vector3 circleCenterV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenter, zPos);
+ UtilitiesDXXL_LineCircled.VectorCircled(startPosV3, circleCenterV3, Vector3.forward, turnAngleDegCC, color, lineWidth, text, coneLength, skipFallbackDisplayOfZeroAngles, pointerAtBothSides, true, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects, 1.0f);
+ }
+
+ /// 在2D平面上绘制一个带箭头的圆弧向量(通过圆心、起始角度和结束角度)。
+ public static void VectorCircled(Vector2 circleCenter, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius = 0.5f, Color color = default(Color), float lineWidth = 0.0f, string text = null, float custom_zPos = float.PositiveInfinity, float coneLength = 0.17f, bool skipFallbackDisplayOfZeroAngles = false, bool pointerAtBothSides = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(startAngleDegCC_relativeToUp, "startAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(endAngleDegCC_relativeToUp, "endAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 circleCenterV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenter, zPos);
+ float turnedAngleDegCC_fromStartAngle = endAngleDegCC_relativeToUp - startAngleDegCC_relativeToUp;
+ Quaternion rotation_fromUp_toLineStart = Quaternion.AngleAxis(startAngleDegCC_relativeToUp, Vector3.forward);
+ Vector3 cirleCenter_towards_lineStart_normalized = rotation_fromUp_toLineStart * Vector3.up;
+ Vector3 startPosV3 = circleCenterV3 + cirleCenter_towards_lineStart_normalized * radius;
+ UtilitiesDXXL_LineCircled.VectorCircled(startPosV3, circleCenterV3, Vector3.forward, turnedAngleDegCC_fromStartAngle, color, lineWidth, text, coneLength, skipFallbackDisplayOfZeroAngles, pointerAtBothSides, true, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, hiddenByNearerObjects, 1.0f);
+ }
+
+ /// 沿2D射线方向绘制移动箭头动画。
+ public static void MovingArrowsRay(Vector2 start, Vector2 direction, Color color = default(Color), float lineWidth = 0.05f, float distanceBetweenArrows = 0.5f, float lengthOfArrows = 0.15f, string text = null, float custom_zPos = float.PositiveInfinity, float animationSpeed = 0.5f, bool backwardAnimationFlipsArrowDirection = true, float endPlates_size = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ MovingArrowsRay_fadeableAnimSpeed_2D.InternalDraw(start, direction, color, lineWidth, distanceBetweenArrows, lengthOfArrows, text, custom_zPos, animationSpeed, null, backwardAnimationFlipsArrowDirection, endPlates_size, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 沿2D线段绘制移动箭头动画。
+ public static void MovingArrowsLine(Vector2 start, Vector2 end, Color color = default(Color), float lineWidth = 0.05f, float distanceBetweenArrows = 0.5f, float lengthOfArrows = 0.15f, string text = null, float custom_zPos = float.PositiveInfinity, float animationSpeed = 0.5f, bool backwardAnimationFlipsArrowDirection = true, float endPlates_size = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ MovingArrowsLine_fadeableAnimSpeed_2D.InternalDraw(start, end, color, lineWidth, distanceBetweenArrows, lengthOfArrows, text, custom_zPos, animationSpeed, null, backwardAnimationFlipsArrowDirection, endPlates_size, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制交替换色的2D射线。
+ public static void RayWithAlternatingColors(Vector2 start, Vector2 direction, Color color1 = default(Color), Color color2 = default(Color), float width = 0.0f, float lengthOfStripes = 0.04f, string text = null, float custom_zPos = float.PositiveInfinity, float animationSpeed = 0.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ RayWithAlternatingColors_fadeableAnimSpeed_2D.InternalDraw(start, direction, color1, color2, width, lengthOfStripes, text, custom_zPos, animationSpeed, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制交替换色的2D线段。
+ public static void LineWithAlternatingColors(Vector2 start, Vector2 end, Color color1 = default(Color), Color color2 = default(Color), float width = 0.0f, float lengthOfStripes = 0.04f, string text = null, float custom_zPos = float.PositiveInfinity, float animationSpeed = 0.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ //Lines drawn with this function have a higher likelyhood of accidentially using up high numbers of drawnLinePerFrame, because "lengthOfStripes" can be set manually instead of beeing determined by the lineStyle-code
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ LineWithAlternatingColors_fadeableAnimSpeed_2D.InternalDraw(start, end, color1, color2, width, lengthOfStripes, text, custom_zPos, animationSpeed, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制闪烁的2D射线。
+ public static void BlinkingRay(Vector2 start, Vector2 direction, Color primaryColor = default(Color), float blinkDurationInSec = 0.5f, float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, Color blinkColor = default(Color), float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(direction, "direction")) { return; }
+
+ Vector2 end = start + direction;
+ BlinkingLine(start, end, primaryColor, blinkDurationInSec, width, text, style, blinkColor, custom_zPos, stylePatternScaleFactor, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制闪烁的2D线段。
+ public static void BlinkingLine(Vector2 start, Vector2 end, Color primaryColor = default(Color), float blinkDurationInSec = 0.5f, float width = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, Color blinkColor = default(Color), float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float endPlates_size = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(blinkDurationInSec, "blinkDurationInSec")) { return; }
+
+ blinkDurationInSec = Mathf.Max(blinkDurationInSec, UtilitiesDXXL_DrawBasics.min_blinkDurationInSec);
+ float passedBlinkIntervallsSinceStartup = UtilitiesDXXL_LineStyles.GetTime() / blinkDurationInSec;
+ primaryColor = UtilitiesDXXL_Colors.OverwriteDefaultColor(primaryColor);
+ if (UtilitiesDXXL_Math.CheckIf_givenNumberIs_evenNotOdd(Mathf.FloorToInt(passedBlinkIntervallsSinceStartup)))
+ {
+ Line_fadeableAnimSpeed_2D.InternalDraw(start, end, primaryColor, width, text, style, custom_zPos, stylePatternScaleFactor, 0.0f, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+ else
+ {
+ if (UtilitiesDXXL_Colors.IsDefaultColor(blinkColor))
+ {
+ Color alternatingBlinkColor = UtilitiesDXXL_Colors.Invert_andAlphaTo1(primaryColor);
+ alternatingBlinkColor = UtilitiesDXXL_Colors.OverwriteColorNearGreyWithBlack(alternatingBlinkColor);
+ Line_fadeableAnimSpeed_2D.InternalDraw(start, end, alternatingBlinkColor, width, text, style, custom_zPos, stylePatternScaleFactor, 0.0f, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+ else
+ {
+ Line_fadeableAnimSpeed_2D.InternalDraw(start, end, blinkColor, width, text, style, custom_zPos, stylePatternScaleFactor, 0.0f, null, endPlates_size, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+ }
+ }
+
+ /// 绘制带有张力指示的2D射线。
+ public static void RayUnderTension(Vector2 start, Vector2 direction, float relaxedLength = 1.0f, Color relaxedColor = default(Color), DrawBasics.LineStyle style = DrawBasics.LineStyle.sine, float stretchFactor_forStretchedTensionColor = 2.0f, Color color_forStretchedTension = default(Color), float stretchFactor_forSqueezedTensionColor = 0.0f, Color color_forSqueezedTension = default(Color), float width = 0.0f, string text = null, float alphaOfReferenceLengthDisplay = 0.15f, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float endPlates_size = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(direction, "direction")) { return; }
+ LineUnderTension(start, start + direction, relaxedLength, relaxedColor, style, stretchFactor_forStretchedTensionColor, color_forStretchedTension, stretchFactor_forSqueezedTensionColor, color_forSqueezedTension, width, text, alphaOfReferenceLengthDisplay, custom_zPos, stylePatternScaleFactor, endPlates_size, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines);
+ }
+
+ /// 绘制带有张力指示的2D线段。
+ public static void LineUnderTension(Vector2 start, Vector2 end, float relaxedLength = 1.0f, Color relaxedColor = default(Color), DrawBasics.LineStyle style = DrawBasics.LineStyle.sine, float stretchFactor_forStretchedTensionColor = 2.0f, Color color_forStretchedTension = default(Color), float stretchFactor_forSqueezedTensionColor = 0.0f, Color color_forSqueezedTension = default(Color), float width = 0.0f, string text = null, float alphaOfReferenceLengthDisplay = 0.15f, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, float endPlates_size = 0.0f, float enlargeSmallTextToThisMinTextSize = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true, bool skipPatternEnlargementForLongLines = false, bool skipPatternEnlargementForShortLines = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 startV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(start, zPos);
+ Vector3 endV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(end, zPos);
+ style = UtilitiesDXXL_LineStyles.FallbackTo2DLineStyle(style);
+
+ bool parametersAreInvalid = UtilitiesDXXL_DrawBasics.GetSpecsOfLineUnderTension(out float tensionFactor, out Color usedColor, out float lineLength, startV3, endV3, relaxedLength, relaxedColor, color_forStretchedTension, color_forSqueezedTension, stretchFactor_forStretchedTensionColor, stretchFactor_forSqueezedTensionColor);
+ if (parametersAreInvalid) { return; }
+
+ UtilitiesDXXL_DrawBasics.TryDrawReferenceLengthDisplay_ofLineUnderTension(startV3, endV3, alphaOfReferenceLengthDisplay, relaxedLength, relaxedColor, lineLength, UtilitiesDXXL_DrawBasics2D.xyPlane_throughZero, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.Line(startV3, endV3, usedColor, width, text, style, stylePatternScaleFactor, 0.0f, null, UtilitiesDXXL_DrawBasics2D.xyPlane_throughZero, true, 0.0f, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipPatternEnlargementForLongLines, skipPatternEnlargementForShortLines, null, true, endPlates_size, tensionFactor);
+ }
+
+ /// 在2D平面上绘制一个图标。
+ public static void Icon(Vector2 position, DrawBasics.IconType icon, Color color = default(Color), float size = 1.0f, string text = null, float turnAngleDegCC = 0.0f, int strokeWidth_asPPMofSize = 0, float custom_zPos = float.PositiveInfinity, bool mirrorHorizontally = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 positionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(position, zPos);
+ Quaternion rotation = UtilitiesDXXL_DrawBasics2D.QuaternionFromAngle(turnAngleDegCC);
+ UtilitiesDXXL_DrawBasics.Icon(positionV3, icon, color, size, text, rotation, strokeWidth_asPPMofSize, mirrorHorizontally, durationInSec, hiddenByNearerObjects, 0.1f, 0.004f, true);
+ }
+
+ /// 在2D平面上绘制指定形状(使用矩形包围盒)。
+ public static void Shape(Rect boxRect, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, Color color = default(Color), float angleDegCC = 0.0f, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Box(boxRect, color, angleDegCC, shape, linesWidth, text, lineStyle, zPos, stylePatternScaleFactor, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制指定形状(使用中心位置和尺寸)。
+ public static void Shape(Vector2 centerPosition, DrawShapes.Shape2DType shape, Vector2 size, Color color = default(Color), float angleDegCC = 0.0f, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Box(centerPosition, size, color, angleDegCC, shape, linesWidth, text, lineStyle, zPos, stylePatternScaleFactor, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个实心圆点。
+ public static void Dot(Vector2 position, float radius = 0.5f, Color color = default(Color), string text = null, float custom_zPos = float.PositiveInfinity, float density = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 centerPositionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(position, zPos);
+ DrawBasics.Dot(centerPositionV3, radius, Vector3.forward, color, text, density, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个矩形框(通过 Rect 包围盒)。
+ public static void Box(Rect boxRect, Color color = default(Color), float angleDegCC = 0.0f, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ DrawShapes.Box2D(boxRect, color, zPos, angleDegCC, shape, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个矩形框(通过中心位置和尺寸)。
+ public static void Box(Vector2 centerPosition, Vector2 size, Color color = default(Color), float angleDegCC = 0.0f, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ DrawShapes.Box2D(centerPosition, size, color, zPos, angleDegCC, shape, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个圆形(通过矩形包围盒)。
+ public static void Circle(Rect hullRect, Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ DrawShapes.Circle2D(hullRect, color, zPos, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个圆形(通过中心位置和半径)。
+ public static void Circle(Vector2 centerPosition, float radius = 0.5f, Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ DrawShapes.Circle2D(centerPosition, radius, color, zPos, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个胶囊体(通过两个圆心位置)。
+ public static void Capsule(Vector2 posOfCircle1, Vector2 posOfCircle2, float radius = 0.5f, Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ DrawShapes.Capsule2D(posOfCircle1, posOfCircle2, radius, color, zPos, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个胶囊体(通过矩形包围盒)。
+ public static void Capsule(Rect hullRect, Color color = default(Color), CapsuleDirection2D capsuleDirection = CapsuleDirection2D.Vertical, float angleDegCC = 0.0f, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ DrawShapes.Capsule2D(hullRect, color, zPos, capsuleDirection, angleDegCC, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 在2D平面上绘制一个胶囊体(通过中心位置和尺寸)。
+ public static void Capsule(Vector2 centerPosition, Vector2 size, Color color = default(Color), CapsuleDirection2D capsuleDirection = CapsuleDirection2D.Vertical, float angleDegCC = 0.0f, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float custom_zPos = float.PositiveInfinity, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ DrawShapes.Capsule2D(centerPosition, size, color, zPos, capsuleDirection, angleDegCC, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制2D二次贝塞尔曲线(使用两个 GameObject 定义起点方向和终点)。
+ public static void BezierSegmentQuadratic(GameObject startPositionAndDirection, GameObject endPosition, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float custom_zPos = float.PositiveInfinity, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPositionAndDirection, "startPositionAndDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ BezierSegmentQuadratic(startPositionAndDirection.transform, endPosition.transform, color, text, width, straightSubDivisions, custom_zPos, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制2D二次贝塞尔曲线(使用两个 Transform 定义起点方向和终点)。
+ public static void BezierSegmentQuadratic(Transform startPositionAndDirection, Transform endPosition, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float custom_zPos = float.PositiveInfinity, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPositionAndDirection, "startPositionAndDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ Vector3 controlPosInBetween = startPositionAndDirection.position + startPositionAndDirection.right * startPositionAndDirection.localScale.x;
+ BezierSegmentQuadratic(startPositionAndDirection.position, endPosition.position, controlPosInBetween, color, text, width, straightSubDivisions, custom_zPos, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制2D二次贝塞尔曲线(使用三个 GameObject 作为起点、终点和控制点)。
+ public static void BezierSegmentQuadratic(GameObject startPosition, GameObject endPosition, GameObject controlPosInBetween, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float custom_zPos = float.PositiveInfinity, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosInBetween, "controlPosInBetween")) { return; }
+ BezierSegmentQuadratic(startPosition.transform.position, endPosition.transform.position, controlPosInBetween.transform.position, color, text, width, straightSubDivisions, custom_zPos, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制2D二次贝塞尔曲线(使用三个 Transform 作为起点、终点和控制点)。
+ public static void BezierSegmentQuadratic(Transform startPosition, Transform endPosition, Transform controlPosInBetween, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float custom_zPos = float.PositiveInfinity, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosInBetween, "controlPosInBetween")) { return; }
+ BezierSegmentQuadratic(startPosition.position, endPosition.position, controlPosInBetween.position, color, text, width, straightSubDivisions, custom_zPos, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制2D二次贝塞尔曲线(使用三个 Vector2 作为起点、终点和控制点)。
+ public static void BezierSegmentQuadratic(Vector2 startPosition, Vector2 endPosition, Vector2 controlPosInBetween, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float custom_zPos = float.PositiveInfinity, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(controlPosInBetween, "controlPosInBetween")) { return; }
+
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 startPositionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(startPosition, zPos);
+ Vector3 endPositionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(endPosition, zPos);
+ Vector3 controlPosInBetweenV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(controlPosInBetween, zPos);
+ UtilitiesDXXL_Bezier.BezierSegmentQuadratic(true, startPositionV3, endPositionV3, controlPosInBetweenV3, color, text, width, straightSubDivisions, textSize, true, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制2D三次贝塞尔曲线(使用两个 GameObject 定义起点和终点的方向)。
+ public static void BezierSegmentCubic(GameObject startPositionAndDirection, GameObject endPositionAndDirection, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float custom_zPos = float.PositiveInfinity, bool closeGapFromEndToStart = false, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPositionAndDirection, "startPositionAndDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPositionAndDirection, "endPositionAndDirection")) { return; }
+ BezierSegmentCubic(startPositionAndDirection.transform, endPositionAndDirection.transform, color, text, width, straightSubDivisions, custom_zPos, closeGapFromEndToStart, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制2D三次贝塞尔曲线(使用两个 Transform 定义起点和终点的方向)。
+ public static void BezierSegmentCubic(Transform startPositionAndDirection, Transform endPositionAndDirection, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float custom_zPos = float.PositiveInfinity, bool closeGapFromEndToStart = false, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPositionAndDirection, "startPositionAndDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPositionAndDirection, "endPositionAndDirection")) { return; }
+ Vector3 controlPosOfStartDirection = startPositionAndDirection.position + startPositionAndDirection.right * startPositionAndDirection.localScale.x;
+ Vector3 controlPosOfEndDirection = endPositionAndDirection.position - endPositionAndDirection.right * endPositionAndDirection.localScale.x;
+ BezierSegmentCubic(startPositionAndDirection.position, endPositionAndDirection.position, controlPosOfStartDirection, controlPosOfEndDirection, color, text, width, straightSubDivisions, custom_zPos, closeGapFromEndToStart, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制2D三次贝塞尔曲线(使用四个 GameObject 作为起点、终点和两个控制点)。
+ public static void BezierSegmentCubic(GameObject startPosition, GameObject endPosition, GameObject controlPosOfStartDirection, GameObject controlPosOfEndDirection, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float custom_zPos = float.PositiveInfinity, bool closeGapFromEndToStart = false, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosOfStartDirection, "controlPosOfStartDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosOfEndDirection, "controlPosOfEndDirection")) { return; }
+ BezierSegmentCubic(startPosition.transform.position, endPosition.transform.position, controlPosOfStartDirection.transform.position, controlPosOfEndDirection.transform.position, color, text, width, straightSubDivisions, custom_zPos, closeGapFromEndToStart, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制2D三次贝塞尔曲线(使用四个 Transform 作为起点、终点和两个控制点)。
+ public static void BezierSegmentCubic(Transform startPosition, Transform endPosition, Transform controlPosOfStartDirection, Transform controlPosOfEndDirection, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float custom_zPos = float.PositiveInfinity, bool closeGapFromEndToStart = false, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosOfStartDirection, "controlPosOfStartDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(controlPosOfEndDirection, "controlPosOfEndDirection")) { return; }
+ BezierSegmentCubic(startPosition.position, endPosition.position, controlPosOfStartDirection.position, controlPosOfEndDirection.position, color, text, width, straightSubDivisions, custom_zPos, closeGapFromEndToStart, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 绘制2D三次贝塞尔曲线(使用四个 Vector2 作为起点、终点和两个控制点)。
+ public static void BezierSegmentCubic(Vector2 startPosition, Vector2 endPosition, Vector2 controlPosOfStartDirection, Vector2 controlPosOfEndDirection, Color color = default(Color), string text = null, float width = 0.0f, int straightSubDivisions = 50, float custom_zPos = float.PositiveInfinity, bool closeGapFromEndToStart = false, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(startPosition, "startPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(endPosition, "endPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(controlPosOfStartDirection, "controlPosOfStartDirection")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(controlPosOfEndDirection, "controlPosOfEndDirection")) { return; }
+
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 startPositionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(startPosition, zPos);
+ Vector3 endPositionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(endPosition, zPos);
+ Vector3 controlPosOfStartDirectionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(controlPosOfStartDirection, zPos);
+ Vector3 controlPosOfEndDirectionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(controlPosOfEndDirection, zPos);
+ UtilitiesDXXL_Bezier.BezierSegmentCubic(true, startPositionV3, endPositionV3, controlPosOfStartDirectionV3, controlPosOfEndDirectionV3, color, text, width, straightSubDivisions, textSize, true, durationInSec, hiddenByNearerObjects);
+ if (closeGapFromEndToStart)
+ {
+ Vector3 startPos_to_startControlPosV3 = controlPosOfStartDirectionV3 - startPositionV3;
+ Vector3 endPos_to_endControlPosV3 = controlPosOfEndDirectionV3 - endPositionV3;
+ Vector3 controlPosOfStartDirection_ofSecondCurveV3 = startPositionV3 - startPos_to_startControlPosV3;
+ Vector3 controlPosOfEndDirection_ofSecondCurveV3 = endPositionV3 - endPos_to_endControlPosV3;
+ UtilitiesDXXL_Bezier.BezierSegmentCubic(true, startPositionV3, endPositionV3, controlPosOfStartDirection_ofSecondCurveV3, controlPosOfEndDirection_ofSecondCurveV3, color, null, width, straightSubDivisions, textSize, true, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex GetPositions3DFromGameObjectsArray_2D_preAllocated = UtilitiesDXXL_Bezier.GetPositions3DFromGameObjectsArray_2D;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform GetForwardControlPos3DFromGameObjectsArray_2D_preAllocated = UtilitiesDXXL_Bezier.GetForwardControlPos3DFromGameObjectsArray_2D;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform GetBackwardControlPos3DFromGameObjectsArray_2D_preAllocated = UtilitiesDXXL_Bezier.GetBackwardControlPos3DFromGameObjectsArray_2D;
+ /// 绘制2D贝塞尔样条曲线(使用 GameObject 数组定义控制点)。
+ public static void BezierSpline(GameObject[] points, Color color = default(Color), DrawBasics.BezierPosInterpretation interpretationOfArray = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float custom_zPos = float.PositiveInfinity, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ UtilitiesDXXL_Bezier.BezierSpline(true, custom_zPos, points, GetPositions3DFromGameObjectsArray_2D_preAllocated, GetForwardControlPos3DFromGameObjectsArray_2D_preAllocated, GetBackwardControlPos3DFromGameObjectsArray_2D_preAllocated, points.Length, color, interpretationOfArray, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex> GetPositions3DFromGameObjectsList_2D_preAllocated = UtilitiesDXXL_Bezier.GetPositions3DFromGameObjectsList_2D;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform> GetForwardControlPos3DFromGameObjectsList_2D_preAllocated = UtilitiesDXXL_Bezier.GetForwardControlPos3DFromGameObjectsList_2D;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform> GetBackwardControlPos3DFromGameObjectsList_2D_preAllocated = UtilitiesDXXL_Bezier.GetBackwardControlPos3DFromGameObjectsList_2D;
+ /// 绘制2D贝塞尔样条曲线(使用 GameObject 列表定义控制点)。
+ public static void BezierSpline(List points, Color color = default(Color), DrawBasics.BezierPosInterpretation interpretationOfList = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float custom_zPos = float.PositiveInfinity, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ UtilitiesDXXL_Bezier.BezierSpline>(true, custom_zPos, points, GetPositions3DFromGameObjectsList_2D_preAllocated, GetForwardControlPos3DFromGameObjectsList_2D_preAllocated, GetBackwardControlPos3DFromGameObjectsList_2D_preAllocated, points.Count, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex GetPositions3DFromTransformsArray_2D_preAllocated = UtilitiesDXXL_Bezier.GetPositions3DFromTransformsArray_2D;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform GetForwardControlPos3DFromTransformsArray_2D_preAllocated = UtilitiesDXXL_Bezier.GetForwardControlPos3DFromTransformsArray_2D;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform GetBackwardControlPos3DFromTransformsArray_2D_preAllocated = UtilitiesDXXL_Bezier.GetBackwardControlPos3DFromTransformsArray_2D;
+ /// 绘制2D贝塞尔样条曲线(使用 Transform 数组定义控制点)。
+ public static void BezierSpline(Transform[] points, Color color = default(Color), DrawBasics.BezierPosInterpretation interpretationOfArray = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float custom_zPos = float.PositiveInfinity, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ UtilitiesDXXL_Bezier.BezierSpline(true, custom_zPos, points, GetPositions3DFromTransformsArray_2D_preAllocated, GetForwardControlPos3DFromTransformsArray_2D_preAllocated, GetBackwardControlPos3DFromTransformsArray_2D_preAllocated, points.Length, color, interpretationOfArray, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex> GetPositions3DFromTransformsList_2D_preAllocated = UtilitiesDXXL_Bezier.GetPositions3DFromTransformsList_2D;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform> GetForwardControlPos3DFromTransformsList_2D_preAllocated = UtilitiesDXXL_Bezier.GetForwardControlPos3DFromTransformsList_2D;
+ static UtilitiesDXXL_Bezier.FlexibleGetDirectionControlPosOfTransform> GetBackwardControlPos3DFromTransformsList_2D_preAllocated = UtilitiesDXXL_Bezier.GetBackwardControlPos3DFromTransformsList_2D;
+ /// 绘制2D贝塞尔样条曲线(使用 Transform 列表定义控制点)。
+ public static void BezierSpline(List points, Color color = default(Color), DrawBasics.BezierPosInterpretation interpretationOfList = DrawBasics.BezierPosInterpretation.onlySegmentStartPoints_backwardForwardIsAligned, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float custom_zPos = float.PositiveInfinity, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ UtilitiesDXXL_Bezier.BezierSpline>(true, custom_zPos, points, GetPositions3DFromTransformsList_2D_preAllocated, GetForwardControlPos3DFromTransformsList_2D_preAllocated, GetBackwardControlPos3DFromTransformsList_2D_preAllocated, points.Count, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex GetPositions3DFromVector2Array_2D_preAllocated = UtilitiesDXXL_Bezier.GetPositions3DFromVector2Array_2D;
+ /// 绘制2D贝塞尔样条曲线(使用 Vector2 数组定义控制点)。
+ public static void BezierSpline(Vector2[] points, Color color = default(Color), DrawBasics.BezierPosInterpretation interpretationOfArray = DrawBasics.BezierPosInterpretation.start_control1_control2_endIsNextStart, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float custom_zPos = float.PositiveInfinity, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (interpretationOfArray == DrawBasics.BezierPosInterpretation.start_control1_control2_endIsNextStart || interpretationOfArray == DrawBasics.BezierPosInterpretation.start_control1_endIsNextStart)
+ {
+ UtilitiesDXXL_Bezier.BezierSpline(true, custom_zPos, points, GetPositions3DFromVector2Array_2D_preAllocated, null, null, points.Length, color, interpretationOfArray, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ Debug.LogError("The specified interpretationOfArray ('" + interpretationOfArray + "') is not supported for BezierSpline() function overloads that take 'Vector2'-collections. You may choose an overload that takes 'Transform'- or 'GameObject'-collections.");
+ }
+ }
+
+
+ static UtilitiesDXXL_Bezier.FlexibleGetPosAtIndex> GetPositions3DFromVector2List_2D_preAllocated = UtilitiesDXXL_Bezier.GetPositions3DFromVector2List_2D;
+ /// 绘制2D贝塞尔样条曲线(使用 Vector2 列表定义控制点)。
+ public static void BezierSpline(List points, Color color = default(Color), DrawBasics.BezierPosInterpretation interpretationOfList = DrawBasics.BezierPosInterpretation.start_control1_control2_endIsNextStart, string text = null, float width = 0.0f, bool closeGapFromEndToStart = false, int straightSubDivisionsPerSegment = 50, float custom_zPos = float.PositiveInfinity, float textSize = 0.1f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (interpretationOfList == DrawBasics.BezierPosInterpretation.start_control1_control2_endIsNextStart || interpretationOfList == DrawBasics.BezierPosInterpretation.start_control1_endIsNextStart)
+ {
+ UtilitiesDXXL_Bezier.BezierSpline>(true, custom_zPos, points, GetPositions3DFromVector2List_2D_preAllocated, null, null, points.Count, color, interpretationOfList, text, width, closeGapFromEndToStart, straightSubDivisionsPerSegment, textSize, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ Debug.LogError("The specified interpretationOfList ('" + interpretationOfList + "') is not supported for BezierSpline() function overloads that take 'Vector2'-collections. You may choose an overload that takes 'Transform'- or 'GameObject'-collections.");
+ }
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/DrawBasics2D.cs.meta b/Runtime/DrawDebugLibrary/DrawBasics2D.cs.meta
new file mode 100644
index 0000000..bbb1441
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawBasics2D.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d236fb61fe8c99d42a855a5b130b7aaa
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawCharts.cs b/Runtime/DrawDebugLibrary/DrawCharts.cs
new file mode 100644
index 0000000..a52809c
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawCharts.cs
@@ -0,0 +1,303 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+ public class DrawCharts
+ {
+
+ public static bool chartInspectorComponentsAutomaticallyProceedOneFrameStepOnPauseStarts_toPreventFrozenOverlayDraw = true;
+
+ public static ChartDrawing premadeChart0;
+ public static ChartDrawing premadeChart1;
+ public static ChartDrawing premadeChart2;
+ public static ChartDrawing premadeChart3;
+ public static ChartDrawing premadeChart4;
+ public static ChartDrawing premadeChart5;
+ public static ChartDrawing premadeChart6;
+ public static ChartDrawing premadeChart7;
+ public static ChartDrawing premadeChart8;
+ public static ChartDrawing premadeChart9;
+
+ public static PieChartDrawing premadePieChart0;
+ public static PieChartDrawing premadePieChart1;
+ public static PieChartDrawing premadePieChart2;
+ public static PieChartDrawing premadePieChart3;
+ public static PieChartDrawing premadePieChart4;
+ public static PieChartDrawing premadePieChart5;
+ public static PieChartDrawing premadePieChart6;
+ public static PieChartDrawing premadePieChart7;
+ public static PieChartDrawing premadePieChart8;
+ public static PieChartDrawing premadePieChart9;
+
+ public static Vector3 positionOfPremadeCharts = Vector3.zero;
+ public static int premadeChartThatIsRotationPivot = 0;
+
+ const float default_widthOfPremadeCharts = 1.7f;
+ const float default_heightOfPremadeCharts = 0.8f;
+ const float default_diameterOfPremadePieCharts = 0.65f;
+ static float factor_fromLineChartWidth_toPieChartDiameter_soThatTheyAppearWithApproxTheSameWidth = 0.382353f;
+ static float current_widthOfPremadeCharts = default_widthOfPremadeCharts;
+ static float current_heightOfPremadeCharts = default_heightOfPremadeCharts;
+
+ static float xOffsetBetweenPremadeCharts_caseOf_onlyPieCharts = 1.06f;
+ // static float xOffsetBetweenPremadeCharts_caseOf_noNeedFor_pointOfInterestTextBoxes = 1.35f;
+ static float xOffsetBetweenPremadeCharts_caseOf_noNeedFor_pointOfInterestTextBoxes = 1.25f;
+ static float xOffsetBetweenPremadeCharts_caseOf_needs_pointOfInterestTextBoxes_onOneSide = 1.85f;
+ static float xOffsetBetweenPremadeCharts_caseOf_needs_pointOfInterestTextBoxes_onBothSides = 2.44f;
+ static float current_horizontalDistance_fromChartToChart_relativeToChartWidth = xOffsetBetweenPremadeCharts_caseOf_noNeedFor_pointOfInterestTextBoxes;
+ static float used_xOffsetBetweenPremadeCharts = default_widthOfPremadeCharts * current_horizontalDistance_fromChartToChart_relativeToChartWidth;
+
+ static DrawCharts()
+ {
+ premadeChart0 = new ChartDrawing("premade chart #0");
+ premadeChart1 = new ChartDrawing("premade chart #1");
+ premadeChart2 = new ChartDrawing("premade chart #2");
+ premadeChart3 = new ChartDrawing("premade chart #3");
+ premadeChart4 = new ChartDrawing("premade chart #4");
+ premadeChart5 = new ChartDrawing("premade chart #5");
+ premadeChart6 = new ChartDrawing("premade chart #6");
+ premadeChart7 = new ChartDrawing("premade chart #7");
+ premadeChart8 = new ChartDrawing("premade chart #8");
+ premadeChart9 = new ChartDrawing("premade chart #9");
+
+ premadePieChart0 = new PieChartDrawing("pie chart #0");
+ premadePieChart1 = new PieChartDrawing("pie chart #1");
+ premadePieChart2 = new PieChartDrawing("pie chart #2");
+ premadePieChart3 = new PieChartDrawing("pie chart #3");
+ premadePieChart4 = new PieChartDrawing("pie chart #4");
+ premadePieChart5 = new PieChartDrawing("pie chart #5");
+ premadePieChart6 = new PieChartDrawing("pie chart #6");
+ premadePieChart7 = new PieChartDrawing("pie chart #7");
+ premadePieChart8 = new PieChartDrawing("pie chart #8");
+ premadePieChart9 = new PieChartDrawing("pie chart #9");
+
+ RevertPremadeChartsToAutomaticPositionLayout();
+ SetWidth_forAllPremadeLineCharts();
+ SetHeight_forAllPremadeLineCharts();
+ SetSizeOfPieCircleDiameter_forAllPremadePieCharts();
+ }
+
+ public static Vector3 GetAutoLayoutedPositionOfPremadeLineChart(int indexNumberOfPremadeChart)
+ {
+ //The charts are arranged horizontally, because they potentially grow in their y-extent due to the tower of PointOfInterest-TextBoxes. Otherwise the could potentially intersect each other:
+
+ float horizontalOffsetDistance;
+ Vector3 offsetVectorBetweenCharts_normalized;
+
+ if (premadeChartThatIsRotationPivot < 0)
+ {
+ horizontalOffsetDistance = used_xOffsetBetweenPremadeCharts * indexNumberOfPremadeChart;
+ offsetVectorBetweenCharts_normalized = Vector3.right;
+ }
+ else
+ {
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out Vector3 observerCamForward_normalized, out Vector3 observerCamUp_normalized, out Vector3 observerCamRight_normalized, out Vector3 cam_to_lineCenter, positionOfPremadeCharts, Vector3.zero, null);
+ horizontalOffsetDistance = used_xOffsetBetweenPremadeCharts * (indexNumberOfPremadeChart - premadeChartThatIsRotationPivot);
+ offsetVectorBetweenCharts_normalized = observerCamRight_normalized;
+ }
+
+ return (positionOfPremadeCharts + offsetVectorBetweenCharts_normalized * horizontalOffsetDistance);
+ }
+
+ public static Vector3 GetAutoLayoutedPositionOfPremadePieChart(PieChartDrawing requestingPieChartDrawing)
+ {
+ float yOffset; //-> shifting the pie charts to below of the line charts. The line charts potentially grow in size towards the top (due to the tower of PointOfInterest-textBoxes), while the pie charts potentially grow in size towards the downside, due to the segment name list, the grows downward. This way the line charts and pie charts don't intersect each other.
+ if (UtilitiesDXXL_Math.ApproximatelyZero(requestingPieChartDrawing.mostRecent_vertDistance_fromCircleCenter_toUpperBounderySquare))
+ {
+ yOffset = -2.2f * requestingPieChartDrawing.Size_ofPieCircleDiameter;
+ }
+ else
+ {
+ yOffset = (-requestingPieChartDrawing.mostRecent_vertDistance_fromCircleCenter_toUpperBounderySquare - requestingPieChartDrawing.Size_ofPieCircleDiameter);
+ }
+
+ float xPos_offset = requestingPieChartDrawing.Size_ofPieCircleDiameter;//-> shift offset, so the pie charts are vertically aligned with with the line charts. This works only correctly, if "pieChart.RelSize_ofSegmentsNameTexts" hasn't been altered.
+ float horizontalOffsetDistance;
+ Vector3 offsetVectorBetweenCharts_normalized;
+
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out Vector3 observerCamForward_normalized, out Vector3 observerCamUp_normalized, out Vector3 observerCamRight_normalized, out Vector3 cam_to_lineCenter, positionOfPremadeCharts, Vector3.zero, null);
+ if (premadeChartThatIsRotationPivot < 0)
+ {
+ horizontalOffsetDistance = used_xOffsetBetweenPremadeCharts * requestingPieChartDrawing.internal_indexNumberOfPremadeChart + xPos_offset;
+ offsetVectorBetweenCharts_normalized = Vector3.right;
+ }
+ else
+ {
+ horizontalOffsetDistance = used_xOffsetBetweenPremadeCharts * (requestingPieChartDrawing.internal_indexNumberOfPremadeChart - premadeChartThatIsRotationPivot) + xPos_offset;
+ offsetVectorBetweenCharts_normalized = observerCamRight_normalized;
+ }
+
+ return (positionOfPremadeCharts + offsetVectorBetweenCharts_normalized * horizontalOffsetDistance + observerCamUp_normalized * yOffset);
+ }
+
+ public static void SetDistanceBetweenNeighboringPremadeChartsTo_customDistance(float horizontalDistance_fromChartToChart_relativeToChartWidth)
+ {
+ current_horizontalDistance_fromChartToChart_relativeToChartWidth = horizontalDistance_fromChartToChart_relativeToChartWidth;
+ Apply_current_horizontalDistance_fromChartToChart_relativeToChartWidth();
+ }
+
+ public static void SetDistanceBetweenNeighboringPremadeChartsToFitCaseOf_noNeedForPointOfInterestTextBoxes()
+ {
+ current_horizontalDistance_fromChartToChart_relativeToChartWidth = xOffsetBetweenPremadeCharts_caseOf_noNeedFor_pointOfInterestTextBoxes;
+ Apply_current_horizontalDistance_fromChartToChart_relativeToChartWidth();
+ }
+
+ public static void SetDistanceBetweenNeighboringPremadeChartsToFitCaseOf_needsPointOfInterestTextBoxesOnOneSide()
+ {
+ current_horizontalDistance_fromChartToChart_relativeToChartWidth = xOffsetBetweenPremadeCharts_caseOf_needs_pointOfInterestTextBoxes_onOneSide;
+ Apply_current_horizontalDistance_fromChartToChart_relativeToChartWidth();
+ }
+
+ public static void SetDistanceBetweenNeighboringPremadeChartsToFitCaseOf_needsPointOfInterestTextBoxesOnBothSides()
+ {
+ current_horizontalDistance_fromChartToChart_relativeToChartWidth = xOffsetBetweenPremadeCharts_caseOf_needs_pointOfInterestTextBoxes_onBothSides;
+ Apply_current_horizontalDistance_fromChartToChart_relativeToChartWidth();
+ }
+
+ public static void SetDistanceBetweenNeighboringPremadeChartsToFitCaseOf_onlyPieCharts()
+ {
+ current_horizontalDistance_fromChartToChart_relativeToChartWidth = xOffsetBetweenPremadeCharts_caseOf_onlyPieCharts;
+ Apply_current_horizontalDistance_fromChartToChart_relativeToChartWidth();
+ }
+
+ static void Apply_current_horizontalDistance_fromChartToChart_relativeToChartWidth()
+ {
+ used_xOffsetBetweenPremadeCharts = current_widthOfPremadeCharts * current_horizontalDistance_fromChartToChart_relativeToChartWidth;
+ }
+
+ public static void RevertPremadeChartsToAutomaticPositionLayout(bool revert_premadeChart0 = true, bool revert_premadeChart1 = true, bool revert_premadeChart2 = true, bool revert_premadeChart3 = true, bool revert_premadeChart4 = true, bool revert_premadeChart5 = true, bool revert_premadeChart6 = true, bool revert_premadeChart7 = true, bool revert_premadeChart8 = true, bool revert_premadeChart9 = true, bool revert_premadePieChart0 = true, bool revert_premadePieChart1 = true, bool revert_premadePieChart2 = true, bool revert_premadePieChart3 = true, bool revert_premadePieChart4 = true, bool revert_premadePieChart5 = true, bool revert_premadePieChart6 = true, bool revert_premadePieChart7 = true, bool revert_premadePieChart8 = true, bool revert_premadePieChart9 = true)
+ {
+ RevertPremadeLineChartsToAutomaticPositionLayout(revert_premadeChart0, revert_premadeChart1, revert_premadeChart2, revert_premadeChart3, revert_premadeChart4, revert_premadeChart5, revert_premadeChart6, revert_premadeChart7, revert_premadeChart8, revert_premadeChart9);
+ RevertPremadePieChartsToAutomaticPositionLayout(revert_premadePieChart0, revert_premadePieChart1, revert_premadePieChart2, revert_premadePieChart3, revert_premadePieChart4, revert_premadePieChart5, revert_premadePieChart6, revert_premadePieChart7, revert_premadePieChart8, revert_premadePieChart9);
+ }
+
+ public static void RevertPremadeLineChartsToAutomaticPositionLayout(bool revert_premadeChart0 = true, bool revert_premadeChart1 = true, bool revert_premadeChart2 = true, bool revert_premadeChart3 = true, bool revert_premadeChart4 = true, bool revert_premadeChart5 = true, bool revert_premadeChart6 = true, bool revert_premadeChart7 = true, bool revert_premadeChart8 = true, bool revert_premadeChart9 = true)
+ {
+ if (revert_premadeChart0) { premadeChart0.internal_indexNumberOfPremadeChart = 0; }
+ if (revert_premadeChart1) { premadeChart1.internal_indexNumberOfPremadeChart = 1; }
+ if (revert_premadeChart2) { premadeChart2.internal_indexNumberOfPremadeChart = 2; }
+ if (revert_premadeChart3) { premadeChart3.internal_indexNumberOfPremadeChart = 3; }
+ if (revert_premadeChart4) { premadeChart4.internal_indexNumberOfPremadeChart = 4; }
+ if (revert_premadeChart5) { premadeChart5.internal_indexNumberOfPremadeChart = 5; }
+ if (revert_premadeChart6) { premadeChart6.internal_indexNumberOfPremadeChart = 6; }
+ if (revert_premadeChart7) { premadeChart7.internal_indexNumberOfPremadeChart = 7; }
+ if (revert_premadeChart8) { premadeChart8.internal_indexNumberOfPremadeChart = 8; }
+ if (revert_premadeChart9) { premadeChart9.internal_indexNumberOfPremadeChart = 9; }
+ }
+
+ public static void RevertPremadePieChartsToAutomaticPositionLayout(bool revert_premadePieChart0 = true, bool revert_premadePieChart1 = true, bool revert_premadePieChart2 = true, bool revert_premadePieChart3 = true, bool revert_premadePieChart4 = true, bool revert_premadePieChart5 = true, bool revert_premadePieChart6 = true, bool revert_premadePieChart7 = true, bool revert_premadePieChart8 = true, bool revert_premadePieChart9 = true)
+ {
+ if (revert_premadePieChart0) { premadePieChart0.internal_indexNumberOfPremadeChart = 0; }
+ if (revert_premadePieChart1) { premadePieChart1.internal_indexNumberOfPremadeChart = 1; }
+ if (revert_premadePieChart2) { premadePieChart2.internal_indexNumberOfPremadeChart = 2; }
+ if (revert_premadePieChart3) { premadePieChart3.internal_indexNumberOfPremadeChart = 3; }
+ if (revert_premadePieChart4) { premadePieChart4.internal_indexNumberOfPremadeChart = 4; }
+ if (revert_premadePieChart5) { premadePieChart5.internal_indexNumberOfPremadeChart = 5; }
+ if (revert_premadePieChart6) { premadePieChart6.internal_indexNumberOfPremadeChart = 6; }
+ if (revert_premadePieChart7) { premadePieChart7.internal_indexNumberOfPremadeChart = 7; }
+ if (revert_premadePieChart8) { premadePieChart8.internal_indexNumberOfPremadeChart = 8; }
+ if (revert_premadePieChart9) { premadePieChart9.internal_indexNumberOfPremadeChart = 9; }
+ }
+
+ public static void SetSize_forAllPremadeCharts(float newWidthPerChart)
+ {
+ SetWidth_forAllPremadeLineCharts(newWidthPerChart, true);
+ SetSizeOfPieCircleDiameter_forAllPremadePieCharts(newWidthPerChart * factor_fromLineChartWidth_toPieChartDiameter_soThatTheyAppearWithApproxTheSameWidth);
+ }
+
+ public static void SetWidth_forAllPremadeLineCharts(float newWidth = default_widthOfPremadeCharts, bool scaleHeightAsWell = true)
+ {
+ float scaleFactor_comparedToBefore = newWidth / current_widthOfPremadeCharts;
+ current_widthOfPremadeCharts = newWidth;
+ Apply_current_horizontalDistance_fromChartToChart_relativeToChartWidth();
+
+ if (premadeChart0.internal_indexNumberOfPremadeChart != (-1)) { premadeChart0.Width_inWorldSpace = newWidth; }
+ if (premadeChart1.internal_indexNumberOfPremadeChart != (-1)) { premadeChart1.Width_inWorldSpace = newWidth; }
+ if (premadeChart2.internal_indexNumberOfPremadeChart != (-1)) { premadeChart2.Width_inWorldSpace = newWidth; }
+ if (premadeChart3.internal_indexNumberOfPremadeChart != (-1)) { premadeChart3.Width_inWorldSpace = newWidth; }
+ if (premadeChart4.internal_indexNumberOfPremadeChart != (-1)) { premadeChart4.Width_inWorldSpace = newWidth; }
+ if (premadeChart5.internal_indexNumberOfPremadeChart != (-1)) { premadeChart5.Width_inWorldSpace = newWidth; }
+ if (premadeChart6.internal_indexNumberOfPremadeChart != (-1)) { premadeChart6.Width_inWorldSpace = newWidth; }
+ if (premadeChart7.internal_indexNumberOfPremadeChart != (-1)) { premadeChart7.Width_inWorldSpace = newWidth; }
+ if (premadeChart8.internal_indexNumberOfPremadeChart != (-1)) { premadeChart8.Width_inWorldSpace = newWidth; }
+ if (premadeChart9.internal_indexNumberOfPremadeChart != (-1)) { premadeChart9.Width_inWorldSpace = newWidth; }
+
+ if (scaleHeightAsWell)
+ {
+ SetHeight_forAllPremadeLineCharts(current_heightOfPremadeCharts * scaleFactor_comparedToBefore, false);
+ }
+ }
+
+ public static void SetHeight_forAllPremadeLineCharts(float newHeight = default_heightOfPremadeCharts, bool scaleWidthAsWell = true)
+ {
+ float scaleFactor_comparedToBefore = newHeight / current_heightOfPremadeCharts;
+ current_heightOfPremadeCharts = newHeight;
+
+ if (premadeChart0.internal_indexNumberOfPremadeChart != (-1)) { premadeChart0.Height_inWorldSpace = newHeight; }
+ if (premadeChart1.internal_indexNumberOfPremadeChart != (-1)) { premadeChart1.Height_inWorldSpace = newHeight; }
+ if (premadeChart2.internal_indexNumberOfPremadeChart != (-1)) { premadeChart2.Height_inWorldSpace = newHeight; }
+ if (premadeChart3.internal_indexNumberOfPremadeChart != (-1)) { premadeChart3.Height_inWorldSpace = newHeight; }
+ if (premadeChart4.internal_indexNumberOfPremadeChart != (-1)) { premadeChart4.Height_inWorldSpace = newHeight; }
+ if (premadeChart5.internal_indexNumberOfPremadeChart != (-1)) { premadeChart5.Height_inWorldSpace = newHeight; }
+ if (premadeChart6.internal_indexNumberOfPremadeChart != (-1)) { premadeChart6.Height_inWorldSpace = newHeight; }
+ if (premadeChart7.internal_indexNumberOfPremadeChart != (-1)) { premadeChart7.Height_inWorldSpace = newHeight; }
+ if (premadeChart8.internal_indexNumberOfPremadeChart != (-1)) { premadeChart8.Height_inWorldSpace = newHeight; }
+ if (premadeChart9.internal_indexNumberOfPremadeChart != (-1)) { premadeChart9.Height_inWorldSpace = newHeight; }
+
+ if (scaleWidthAsWell)
+ {
+ SetWidth_forAllPremadeLineCharts(current_widthOfPremadeCharts * scaleFactor_comparedToBefore, false);
+ }
+ }
+
+ public static void SetSizeOfPieCircleDiameter_forAllPremadePieCharts(float newDiameter = default_diameterOfPremadePieCharts)
+ {
+ if (premadePieChart0.internal_indexNumberOfPremadeChart != (-1)) { premadePieChart0.Size_ofPieCircleDiameter = newDiameter; }
+ if (premadePieChart1.internal_indexNumberOfPremadeChart != (-1)) { premadePieChart1.Size_ofPieCircleDiameter = newDiameter; }
+ if (premadePieChart2.internal_indexNumberOfPremadeChart != (-1)) { premadePieChart2.Size_ofPieCircleDiameter = newDiameter; }
+ if (premadePieChart3.internal_indexNumberOfPremadeChart != (-1)) { premadePieChart3.Size_ofPieCircleDiameter = newDiameter; }
+ if (premadePieChart4.internal_indexNumberOfPremadeChart != (-1)) { premadePieChart4.Size_ofPieCircleDiameter = newDiameter; }
+ if (premadePieChart5.internal_indexNumberOfPremadeChart != (-1)) { premadePieChart5.Size_ofPieCircleDiameter = newDiameter; }
+ if (premadePieChart6.internal_indexNumberOfPremadeChart != (-1)) { premadePieChart6.Size_ofPieCircleDiameter = newDiameter; }
+ if (premadePieChart7.internal_indexNumberOfPremadeChart != (-1)) { premadePieChart7.Size_ofPieCircleDiameter = newDiameter; }
+ if (premadePieChart8.internal_indexNumberOfPremadeChart != (-1)) { premadePieChart8.Size_ofPieCircleDiameter = newDiameter; }
+ if (premadePieChart9.internal_indexNumberOfPremadeChart != (-1)) { premadePieChart9.Size_ofPieCircleDiameter = newDiameter; }
+ }
+
+ public static void ClearAllPremadeCharts(bool clear_premadeChart0 = true, bool clear_premadeChart1 = true, bool clear_premadeChart2 = true, bool clear_premadeChart3 = true, bool clear_premadeChart4 = true, bool clear_premadeChart5 = true, bool clear_premadeChart6 = true, bool clear_premadeChart7 = true, bool clear_premadeChart8 = true, bool clear_premadeChart9 = true, bool clear_premadePieChart0 = true, bool clear_premadePieChart1 = true, bool clear_premadePieChart2 = true, bool clear_premadePieChart3 = true, bool clear_premadePieChart4 = true, bool clear_premadePieChart5 = true, bool clear_premadePieChart6 = true, bool clear_premadePieChart7 = true, bool clear_premadePieChart8 = true, bool clear_premadePieChart9 = true)
+ {
+ ClearAllPremadeLineCharts(clear_premadeChart0, clear_premadeChart1, clear_premadeChart2, clear_premadeChart3, clear_premadeChart4, clear_premadeChart5, clear_premadeChart6, clear_premadeChart7, clear_premadeChart8, clear_premadeChart9);
+ ClearAllPremadePieCharts(clear_premadePieChart0, clear_premadePieChart1, clear_premadePieChart2, clear_premadePieChart3, clear_premadePieChart4, clear_premadePieChart5, clear_premadePieChart6, clear_premadePieChart7, clear_premadePieChart8, clear_premadePieChart9);
+ }
+
+ public static void ClearAllPremadeLineCharts(bool clear_premadeChart0 = true, bool clear_premadeChart1 = true, bool clear_premadeChart2 = true, bool clear_premadeChart3 = true, bool clear_premadeChart4 = true, bool clear_premadeChart5 = true, bool clear_premadeChart6 = true, bool clear_premadeChart7 = true, bool clear_premadeChart8 = true, bool clear_premadeChart9 = true)
+ {
+ if (clear_premadeChart0) { premadeChart0.Clear(); }
+ if (clear_premadeChart1) { premadeChart1.Clear(); }
+ if (clear_premadeChart2) { premadeChart2.Clear(); }
+ if (clear_premadeChart3) { premadeChart3.Clear(); }
+ if (clear_premadeChart4) { premadeChart4.Clear(); }
+ if (clear_premadeChart5) { premadeChart5.Clear(); }
+ if (clear_premadeChart6) { premadeChart6.Clear(); }
+ if (clear_premadeChart7) { premadeChart7.Clear(); }
+ if (clear_premadeChart8) { premadeChart8.Clear(); }
+ if (clear_premadeChart9) { premadeChart9.Clear(); }
+ }
+
+ public static void ClearAllPremadePieCharts(bool clear_premadePieChart0 = true, bool clear_premadePieChart1 = true, bool clear_premadePieChart2 = true, bool clear_premadePieChart3 = true, bool clear_premadePieChart4 = true, bool clear_premadePieChart5 = true, bool clear_premadePieChart6 = true, bool clear_premadePieChart7 = true, bool clear_premadePieChart8 = true, bool clear_premadePieChart9 = true)
+ {
+ if (clear_premadePieChart0) { premadePieChart0.Clear(); }
+ if (clear_premadePieChart1) { premadePieChart1.Clear(); }
+ if (clear_premadePieChart2) { premadePieChart2.Clear(); }
+ if (clear_premadePieChart3) { premadePieChart3.Clear(); }
+ if (clear_premadePieChart4) { premadePieChart4.Clear(); }
+ if (clear_premadePieChart5) { premadePieChart5.Clear(); }
+ if (clear_premadePieChart6) { premadePieChart6.Clear(); }
+ if (clear_premadePieChart7) { premadePieChart7.Clear(); }
+ if (clear_premadePieChart8) { premadePieChart8.Clear(); }
+ if (clear_premadePieChart9) { premadePieChart9.Clear(); }
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/DrawCharts.cs.meta b/Runtime/DrawDebugLibrary/DrawCharts.cs.meta
new file mode 100644
index 0000000..ac37034
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawCharts.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b95f03b066d204641be8a6bd70f033ea
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawEngineBasics.cs b/Runtime/DrawDebugLibrary/DrawEngineBasics.cs
new file mode 100644
index 0000000..bc5425f
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawEngineBasics.cs
@@ -0,0 +1,1481 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+ public class DrawEngineBasics
+ {
+ public static Color colorOfVector1_forDotProduct = UtilitiesDXXL_Colors.green_boolTrue; //This only affects the dot product drawings. It specifies the color of "vector1_lhs".
+ public static Color colorOfVector2_forDotProduct = UtilitiesDXXL_Colors.red_boolFalse; //This only affects the dot product drawings. It specifies the color of "vector2_rhs".
+ public static Color colorOfAngle_forDotProduct = UtilitiesDXXL_Colors.orange_lineThresholdMiddleDistance; //This only affects the dot product drawings. It specifies the color of the displayed angle when using "DotProduct".
+ public static Color colorOfResult_forDotProduct = Color.white; //This only affects the dot product drawings. It specifies the color of the displayed result text when using "DotProduct".
+
+ public static Color colorOfVector1_forCrossProduct = UtilitiesDXXL_Colors.green_boolTrue; //This only affects the cross product drawings. It specifies the color of "vector1_lhs_leftThumb".
+ public static Color colorOfVector2_forCrossProduct = UtilitiesDXXL_Colors.red_boolFalse; //This only affects the cross product drawings. It specifies the color of "vector2_rhs_leftIndexFinger".
+ public static Color colorOfAngle_forCrossProduct = UtilitiesDXXL_Colors.orange_lineThresholdMiddleDistance; //This only affects the cross product drawings. It specifies the color of the displayed angle when using "CrossProduct".
+ public static Color colorOfResultVector_forCrossProduct = UtilitiesDXXL_Colors.darkBlue; //This only affects the cross product drawings. It specifies the color of the displayed result vector when using "CrossProduct".
+ public static Color colorOfResultText_forCrossProduct = Color.white; //This only affects the cross product drawings. It specifies the color of the displayed result text when using "CrossProduct".
+ public static Color colorOfResultPlane_forCrossProduct = UtilitiesDXXL_Colors.violet; //This only affects the cross product drawings. It specifies the color of the displayed result plane when using "CrossProduct".
+
+ public static Color overwriteColorForFrustumsHighlightedPlane = default(Color); //The default color for the highlighted plane of camera frustums is the color that has been specfied for the frustum itself, but with an adjusted brightness. You can overwrite this behaviour by setting this field.
+ public static float distanceOfFrustumsHighlightedPlane = 0.0f;
+ public static bool drawFrustumsHighlightedPlaneAlsoIfFarerThanFarClipPlane = true;
+
+ public static bool hide_positionAroundWhichToDraw_forGrids = false;
+ public static bool hide_distanceDisplay_forGrids = UtilitiesDXXL_Grid.default_hide_distanceDisplay_forGrids;
+ public static float offsetForDistanceDisplays_inGrids = UtilitiesDXXL_Grid.default_offsetForDistanceDisplays_inGrids;
+ public static float offsetForCoordinateTextDisplays_inGrids = UtilitiesDXXL_Grid.default_offsetForCoordinateTextDisplays_inGrids;
+ public static float coveredGridUnits_rel_forGridPlanes = UtilitiesDXXL_Grid.default_coveredGridUnits_rel_forGridPlanes;
+
+ private static float sizeScalingForCoordinateTexts_inGrids = UtilitiesDXXL_Grid.default_sizeScalingForCoordinateTexts_inGrids;
+ public static float SizeScalingForCoordinateTexts_inGrids
+ {
+ get { return sizeScalingForCoordinateTexts_inGrids; }
+ set
+ {
+ if (value < UtilitiesDXXL_Grid.min_sizeScalingForCoordinateTexts_inGrids)
+ {
+ Debug.Log("Cannot set 'DrawEngineBasics.SizeScalingForCoordinateTexts_inGrids' to a smaller value than " + UtilitiesDXXL_Grid.min_sizeScalingForCoordinateTexts_inGrids);
+ sizeScalingForCoordinateTexts_inGrids = UtilitiesDXXL_Grid.min_sizeScalingForCoordinateTexts_inGrids;
+ }
+ else
+ {
+ sizeScalingForCoordinateTexts_inGrids = value;
+ }
+ }
+ }
+
+ public static bool skipXYZAxisIdentifier_inCoordinateTextsOnGridAxes = false;
+ public static bool skipLocalPrefix_inCoordinateTextsOnGridAxes = false;
+
+ public static void Vector(Vector3 vectorStartPos, Vector3 vectorEndPos, Color color = default(Color), float lineWidth = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorEndPos, "vectorEndPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorEndPos, "vectorEndPos")) { return; }
+ VectorFrom(vectorStartPos, vectorEndPos - vectorStartPos, color, lineWidth, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void VectorFrom(Vector3 vectorStartPos, Vector3 vector, Color color = default(Color), float lineWidth = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_EngineBasics.VectorFrom_local(Vector3.zero, Vector3.one, Quaternion.identity, vectorStartPos, vector, color, lineWidth, text, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ public static void VectorTo(Vector3 vector, Vector3 vectorEndPos, Color color = default(Color), float lineWidth = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorEndPos, "vectorEndPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vector, "vector")) { return; }
+ VectorFrom(vectorEndPos - vector, vector, color, lineWidth, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Position(GameObject gameObject, Color color = default(Color), float lineWidth = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ VectorFrom(Vector3.zero, gameObject.transform.position, color, lineWidth, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Position(Transform transform, Color color = default(Color), float lineWidth = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ VectorFrom(Vector3.zero, transform.position, color, lineWidth, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Position(Vector3 position, Color color = default(Color), float lineWidth = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ VectorFrom(Vector3.zero, position, color, lineWidth, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Vector_local(Transform parentTransform_thatDefinesTheLocalSpace, Vector3 vectorStartPos, Vector3 vectorEndPos, Color color = default(Color), float lineWidth_inGlobalUnits = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorEndPos, "vectorEndPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorEndPos, "vectorEndPos")) { return; }
+ VectorFrom_local(parentTransform_thatDefinesTheLocalSpace, vectorStartPos, vectorEndPos - vectorStartPos, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void VectorFrom_local(Transform parentTransform_thatDefinesTheLocalSpace, Vector3 vectorStartPos, Vector3 vector, Color color = default(Color), float lineWidth_inGlobalUnits = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+
+ if (parentTransform_thatDefinesTheLocalSpace == null)
+ {
+ text = "[ parent transform that defines the local space is 'null'
-> fallback to global space]
" + text;
+ UtilitiesDXXL_EngineBasics.VectorFrom_local(Vector3.zero, Vector3.one, Quaternion.identity, vectorStartPos, vector, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects, false);
+ }
+ else
+ {
+ bool aParentHasANonUniformScale = UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale(parentTransform_thatDefinesTheLocalSpace);
+ if (aParentHasANonUniformScale)
+ {
+ text = "[ A parent transform that defines the local space has a non-uniform scale
-> possibly weird results]
" + text;
+ }
+ UtilitiesDXXL_EngineBasics.VectorFrom_local(parentTransform_thatDefinesTheLocalSpace.position, parentTransform_thatDefinesTheLocalSpace.lossyScale, parentTransform_thatDefinesTheLocalSpace.rotation, vectorStartPos, vector, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects, true);
+ }
+ }
+
+ public static void VectorTo_local(Transform parentTransform_thatDefinesTheLocalSpace, Vector3 vector, Vector3 vectorEndPos, Color color = default(Color), float lineWidth_inGlobalUnits = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorEndPos, "vectorEndPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vector, "vector")) { return; }
+ VectorFrom_local(parentTransform_thatDefinesTheLocalSpace, vectorEndPos - vector, vector, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Position_local(GameObject gameObject_insideLocalSpace, Color color = default(Color), float lineWidth_inGlobalUnits = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject_insideLocalSpace, "gameObject_insideLocalSpace")) { return; }
+ Position_local(gameObject_insideLocalSpace.transform, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Position_local(Transform transform_insideLocalSpace, Color color = default(Color), float lineWidth_inGlobalUnits = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform_insideLocalSpace, "transform_insideLocalSpace")) { return; }
+ VectorFrom_local(transform_insideLocalSpace.parent, Vector3.zero, transform_insideLocalSpace.localPosition, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Position_local(Transform parentTransform_thatDefinesTheLocalSpace, Vector3 positionToDraw, Color color = default(Color), float lineWidth_inGlobalUnits = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ VectorFrom_local(parentTransform_thatDefinesTheLocalSpace, Vector3.zero, positionToDraw, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Scale(GameObject gameObject, float lineWidth = 0.0035f, string text = null, bool drawXDim = true, bool drawYDim = true, bool drawZDim = true, float relSizeOfPlanes = 0.5f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject, "gameObject")) { return; }
+ Scale(gameObject.transform, lineWidth, text, drawXDim, drawYDim, drawZDim, relSizeOfPlanes, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Scale(Transform transform, float lineWidth = 0.0035f, string text = null, bool drawXDim = true, bool drawYDim = true, bool drawZDim = true, float relSizeOfPlanes = 0.5f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform, "transform")) { return; }
+
+ if (transform.parent != null)
+ {
+ text = "[ Try drawing 'Scale', but the transform has a parent
-> fallback to 'LocalScale', but the displayed length units fit global space]
" + text;
+ }
+ Scale(transform.position, transform.lossyScale, lineWidth, text, transform.rotation, drawXDim, drawYDim, drawZDim, relSizeOfPlanes, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Scale(Vector3 centerPos, Vector3 scale, float lineWidth = 0.0035f, string text = null, Quaternion rotation = default(Quaternion), bool drawXDim = true, bool drawYDim = true, bool drawZDim = true, float relSizeOfPlanes = 0.5f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_EngineBasics.LocalScale(centerPos, scale, null, rotation, lineWidth, text, drawXDim, drawYDim, drawZDim, relSizeOfPlanes, overwriteColor, durationInSec, hiddenByNearerObjects, true);
+ }
+
+ public static void LocalScale(GameObject gameObject_insideLocalSpace, float lineWidth_inGlobalUnits = 0.0035f, string text = null, bool drawXDim = true, bool drawYDim = true, bool drawZDim = true, float relSizeOfPlanes = 0.5f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject_insideLocalSpace, "gameObject_insideLocalSpace")) { return; }
+ LocalScale(gameObject_insideLocalSpace.transform, lineWidth_inGlobalUnits, text, drawXDim, drawYDim, drawZDim, relSizeOfPlanes, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void LocalScale(Transform transform_insideLocalSpace, float lineWidth_inGlobalUnits = 0.0035f, string text = null, bool drawXDim = true, bool drawYDim = true, bool drawZDim = true, float relSizeOfPlanes = 0.5f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform_insideLocalSpace, "transform_insideLocalSpace")) { return; }
+ LocalScale(transform_insideLocalSpace.localPosition, transform_insideLocalSpace.localScale, transform_insideLocalSpace.parent, transform_insideLocalSpace.localRotation, lineWidth_inGlobalUnits, text, drawXDim, drawYDim, drawZDim, relSizeOfPlanes, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void LocalScale(Vector3 localPosition, Vector3 localScale, Transform parentTransform, Quaternion localRotation = default(Quaternion), float lineWidth_inGlobalUnits = 0.0035f, string text = null, bool drawXDim = true, bool drawYDim = true, bool drawZDim = true, float relSizeOfPlanes = 0.5f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (parentTransform == null)
+ {
+ text = "[ parent transform that defines the local space is 'null'
-> fallback to global scale]
" + text;
+ UtilitiesDXXL_EngineBasics.LocalScale(localPosition, localScale, parentTransform, localRotation, lineWidth_inGlobalUnits, text, drawXDim, drawYDim, drawZDim, relSizeOfPlanes, overwriteColor, durationInSec, hiddenByNearerObjects, true);
+ }
+ else
+ {
+ UtilitiesDXXL_EngineBasics.LocalScale(localPosition, localScale, parentTransform, localRotation, lineWidth_inGlobalUnits, text, drawXDim, drawYDim, drawZDim, relSizeOfPlanes, overwriteColor, durationInSec, hiddenByNearerObjects, false);
+ }
+ }
+
+ public static void QuaternionRotation(GameObject gameObject, Vector3 customVectorToRotate = default(Vector3), float length_ofUpAndForwardVectors = 1.0f, Color color_ofTurnAxis = default(Color), float lineWidth = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject, "gameObject")) { return; }
+ QuaternionRotation(gameObject.transform, customVectorToRotate, length_ofUpAndForwardVectors, color_ofTurnAxis, lineWidth, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void QuaternionRotation(Transform transform, Vector3 customVectorToRotate = default(Vector3), float length_ofUpAndForwardVectors = 1.0f, Color color_ofTurnAxis = default(Color), float lineWidth = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform, "transform")) { return; }
+ QuaternionRotation(transform.rotation, transform.position, customVectorToRotate, length_ofUpAndForwardVectors, color_ofTurnAxis, lineWidth, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void QuaternionRotation(Quaternion quaternion, Vector3 posWhereToDraw = default(Vector3), Vector3 customVectorToRotate = default(Vector3), float length_ofUpAndForwardVectors = 1.0f, Color color_ofTurnAxis = default(Color), float lineWidth = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Quaternion.QuaternionRotation_local(quaternion, posWhereToDraw, color_ofTurnAxis, lineWidth, text, length_ofUpAndForwardVectors, customVectorToRotate, durationInSec, hiddenByNearerObjects, false, null);
+ }
+
+ public static void QuaternionRotation_local(GameObject gameObject_insideLocalSpace, Vector3 customVectorToRotate_local = default(Vector3), float length_ofUpAndForwardVectors_local = 1.0f, Color color_ofTurnAxis = default(Color), float lineWidth_inGlobalUnits = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject_insideLocalSpace, "gameObject_insideLocalSpace")) { return; }
+ QuaternionRotation_local(gameObject_insideLocalSpace.transform, customVectorToRotate_local, length_ofUpAndForwardVectors_local, color_ofTurnAxis, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void QuaternionRotation_local(Transform transform_insideLocalSpace, Vector3 customVectorToRotate_local = default(Vector3), float length_ofUpAndForwardVectors_local = 1.0f, Color color_ofTurnAxis = default(Color), float lineWidth_inGlobalUnits = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform_insideLocalSpace, "transform_insideLocalSpace")) { return; }
+
+ if (transform_insideLocalSpace.parent == null)
+ {
+ text = "[ parent transform that defines
the local space is 'null'
-> fallback to global rotation]
" + text;
+ UtilitiesDXXL_Quaternion.QuaternionRotation_local(transform_insideLocalSpace.localRotation, transform_insideLocalSpace.position, color_ofTurnAxis, lineWidth_inGlobalUnits, text, length_ofUpAndForwardVectors_local, customVectorToRotate_local, durationInSec, hiddenByNearerObjects, false, null);
+ }
+ else
+ {
+ bool aParentHasANonUniformScale = UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale(transform_insideLocalSpace.parent);
+ if (aParentHasANonUniformScale)
+ {
+ text = "[ A parent transform that defines the
local space has a non-uniform scale
-> possibly weird results]
" + text;
+ }
+ UtilitiesDXXL_Quaternion.QuaternionRotation_local(transform_insideLocalSpace.localRotation, transform_insideLocalSpace.position, color_ofTurnAxis, lineWidth_inGlobalUnits, text, length_ofUpAndForwardVectors_local, customVectorToRotate_local, durationInSec, hiddenByNearerObjects, true, transform_insideLocalSpace.parent);
+ }
+ }
+
+ public static void QuaternionRotation_local(Transform parentTransform_thatDefinesTheLocalSpace, Quaternion quaternionToDraw_local, Vector3 posWhereToDraw_global = default(Vector3), Vector3 customVectorToRotate_local = default(Vector3), float length_ofUpAndForwardVectors_local = 1.0f, Color color_ofTurnAxis = default(Color), float lineWidth_inGlobalUnits = 0.0f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+
+ if (parentTransform_thatDefinesTheLocalSpace == null)
+ {
+ text = "[ parent transform that defines
the local space is 'null'
-> fallback to global rotation]
" + text;
+ UtilitiesDXXL_Quaternion.QuaternionRotation_local(quaternionToDraw_local, posWhereToDraw_global, color_ofTurnAxis, lineWidth_inGlobalUnits, text, length_ofUpAndForwardVectors_local, customVectorToRotate_local, durationInSec, hiddenByNearerObjects, false, null);
+ }
+ else
+ {
+ bool aParentHasANonUniformScale = UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale(parentTransform_thatDefinesTheLocalSpace);
+ if (aParentHasANonUniformScale)
+ {
+ text = "[ A parent transform that defines the
local space has a non-uniform scale
-> possibly weird results]
" + text;
+ }
+ UtilitiesDXXL_Quaternion.QuaternionRotation_local(quaternionToDraw_local, posWhereToDraw_global, color_ofTurnAxis, lineWidth_inGlobalUnits, text, length_ofUpAndForwardVectors_local, customVectorToRotate_local, durationInSec, hiddenByNearerObjects, true, parentTransform_thatDefinesTheLocalSpace);
+ }
+ }
+
+ public static void EulerRotation(GameObject gameObject, Vector3 customVectorToRotate = default(Vector3), float length_ofUpAndForwardVectors = 0.0f, float alpha_ofSquareSpannedByForwardAndUp = 0.0f, string text = null, bool useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay = false, float alpha_ofUnrotatedGimbalAxes = 0.06f, float gimbalSize = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject, "gameObject")) { return; }
+ EulerRotation(gameObject.transform, customVectorToRotate, length_ofUpAndForwardVectors, alpha_ofSquareSpannedByForwardAndUp, text, useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay, alpha_ofUnrotatedGimbalAxes, gimbalSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void EulerRotation(Transform transform, Vector3 customVectorToRotate = default(Vector3), float length_ofUpAndForwardVectors = 0.0f, float alpha_ofSquareSpannedByForwardAndUp = 0.0f, string text = null, bool useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay = false, float alpha_ofUnrotatedGimbalAxes = 0.06f, float gimbalSize = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform, "transform")) { return; }
+
+ if (useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay == false)
+ {
+ if (transform.parent != null)
+ {
+ text = "[ The transform has a parent, but the angle values from the inspector show the local rotation
-> fallback to values from transform.eulerAngles
-> for further infos see documentation of 'useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay']
" + text;
+ useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay = true;
+ }
+ }
+ Vector3 eulerAnglesToDraw = UtilitiesDXXL_Euler.GetEulerAnglesFromNonNullTransform(transform, useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay, false);
+ UtilitiesDXXL_Euler.EulerRotation_local(eulerAnglesToDraw, transform.position, customVectorToRotate, length_ofUpAndForwardVectors, alpha_ofSquareSpannedByForwardAndUp, alpha_ofUnrotatedGimbalAxes, gimbalSize, text, false, durationInSec, hiddenByNearerObjects, null);
+ }
+
+ public static void EulerRotation(Vector3 eulerAnglesToDraw, Vector3 posWhereToDraw = default(Vector3), Vector3 customVectorToRotate = default(Vector3), float length_ofUpAndForwardVectors = 0.0f, float alpha_ofSquareSpannedByForwardAndUp = 0.0f, string text = null, float alpha_ofUnrotatedGimbalAxes = 0.06f, float gimbalSize = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Euler.EulerRotation_local(eulerAnglesToDraw, posWhereToDraw, customVectorToRotate, length_ofUpAndForwardVectors, alpha_ofSquareSpannedByForwardAndUp, alpha_ofUnrotatedGimbalAxes, gimbalSize, text, false, durationInSec, hiddenByNearerObjects, null);
+ }
+
+ public static void EulerRotation(Quaternion quaternionToDrawAsEulerAngles, Vector3 posWhereToDraw = default(Vector3), Vector3 customVectorToRotate = default(Vector3), float length_ofUpAndForwardVectors = 0.0f, float alpha_ofSquareSpannedByForwardAndUp = 0.0f, string text = null, float alpha_ofUnrotatedGimbalAxes = 0.06f, float gimbalSize = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ EulerRotation(quaternionToDrawAsEulerAngles.eulerAngles, posWhereToDraw, customVectorToRotate, length_ofUpAndForwardVectors, alpha_ofSquareSpannedByForwardAndUp, text, alpha_ofUnrotatedGimbalAxes, gimbalSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void EulerRotation_local(GameObject gameObject_insideLocalSpace, Vector3 customVectorToRotate_local = default(Vector3), float length_ofUpAndForwardVectors_local = 0.0f, float alpha_ofSquareSpannedByForwardAndUp = 0.0f, string text = null, bool useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay = false, float alpha_ofUnrotatedGimbalAxes = 0.06f, float gimbalSize_local = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject_insideLocalSpace, "gameObject_insideLocalSpace")) { return; }
+ EulerRotation_local(gameObject_insideLocalSpace.transform, customVectorToRotate_local, length_ofUpAndForwardVectors_local, alpha_ofSquareSpannedByForwardAndUp, text, useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay, alpha_ofUnrotatedGimbalAxes, gimbalSize_local, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void EulerRotation_local(Transform transform_insideLocalSpace, Vector3 customVectorToRotate_local = default(Vector3), float length_ofUpAndForwardVectors_local = 0.0f, float alpha_ofSquareSpannedByForwardAndUp = 0.0f, string text = null, bool useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay = false, float alpha_ofUnrotatedGimbalAxes = 0.06f, float gimbalSize_local = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform_insideLocalSpace, "transform_insideLocalSpace")) { return; }
+ Vector3 eulerAnglesToDraw = UtilitiesDXXL_Euler.GetEulerAnglesFromNonNullTransform(transform_insideLocalSpace, useAnglesFromQuaternion_notFromEditorsTransformInspectorDisplay, true);
+ if (transform_insideLocalSpace.parent == null)
+ {
+ text = "[ parent transform that defines the local space is 'null'
-> fallback to global rotation]
" + text;
+ UtilitiesDXXL_Euler.EulerRotation_local(eulerAnglesToDraw, transform_insideLocalSpace.position, customVectorToRotate_local, length_ofUpAndForwardVectors_local, alpha_ofSquareSpannedByForwardAndUp, alpha_ofUnrotatedGimbalAxes, gimbalSize_local, text, false, durationInSec, hiddenByNearerObjects, null);
+ }
+ else
+ {
+ bool aParentHasANonUniformScale = UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale(transform_insideLocalSpace.parent);
+ if (aParentHasANonUniformScale)
+ {
+ text = "[ A parent transform that defines the local space has a non-uniform scale
-> possibly weird results]
" + text;
+ }
+ float gimbalSize_global = transform_insideLocalSpace.parent.lossyScale.x * gimbalSize_local;
+ UtilitiesDXXL_Euler.EulerRotation_local(eulerAnglesToDraw, transform_insideLocalSpace.position, customVectorToRotate_local, length_ofUpAndForwardVectors_local, alpha_ofSquareSpannedByForwardAndUp, alpha_ofUnrotatedGimbalAxes, gimbalSize_global, text, true, durationInSec, hiddenByNearerObjects, transform_insideLocalSpace.parent);
+ }
+ }
+
+ public static void EulerRotation_local(Transform parentTransform_thatDefinesTheLocalSpace, Vector3 eulerAnglesToDraw_local, Vector3 posWhereToDraw_global = default(Vector3), Vector3 customVectorToRotate_local = default(Vector3), float length_ofUpAndForwardVectors_local = 0.0f, float alpha_ofSquareSpannedByForwardAndUp = 0.0f, string text = null, float alpha_ofUnrotatedGimbalAxes = 0.06f, float gimbalSize_local = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+
+ if (parentTransform_thatDefinesTheLocalSpace == null)
+ {
+ text = "[ parent transform that defines the local space is 'null'
-> fallback to global rotation]
" + text;
+ UtilitiesDXXL_Euler.EulerRotation_local(eulerAnglesToDraw_local, posWhereToDraw_global, customVectorToRotate_local, length_ofUpAndForwardVectors_local, alpha_ofSquareSpannedByForwardAndUp, alpha_ofUnrotatedGimbalAxes, gimbalSize_local, text, false, durationInSec, hiddenByNearerObjects, null);
+ }
+ else
+ {
+ bool aParentHasANonUniformScale = UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale(parentTransform_thatDefinesTheLocalSpace);
+ if (aParentHasANonUniformScale)
+ {
+ text = "[ A parent transform that defines the local space has a non-uniform scale
-> possibly weird results]
" + text;
+ }
+ float gimbalSize_global = parentTransform_thatDefinesTheLocalSpace.lossyScale.x * gimbalSize_local;
+ UtilitiesDXXL_Euler.EulerRotation_local(eulerAnglesToDraw_local, posWhereToDraw_global, customVectorToRotate_local, length_ofUpAndForwardVectors_local, alpha_ofSquareSpannedByForwardAndUp, alpha_ofUnrotatedGimbalAxes, gimbalSize_global, text, true, durationInSec, hiddenByNearerObjects, parentTransform_thatDefinesTheLocalSpace);
+ }
+ }
+
+ public static void EulerRotation_local(Transform parentTransform_thatDefinesTheLocalSpace, Quaternion quaternionToDrawAsEulerAngles_local, Vector3 posWhereToDraw_global = default(Vector3), Vector3 customVectorToRotate_local = default(Vector3), float length_ofUpAndForwardVectors_local = 0.0f, float alpha_ofSquareSpannedByForwardAndUp = 0.0f, string text = null, float alpha_ofUnrotatedGimbalAxes = 0.06f, float gimbalSize_local = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ EulerRotation_local(parentTransform_thatDefinesTheLocalSpace, quaternionToDrawAsEulerAngles_local.eulerAngles, posWhereToDraw_global, customVectorToRotate_local, length_ofUpAndForwardVectors_local, alpha_ofSquareSpannedByForwardAndUp, text, alpha_ofUnrotatedGimbalAxes, gimbalSize_local, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Bounds(GameObject gameObject, Color color = default(Color), bool alsoDrawLocalBounds = true, bool showAlsoBoundsOfChildren = true, float linesWidth = 0.01f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject, "gameObject")) { return; }
+ Bounds(gameObject.transform, color, alsoDrawLocalBounds, showAlsoBoundsOfChildren, linesWidth, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void LocalBounds(GameObject gameObject, Color color = default(Color), bool showAlsoBoundsOfChildren = true, float lineWidth_inGlobalUnits = 0.01f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject, "gameObject")) { return; }
+ LocalBounds(gameObject.transform, color, showAlsoBoundsOfChildren, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Bounds(Transform transform, Color color = default(Color), bool alsoDrawLocalBounds = true, bool showAlsoBoundsOfChildren = true, float linesWidth = 0.01f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform, "transform")) { return; }
+
+ linesWidth = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth);
+ if (alsoDrawLocalBounds)
+ {
+ linesWidth = Mathf.Max(linesWidth, 0.01f);
+ }
+
+ color = UtilitiesDXXL_Colors.OverwriteDefaultColor(color);
+
+ Transform[] thisAndAllChildTransforms = transform.GetComponentsInChildren();
+ int numberOfDrawnBounds = 0;
+
+ if (thisAndAllChildTransforms == null)
+ {
+ UtilitiesDXXL_Log.PrintErrorCode("25");
+ return;
+ }
+ else
+ {
+ bool textHasToBeDrawnYet = true;
+ DrawGlobalBoundsIfTransformHasAMeshRenderer(ref numberOfDrawnBounds, out textHasToBeDrawnYet, transform, color, linesWidth, text, durationInSec, hiddenByNearerObjects);
+
+ if (showAlsoBoundsOfChildren)
+ {
+ for (int i = 0; i < thisAndAllChildTransforms.Length; i++)
+ {
+ if (thisAndAllChildTransforms[i] != transform)
+ {
+ DrawGlobalBoundsIfTransformHasAMeshRenderer(ref numberOfDrawnBounds, out textHasToBeDrawnYet, thisAndAllChildTransforms[i], color, linesWidth, textHasToBeDrawnYet ? text : null, durationInSec, hiddenByNearerObjects);
+ }
+ }
+ }
+
+ if (numberOfDrawnBounds == 0)
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(transform.position, "[ No bounds found on this GameObject]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+ }
+
+ if (alsoDrawLocalBounds)
+ {
+ if (numberOfDrawnBounds > 0)
+ {
+ Color colorForLocalBounds = UtilitiesDXXL_Colors.GetSimilarColorWithOtherBrightnessValue(color);
+ LocalBounds(transform, colorForLocalBounds, showAlsoBoundsOfChildren, 0.15f * linesWidth, null, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ }
+
+ static void DrawGlobalBoundsIfTransformHasAMeshRenderer(ref int numberOfDrawnBounds, out bool textHasToBeDrawnYet, Transform transformToCheck, Color color, float linesWidth, string text, float durationInSec, bool hiddenByNearerObjects)
+ {
+ textHasToBeDrawnYet = (text != null);
+ MeshRenderer meshRenderer = transformToCheck.GetComponent();
+ if (meshRenderer != null)
+ {
+ if (meshRenderer.bounds != null)
+ {
+ Bounds(meshRenderer.bounds, color, linesWidth, text, durationInSec, hiddenByNearerObjects);
+ numberOfDrawnBounds++;
+ textHasToBeDrawnYet = false;
+ }
+ }
+
+ SkinnedMeshRenderer skinnedMeshRenderer = transformToCheck.gameObject.GetComponent();
+ if (skinnedMeshRenderer != null)
+ {
+ if (skinnedMeshRenderer.bounds != null)
+ {
+ Bounds(skinnedMeshRenderer.bounds, color, linesWidth, text, durationInSec, hiddenByNearerObjects);
+ numberOfDrawnBounds++;
+ textHasToBeDrawnYet = false;
+ }
+ }
+ }
+
+ public static void LocalBounds(Transform transform, Color color = default(Color), bool showAlsoBoundsOfChildren = true, float lineWidth_inGlobalUnits = 0.01f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform, "transform")) { return; }
+
+ Transform[] thisAndAllChildTransforms = transform.GetComponentsInChildren();
+ int numberOfDrawnBounds = 0;
+ bool textHasToBeDrawnYet = true;
+
+ DrawLocalBoundsIfTransformHasAMeshFilterOrMeshSkinnedRenderer(ref numberOfDrawnBounds, out textHasToBeDrawnYet, transform, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+
+ if (showAlsoBoundsOfChildren)
+ {
+ for (int i = 0; i < thisAndAllChildTransforms.Length; i++)
+ {
+ if (thisAndAllChildTransforms[i] != transform)
+ {
+ DrawLocalBoundsIfTransformHasAMeshFilterOrMeshSkinnedRenderer(ref numberOfDrawnBounds, out textHasToBeDrawnYet, thisAndAllChildTransforms[i], color, lineWidth_inGlobalUnits, textHasToBeDrawnYet ? text : null, durationInSec, hiddenByNearerObjects);
+ }
+ }
+ }
+
+ if (numberOfDrawnBounds == 0)
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(transform.position, "[ No bounds found on this GameObject]
" + text, color, lineWidth_inGlobalUnits, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+ }
+
+ static void DrawLocalBoundsIfTransformHasAMeshFilterOrMeshSkinnedRenderer(ref int numberOfDrawnBounds, out bool textHasToBeDrawnYet, Transform transformToCheck, Color color, float lineWidth_inGlobalUnits, string text, float durationInSec, bool hiddenByNearerObjects)
+ {
+ textHasToBeDrawnYet = (text != null);
+
+ MeshFilter meshfilter = transformToCheck.gameObject.GetComponent();
+ if (meshfilter != null)
+ {
+ if (Application.isPlaying)
+ {
+ if (meshfilter.mesh != null)
+ {
+ if (meshfilter.mesh.bounds != null)
+ {
+ LocalBounds(meshfilter.mesh.bounds, transformToCheck, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+ numberOfDrawnBounds++;
+ textHasToBeDrawnYet = false;
+ }
+ }
+ }
+ else
+ {
+ if (meshfilter.sharedMesh != null)
+ {
+ if (meshfilter.sharedMesh.bounds != null)
+ {
+ LocalBounds(meshfilter.sharedMesh.bounds, transformToCheck, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+ numberOfDrawnBounds++;
+ textHasToBeDrawnYet = false;
+ }
+ }
+ }
+ }
+
+ SkinnedMeshRenderer skinnedMeshRenderer = transformToCheck.gameObject.GetComponent();
+ if (skinnedMeshRenderer != null)
+ {
+ if (skinnedMeshRenderer.localBounds != null)
+ {
+ if (skinnedMeshRenderer.rootBone == null)
+ {
+ text = "[ Local Bounds potentially at the wrong place, because the Skinned Mesh Renderer has no root bone assigned]
" + text;
+ LocalBounds(skinnedMeshRenderer.localBounds, transformToCheck, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ LocalBounds(skinnedMeshRenderer.localBounds, skinnedMeshRenderer.rootBone, color, lineWidth_inGlobalUnits, text, durationInSec, hiddenByNearerObjects);
+ }
+
+ numberOfDrawnBounds++;
+ textHasToBeDrawnYet = false;
+ }
+ }
+ }
+
+ public static void Bounds(Bounds bounds, Color color = default(Color), float linesWidth = 0.01f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return; }
+
+ color = UtilitiesDXXL_Colors.OverwriteDefaultColor(color);
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(bounds.size))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(bounds.center, "[ Bounds with size of 0]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+
+ if (UtilitiesDXXL_Math.GetSmallestComponent(bounds.extents) < 0.0f)
+ {
+ text = "[ Bounds.extents ( " + bounds.extents.x + " , " + bounds.extents.y + " , " + bounds.extents.z + " ) contains negative values -> 'Bounds.Contains()' will always return 'false']
" + text;
+ }
+
+ //text ABOVE line (in contrast to "LocalBounds" which may often be superimposed):
+ UtilitiesDXXL_Shapes.Cube(bounds.center, bounds.size, color, color, Vector3.up, Vector3.forward, linesWidth, text + "
Bounds", DrawBasics.LineStyle.disconnectedAnchors, 1.0f, true, durationInSec, hiddenByNearerObjects, false, null);
+ }
+
+ public static void LocalBounds(Bounds localBounds, Transform transformDefiningLocalSpace, Color color = default(Color), float lineWidth_inGlobalUnits = 0.01f, string text = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transformDefiningLocalSpace, "transformDefiningLocalSpace")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(lineWidth_inGlobalUnits, "linesWidth")) { return; }
+
+ color = UtilitiesDXXL_Colors.OverwriteDefaultColor(color);
+ Vector3 boundsCenter_worldSpace = transformDefiningLocalSpace.TransformPoint(localBounds.center);
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(localBounds.size))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(boundsCenter_worldSpace, "[ LocalBounds with size of 0 (in localSpace)]
" + text, color, lineWidth_inGlobalUnits, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+
+ Vector3 globalSize = Vector3.Scale(localBounds.size, transformDefiningLocalSpace.lossyScale);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(globalSize))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(boundsCenter_worldSpace, "[ LocalBounds with size of 0 (in worldspace)]
" + text, color, lineWidth_inGlobalUnits, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+
+ if (UtilitiesDXXL_Math.GetSmallestComponent(localBounds.extents) < 0.0f)
+ {
+ text = "[ LocalBounds.extents ( " + localBounds.extents.x + " , " + localBounds.extents.y + " , " + localBounds.extents.z + " ) contains negative values -> 'Bounds.Contains()' will always return 'false']
" + text;
+ }
+
+ if (UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale(transformDefiningLocalSpace.parent))
+ {
+ text = "[ LocalBounds: The local transform has a parent with non-uniform scale
-> possibly weird results]
" + text;
+ }
+
+ //text BELOW line (in contrast to "(Global)Bounds" which may often be superimposed):
+ UtilitiesDXXL_Shapes.Cube(boundsCenter_worldSpace, globalSize, color, color, transformDefiningLocalSpace.up, transformDefiningLocalSpace.forward, lineWidth_inGlobalUnits, "Local Bounds
" + text, DrawBasics.LineStyle.disconnectedAnchors, 1.0f, false, durationInSec, hiddenByNearerObjects, false, null);
+ }
+
+ public static void DotProduct(Vector3 vector1_lhs, Vector3 vector2_rhs, Vector3 posWhereToDraw = default(Vector3), float linesWidth = 0.0025f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //"lhs" = "left hand side (of equation)".
+ //"rhs" = "right hand side (of equation)"
+
+ UtilitiesDXXL_EngineBasics.DotProduct(vector1_lhs, vector2_rhs, posWhereToDraw, linesWidth, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void CrossProduct(Vector3 vector1_lhs_leftThumb, Vector3 vector2_rhs_leftIndexFinger, Vector3 posWhereToDraw = default(Vector3), float linesWidth = 0.0025f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //"lhs" = "left hand side (of equation)"
+ //"rhs" = "right hand side (of equation)"
+ //cross product result is "left middle finger" according to the left hand rule
+
+ UtilitiesDXXL_EngineBasics.CrossProduct(vector1_lhs_leftThumb, vector2_rhs_leftIndexFinger, posWhereToDraw, linesWidth, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void TagGameObject(GameObject gameObject, string text = null, Color colorForText = default(Color), Color colorForTagBox = default(Color), float textSize = 0.2f, float linesWidth = 0.0f, bool encapsulateChildren = true, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject, "gameObject")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(textSize, "textSize")) { return; }
+
+ linesWidth = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth);
+
+ if (UtilitiesDXXL_Colors.IsDefaultColor(colorForText))
+ {
+ colorForText = UtilitiesDXXL_Colors.Get_randomColorSeeded(gameObject.GetInstanceID());
+ }
+
+ if (UtilitiesDXXL_Colors.IsDefaultColor(colorForTagBox))
+ {
+ colorForTagBox = UtilitiesDXXL_Colors.Get_randomColorSeeded(gameObject.GetInstanceID());
+ }
+
+ UtilitiesDXXL_EngineBasics.FillBounds(gameObject, encapsulateChildren, out Vector3 globalExtents, out Vector3 globalCenter, out bool rotateBoundingBox);
+ UtilitiesDXXL_EngineBasics.FillTagBoxOrientationVectors(gameObject, rotateBoundingBox, out Vector3 tagBoxUp, out Vector3 tagBoxForward);
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(globalExtents))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(gameObject.transform.position, "[ GameObject with extent of zero]
" + text, colorForTagBox, linesWidth, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+
+ bool textSize_isZero = UtilitiesDXXL_Math.ApproximatelyZero(textSize);
+ if (textSize_isZero)
+ {
+ UtilitiesDXXL_Shapes.Set_forcedConstantWorldspaceTextSize_forTextAtShapes_reversible(0.0f); //-> text will be relative to gameobject size, or to screenspace
+ }
+ else
+ {
+ UtilitiesDXXL_Shapes.Set_forcedConstantScreenspaceTextSize_relToScreenHeight_forTextAtShapes_reversible(0.0f); //-> disable fixed screenspace size, since it would overrule the fixed worldspace size
+ UtilitiesDXXL_Shapes.Set_forcedConstantWorldspaceTextSize_forTextAtShapes_reversible(textSize);
+ }
+
+ UtilitiesDXXL_Shapes.Cube(globalCenter, 2.0f * globalExtents, colorForTagBox, colorForText, tagBoxUp, tagBoxForward, linesWidth, text, DrawBasics.LineStyle.disconnectedAnchors, 1.0f, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false, gameObject.name);
+
+ if (textSize_isZero)
+ {
+ UtilitiesDXXL_Shapes.Reverse_forcedConstantWorldspaceTextSize_forTextAtShapes();
+ }
+ else
+ {
+ UtilitiesDXXL_Shapes.Reverse_forcedConstantScreenspaceTextSize_relToScreenHeight_forTextAtShapes();
+ UtilitiesDXXL_Shapes.Reverse_forcedConstantWorldspaceTextSize_forTextAtShapes();
+ }
+
+ }
+
+ public static void TagGameObjectScreenspace(GameObject gameObject, string text = null, Color colorForText = default(Color), Color colorForTagBox = default(Color), float linesWidth_relToViewportHeight = 0.0f, bool drawPointerIfOffscreen = true, float relTextSizeScaling = 1.0f, bool encapsulateChildren = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawEngineBasics.TagGameObjectScreenspace") == false) { return; }
+ TagGameObjectScreenspace(automaticallyFoundCamera, gameObject, text, colorForText, colorForTagBox, linesWidth_relToViewportHeight, drawPointerIfOffscreen, relTextSizeScaling, encapsulateChildren, durationInSec);
+ }
+
+ public static void TagGameObjectScreenspace(Camera screenCamera, GameObject gameObject, string text = null, Color colorForText = default(Color), Color colorForTagBox = default(Color), float linesWidth_relToViewportHeight = 0.0f, bool drawPointerIfOffscreen = true, float relTextSizeScaling = 1.0f, bool encapsulateChildren = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TagGameObjectScreenspace.Add(new TagGameObjectScreenspace(screenCamera, gameObject, text, colorForText, colorForTagBox, linesWidth_relToViewportHeight, drawPointerIfOffscreen, relTextSizeScaling, encapsulateChildren, durationInSec));
+ return;
+ }
+
+ UtilitiesDXXL_EngineBasics.TagGameObjectScreenspace(screenCamera, gameObject, text, colorForText, colorForTagBox, linesWidth_relToViewportHeight, drawPointerIfOffscreen, relTextSizeScaling, encapsulateChildren, durationInSec);
+ }
+
+ public static void Camera(Vector3 position, Quaternion rotation = default(Quaternion), Color color = default(Color), string text = null, float linesWidth = 0.0f, float nearClipPlaneDistance = 0.3f, float fieldOfViewAngleDeg = 60.0f, float aspectRatioOfScreen = 16.0f / 9.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Camera(position, rotation * Vector3.forward, rotation * Vector3.up, color, text, linesWidth, nearClipPlaneDistance, fieldOfViewAngleDeg, aspectRatioOfScreen, durationInSec, hiddenByNearerObjects);
+ }
+
+ static InternalDXXL_Plane camPlane = new InternalDXXL_Plane();
+ public static void Camera(Vector3 position, Vector3 forward = default(Vector3), Vector3 up = default(Vector3), Color color = default(Color), string text = null, float linesWidth = 0.0f, float nearClipPlaneDistance = 0.3f, float fieldOfViewAngleDeg = 60.0f, float aspectRatioOfScreen = 16.0f / 9.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(position, "position")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(forward, "forward")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(up, "up")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(nearClipPlaneDistance, "nearClipPlaneDistance")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(fieldOfViewAngleDeg, "fieldOfViewAngleDeg")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(aspectRatioOfScreen, "aspectRatioOfScreen")) { return; }
+
+ forward = UtilitiesDXXL_Math.OverwriteDefaultVectors(forward, Vector3.forward);
+ camPlane.Recreate(position, forward);
+ up = UtilitiesDXXL_Math.OverwriteDefaultVectors(up, Vector3.up);
+ up = UtilitiesDXXL_Shapes.ForceVectorPerpToOtherVector(up, camPlane);
+
+ aspectRatioOfScreen = UtilitiesDXXL_Math.AbsNonZeroValue(aspectRatioOfScreen);
+ if (aspectRatioOfScreen < 0.001f)
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(position, "[ Camera with aspectRatioOfScreen near 0]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+
+ nearClipPlaneDistance = Mathf.Max(nearClipPlaneDistance, 0.01f);
+ fieldOfViewAngleDeg = Mathf.Clamp(fieldOfViewAngleDeg, 0.1f, 179.9f);
+
+ UtilitiesDXXL_EngineBasics.Camera(position, forward, up, false, 5.0f, fieldOfViewAngleDeg, nearClipPlaneDistance, aspectRatioOfScreen, color, text, linesWidth, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Camera(Camera camera, Color color = default(Color), string text = null, float linesWidth = 0.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(camera, "camera")) { return; }
+ UtilitiesDXXL_EngineBasics.Camera(camera.transform.position, camera.transform.forward, camera.transform.up, camera.orthographic, camera.orthographicSize, camera.fieldOfView, camera.nearClipPlane, camera.aspect, color, text, linesWidth, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void CameraFrustum(Vector3 position_ofCamera, Quaternion rotation_ofCamera = default(Quaternion), Color color = default(Color), float nearClipPlaneDistance = 0.3f, float farClipPlaneDistance = 1000.0f, float fieldOfViewAngleDeg = 60.0f, float aspectRatioOfScreen = 16.0f / 9.0f, float alphaFactor_forBoundarySurfaceLines = 0.18f, float linesWidth_ofEdges = 0.0f, int linesPerBoundarySurface = 60, string text = null, bool forceTextOnNearPlaneUnmirroredTowardsCam = true, Vector3 positionOnHighlightedPlane = default(Vector3), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation_ofCamera = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation_ofCamera);
+ CameraFrustum(position_ofCamera, rotation_ofCamera * Vector3.forward, rotation_ofCamera * Vector3.up, color, nearClipPlaneDistance, farClipPlaneDistance, fieldOfViewAngleDeg, aspectRatioOfScreen, alphaFactor_forBoundarySurfaceLines, linesWidth_ofEdges, linesPerBoundarySurface, text, forceTextOnNearPlaneUnmirroredTowardsCam, positionOnHighlightedPlane, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void CameraFrustum(Vector3 position_ofCamera, Vector3 forward_ofCamera = default(Vector3), Vector3 up_ofCamera = default(Vector3), Color color = default(Color), float nearClipPlaneDistance = 0.3f, float farClipPlaneDistance = 1000.0f, float fieldOfViewAngleDeg = 60.0f, float aspectRatioOfScreen = 16.0f / 9.0f, float alphaFactor_forBoundarySurfaceLines = 0.18f, float linesWidth_ofEdges = 0.0f, int linesPerBoundarySurface = 60, string text = null, bool forceTextOnNearPlaneUnmirroredTowardsCam = true, Vector3 positionOnHighlightedPlane = default(Vector3), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(position_ofCamera, "position_ofCamera")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(forward_ofCamera, "forward_ofCamera")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(up_ofCamera, "up_ofCamera")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(nearClipPlaneDistance, "nearClipPlaneDistance")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(farClipPlaneDistance, "farClipPlaneDistance")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(fieldOfViewAngleDeg, "fieldOfViewAngleDeg")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(aspectRatioOfScreen, "aspectRatioOfScreen")) { return; }
+
+ forward_ofCamera = UtilitiesDXXL_Math.OverwriteDefaultVectors(forward_ofCamera, Vector3.forward);
+ camPlane.Recreate(position_ofCamera, forward_ofCamera);
+ up_ofCamera = UtilitiesDXXL_Math.OverwriteDefaultVectors(up_ofCamera, Vector3.up);
+ up_ofCamera = UtilitiesDXXL_Shapes.ForceVectorPerpToOtherVector(up_ofCamera, camPlane);
+
+ aspectRatioOfScreen = UtilitiesDXXL_Math.AbsNonZeroValue(aspectRatioOfScreen);
+ if (aspectRatioOfScreen < 0.001f)
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(position_ofCamera, "[ CameraFrustum with aspectRatioOfScreen near 0]
" + text, color, 0.0f, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+
+ nearClipPlaneDistance = Mathf.Max(nearClipPlaneDistance, 0.01f);
+ farClipPlaneDistance = Mathf.Max(farClipPlaneDistance, 0.011f);
+ fieldOfViewAngleDeg = Mathf.Clamp(fieldOfViewAngleDeg, 0.1f, 179.9f);
+
+ UtilitiesDXXL_EngineBasics.CameraFrustum(position_ofCamera, forward_ofCamera, up_ofCamera, false, 5.0f, fieldOfViewAngleDeg, nearClipPlaneDistance, farClipPlaneDistance, aspectRatioOfScreen, color, text, forceTextOnNearPlaneUnmirroredTowardsCam, linesWidth_ofEdges, alphaFactor_forBoundarySurfaceLines, linesPerBoundarySurface, positionOnHighlightedPlane, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void CameraFrustum(Camera camera, Color color = default(Color), float alphaFactor_forBoundarySurfaceLines = 0.18f, float linesWidth_ofEdges = 0.0f, int linesPerBoundarySurface = 60, string text = null, bool forceTextOnNearPlaneUnmirroredTowardsCam = true, Vector3 positionOnHighlightedPlane = default(Vector3), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(camera, "camera")) { return; }
+ UtilitiesDXXL_EngineBasics.CameraFrustum(camera.transform.position, camera.transform.forward, camera.transform.up, camera.orthographic, camera.orthographicSize, camera.fieldOfView, camera.nearClipPlane, camera.farClipPlane, camera.aspect, color, text, forceTextOnNearPlaneUnmirroredTowardsCam, linesWidth_ofEdges, alphaFactor_forBoundarySurfaceLines, linesPerBoundarySurface, positionOnHighlightedPlane, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void BoolDisplayer2D(bool boolValueToDisplay, Vector2 position = default(Vector2), string boolName = null, float size = 1.0f, float custom_zPos = float.PositiveInfinity, Color color_forTextAndFrame = default(Color), Color overwriteColor_forTrue = default(Color), Color overwriteColor_forFalse = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 positionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(position, zPos);
+ BoolDisplayer(boolValueToDisplay, positionV3, boolName, size, UnityEngine.Quaternion.identity, color_forTextAndFrame, overwriteColor_forTrue, overwriteColor_forFalse, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void BoolDisplayer(bool boolValueToDisplay, Vector3 position = default(Vector3), string boolName = null, float size = 1.0f, Quaternion rotation = default(Quaternion), Color color_forTextAndFrame = default(Color), Color overwriteColor_forTrue = default(Color), Color overwriteColor_forFalse = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ UtilitiesDXXL_EngineBasics.BoolDisplayer(boolValueToDisplay, position, boolName, size, rotation, color_forTextAndFrame, overwriteColor_forTrue, overwriteColor_forFalse, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void BoolDisplayerScreenspace(bool boolValueToDisplay, string boolName, Vector3 position_in3DWorldspace, float size_relToViewportHeight = 0.175f, Color color_forTextAndFrame = default(Color), Color overwriteColor_forTrue = default(Color), Color overwriteColor_forFalse = default(Color), float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_BoolDisplayerScreenspace_3Dpos.Add(new BoolDisplayerScreenspace_3Dpos(boolValueToDisplay, boolName, position_in3DWorldspace, size_relToViewportHeight, color_forTextAndFrame, overwriteColor_forTrue, overwriteColor_forFalse, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawEngineBasics.BoolDisplayerScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ BoolDisplayerScreenspace(boolValueToDisplay, boolName, position_in2DViewportSpace, size_relToViewportHeight, color_forTextAndFrame, overwriteColor_forTrue, overwriteColor_forFalse, durationInSec);
+ }
+
+ public static void BoolDisplayerScreenspace(Camera screenCamera, bool boolValueToDisplay, string boolName, Vector3 position_in3DWorldspace, float size_relToViewportHeight = 0.175f, Color color_forTextAndFrame = default(Color), Color overwriteColor_forTrue = default(Color), Color overwriteColor_forFalse = default(Color), float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_BoolDisplayerScreenspace_3Dpos_cam.Add(new BoolDisplayerScreenspace_3Dpos_cam(screenCamera, boolValueToDisplay, boolName, position_in3DWorldspace, size_relToViewportHeight, color_forTextAndFrame, overwriteColor_forTrue, overwriteColor_forFalse, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ BoolDisplayerScreenspace(screenCamera, boolValueToDisplay, boolName, position_in2DViewportSpace, size_relToViewportHeight, color_forTextAndFrame, overwriteColor_forTrue, overwriteColor_forFalse, durationInSec);
+ }
+
+ public static void BoolDisplayerScreenspace(bool boolValueToDisplay, string boolName = null, Vector2 position_in2DViewportSpace = default(Vector2), float size_relToViewportHeight = 0.175f, Color color_forTextAndFrame = default(Color), Color overwriteColor_forTrue = default(Color), Color overwriteColor_forFalse = default(Color), float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawEngineBasics.BoolDisplayerScreenspace") == false) { return; }
+ BoolDisplayerScreenspace(automaticallyFoundCamera, boolValueToDisplay, boolName, position_in2DViewportSpace, size_relToViewportHeight, color_forTextAndFrame, overwriteColor_forTrue, overwriteColor_forFalse, durationInSec);
+ }
+
+ public static void BoolDisplayerScreenspace(Camera screenCamera, bool boolValueToDisplay, string boolName = null, Vector2 position_in2DViewportSpace = default(Vector2), float size_relToViewportHeight = 0.175f, Color color_forTextAndFrame = default(Color), Color overwriteColor_forTrue = default(Color), Color overwriteColor_forFalse = default(Color), float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_BoolDisplayerScreenspace_2Dpos_cam.Add(new BoolDisplayerScreenspace_2Dpos_cam(screenCamera, boolValueToDisplay, boolName, position_in2DViewportSpace, size_relToViewportHeight, color_forTextAndFrame, overwriteColor_forTrue, overwriteColor_forFalse, durationInSec));
+ return;
+ }
+
+ UtilitiesDXXL_EngineBasics.BoolDisplayerScreenspace(screenCamera, boolValueToDisplay, boolName, position_in2DViewportSpace, size_relToViewportHeight, color_forTextAndFrame, overwriteColor_forTrue, overwriteColor_forFalse, durationInSec);
+ }
+
+ public static void RayLineExtended(Ray ray, Color color = default(Color), float width = 0.0f, string text = null, float forceFixedConeLength = 0.0f, bool addNormalizedMarkingText = true, float enlargeSmallTextToThisMinTextSize = 0.005f, float extentionLength = 1000.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ RayLineExtended(ray.origin, ray.direction, color, width, text, forceFixedConeLength, addNormalizedMarkingText, enlargeSmallTextToThisMinTextSize, extentionLength, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void RayLineExtended(Vector3 rayOrigin, Vector3 rayDirection, Color color = default(Color), float width = 0.0f, string text = null, float forceFixedConeLength = 0.0f, bool addNormalizedMarkingText = true, float enlargeSmallTextToThisMinTextSize = 0.005f, float extentionLength = 1000.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_EngineBasics.RayLineExtended(false, rayOrigin, rayDirection, color, width, text, forceFixedConeLength, addNormalizedMarkingText, enlargeSmallTextToThisMinTextSize, extentionLength, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void RayLineExtended2D(Ray2D ray, Color color = default(Color), float width = 0.0f, string text = null, float custom_zPos = float.PositiveInfinity, float forceFixedConeLength = 0.0f, bool addNormalizedMarkingText = true, float enlargeSmallTextToThisMinTextSize = 0.005f, float extentionLength = 1000.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ RayLineExtended2D(ray.origin, ray.direction, color, width, text, custom_zPos, forceFixedConeLength, addNormalizedMarkingText, enlargeSmallTextToThisMinTextSize, extentionLength, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void RayLineExtended2D(Vector2 rayOrigin, Vector2 rayDirection, Color color = default(Color), float width = 0.0f, string text = null, float custom_zPos = float.PositiveInfinity, float forceFixedConeLength = 0.0f, bool addNormalizedMarkingText = true, float enlargeSmallTextToThisMinTextSize = 0.005f, float extentionLength = 1000.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 rayOriginV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(rayOrigin, zPos);
+ Vector3 rayDirectionV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(rayDirection);
+ UtilitiesDXXL_EngineBasics.RayLineExtended(true, rayOriginV3, rayDirectionV3, color, width, text, forceFixedConeLength, addNormalizedMarkingText, enlargeSmallTextToThisMinTextSize, extentionLength, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void RayLineExtendedScreenspace(Vector2 rayOrigin, Vector2 rayDirection, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, float coneLength_relToViewportHeight = 0.05f, bool displayDistanceOutsideScreenBorder = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawEngineBasics.RayLineExtendedScreenspace") == false) { return; }
+ RayLineExtendedScreenspace(automaticallyFoundCamera, rayOrigin, rayDirection, color, width_relToViewportHeight, text, interpretDirectionAsUnwarped, coneLength_relToViewportHeight, displayDistanceOutsideScreenBorder, durationInSec);
+ }
+
+ public static void RayLineExtendedScreenspace(Camera screenCamera, Vector2 rayOrigin, Vector2 rayDirection, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, float coneLength_relToViewportHeight = 0.05f, bool displayDistanceOutsideScreenBorder = true, float durationInSec = 0.0f)
+ {
+ UtilitiesDXXL_EngineBasics.RayLineExtendedScreenspace(screenCamera, rayOrigin, rayDirection, color, width_relToViewportHeight, text, interpretDirectionAsUnwarped, coneLength_relToViewportHeight, displayDistanceOutsideScreenBorder, durationInSec);
+ }
+
+ public static void CoordinateAxesGizmo(Vector3 position, float lengthPerAxis = 1.0f, float linesWidth = 0.025f, string text = null, bool drawXYZchars = true, bool skipConeDrawing = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(lengthPerAxis, "lengthPerAxis")) { return; } //-> would also be checked in "CoordinateAxesGizmoLocal", but has different name there
+ CoordinateAxesGizmoLocal(position, UnityEngine.Quaternion.identity, default(Vector3), lengthPerAxis, linesWidth, text, drawXYZchars, skipConeDrawing, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void CoordinateAxesGizmoLocal(GameObject gameObject_whoseLocalSpaceIsDisplayed, float forceAllAxesLength = 0.0f, float lineWidth_inGlobalUnits = 0.025f, string text = null, bool drawXYZchars = true, bool skipConeDrawing = false, bool skipWarningForNonUniformParentScale = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject_whoseLocalSpaceIsDisplayed, "gameObject_whoseLocalSpaceIsDisplayed")) { return; }
+ CoordinateAxesGizmoLocal(gameObject_whoseLocalSpaceIsDisplayed.transform, forceAllAxesLength, lineWidth_inGlobalUnits, text, drawXYZchars, skipConeDrawing, skipWarningForNonUniformParentScale, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void CoordinateAxesGizmoLocal(Transform transform_whoseLocalSpaceIsDisplayed, float forceAllAxesLength = 0.0f, float lineWidth_inGlobalUnits = 0.025f, string text = null, bool drawXYZchars = true, bool skipConeDrawing = false, bool skipWarningForNonUniformParentScale = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform_whoseLocalSpaceIsDisplayed, "transform_whoseLocalSpaceIsDisplayed")) { return; }
+
+ bool aParentHasANonUniformScale = UtilitiesDXXL_EngineBasics.CheckIf_transformOrAParentHasNonUniformScale(transform_whoseLocalSpaceIsDisplayed.parent);
+ if (skipWarningForNonUniformParentScale) { aParentHasANonUniformScale = false; }
+ UtilitiesDXXL_EngineBasics.CoordinateAxesGizmoLocal(transform_whoseLocalSpaceIsDisplayed.position, transform_whoseLocalSpaceIsDisplayed.rotation, transform_whoseLocalSpaceIsDisplayed.lossyScale, forceAllAxesLength, lineWidth_inGlobalUnits, text, drawXYZchars, skipConeDrawing, durationInSec, hiddenByNearerObjects, aParentHasANonUniformScale);
+ }
+
+ public static void CoordinateAxesGizmoLocal(Vector3 position_OfLocalCoordinateSystem, Quaternion rotation_OfLocalCoordinateSystem, Vector3 scale_OfLocalCoordinateSystem = default(Vector3), float forceAllAxesLength = 0.0f, float lineWidth_inGlobalUnits = 0.025f, string text = null, bool drawXYZchars = true, bool skipConeDrawing = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ UtilitiesDXXL_EngineBasics.CoordinateAxesGizmoLocal(position_OfLocalCoordinateSystem, rotation_OfLocalCoordinateSystem, scale_OfLocalCoordinateSystem, forceAllAxesLength, lineWidth_inGlobalUnits, text, drawXYZchars, skipConeDrawing, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ public static void GridPlanes(Transform transformAroundWhichToDraw, float extentOfEachGridPlane_rel = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transformAroundWhichToDraw, "transformAroundWhichToDraw")) { return; }
+ GridPlanes(transformAroundWhichToDraw.position, extentOfEachGridPlane_rel, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void GridPlanes(Vector3 positionAroundWhichToDraw, float extentOfEachGridPlane_rel = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridPlanes(true, true, true, positionAroundWhichToDraw, extentOfEachGridPlane_rel, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void XGridPlanes(Transform transformAroundWhichToDraw, float extentOfEachGridPlane_rel = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transformAroundWhichToDraw, "transformAroundWhichToDraw")) { return; }
+ XGridPlanes(transformAroundWhichToDraw.position, extentOfEachGridPlane_rel, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void XGridPlanes(Vector3 positionAroundWhichToDraw, float extentOfEachGridPlane_rel = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridPlanes(true, false, false, positionAroundWhichToDraw, extentOfEachGridPlane_rel, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void YGridPlanes(Transform transformAroundWhichToDraw, float extentOfEachGridPlane_rel = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transformAroundWhichToDraw, "transformAroundWhichToDraw")) { return; }
+ YGridPlanes(transformAroundWhichToDraw.position, extentOfEachGridPlane_rel, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void YGridPlanes(Vector3 positionAroundWhichToDraw, float extentOfEachGridPlane_rel = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridPlanes(false, true, false, positionAroundWhichToDraw, extentOfEachGridPlane_rel, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void ZGridPlanes(Transform transformAroundWhichToDraw, float extentOfEachGridPlane_rel = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transformAroundWhichToDraw, "transformAroundWhichToDraw")) { return; }
+ ZGridPlanes(transformAroundWhichToDraw.position, extentOfEachGridPlane_rel, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void ZGridPlanes(Vector3 positionAroundWhichToDraw, float extentOfEachGridPlane_rel = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridPlanes(false, false, true, positionAroundWhichToDraw, extentOfEachGridPlane_rel, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void GridPlanesLocal(Transform childTransformAroundWhichToDrawGridOfParent, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDrawGridOfParent, "childTransformAroundWhichToDrawGridOfParent")) { return; }
+ if (childTransformAroundWhichToDrawGridOfParent.parent == null)
+ {
+ GridPlanesLocal(Vector3.zero, Vector3.one, Quaternion.identity, childTransformAroundWhichToDrawGridOfParent.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ GridPlanesLocal(childTransformAroundWhichToDrawGridOfParent.parent.position, childTransformAroundWhichToDrawGridOfParent.parent.lossyScale, childTransformAroundWhichToDrawGridOfParent.parent.rotation, childTransformAroundWhichToDrawGridOfParent.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void GridPlanesLocal(Transform parentTransformThatDefinesTheLocalSpace, Vector3 localPositionAroundWhichToDraw, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (parentTransformThatDefinesTheLocalSpace == null)
+ {
+ UtilitiesDXXL_Grid.GridPlanesLocal(Vector3.zero, Vector3.one, Quaternion.identity, true, true, true, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ UtilitiesDXXL_Grid.GridPlanesLocal(parentTransformThatDefinesTheLocalSpace.position, parentTransformThatDefinesTheLocalSpace.lossyScale, parentTransformThatDefinesTheLocalSpace.rotation, true, true, true, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void XGridPlanesLocal(Transform childTransformAroundWhichToDrawGridOfParent, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDrawGridOfParent, "childTransformAroundWhichToDrawGridOfParent")) { return; }
+ if (childTransformAroundWhichToDrawGridOfParent.parent == null)
+ {
+ XGridPlanesLocal(Vector3.zero, Vector3.one, Quaternion.identity, childTransformAroundWhichToDrawGridOfParent.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ XGridPlanesLocal(childTransformAroundWhichToDrawGridOfParent.parent.position, childTransformAroundWhichToDrawGridOfParent.parent.lossyScale, childTransformAroundWhichToDrawGridOfParent.parent.rotation, childTransformAroundWhichToDrawGridOfParent.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void XGridPlanesLocal(Transform parentTransformThatDefinesTheLocalSpace, Vector3 localPositionAroundWhichToDraw, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (parentTransformThatDefinesTheLocalSpace == null)
+ {
+ UtilitiesDXXL_Grid.GridPlanesLocal(Vector3.zero, Vector3.one, Quaternion.identity, true, false, false, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ UtilitiesDXXL_Grid.GridPlanesLocal(parentTransformThatDefinesTheLocalSpace.position, parentTransformThatDefinesTheLocalSpace.lossyScale, parentTransformThatDefinesTheLocalSpace.rotation, true, false, false, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void YGridPlanesLocal(Transform childTransformAroundWhichToDrawGridOfParent, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDrawGridOfParent, "childTransformAroundWhichToDrawGridOfParent")) { return; }
+ if (childTransformAroundWhichToDrawGridOfParent.parent == null)
+ {
+ YGridPlanesLocal(Vector3.zero, Vector3.one, Quaternion.identity, childTransformAroundWhichToDrawGridOfParent.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ YGridPlanesLocal(childTransformAroundWhichToDrawGridOfParent.parent.position, childTransformAroundWhichToDrawGridOfParent.parent.lossyScale, childTransformAroundWhichToDrawGridOfParent.parent.rotation, childTransformAroundWhichToDrawGridOfParent.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void YGridPlanesLocal(Transform parentTransformThatDefinesTheLocalSpace, Vector3 localPositionAroundWhichToDraw, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (parentTransformThatDefinesTheLocalSpace == null)
+ {
+ UtilitiesDXXL_Grid.GridPlanesLocal(Vector3.zero, Vector3.one, Quaternion.identity, false, true, false, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ UtilitiesDXXL_Grid.GridPlanesLocal(parentTransformThatDefinesTheLocalSpace.position, parentTransformThatDefinesTheLocalSpace.lossyScale, parentTransformThatDefinesTheLocalSpace.rotation, false, true, false, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void ZGridPlanesLocal(Transform childTransformAroundWhichToDrawGridOfParent, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDrawGridOfParent, "childTransformAroundWhichToDrawGridOfParent")) { return; }
+ if (childTransformAroundWhichToDrawGridOfParent.parent == null)
+ {
+ ZGridPlanesLocal(Vector3.zero, Vector3.one, Quaternion.identity, childTransformAroundWhichToDrawGridOfParent.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ ZGridPlanesLocal(childTransformAroundWhichToDrawGridOfParent.parent.position, childTransformAroundWhichToDrawGridOfParent.parent.lossyScale, childTransformAroundWhichToDrawGridOfParent.parent.rotation, childTransformAroundWhichToDrawGridOfParent.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void ZGridPlanesLocal(Transform parentTransformThatDefinesTheLocalSpace, Vector3 localPositionAroundWhichToDraw, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (parentTransformThatDefinesTheLocalSpace == null)
+ {
+ UtilitiesDXXL_Grid.GridPlanesLocal(Vector3.zero, Vector3.one, Quaternion.identity, false, false, true, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ UtilitiesDXXL_Grid.GridPlanesLocal(parentTransformThatDefinesTheLocalSpace.position, parentTransformThatDefinesTheLocalSpace.lossyScale, parentTransformThatDefinesTheLocalSpace.rotation, false, false, true, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void GridPlanesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Transform childTransformAroundWhichToDraw, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDraw, "childTransformAroundWhichToDraw")) { return; }
+ GridPlanesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, childTransformAroundWhichToDraw.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void GridPlanesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Vector3 localPositionAroundWhichToDraw = default(Vector3), float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridPlanesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, true, true, true, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void XGridPlanesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Transform childTransformAroundWhichToDraw, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDraw, "childTransformAroundWhichToDraw")) { return; }
+ XGridPlanesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, childTransformAroundWhichToDraw.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void XGridPlanesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Vector3 localPositionAroundWhichToDraw = default(Vector3), float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridPlanesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, true, false, false, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void YGridPlanesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Transform childTransformAroundWhichToDraw, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDraw, "childTransformAroundWhichToDraw")) { return; }
+ YGridPlanesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, childTransformAroundWhichToDraw.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void YGridPlanesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Vector3 localPositionAroundWhichToDraw = default(Vector3), float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridPlanesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, false, true, false, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ public static void ZGridPlanesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Transform childTransformAroundWhichToDraw, float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDraw, "childTransformAroundWhichToDraw")) { return; }
+ ZGridPlanesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, childTransformAroundWhichToDraw.localPosition, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void ZGridPlanesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Vector3 localPositionAroundWhichToDraw = default(Vector3), float extentOfEachGridPlane_rel_inLocalSpaceUnits = 10.0f, float drawDensity = 1.0f, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = false, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridPlanesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, false, false, true, localPositionAroundWhichToDraw, extentOfEachGridPlane_rel_inLocalSpaceUnits, drawDensity, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public enum XGridLinesOrientation { alongY, alongZ };
+ public enum YGridLinesOrientation { alongX, alongZ };
+ public enum ZGridLinesOrientation { alongX, alongY };
+ public static void GridLines(Transform transformAroundWhichToDraw, float coveredGridUnits_rel = 10.0f, float lengthOfEachGridLine_rel = 10.0f, float linesWidth_signFlipsPerp = 0.0f, XGridLinesOrientation orientation_ofXLines = XGridLinesOrientation.alongY, YGridLinesOrientation orientation_ofYLines = YGridLinesOrientation.alongX, ZGridLinesOrientation orientation_ofZLines = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transformAroundWhichToDraw, "transformAroundWhichToDraw")) { return; }
+ GridLines(transformAroundWhichToDraw.position, coveredGridUnits_rel, lengthOfEachGridLine_rel, linesWidth_signFlipsPerp, orientation_ofXLines, orientation_ofYLines, orientation_ofZLines, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void GridLines(Vector3 positionAroundWhichToDraw, float coveredGridUnits_rel = 10.0f, float lengthOfEachGridLine_rel = 10.0f, float linesWidth_signFlipsPerp = 0.0f, XGridLinesOrientation orientation_ofXLines = XGridLinesOrientation.alongY, YGridLinesOrientation orientation_ofYLines = YGridLinesOrientation.alongX, ZGridLinesOrientation orientation_ofZLines = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridLines(positionAroundWhichToDraw, coveredGridUnits_rel, lengthOfEachGridLine_rel, linesWidth_signFlipsPerp, true, true, true, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects, orientation_ofXLines, orientation_ofYLines, orientation_ofZLines);
+ }
+
+ public static void XGridLines(Transform transformAroundWhichToDraw, float coveredGridUnits_rel = 10.0f, float lengthOfEachGridLine_rel = 10.0f, float linesWidth_signFlipsPerp = 0.0f, XGridLinesOrientation orientation = XGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transformAroundWhichToDraw, "transformAroundWhichToDraw")) { return; }
+ XGridLines(transformAroundWhichToDraw.position, coveredGridUnits_rel, lengthOfEachGridLine_rel, linesWidth_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void XGridLines(Vector3 positionAroundWhichToDraw, float coveredGridUnits_rel = 10.0f, float lengthOfEachGridLine_rel = 10.0f, float linesWidth_signFlipsPerp = 0.0f, XGridLinesOrientation orientation = XGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridLines(positionAroundWhichToDraw, coveredGridUnits_rel, lengthOfEachGridLine_rel, linesWidth_signFlipsPerp, true, false, false, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, orientation, YGridLinesOrientation.alongX, ZGridLinesOrientation.alongX);
+ }
+
+ public static void YGridLines(Transform transformAroundWhichToDraw, float coveredGridUnits_rel = 10.0f, float lengthOfEachGridLine_rel = 10.0f, float linesWidth_signFlipsPerp = 0.0f, YGridLinesOrientation orientation = YGridLinesOrientation.alongX, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transformAroundWhichToDraw, "transformAroundWhichToDraw")) { return; }
+ YGridLines(transformAroundWhichToDraw.position, coveredGridUnits_rel, lengthOfEachGridLine_rel, linesWidth_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void YGridLines(Vector3 positionAroundWhichToDraw, float coveredGridUnits_rel = 10.0f, float lengthOfEachGridLine_rel = 10.0f, float linesWidth_signFlipsPerp = 0.0f, YGridLinesOrientation orientation = YGridLinesOrientation.alongX, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridLines(positionAroundWhichToDraw, coveredGridUnits_rel, lengthOfEachGridLine_rel, linesWidth_signFlipsPerp, false, true, false, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, XGridLinesOrientation.alongZ, orientation, ZGridLinesOrientation.alongX);
+ }
+ public static void ZGridLines(Transform transformAroundWhichToDraw, float coveredGridUnits_rel = 10.0f, float lengthOfEachGridLine_rel = 10.0f, float linesWidth_signFlipsPerp = 0.0f, ZGridLinesOrientation orientation = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transformAroundWhichToDraw, "transformAroundWhichToDraw")) { return; }
+ ZGridLines(transformAroundWhichToDraw.position, coveredGridUnits_rel, lengthOfEachGridLine_rel, linesWidth_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void ZGridLines(Vector3 positionAroundWhichToDraw, float coveredGridUnits_rel = 10.0f, float lengthOfEachGridLine_rel = 10.0f, float linesWidth_signFlipsPerp = 0.0f, ZGridLinesOrientation orientation = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridLines(positionAroundWhichToDraw, coveredGridUnits_rel, lengthOfEachGridLine_rel, linesWidth_signFlipsPerp, false, false, true, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, XGridLinesOrientation.alongZ, YGridLinesOrientation.alongZ, orientation);
+ }
+
+ public static void GridLinesLocal(Transform childTransformAroundWhichToDrawGridOfParent, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, XGridLinesOrientation orientation_ofXLines = XGridLinesOrientation.alongY, YGridLinesOrientation orientation_ofYLines = YGridLinesOrientation.alongX, ZGridLinesOrientation orientation_ofZLines = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDrawGridOfParent, "childTransformAroundWhichToDrawGridOfParent")) { return; }
+ if (childTransformAroundWhichToDrawGridOfParent.parent == null)
+ {
+ GridLinesLocal(Vector3.zero, Vector3.one, Quaternion.identity, childTransformAroundWhichToDrawGridOfParent.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation_ofXLines, orientation_ofYLines, orientation_ofZLines, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ GridLinesLocal(childTransformAroundWhichToDrawGridOfParent.parent.position, childTransformAroundWhichToDrawGridOfParent.parent.lossyScale, childTransformAroundWhichToDrawGridOfParent.parent.rotation, childTransformAroundWhichToDrawGridOfParent.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation_ofXLines, orientation_ofYLines, orientation_ofZLines, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void GridLinesLocal(Transform parentTransformThatDefinesTheLocalSpace, Vector3 localPositionAroundWhichToDraw, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, XGridLinesOrientation orientation_ofXLines = XGridLinesOrientation.alongY, YGridLinesOrientation orientation_ofYLines = YGridLinesOrientation.alongX, ZGridLinesOrientation orientation_ofZLines = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (parentTransformThatDefinesTheLocalSpace == null)
+ {
+ UtilitiesDXXL_Grid.GridLinesLocal(Vector3.zero, Vector3.one, Quaternion.identity, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, true, true, true, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects, orientation_ofXLines, orientation_ofYLines, orientation_ofZLines);
+ }
+ else
+ {
+ UtilitiesDXXL_Grid.GridLinesLocal(parentTransformThatDefinesTheLocalSpace.position, parentTransformThatDefinesTheLocalSpace.lossyScale, parentTransformThatDefinesTheLocalSpace.rotation, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, true, true, true, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects, orientation_ofXLines, orientation_ofYLines, orientation_ofZLines);
+ }
+ }
+
+ public static void XGridLinesLocal(Transform childTransformAroundWhichToDrawGridOfParent, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, XGridLinesOrientation orientation = XGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDrawGridOfParent, "childTransformAroundWhichToDrawGridOfParent")) { return; }
+ if (childTransformAroundWhichToDrawGridOfParent.parent == null)
+ {
+ XGridLinesLocal(Vector3.zero, Vector3.one, Quaternion.identity, childTransformAroundWhichToDrawGridOfParent.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ XGridLinesLocal(childTransformAroundWhichToDrawGridOfParent.parent.position, childTransformAroundWhichToDrawGridOfParent.parent.lossyScale, childTransformAroundWhichToDrawGridOfParent.parent.rotation, childTransformAroundWhichToDrawGridOfParent.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void XGridLinesLocal(Transform parentTransformThatDefinesTheLocalSpace, Vector3 localPositionAroundWhichToDraw, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, XGridLinesOrientation orientation = XGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (parentTransformThatDefinesTheLocalSpace == null)
+ {
+ UtilitiesDXXL_Grid.GridLinesLocal(Vector3.zero, Vector3.one, Quaternion.identity, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, true, false, false, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, orientation, YGridLinesOrientation.alongX, ZGridLinesOrientation.alongX);
+ }
+ else
+ {
+ UtilitiesDXXL_Grid.GridLinesLocal(parentTransformThatDefinesTheLocalSpace.position, parentTransformThatDefinesTheLocalSpace.lossyScale, parentTransformThatDefinesTheLocalSpace.rotation, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, true, false, false, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, orientation, YGridLinesOrientation.alongX, ZGridLinesOrientation.alongX);
+ }
+ }
+
+ public static void YGridLinesLocal(Transform childTransformAroundWhichToDrawGridOfParent, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, YGridLinesOrientation orientation = YGridLinesOrientation.alongX, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDrawGridOfParent, "childTransformAroundWhichToDrawGridOfParent")) { return; }
+ if (childTransformAroundWhichToDrawGridOfParent.parent == null)
+ {
+ YGridLinesLocal(Vector3.zero, Vector3.one, Quaternion.identity, childTransformAroundWhichToDrawGridOfParent.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ YGridLinesLocal(childTransformAroundWhichToDrawGridOfParent.parent.position, childTransformAroundWhichToDrawGridOfParent.parent.lossyScale, childTransformAroundWhichToDrawGridOfParent.parent.rotation, childTransformAroundWhichToDrawGridOfParent.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void YGridLinesLocal(Transform parentTransformThatDefinesTheLocalSpace, Vector3 localPositionAroundWhichToDraw, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, YGridLinesOrientation orientation = YGridLinesOrientation.alongX, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (parentTransformThatDefinesTheLocalSpace == null)
+ {
+ UtilitiesDXXL_Grid.GridLinesLocal(Vector3.zero, Vector3.one, Quaternion.identity, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, false, true, false, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, XGridLinesOrientation.alongZ, orientation, ZGridLinesOrientation.alongX);
+ }
+ else
+ {
+ UtilitiesDXXL_Grid.GridLinesLocal(parentTransformThatDefinesTheLocalSpace.position, parentTransformThatDefinesTheLocalSpace.lossyScale, parentTransformThatDefinesTheLocalSpace.rotation, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, false, true, false, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, XGridLinesOrientation.alongZ, orientation, ZGridLinesOrientation.alongX);
+ }
+ }
+
+ public static void ZGridLinesLocal(Transform childTransformAroundWhichToDrawGridOfParent, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, ZGridLinesOrientation orientation = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDrawGridOfParent, "childTransformAroundWhichToDrawGridOfParent")) { return; }
+ if (childTransformAroundWhichToDrawGridOfParent.parent == null)
+ {
+ ZGridLinesLocal(Vector3.zero, Vector3.one, Quaternion.identity, childTransformAroundWhichToDrawGridOfParent.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ ZGridLinesLocal(childTransformAroundWhichToDrawGridOfParent.parent.position, childTransformAroundWhichToDrawGridOfParent.parent.lossyScale, childTransformAroundWhichToDrawGridOfParent.parent.rotation, childTransformAroundWhichToDrawGridOfParent.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public static void ZGridLinesLocal(Transform parentTransformThatDefinesTheLocalSpace, Vector3 localPositionAroundWhichToDraw, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, ZGridLinesOrientation orientation = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (parentTransformThatDefinesTheLocalSpace == null)
+ {
+ UtilitiesDXXL_Grid.GridLinesLocal(Vector3.zero, Vector3.one, Quaternion.identity, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, false, false, true, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, XGridLinesOrientation.alongZ, YGridLinesOrientation.alongZ, orientation);
+ }
+ else
+ {
+ UtilitiesDXXL_Grid.GridLinesLocal(parentTransformThatDefinesTheLocalSpace.position, parentTransformThatDefinesTheLocalSpace.lossyScale, parentTransformThatDefinesTheLocalSpace.rotation, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, false, false, true, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, XGridLinesOrientation.alongZ, YGridLinesOrientation.alongZ, orientation);
+ }
+ }
+
+ public static void GridLinesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Transform childTransformAroundWhichToDraw, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, XGridLinesOrientation orientation_ofXLines = XGridLinesOrientation.alongY, YGridLinesOrientation orientation_ofYLines = YGridLinesOrientation.alongX, ZGridLinesOrientation orientation_ofZLines = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDraw, "childTransformAroundWhichToDraw")) { return; }
+ GridLinesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, childTransformAroundWhichToDraw.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation_ofXLines, orientation_ofYLines, orientation_ofZLines, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void GridLinesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Vector3 localPositionAroundWhichToDraw = default(Vector3), float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, XGridLinesOrientation orientation_ofXLines = XGridLinesOrientation.alongY, YGridLinesOrientation orientation_ofYLines = YGridLinesOrientation.alongX, ZGridLinesOrientation orientation_ofZLines = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColorForX = default(Color), Color overwriteColorForY = default(Color), Color overwriteColorForZ = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridLinesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, true, true, true, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColorForX, overwriteColorForY, overwriteColorForZ, durationInSec, hiddenByNearerObjects, orientation_ofXLines, orientation_ofYLines, orientation_ofZLines);
+ }
+
+ public static void XGridLinesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Transform childTransformAroundWhichToDraw, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, XGridLinesOrientation orientation = XGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDraw, "childTransformAroundWhichToDraw")) { return; }
+ XGridLinesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, childTransformAroundWhichToDraw.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+
+ public static void XGridLinesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Vector3 localPositionAroundWhichToDraw = default(Vector3), float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, XGridLinesOrientation orientation = XGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridLinesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, true, false, false, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, orientation, YGridLinesOrientation.alongX, ZGridLinesOrientation.alongX);
+ }
+
+ public static void YGridLinesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Transform childTransformAroundWhichToDraw, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, YGridLinesOrientation orientation = YGridLinesOrientation.alongX, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDraw, "childTransformAroundWhichToDraw")) { return; }
+ YGridLinesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, childTransformAroundWhichToDraw.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void YGridLinesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Vector3 localPositionAroundWhichToDraw = default(Vector3), float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, YGridLinesOrientation orientation = YGridLinesOrientation.alongX, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridLinesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, false, true, false, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, XGridLinesOrientation.alongZ, orientation, ZGridLinesOrientation.alongX);
+ }
+
+ public static void ZGridLinesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Transform childTransformAroundWhichToDraw, float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, ZGridLinesOrientation orientation = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(childTransformAroundWhichToDraw, "childTransformAroundWhichToDraw")) { return; }
+ ZGridLinesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, childTransformAroundWhichToDraw.localPosition, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, orientation, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void ZGridLinesLocal(Vector3 originOfLocalSpace, Vector3 scaleOfLocalSpace, Quaternion rotationOfLocalSpace, Vector3 localPositionAroundWhichToDraw = default(Vector3), float coveredGridUnits_rel_inLocalSpaceUnits = 10.0f, float lengthOfEachGridLine_rel_inLocalSpaceUnits = 10.0f, float linesWidth_inLocalSpaceUnits_signFlipsPerp = 0.0f, ZGridLinesOrientation orientation = ZGridLinesOrientation.alongY, bool draw1000grid = false, bool draw100grid = false, bool draw10grid = false, bool draw1grid = true, bool draw0p1grid = true, bool draw0p01grid = false, bool draw0p001grid = false, float distanceBetweenRepeatingCoordsTexts_relToGridDistance = 20.0f, Color overwriteColor = default(Color), float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Grid.GridLinesLocal(originOfLocalSpace, scaleOfLocalSpace, rotationOfLocalSpace, localPositionAroundWhichToDraw, coveredGridUnits_rel_inLocalSpaceUnits, lengthOfEachGridLine_rel_inLocalSpaceUnits, linesWidth_inLocalSpaceUnits_signFlipsPerp, false, false, true, draw1000grid, draw100grid, draw10grid, draw1grid, draw0p1grid, draw0p01grid, draw0p001grid, distanceBetweenRepeatingCoordsTexts_relToGridDistance, overwriteColor, overwriteColor, overwriteColor, durationInSec, hiddenByNearerObjects, XGridLinesOrientation.alongZ, YGridLinesOrientation.alongZ, orientation);
+ }
+
+ public enum GridScreenspaceMode
+ {
+ warpWidthAndHeightIndividuallyToFitScreenInBothAxes,
+ screenHeightDefinesSquareBoxes_alignLeft,
+ screenHeightDefinesSquareBoxes_alignRight,
+ screenWidthDefinesSquareBoxes_alignAtBottom,
+ screenWidthDefinesSquareBoxes_alignAtTop,
+ }
+
+ public static void GridScreenspace(Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, bool drawTenthLines = true, bool drawHundredthLines = true, GridScreenspaceMode gridScreenspaceMode = GridScreenspaceMode.warpWidthAndHeightIndividuallyToFitScreenInBothAxes, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawEngineBasics.GridScreenspace") == false) { return; }
+ GridScreenspace(automaticallyFoundCamera, color, linesWidth_relToViewportHeight, drawTenthLines, drawHundredthLines, gridScreenspaceMode, durationInSec);
+ }
+
+ public static void GridScreenspace(Camera camera, Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, bool drawTenthLines = true, bool drawHundredthLines = true, GridScreenspaceMode gridScreenspaceMode = GridScreenspaceMode.warpWidthAndHeightIndividuallyToFitScreenInBothAxes, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(camera, "camera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(camera)) { return; }
+
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_GridScreenspace.Add(new GridScreenspace(camera, color, linesWidth_relToViewportHeight, drawTenthLines, drawHundredthLines, gridScreenspaceMode, durationInSec));
+ return;
+ }
+
+ color = UtilitiesDXXL_Colors.OverwriteDefaultColor(color);
+ Color colorFor01 = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.5f);
+ Color colorFor001 = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.15f);
+ float usedAspectCorrectionFactor_toMakeBoxesSquare;
+
+ switch (gridScreenspaceMode)
+ {
+ case GridScreenspaceMode.warpWidthAndHeightIndividuallyToFitScreenInBothAxes:
+ DrawMainScreenspaceGridLines(camera, 1.0f, 1.0f, false, false, color, linesWidth_relToViewportHeight, durationInSec);
+ DrawConfigurableScreenspaceGrid(camera, drawTenthLines, 10, 1.0f, 1.0f, false, false, colorFor01, durationInSec);
+ DrawConfigurableScreenspaceGrid(camera, drawHundredthLines, 100, 1.0f, 1.0f, false, false, colorFor001, durationInSec);
+ break;
+ case GridScreenspaceMode.screenHeightDefinesSquareBoxes_alignLeft:
+ usedAspectCorrectionFactor_toMakeBoxesSquare = 1.0f / camera.aspect;
+ DrawMainScreenspaceGridLines(camera, 1.0f, usedAspectCorrectionFactor_toMakeBoxesSquare, false, false, color, linesWidth_relToViewportHeight, durationInSec);
+ DrawConfigurableScreenspaceGrid(camera, drawTenthLines, 10, 1.0f, usedAspectCorrectionFactor_toMakeBoxesSquare, false, false, colorFor01, durationInSec);
+ DrawConfigurableScreenspaceGrid(camera, drawHundredthLines, 100, 1.0f, usedAspectCorrectionFactor_toMakeBoxesSquare, false, false, colorFor001, durationInSec);
+ break;
+ case GridScreenspaceMode.screenHeightDefinesSquareBoxes_alignRight:
+ usedAspectCorrectionFactor_toMakeBoxesSquare = 1.0f / camera.aspect;
+ DrawMainScreenspaceGridLines(camera, 1.0f, usedAspectCorrectionFactor_toMakeBoxesSquare, true, false, color, linesWidth_relToViewportHeight, durationInSec);
+ DrawConfigurableScreenspaceGrid(camera, drawTenthLines, 10, 1.0f, usedAspectCorrectionFactor_toMakeBoxesSquare, true, false, colorFor01, durationInSec);
+ DrawConfigurableScreenspaceGrid(camera, drawHundredthLines, 100, 1.0f, usedAspectCorrectionFactor_toMakeBoxesSquare, true, false, colorFor001, durationInSec);
+ break;
+ case GridScreenspaceMode.screenWidthDefinesSquareBoxes_alignAtBottom:
+ usedAspectCorrectionFactor_toMakeBoxesSquare = camera.aspect;
+ DrawMainScreenspaceGridLines(camera, usedAspectCorrectionFactor_toMakeBoxesSquare, 1.0f, false, false, color, linesWidth_relToViewportHeight, durationInSec);
+ DrawConfigurableScreenspaceGrid(camera, drawTenthLines, 10, usedAspectCorrectionFactor_toMakeBoxesSquare, 1.0f, false, false, colorFor01, durationInSec);
+ DrawConfigurableScreenspaceGrid(camera, drawHundredthLines, 100, usedAspectCorrectionFactor_toMakeBoxesSquare, 1.0f, false, false, colorFor001, durationInSec);
+ break;
+ case GridScreenspaceMode.screenWidthDefinesSquareBoxes_alignAtTop:
+ usedAspectCorrectionFactor_toMakeBoxesSquare = camera.aspect;
+ DrawMainScreenspaceGridLines(camera, usedAspectCorrectionFactor_toMakeBoxesSquare, 1.0f, false, true, color, linesWidth_relToViewportHeight, durationInSec);
+ DrawConfigurableScreenspaceGrid(camera, drawTenthLines, 10, usedAspectCorrectionFactor_toMakeBoxesSquare, 1.0f, false, true, colorFor01, durationInSec);
+ DrawConfigurableScreenspaceGrid(camera, drawHundredthLines, 100, usedAspectCorrectionFactor_toMakeBoxesSquare, 1.0f, false, true, colorFor001, durationInSec);
+ break;
+ default:
+ break;
+ }
+
+ }
+
+ static void DrawMainScreenspaceGridLines(Camera camera, float scaleFactor_forHorizLines, float scaleFactor_forVertLines, bool startAtRightBorder_insteadOfLeft, bool startAtTopBorder_insteadOfBottom, Color color, float linesWidth_relToViewportHeight, float durationInSec)
+ {
+ //horiz lines:
+ if (startAtTopBorder_insteadOfBottom)
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(0.0f, 1.0f), new Vector2(1.0f, 1.0f), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(0.0f, 1.0f - (0.5f * scaleFactor_forHorizLines)), new Vector2(1.0f, 1.0f - (0.5f * scaleFactor_forHorizLines)), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(0.0f, 1.0f - (1.0f * scaleFactor_forHorizLines)), new Vector2(1.0f, 1.0f - (1.0f * scaleFactor_forHorizLines)), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ }
+ else
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(0.0f, 0.0f), new Vector2(1.0f, 0.0f), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(0.0f, 0.5f * scaleFactor_forHorizLines), new Vector2(1.0f, 0.5f * scaleFactor_forHorizLines), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(0.0f, 1.0f * scaleFactor_forHorizLines), new Vector2(1.0f, 1.0f * scaleFactor_forHorizLines), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ }
+
+ //vert lines:
+ if (startAtRightBorder_insteadOfLeft)
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(1.0f, 0.0f), new Vector2(1.0f, 1.0f), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(1.0f - (0.5f * scaleFactor_forVertLines), 0.0f), new Vector2(1.0f - (0.5f * scaleFactor_forVertLines), 1.0f), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(1.0f - (1.0f * scaleFactor_forVertLines), 0.0f), new Vector2(1.0f - (1.0f * scaleFactor_forVertLines), 1.0f), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ }
+ else
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(0.0f, 0.0f), new Vector2(0.0f, 1.0f), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(0.5f * scaleFactor_forVertLines, 0.0f), new Vector2(0.5f * scaleFactor_forVertLines, 1.0f), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(1.0f * scaleFactor_forVertLines, 0.0f), new Vector2(1.0f * scaleFactor_forVertLines, 1.0f), color, linesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ }
+ }
+
+ static void DrawConfigurableScreenspaceGrid(Camera camera, bool drawThis, int numberOfLines, float scaleFactor_forHorizLines, float scaleFactor_forVertLines, bool startAtRightBorder_insteadOfLeft, bool startAtTopBorder_insteadOfBottom, Color color, float durationInSec)
+ {
+ if (drawThis)
+ {
+ float progress0to1_perLine = 1.0f / (float)numberOfLines;
+
+ //horiz lines:
+ float progress0to1_perLine_forHorizLines = progress0to1_perLine * scaleFactor_forHorizLines;
+
+ int numberOfHorizLines_minus1_overshootingToFillWholeScreen;
+ if (UtilitiesDXXL_Math.ApproximatelyZero(scaleFactor_forHorizLines))
+ {
+ numberOfHorizLines_minus1_overshootingToFillWholeScreen = numberOfLines - 1; //-> "minus 1" is for not overdrawing the mainLine once more to not alter mainLines alpha value
+ }
+ else
+ {
+ numberOfHorizLines_minus1_overshootingToFillWholeScreen = Mathf.RoundToInt((float)numberOfLines / scaleFactor_forHorizLines);
+ }
+
+ for (int i = 1; i <= numberOfHorizLines_minus1_overshootingToFillWholeScreen; i++)
+ {
+ float progress0to1_forHorizLines = progress0to1_perLine_forHorizLines * i;
+ if (startAtTopBorder_insteadOfBottom) { progress0to1_forHorizLines = 1.0f - progress0to1_forHorizLines; }
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(0.0f, progress0to1_forHorizLines), new Vector2(1.0f, progress0to1_forHorizLines), color, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ }
+
+ //vert lines:
+ float progress0to1_perLine_forVertLines = progress0to1_perLine * scaleFactor_forVertLines;
+
+ int numberOfVertLines_minus1_overshootingToFillWholeScreen;
+ if (UtilitiesDXXL_Math.ApproximatelyZero(scaleFactor_forVertLines))
+ {
+ numberOfVertLines_minus1_overshootingToFillWholeScreen = numberOfLines - 1; //-> "minus 1" is for not overdrawing the mainLine once more to not alter mainLines alpha value
+ }
+ else
+ {
+ numberOfVertLines_minus1_overshootingToFillWholeScreen = Mathf.RoundToInt((float)numberOfLines / scaleFactor_forVertLines);
+ }
+
+ for (int i = 1; i <= numberOfVertLines_minus1_overshootingToFillWholeScreen; i++)
+ {
+ float progress0to1_forVertLines = progress0to1_perLine_forVertLines * i;
+ if (startAtRightBorder_insteadOfLeft) { progress0to1_forVertLines = 1.0f - progress0to1_forVertLines; }
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(camera, new Vector2(progress0to1_forVertLines, 0.0f), new Vector2(progress0to1_forVertLines, 1.0f), color, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, DrawScreenspace.minTextSize_relToViewportHeight, durationInSec);
+ }
+ }
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/DrawEngineBasics.cs.meta b/Runtime/DrawDebugLibrary/DrawEngineBasics.cs.meta
new file mode 100644
index 0000000..e897ab1
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawEngineBasics.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ec28ea9811a12d945a4060291021fbe6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawLogs.cs b/Runtime/DrawDebugLibrary/DrawLogs.cs
new file mode 100644
index 0000000..6d52880
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawLogs.cs
@@ -0,0 +1,959 @@
+namespace DrawXXL
+{
+ using System;
+ using System.Diagnostics;
+ using UnityEngine;
+ using System.Collections.Generic;
+
+ public class DrawLogs
+ {
+ public static bool autoMarkupLogTextWithGameobjectColor_forConsole = false;
+ public static bool autoMarkupLogTextWithGameobjectColor_forDrawingInScene = false;
+ public static bool autoMarkupLogTextWithGameobjectColor_forDrawingInScrenspace = false;
+ public static float forceLuminance_ofAutoMarkupColors = 0.0f;
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void Assert(bool condition, string message, GameObject context)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(message, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.Assert(condition, message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.Assert(condition, message, context);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ if (condition == false)
+ {
+ NoteLogMessageForDrawingAtGameObjects(LogType.Assert, context, message);
+ }
+ }
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void Assert(bool condition)
+ {
+ UnityEngine.Debug.Assert(condition);
+ }
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void Assert(bool condition, object message, GameObject context)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string message_asString = GetStringFromObject(message);
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(message_asString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.Assert(condition, message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.Assert(condition, message, context);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ if (condition == false)
+ {
+ NoteLogMessageForDrawingAtGameObjects(LogType.Assert, context, message);
+ }
+ }
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void Assert(bool condition, string message)
+ {
+ UnityEngine.Debug.Assert(condition, message);
+ }
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void Assert(bool condition, object message)
+ {
+ UnityEngine.Debug.Assert(condition, message);
+ }
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void Assert(bool condition, GameObject context)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(assertionFailedString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.Assert(condition, message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.Assert(condition, context);
+ }
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ if (condition == false)
+ {
+ NoteLogMessageForDrawingAtGameObjects(LogType.Assert, context);
+ }
+ }
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void AssertFormat(bool condition, GameObject context, string format, params object[] args)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string messageAsString = GetStringFromFormatAndArgs(format, args);
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(messageAsString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.Assert(condition, message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.AssertFormat(condition, context, format, args);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ if (condition == false)
+ {
+ NoteLogMessageForDrawingAtGameObjects(LogType.Assert, context, format, args);
+ }
+ }
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void AssertFormat(bool condition, string format, params object[] args)
+ {
+ UnityEngine.Debug.AssertFormat(condition, format, args);
+ }
+
+ public static void Log(object message)
+ {
+ UnityEngine.Debug.Log(message);
+ }
+
+ public static void Log(object message, GameObject context)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string message_asString = GetStringFromObject(message);
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(message_asString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.Log(message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.Log(message, context);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ NoteLogMessageForDrawingAtGameObjects(LogType.Log, context, message);
+ }
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void LogAssertion(object message, GameObject context)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string message_asString = GetStringFromObject(message);
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(message_asString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.LogAssertion(message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.LogAssertion(message, context);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ NoteLogMessageForDrawingAtGameObjects(LogType.Assert, context, message);
+ }
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void LogAssertion(object message)
+ {
+ UnityEngine.Debug.LogAssertion(message);
+ }
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void LogAssertionFormat(GameObject context, string format, params object[] args)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string messageAsString = GetStringFromFormatAndArgs(format, args);
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(messageAsString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.LogAssertion(message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.LogAssertionFormat(context, format, args);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ NoteLogMessageForDrawingAtGameObjects(LogType.Assert, context, format, args);
+ }
+
+ [Conditional("UNITY_ASSERTIONS")]
+ public static void LogAssertionFormat(string format, params object[] args)
+ {
+ UnityEngine.Debug.LogAssertionFormat(format, args);
+ }
+
+ public static void LogError(object message, GameObject context)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string message_asString = GetStringFromObject(message);
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(message_asString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.LogError(message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.LogError(message, context);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ NoteLogMessageForDrawingAtGameObjects(LogType.Error, context, message);
+ }
+
+ public static void LogError(object message)
+ {
+ UnityEngine.Debug.LogError(message);
+ }
+
+ public static void LogErrorFormat(GameObject context, string format, params object[] args)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string messageAsString = GetStringFromFormatAndArgs(format, args);
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(messageAsString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.LogError(message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.LogErrorFormat(context, format, args);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ NoteLogMessageForDrawingAtGameObjects(LogType.Error, context, format, args);
+ }
+
+ public static void LogErrorFormat(string format, params object[] args)
+ {
+ UnityEngine.Debug.LogErrorFormat(format, args);
+ }
+
+ public static void LogException(System.Exception exception)
+ {
+ UnityEngine.Debug.LogException(exception);
+ }
+
+ public static void LogException(System.Exception exception, GameObject context)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string messageAsString = GetStringFromException(exception);
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(messageAsString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.LogError(message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.LogException(exception, context);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ NoteLogMessageForDrawingAtGameObjects(LogType.Exception, context, exception);
+ }
+
+ public static void LogFormat(string format, params object[] args)
+ {
+ UnityEngine.Debug.LogFormat(format, args);
+ }
+
+ public static void LogFormat(GameObject context, string format, params object[] args)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string messageAsString = GetStringFromFormatAndArgs(format, args);
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(messageAsString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.Log(message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.LogFormat(context, format, args);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ NoteLogMessageForDrawingAtGameObjects(LogType.Log, context, format, args);
+ }
+
+ public static void LogFormat(LogType logType, LogOption logOptions, GameObject context, string format, params object[] args)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string format_withColorMarkup = DrawText.MarkupColorFromGameobjectID(format, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.LogFormat(logType, logOptions, context, format_withColorMarkup, args);
+ }
+ else
+ {
+ UnityEngine.Debug.LogFormat(logType, logOptions, context, format, args);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ NoteLogMessageForDrawingAtGameObjects(logType, context, format, args);
+ }
+
+ public static void LogWarning(object message, GameObject context)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string message_asString = GetStringFromObject(message);
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(message_asString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.LogWarning(message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.LogWarning(message, context);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ NoteLogMessageForDrawingAtGameObjects(LogType.Warning, context, message);
+ }
+
+ public static void LogWarning(object message)
+ {
+ UnityEngine.Debug.LogWarning(message);
+ }
+
+ public static void LogWarningFormat(GameObject context, string format, params object[] args)
+ {
+ if (autoMarkupLogTextWithGameobjectColor_forConsole)
+ {
+ string messageAsString = GetStringFromFormatAndArgs(format, args);
+ string message_asString_withColorMarkup = DrawText.MarkupColorFromGameobjectID(messageAsString, context, forceLuminance_ofAutoMarkupColors);
+ UnityEngine.Debug.LogWarning(message_asString_withColorMarkup, context);
+ }
+ else
+ {
+ UnityEngine.Debug.LogWarningFormat(context, format, args);
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+ NoteLogMessageForDrawingAtGameObjects(LogType.Warning, context, format, args);
+ }
+
+ public static void LogWarningFormat(string format, params object[] args)
+ {
+ UnityEngine.Debug.LogWarningFormat(format, args);
+ }
+
+ static void NoteLogMessageForDrawingAtGameObjects(LogType logType, GameObject gameObject_toWhichLogMessageBelongs, object message)
+ {
+ string messageString = GetStringFromObject(message, ref logType);
+ NoteLogMessageForDrawingAtGameObjects(logType, gameObject_toWhichLogMessageBelongs, messageString);
+ }
+
+ static string GetStringFromObject(object message)
+ {
+ LogType dummyLogType = default;
+ return GetStringFromObject(message, ref dummyLogType);
+ }
+
+ static string GetStringFromObject(object message, ref LogType logType)
+ {
+ if (message == null)
+ {
+ return "null";
+ }
+ else
+ {
+ string messageString;
+ try
+ {
+ messageString = message.ToString();
+ }
+ catch (Exception exception)
+ {
+ try
+ {
+ messageString = "[" + DrawText.MarkupLogSymbol(logType) + " -> " + DrawText.MarkupLogSymbol(LogType.Exception) + "] Converting message object to string threw an exception: " + exception.GetType() + ": " + exception.Message;
+ }
+ catch
+ {
+ messageString = "Converting message object to string threw an exception, and parsing this exception to string again threw another exception.";
+ }
+ logType = LogType.Exception;
+ }
+ return messageString;
+ }
+ }
+
+ static string assertionFailedString = "Assertion failed";
+ static void NoteLogMessageForDrawingAtGameObjects(LogType logType, GameObject gameObject_toWhichLogMessageBelongs)
+ {
+ NoteLogMessageForDrawingAtGameObjects(logType, gameObject_toWhichLogMessageBelongs, assertionFailedString);
+ }
+
+ static void NoteLogMessageForDrawingAtGameObjects(LogType logType, GameObject gameObject_toWhichLogMessageBelongs, string format, params object[] args)
+ {
+ string messageString = GetStringFromFormatAndArgs(ref logType, format, args);
+ NoteLogMessageForDrawingAtGameObjects(logType, gameObject_toWhichLogMessageBelongs, messageString);
+ }
+
+ static string GetStringFromFormatAndArgs(string format, params object[] args)
+ {
+ LogType dummyLogType = default;
+ return GetStringFromFormatAndArgs(ref dummyLogType, format, args);
+ }
+
+ static string GetStringFromFormatAndArgs(ref LogType logType, string format, params object[] args)
+ {
+ if (format == null)
+ {
+ return "null";
+ }
+ else
+ {
+ string messageString;
+ try
+ {
+ messageString = String.Format(format, args);
+ }
+ catch (Exception exception)
+ {
+ try
+ {
+ messageString = "[" + DrawText.MarkupLogSymbol(logType) + " -> " + DrawText.MarkupLogSymbol(LogType.Exception) + "] Formatting the logString threw an exception: " + exception.GetType() + ": " + exception.Message;
+ }
+ catch
+ {
+ messageString = "Formatting the logString threw an exception, and parsing this exception to string again threw another exception.";
+ }
+ logType = LogType.Exception;
+ }
+ return messageString;
+ }
+ }
+
+ static void NoteLogMessageForDrawingAtGameObjects(LogType logType, GameObject gameObject_toWhichLogMessageBelongs, System.Exception exception)
+ {
+ string message = GetStringFromException(exception);
+ NoteLogMessageForDrawingAtGameObjects(logType, gameObject_toWhichLogMessageBelongs, message, exception.StackTrace);
+ }
+
+ static string GetStringFromException(System.Exception exception)
+ {
+ string message;
+ try
+ {
+ message = "" + exception.GetType() + ": " + exception.Message;
+ }
+ catch (Exception)
+ {
+ message = "LogException, that failed to parse to string.";
+ }
+ return message;
+ }
+
+ static void NoteLogMessageForDrawingAtGameObjects(LogType logType, GameObject gameObject_toWhichLogMessageBelongs, string message, string stackTrace = null)
+ {
+ if (gameObject_toWhichLogMessageBelongs != null)
+ {
+ if (message != null)
+ {
+ InternalDXXL_LogMessageForDrawing receivedLogMessage = new InternalDXXL_LogMessageForDrawing();
+ receivedLogMessage.logString = message;
+ receivedLogMessage.stackTrace = stackTrace;
+ receivedLogMessage.logType = logType;
+ receivedLogMessage.gameObjectsInstanceID = gameObject_toWhichLogMessageBelongs.GetInstanceID();
+ logMessagesForDrawAtGameObjects.Add(receivedLogMessage);
+ }
+ }
+ }
+
+ public static void LogsAtGameObject(GameObject gameObject, bool drawNormalPrio = true, bool drawWarningPrio = true, bool drawErrorPrio = true, int maxNumberOfDisplayedLogMessages = 10, float textSize = 0.2f, Color textColor = default(Color), Color boxColor = default(Color), float width_ofBoxLines = 0.0f, bool drawnBoxEncapsulatesChildren = true, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //if you supply a different "maxNumberOfDisplayedLogMessages" or "draw*Prio" during runtime: Then this comes into effect not immediately, but after a delay, namely when a new log message gets noted. Reason: optimization of GC allocations.
+ //the same goes if you change during runtime between "LogsAtGameObject" and "LogsAtGameObjectScreenSpace"
+
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject, "gameObject")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(textSize, "textSize")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width_ofBoxLines, "width_ofBoxLines")) { return; }
+
+ if (maxNumberOfDisplayedLogMessages > maxMaxNumberOfNumberOfLogDisplayerLogMessages)
+ {
+ UnityEngine.Debug.Log("The maximum allowed value for 'maxNumberOfDisplayedLogMessages' is " + maxMaxNumberOfNumberOfLogDisplayerLogMessages + " -> Auto-force from " + maxNumberOfDisplayedLogMessages + " to " + maxMaxNumberOfNumberOfLogDisplayerLogMessages + "");
+ maxNumberOfDisplayedLogMessages = maxMaxNumberOfNumberOfLogDisplayerLogMessages;
+ }
+
+ textColor = UtilitiesDXXL_Colors.OverwriteDefaultColor(textColor);
+ if (autoMarkupLogTextWithGameobjectColor_forDrawingInScene) { textColor = SeededColorGenerator.ColorOfGameobjectID(gameObject, forceLuminance_ofAutoMarkupColors); }
+ string logsAsTextWall = GetStringWithXNewestLogsForGameObject(gameObject, maxNumberOfDisplayedLogMessages, drawNormalPrio, drawWarningPrio, drawErrorPrio);
+ DrawEngineBasics.TagGameObject(gameObject, logsAsTextWall, textColor, boxColor, textSize, width_ofBoxLines, drawnBoxEncapsulatesChildren, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void LogsAtGameObjectScreenspace(GameObject gameObject, bool drawNormalPrio = true, bool drawWarningPrio = true, bool drawErrorPrio = true, bool clampIntoScreen = true, int maxNumberOfDisplayedLogMessages = 10, float relTextSizeScaling = 1.0f, Color textColor = default(Color), Color boxColor = default(Color), float widthOfBoxLines_relToViewportHeight = 0.0f, bool drawnBoxEncapsulatesChildren = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawLogs.LogsAtGameObjectScreenspace") == false) { return; }
+ LogsAtGameObjectScreenspace(automaticallyFoundCamera, gameObject, drawNormalPrio, drawWarningPrio, drawErrorPrio, clampIntoScreen, maxNumberOfDisplayedLogMessages, relTextSizeScaling, textColor, boxColor, widthOfBoxLines_relToViewportHeight, drawnBoxEncapsulatesChildren, durationInSec);
+ }
+
+ public static void LogsAtGameObjectScreenspace(Camera cameraWhereToDraw, GameObject gameObject, bool drawNormalPrio = true, bool drawWarningPrio = true, bool drawErrorPrio = true, bool clampIntoScreen = true, int maxNumberOfDisplayedLogMessages = 10, float relTextSizeScaling = 1.0f, Color textColor = default(Color), Color boxColor = default(Color), float widthOfBoxLines_relToViewportHeight = 0.0f, bool drawnBoxEncapsulatesChildren = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(cameraWhereToDraw, "cameraWhereToDraw")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(gameObject, "gameObject")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(widthOfBoxLines_relToViewportHeight, "widthOfBoxLines_relToViewportHeight")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(relTextSizeScaling, "relTextSizeScaling")) { return; }
+
+ if (maxNumberOfDisplayedLogMessages > maxMaxNumberOfNumberOfLogDisplayerLogMessages)
+ {
+ UnityEngine.Debug.Log("The maximum allowed value for 'maxNumberOfDisplayedLogMessages' is " + maxMaxNumberOfNumberOfLogDisplayerLogMessages + " -> Auto-force from " + maxNumberOfDisplayedLogMessages + " to " + maxMaxNumberOfNumberOfLogDisplayerLogMessages + "");
+ maxNumberOfDisplayedLogMessages = maxMaxNumberOfNumberOfLogDisplayerLogMessages;
+ }
+
+ textColor = UtilitiesDXXL_Colors.OverwriteDefaultColor(textColor);
+ if (autoMarkupLogTextWithGameobjectColor_forDrawingInScrenspace) { textColor = SeededColorGenerator.ColorOfGameobjectID(gameObject, forceLuminance_ofAutoMarkupColors); }
+ string logsAsTextWall = GetStringWithXNewestLogsForGameObject(gameObject, maxNumberOfDisplayedLogMessages, drawNormalPrio, drawWarningPrio, drawErrorPrio);
+ DrawEngineBasics.TagGameObjectScreenspace(cameraWhereToDraw, gameObject, logsAsTextWall, textColor, boxColor, widthOfBoxLines_relToViewportHeight, clampIntoScreen, 0.6f * relTextSizeScaling, drawnBoxEncapsulatesChildren, durationInSec);
+ }
+
+ public static void LogsOnScreen(bool drawNormalPrio = true, bool drawWarningPrio = true, bool drawErrorPrio = true, int maxNumberOfDisplayedLogMessages = 10, float textSize_relToViewportHeight = 0.014f, Color textColor = default(Color), bool stackTraceForNormalPrio = false, bool stackTraceForWarningPrio = false, bool stackTraceForErrorPrio = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawLogs.LogsOnScreen") == false) { return; }
+ LogsOnScreen(automaticallyFoundCamera, drawNormalPrio, drawWarningPrio, drawErrorPrio, maxNumberOfDisplayedLogMessages, textSize_relToViewportHeight, textColor, stackTraceForNormalPrio, stackTraceForWarningPrio, stackTraceForErrorPrio, durationInSec);
+ }
+
+ public static void LogsOnScreen(Camera cameraWhereToDraw, bool drawNormalPrio = true, bool drawWarningPrio = true, bool drawErrorPrio = true, int maxNumberOfDisplayedLogMessages = 10, float textSize_relToViewportHeight = 0.014f, Color textColor = default(Color), bool stackTraceForNormalPrio = false, bool stackTraceForWarningPrio = false, bool stackTraceForErrorPrio = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(cameraWhereToDraw, "cameraWhereToDraw")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(textSize_relToViewportHeight, "textSize_relToViewportHeight")) { return; }
+
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_LogsOnScreen.Add(new LogsOnScreen(cameraWhereToDraw, drawNormalPrio, drawWarningPrio, drawErrorPrio, maxNumberOfDisplayedLogMessages, textSize_relToViewportHeight, textColor, stackTraceForNormalPrio, stackTraceForWarningPrio, stackTraceForErrorPrio, durationInSec, logMessageListenerForLogsOnScreen_isActivated));
+ return;
+ }
+
+ if (maxNumberOfDisplayedLogMessages > maxMaxNumberOfNumberOfLogDisplayerLogMessages)
+ {
+ UnityEngine.Debug.Log("The maximum allowed value for 'maxNumberOfDisplayedLogMessages' is " + maxMaxNumberOfNumberOfLogDisplayerLogMessages + " -> Auto-force from " + maxNumberOfDisplayedLogMessages + " to " + maxMaxNumberOfNumberOfLogDisplayerLogMessages + "");
+ maxNumberOfDisplayedLogMessages = maxMaxNumberOfNumberOfLogDisplayerLogMessages;
+ }
+
+ textColor = UtilitiesDXXL_Colors.OverwriteDefaultColor(textColor);
+ string logsAsTextWall = GetStringWithXNewestLogsForDrawOnScreen(maxNumberOfDisplayedLogMessages, drawNormalPrio, drawWarningPrio, drawErrorPrio, stackTraceForNormalPrio, stackTraceForWarningPrio, stackTraceForErrorPrio);
+ UtilitiesDXXL_Text.WriteScreenspace(cameraWhereToDraw, logsAsTextWall, new Vector2(textSize_relToViewportHeight, 0.0f), textColor, textSize_relToViewportHeight, 0.0f, DrawText.TextAnchorDXXL.LowerLeft, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, true, 0.0f, false, durationInSec, false);
+ }
+
+ static List logMessagesForDrawAtGameObjects = new List();
+ static int maxMaxNumberOfNumberOfLogDisplayerLogMessages = 40; //has to be dividable by "4" //if value is raised: danger of performance issues/freezing
+ static int maxNumberOfBlocksOf4ConcattedStrings = Mathf.RoundToInt(0.25f * maxMaxNumberOfNumberOfLogDisplayerLogMessages);
+ static string[] blocksOf4ConcattedStrings_startingWithNewest = new string[maxNumberOfBlocksOf4ConcattedStrings];
+ static int[] indexes_ofCurrLog_insideAllLogsList_startingWithNewest = new int[maxMaxNumberOfNumberOfLogDisplayerLogMessages];
+ static string GetStringWithXNewestLogsForGameObject(GameObject gameObject, int maxNumberOfDisplayedLogMessages, bool getNormalPrio, bool getWarningPrio, bool getErrorPrio)
+ {
+ if (getNormalPrio == false && getWarningPrio == false && getErrorPrio == false)
+ {
+ return "(all logTypes are disabled)";
+ }
+
+ maxNumberOfDisplayedLogMessages = Mathf.Abs(maxNumberOfDisplayedLogMessages);
+ maxNumberOfDisplayedLogMessages = Mathf.Max(maxNumberOfDisplayedLogMessages, 1);
+ maxNumberOfDisplayedLogMessages = Mathf.Min(maxNumberOfDisplayedLogMessages, maxMaxNumberOfNumberOfLogDisplayerLogMessages);
+
+ int gameObjectsInstanceId = gameObject.GetInstanceID();
+
+ int numberOfSavedRequestedTypesMessagesThatAreAttachedToGameObject = 0;
+ int numberOf_savedNormalLogMessagesThatAreAttachedToGameObject = 0;
+ int numberOf_savedWarningLogMessagesThatAreAttachedToGameObject = 0;
+ int numberOf_savedErrorLogMessagesThatAreAttachedToGameObject = 0;
+ for (int i = 0; i < logMessagesForDrawAtGameObjects.Count; i++)
+ {
+ if (gameObjectsInstanceId == logMessagesForDrawAtGameObjects[i].gameObjectsInstanceID)
+ {
+ if (logMessagesForDrawAtGameObjects[i].logType == LogType.Log)
+ {
+ numberOf_savedNormalLogMessagesThatAreAttachedToGameObject++;
+ if (getNormalPrio)
+ {
+ numberOfSavedRequestedTypesMessagesThatAreAttachedToGameObject++;
+ }
+ }
+ else
+ {
+ if (logMessagesForDrawAtGameObjects[i].logType == LogType.Warning)
+ {
+ numberOf_savedWarningLogMessagesThatAreAttachedToGameObject++;
+ if (getWarningPrio)
+ {
+ numberOfSavedRequestedTypesMessagesThatAreAttachedToGameObject++;
+ }
+ }
+ else
+ {
+ //"exception" and "assertion" count as "error":
+ numberOf_savedErrorLogMessagesThatAreAttachedToGameObject++;
+ if (getErrorPrio)
+ {
+ numberOfSavedRequestedTypesMessagesThatAreAttachedToGameObject++;
+ }
+ }
+ }
+ }
+ }
+
+ if (numberOfSavedRequestedTypesMessagesThatAreAttachedToGameObject == 0)
+ {
+ return "(no log messages yet for the requested log types)";
+ }
+ else
+ {
+ int numberOfMessagesInTextWall = FillGameObjectsConcerned_stringsWithLogSymbolStackTraceAndLineBreak(gameObjectsInstanceId, maxNumberOfDisplayedLogMessages, getNormalPrio, getWarningPrio, getErrorPrio);
+ return GetWholeLogTextWall(ref logMessagesForDrawAtGameObjects, numberOfSavedRequestedTypesMessagesThatAreAttachedToGameObject, numberOfMessagesInTextWall, numberOf_savedNormalLogMessagesThatAreAttachedToGameObject, numberOf_savedWarningLogMessagesThatAreAttachedToGameObject, numberOf_savedErrorLogMessagesThatAreAttachedToGameObject, getNormalPrio, getWarningPrio, getErrorPrio);
+ }
+ }
+
+ static int FillGameObjectsConcerned_stringsWithLogSymbolStackTraceAndLineBreak(int gameObjectsInstanceId, int maxNumberOfDisplayedLogMessages, bool getNormalPrio, bool getWarningPrio, bool getErrorPrio)
+ {
+ int numberOfAlreadyRetrievedMessages = 0;
+ for (int i_logsOfAllGameObjects = logMessagesForDrawAtGameObjects.Count - 1; i_logsOfAllGameObjects >= 0; i_logsOfAllGameObjects--)
+ {
+ if (gameObjectsInstanceId == logMessagesForDrawAtGameObjects[i_logsOfAllGameObjects].gameObjectsInstanceID)
+ {
+ if (IsARequestedLogType(logMessagesForDrawAtGameObjects[i_logsOfAllGameObjects].logType, getNormalPrio, getWarningPrio, getErrorPrio))
+ {
+ if (logMessagesForDrawAtGameObjects[i_logsOfAllGameObjects].stringWithLogSymbolStackTraceAndLineBreak == null)
+ {
+ logMessagesForDrawAtGameObjects[i_logsOfAllGameObjects].stringWithLogSymbolStackTraceAndLineBreak = DrawText.MarkupLogSymbol(logMessagesForDrawAtGameObjects[i_logsOfAllGameObjects].logType) + " " + logMessagesForDrawAtGameObjects[i_logsOfAllGameObjects].logString + "
";
+ if (logMessagesForDrawAtGameObjects[i_logsOfAllGameObjects].stackTrace != null)
+ {
+ logMessagesForDrawAtGameObjects[i_logsOfAllGameObjects].stringWithLogSymbolStackTraceAndLineBreak = logMessagesForDrawAtGameObjects[i_logsOfAllGameObjects].stringWithLogSymbolStackTraceAndLineBreak + logMessagesForDrawAtGameObjects[i_logsOfAllGameObjects].stackTrace + "
";
+ }
+ }
+
+ indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyRetrievedMessages] = i_logsOfAllGameObjects;
+ numberOfAlreadyRetrievedMessages++;
+ }
+ }
+ if (numberOfAlreadyRetrievedMessages >= maxNumberOfDisplayedLogMessages) { break; }
+ }
+ return numberOfAlreadyRetrievedMessages;
+ }
+
+ static bool IsARequestedLogType(LogType logTypeToCheckIfRequested, bool getNormalPrio, bool getWarningPrio, bool getErrorPrio)
+ {
+ if (logTypeToCheckIfRequested == LogType.Log)
+ {
+ if (getNormalPrio)
+ {
+ return true;
+ }
+ }
+ else
+ {
+ if (logTypeToCheckIfRequested == LogType.Warning)
+ {
+ if (getWarningPrio)
+ {
+ return true;
+ }
+ }
+ else
+ {
+ //"exception" and "assertion" count as "error":
+ if (getErrorPrio)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ static string GetWholeLogTextWall(ref List listOfSavedLogMessages, int numberOfSavedRequestedTypesMessagesThatAreAttachedToGameObject, int numberOfMessagesInTextWall, int numberOf_savedNormalLogMessagesThatAreAttachedToGameObject, int numberOf_savedWarningLogMessagesThatAreAttachedToGameObject, int numberOf_savedErrorLogMessagesThatAreAttachedToGameObject, bool getNormalPrio, bool getWarningPrio, bool getErrorPrio)
+ {
+ if (listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[0]].wholeTextWallForLogDisplayOfLastXLogs == null)
+ {
+ string headerLine = GetHeaderLineString(numberOfSavedRequestedTypesMessagesThatAreAttachedToGameObject, numberOfMessagesInTextWall, numberOf_savedNormalLogMessagesThatAreAttachedToGameObject, numberOf_savedWarningLogMessagesThatAreAttachedToGameObject, numberOf_savedErrorLogMessagesThatAreAttachedToGameObject, getNormalPrio, getWarningPrio, getErrorPrio);
+
+ int numberOfAlreadyConcattedMessages = 0;
+ int numberOfUsedSlots_inConcatted4StringsArray = 0;
+ bool allSlotsInStringOf4ArrayFilled = false;
+
+ //trading code readability for GC.Alloc()-prevention:
+ for (int i_concatted4Strings = 0; i_concatted4Strings < maxNumberOfBlocksOf4ConcattedStrings; i_concatted4Strings++)
+ {
+ int numberOfLogsForNext_blockOf4ConcattedStrings = (numberOfAlreadyConcattedMessages + 4) <= numberOfMessagesInTextWall ? 4 : (numberOfMessagesInTextWall - numberOfAlreadyConcattedMessages);
+ switch (numberOfLogsForNext_blockOf4ConcattedStrings)
+ {
+ case 0:
+ blocksOf4ConcattedStrings_startingWithNewest[i_concatted4Strings] = headerLine;
+ allSlotsInStringOf4ArrayFilled = true;
+ break;
+
+ case 1:
+ blocksOf4ConcattedStrings_startingWithNewest[i_concatted4Strings] = headerLine + listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyConcattedMessages]].stringWithLogSymbolStackTraceAndLineBreak;
+ allSlotsInStringOf4ArrayFilled = true;
+ break;
+
+ case 2:
+ blocksOf4ConcattedStrings_startingWithNewest[i_concatted4Strings] = headerLine + listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyConcattedMessages + 1]].stringWithLogSymbolStackTraceAndLineBreak + listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyConcattedMessages]].stringWithLogSymbolStackTraceAndLineBreak;
+ allSlotsInStringOf4ArrayFilled = true;
+ break;
+
+ case 3:
+ blocksOf4ConcattedStrings_startingWithNewest[i_concatted4Strings] = headerLine + listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyConcattedMessages + 2]].stringWithLogSymbolStackTraceAndLineBreak + listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyConcattedMessages + 1]].stringWithLogSymbolStackTraceAndLineBreak + listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyConcattedMessages]].stringWithLogSymbolStackTraceAndLineBreak;
+ allSlotsInStringOf4ArrayFilled = true;
+ break;
+
+ case 4:
+ blocksOf4ConcattedStrings_startingWithNewest[i_concatted4Strings] = listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyConcattedMessages + 3]].stringWithLogSymbolStackTraceAndLineBreak + listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyConcattedMessages + 2]].stringWithLogSymbolStackTraceAndLineBreak + listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyConcattedMessages + 1]].stringWithLogSymbolStackTraceAndLineBreak + listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyConcattedMessages]].stringWithLogSymbolStackTraceAndLineBreak;
+ numberOfAlreadyConcattedMessages = numberOfAlreadyConcattedMessages + 4;
+ break;
+
+ default:
+ UtilitiesDXXL_Log.PrintErrorCode("1-" + numberOfLogsForNext_blockOf4ConcattedStrings);
+ break;
+ }
+
+ if (allSlotsInStringOf4ArrayFilled)
+ {
+ numberOfUsedSlots_inConcatted4StringsArray = i_concatted4Strings + 1;
+ break;
+ }
+
+ if (i_concatted4Strings >= (maxNumberOfBlocksOf4ConcattedStrings - 1))
+ {
+ //->all slots are filled
+ blocksOf4ConcattedStrings_startingWithNewest[i_concatted4Strings] = headerLine + blocksOf4ConcattedStrings_startingWithNewest[i_concatted4Strings];
+ numberOfUsedSlots_inConcatted4StringsArray = i_concatted4Strings + 1;
+ break;
+ }
+
+ }
+
+ switch (numberOfUsedSlots_inConcatted4StringsArray)
+ {
+ case 0:
+ UtilitiesDXXL_Log.PrintErrorCode("2");
+ listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[0]].wholeTextWallForLogDisplayOfLastXLogs = null;
+ break;
+
+ case 1:
+ listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[0]].wholeTextWallForLogDisplayOfLastXLogs = blocksOf4ConcattedStrings_startingWithNewest[0];
+ break;
+
+ case 2:
+ listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[0]].wholeTextWallForLogDisplayOfLastXLogs = blocksOf4ConcattedStrings_startingWithNewest[1] + blocksOf4ConcattedStrings_startingWithNewest[0];
+ break;
+
+ case 3:
+ listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[0]].wholeTextWallForLogDisplayOfLastXLogs = blocksOf4ConcattedStrings_startingWithNewest[2] + blocksOf4ConcattedStrings_startingWithNewest[1] + blocksOf4ConcattedStrings_startingWithNewest[0];
+ break;
+
+ case 4:
+ listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[0]].wholeTextWallForLogDisplayOfLastXLogs = blocksOf4ConcattedStrings_startingWithNewest[3] + blocksOf4ConcattedStrings_startingWithNewest[2] + blocksOf4ConcattedStrings_startingWithNewest[1] + blocksOf4ConcattedStrings_startingWithNewest[0];
+ break;
+
+ default:
+ listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[0]].wholeTextWallForLogDisplayOfLastXLogs = blocksOf4ConcattedStrings_startingWithNewest[3] + blocksOf4ConcattedStrings_startingWithNewest[2] + blocksOf4ConcattedStrings_startingWithNewest[1] + blocksOf4ConcattedStrings_startingWithNewest[0];
+ //no GC.Alloc()-optimization for more than 14 maxNumberOfDisplayedLogMessages:
+ for (int i = 4; i < numberOfUsedSlots_inConcatted4StringsArray; i++)
+ {
+ listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[0]].wholeTextWallForLogDisplayOfLastXLogs = blocksOf4ConcattedStrings_startingWithNewest[i] + listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[0]].wholeTextWallForLogDisplayOfLastXLogs;
+ }
+ break;
+ }
+ }
+ return listOfSavedLogMessages[indexes_ofCurrLog_insideAllLogsList_startingWithNewest[0]].wholeTextWallForLogDisplayOfLastXLogs;
+ }
+
+ static string GetHeaderLineString(int overallNumberOfSavedRequestedTypesMessages, int numberOfMessagesInTextWall, int numberOf_normalLogMessages, int numberOf_warningLogMessages, int numberOf_errorLogMessages, bool getNormalPrio, bool getWarningPrio, bool getErrorPrio)
+ {
+ //trading code readability for GC.Alloc()-prevention:
+ if (getNormalPrio)
+ {
+ if (getWarningPrio)
+ {
+ if (getErrorPrio)
+ {
+ return (" ..." + (overallNumberOfSavedRequestedTypesMessages - numberOfMessagesInTextWall) + " more message(s) (overall: " + numberOf_normalLogMessages + " , " + numberOf_warningLogMessages + " , " + numberOf_errorLogMessages + " )
");
+ }
+ else
+ {
+ return (" ..." + (overallNumberOfSavedRequestedTypesMessages - numberOfMessagesInTextWall) + " more message(s) (overall: " + numberOf_normalLogMessages + " , " + numberOf_warningLogMessages + " , " + numberOf_errorLogMessages + " )
");
+ }
+ }
+ else
+ {
+ if (getErrorPrio)
+ {
+ return (" ..." + (overallNumberOfSavedRequestedTypesMessages - numberOfMessagesInTextWall) + " more message(s) (overall: " + numberOf_normalLogMessages + " , " + numberOf_warningLogMessages + " , " + numberOf_errorLogMessages + " )
");
+ }
+ else
+ {
+ return (" ..." + (overallNumberOfSavedRequestedTypesMessages - numberOfMessagesInTextWall) + " more message(s) (overall: " + numberOf_normalLogMessages + " , " + numberOf_warningLogMessages + " , " + numberOf_errorLogMessages + " )
");
+ }
+ }
+ }
+ else
+ {
+ if (getWarningPrio)
+ {
+ if (getErrorPrio)
+ {
+ return (" ..." + (overallNumberOfSavedRequestedTypesMessages - numberOfMessagesInTextWall) + " more message(s) (overall: " + numberOf_normalLogMessages + " , " + numberOf_warningLogMessages + " , " + numberOf_errorLogMessages + " )
");
+ }
+ else
+ {
+ return (" ..." + (overallNumberOfSavedRequestedTypesMessages - numberOfMessagesInTextWall) + " more message(s) (overall: " + numberOf_normalLogMessages + " , " + numberOf_warningLogMessages + " , " + numberOf_errorLogMessages + " )
");
+ }
+ }
+ else
+ {
+ if (getErrorPrio)
+ {
+ return (" ..." + (overallNumberOfSavedRequestedTypesMessages - numberOfMessagesInTextWall) + " more message(s) (overall: " + numberOf_normalLogMessages + " , " + numberOf_warningLogMessages + " , " + numberOf_errorLogMessages + " )
");
+ }
+ else
+ {
+ return "(all logTypes are disabled)";
+ }
+ }
+ }
+ }
+
+ public static void ClearLogs(bool clearLogsForDrawingAtGameobjects = true, bool clearLogsForDrawingToScreenspace = true)
+ {
+ if (clearLogsForDrawingAtGameobjects)
+ {
+ logMessagesForDrawAtGameObjects = new List();
+ }
+
+ if (clearLogsForDrawingToScreenspace)
+ {
+ logMessagesForDrawnOnScreen = new List();
+ }
+ }
+
+ private static bool logMessageListenerForLogsOnScreen_isActivated = false;
+ public static bool LogMessageListenerForLogsOnScreen_isActivated
+ {
+ get { return logMessageListenerForLogsOnScreen_isActivated; }
+ set { UnityEngine.Debug.LogError("Don't set 'LogMessageListenerForLogsOnScreen_isActivated' manually. Use 'ActivateLogMessageListenerForLogsOnScreen()' or 'DecactivateLogMessageListenerForLogsOnScreen()' instead."); }
+ }
+
+ public static void ActivateLogMessageListenerForLogsOnScreen()
+ {
+ Application.logMessageReceived -= SaveLogForDrawingOnScreen;
+ Application.logMessageReceived += SaveLogForDrawingOnScreen;
+ logMessageListenerForLogsOnScreen_isActivated = true;
+ }
+
+ public static void DeactivateLogMessageListenerForLogsOnScreen()
+ {
+ Application.logMessageReceived -= SaveLogForDrawingOnScreen;
+ logMessageListenerForLogsOnScreen_isActivated = false;
+ }
+
+ static void SaveLogForDrawingOnScreen(string logString, string stackTrace, LogType type)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod == DrawBasics.UsedUnityLineDrawingMethod.disabled) { return; }
+
+ InternalDXXL_LogMessageForDrawing receivedLogMessage = new InternalDXXL_LogMessageForDrawing();
+ receivedLogMessage.logString = logString;
+ receivedLogMessage.stackTrace = stackTrace;
+ receivedLogMessage.logType = type;
+ logMessagesForDrawnOnScreen.Add(receivedLogMessage);
+ }
+
+ static List logMessagesForDrawnOnScreen = new List();
+ static string GetStringWithXNewestLogsForDrawOnScreen(int maxNumberOfDisplayedLogMessages, bool getNormalPrio, bool getWarningPrio, bool getErrorPrio, bool stackTraceForNormalPrio, bool stackTraceForWarningPrio, bool stackTraceForErrorPrio)
+ {
+ if (logMessageListenerForLogsOnScreen_isActivated == false)
+ {
+ return "In order to use 'DrawLogs.LogsOnScreen()' you have activate it by calling
'DrawLogs.ActivateLogMessageListenerForLogsOnScreen()' once beforehand.";
+ }
+
+ if (getNormalPrio == false && getWarningPrio == false && getErrorPrio == false)
+ {
+ return "(all logTypes are disabled)";
+ }
+
+ maxNumberOfDisplayedLogMessages = Mathf.Abs(maxNumberOfDisplayedLogMessages);
+ maxNumberOfDisplayedLogMessages = Mathf.Max(maxNumberOfDisplayedLogMessages, 1);
+ maxNumberOfDisplayedLogMessages = Mathf.Min(maxNumberOfDisplayedLogMessages, maxMaxNumberOfNumberOfLogDisplayerLogMessages);
+
+ int numberOfSavedRequestedTypesMessages = 0;
+ int numberOf_savedNormalLogMessages = 0;
+ int numberOf_savedWarningLogMessages = 0;
+ int numberOf_savedErrorLogMessages = 0;
+ for (int i = 0; i < logMessagesForDrawnOnScreen.Count; i++)
+ {
+ if (logMessagesForDrawnOnScreen[i].logType == LogType.Log)
+ {
+ numberOf_savedNormalLogMessages++;
+ if (getNormalPrio)
+ {
+ numberOfSavedRequestedTypesMessages++;
+ }
+ }
+ else
+ {
+ if (logMessagesForDrawnOnScreen[i].logType == LogType.Warning)
+ {
+ numberOf_savedWarningLogMessages++;
+ if (getWarningPrio)
+ {
+ numberOfSavedRequestedTypesMessages++;
+ }
+ }
+ else
+ {
+ //"exception" and "assertion" count as "error":
+ numberOf_savedErrorLogMessages++;
+ if (getErrorPrio)
+ {
+ numberOfSavedRequestedTypesMessages++;
+ }
+ }
+ }
+ }
+
+ if (numberOfSavedRequestedTypesMessages == 0)
+ {
+ return "(no log messages yet for the requested log types)";
+ }
+ else
+ {
+ int numberOfMessagesInTextWall = FillConcerned_stringsWithLogSymbolStackTraceAndLineBreak(maxNumberOfDisplayedLogMessages, getNormalPrio, getWarningPrio, getErrorPrio, stackTraceForNormalPrio, stackTraceForWarningPrio, stackTraceForErrorPrio);
+ return GetWholeLogTextWall(ref logMessagesForDrawnOnScreen, numberOfSavedRequestedTypesMessages, numberOfMessagesInTextWall, numberOf_savedNormalLogMessages, numberOf_savedWarningLogMessages, numberOf_savedErrorLogMessages, getNormalPrio, getWarningPrio, getErrorPrio);
+ }
+ }
+
+ static int FillConcerned_stringsWithLogSymbolStackTraceAndLineBreak(int maxNumberOfDisplayedLogMessages, bool getNormalPrio, bool getWarningPrio, bool getErrorPrio, bool stackTraceForNormalPrio, bool stackTraceForWarningPrio, bool stackTraceForErrorPrio)
+ {
+ int numberOfAlreadyRetrievedMessages = 0;
+ for (int i_ofAllSavedLogs = logMessagesForDrawnOnScreen.Count - 1; i_ofAllSavedLogs >= 0; i_ofAllSavedLogs--)
+ {
+ if (IsARequestedLogType(logMessagesForDrawnOnScreen[i_ofAllSavedLogs].logType, getNormalPrio, getWarningPrio, getErrorPrio))
+ {
+ if (logMessagesForDrawnOnScreen[i_ofAllSavedLogs].stringWithLogSymbolStackTraceAndLineBreak == null)
+ {
+ logMessagesForDrawnOnScreen[i_ofAllSavedLogs].stringWithLogSymbolStackTraceAndLineBreak = DrawText.MarkupLogSymbol(logMessagesForDrawnOnScreen[i_ofAllSavedLogs].logType) + " " + logMessagesForDrawnOnScreen[i_ofAllSavedLogs].logString + "
";
+ if (logMessagesForDrawnOnScreen[i_ofAllSavedLogs].stackTrace != null)
+ {
+ if (IsARequestedLogType(logMessagesForDrawnOnScreen[i_ofAllSavedLogs].logType, stackTraceForNormalPrio, stackTraceForWarningPrio, stackTraceForErrorPrio))
+ {
+ //-> it is not trivial here to simply indent the stack trace, because the ".stackTrace" field comes already with inserted line breaks, so the line start positions are not directly available here
+ logMessagesForDrawnOnScreen[i_ofAllSavedLogs].stringWithLogSymbolStackTraceAndLineBreak = logMessagesForDrawnOnScreen[i_ofAllSavedLogs].stringWithLogSymbolStackTraceAndLineBreak + "
-----------------------------[STACK TRACE]-----------------------------
" + logMessagesForDrawnOnScreen[i_ofAllSavedLogs].stackTrace + "
-----------------------------[/STACK TRACE]----------------------------
";
+ }
+ }
+ }
+
+ indexes_ofCurrLog_insideAllLogsList_startingWithNewest[numberOfAlreadyRetrievedMessages] = i_ofAllSavedLogs;
+ numberOfAlreadyRetrievedMessages++;
+ }
+ if (numberOfAlreadyRetrievedMessages >= maxNumberOfDisplayedLogMessages) { break; }
+ }
+ return numberOfAlreadyRetrievedMessages;
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/DrawLogs.cs.meta b/Runtime/DrawDebugLibrary/DrawLogs.cs.meta
new file mode 100644
index 0000000..b79b891
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawLogs.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3b0620c964834a94ca9b951c9b4504c7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawMeasurements.cs b/Runtime/DrawDebugLibrary/DrawMeasurements.cs
new file mode 100644
index 0000000..75b4438
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawMeasurements.cs
@@ -0,0 +1,933 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+ public class DrawMeasurements
+ {
+ static InternalDXXL_Line line = new InternalDXXL_Line();
+ static InternalDXXL_Line line1 = new InternalDXXL_Line();
+ static InternalDXXL_Line line2 = new InternalDXXL_Line();
+
+ public static Color defaultColor1 = new Color(0.26f, 1.0f, 1.0f, 1.0f);
+ public static Color defaultColor2 = new Color(1.0f, 0.938f, 0.23f, 1.0f);
+
+ public static Vector3 preferredPlanePatternOrientation_forDistancePointToPlane = Vector3.forward;
+ public static float minimumLineLength_forDistancePointToLine = 1000.0f;
+ public static float minimumLineLength_forDistanceLineToLine = 1000.0f;
+ public static float minimumLineLength_forAngleLineToPlane = 1000.0f;
+
+ public static float Distance(Vector3 from, Vector3 to, Color color = default(Color), float lineWidth = 0.0f, string text = null, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ return UtilitiesDXXL_Measurements.Distance(false, UtilitiesDXXL_Measurements.DistanceSpecifyingStringType.point_point, from, to, color, lineWidth, text, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ public static float Angle(Vector3 from, Vector3 to, Vector3 turnCenter, Color color = default(Color), float forceRadius = 0.0f, float lineWidth = 0.0f, string text = null, bool useReflexAngleOver180deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool drawBoundaryLines = true, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ return UtilitiesDXXL_Measurements.Angle(false, false, false, from, to, turnCenter, color, forceRadius, lineWidth, text, useReflexAngleOver180deg, displayAndReturn_radInsteadOfDeg, coneLength, drawBoundaryLines, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float AngleSpan(Vector3 from, Vector3 to, Vector3 turnCenter, Color color = default(Color), float forceRadius = 0.0f, float lineWidth = 0.0f, string text = null, bool useReflexAngleOver180deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool drawBoundaryLines = true, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ return UtilitiesDXXL_Measurements.Angle(false, false, true, from, to, turnCenter, color, forceRadius, lineWidth, text, useReflexAngleOver180deg, displayAndReturn_radInsteadOfDeg, coneLength, drawBoundaryLines, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float DistancePointToLine(Vector3 point, Ray line, Color color = default(Color), float linesWidth = 0.0f, string text = null, string lineName = null, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ return DistancePointToLine(point, line.origin, line.direction, color, linesWidth, text, lineName, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float DistancePointToLine(Vector3 point, Vector3 lineOrigin, Vector3 lineDirection, Color color = default(Color), float linesWidth = 0.0f, string text = null, string lineName = null, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return 0.0f; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(point, "point")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(lineOrigin, "lineOrigin")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(lineDirection, "lineDirection")) { return 0.0f; }
+
+ linesWidth = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(lineDirection))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(point, "[ 'lineDirection' is zero. DistancePointToLine measure operation not executed.]
[point]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.PointFallback(lineOrigin, "[ 'lineDirection' is zero. DistancePointToLine measure operation not executed.]
[lineOrigin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ line.Recreate(lineOrigin, lineDirection, false);
+ Vector3 pointsProjectionOntoLine = line.Get_perpProjectionOfPoint_ontoThisLine(point);
+
+ //Draw distance:
+ bool skipDrawing = DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped();
+ float distance = UtilitiesDXXL_Measurements.Distance(false, UtilitiesDXXL_Measurements.DistanceSpecifyingStringType.point_line, point, pointsProjectionOntoLine, color, linesWidth, text, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipDrawing);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return distance; }
+
+ //Draw line:
+ string lineIdentifyingText = ((lineName == null) || (lineName == "")) ? "line direction" : lineName;
+ float widthOfDirVector = UtilitiesDXXL_Math.ApproximatelyZero(linesWidth) ? 0.01f : (0.6f * linesWidth);
+ Color colorOfProlongedLine = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor2, 0.55f);
+ Color colorOfProlongedLine_lowerAlpha = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor2, 0.35f);
+ DrawBasics.VectorFrom(lineOrigin, lineDirection, defaultColor2, widthOfDirVector, DrawText.MarkupColor(lineIdentifyingText, colorOfProlongedLine_lowerAlpha), coneLength * 1.7f, false, false, default(Vector3), true, 0.0f, false, 0.0f, durationInSec, hiddenByNearerObjects);
+
+ Vector3 projectionToLineOrigin = line.origin - pointsProjectionOntoLine;
+ float distance_projectionToLineOrigin = projectionToLineOrigin.magnitude;
+ float lineExtentionPerSide = Mathf.Max(minimumLineLength_forDistancePointToLine, 1.1f * distance_projectionToLineOrigin);
+ Line_fadeableAnimSpeed.InternalDraw(lineOrigin - line.direction_normalized * lineExtentionPerSide, lineOrigin + line.direction_normalized * lineExtentionPerSide, colorOfProlongedLine, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ UtilitiesDXXL_Measurements.WriteLineNameAtProjectionPlumbPos(false, lineName, "line", "", projectionToLineOrigin, distance_projectionToLineOrigin, point, line, pointsProjectionOntoLine, 0.02f * distance, colorOfProlongedLine, true, durationInSec, hiddenByNearerObjects);
+
+ UtilitiesDXXL_Measurements.Draw90degSymbol(distance, pointsProjectionOntoLine, point, line.direction_normalized, colorOfProlongedLine_lowerAlpha, durationInSec, hiddenByNearerObjects);
+
+ return distance;
+ }
+
+ public static float DistanceLineToLine(Ray line1, Ray line2, Color color = default(Color), float linesWidth = 0.0f, string text = null, string line1Name = null, string line2Name = null, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ return DistanceLineToLine(line1.origin, line1.direction, line2.origin, line2.direction, color, linesWidth, text, line1Name, line2Name, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float DistanceLineToLine(Vector3 line1Origin, Vector3 line1Direction, Vector3 line2Origin, Vector3 line2Direction, Color color = default(Color), float linesWidth = 0.0f, string text = null, string line1Name = null, string line2Name = null, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return 0.0f; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(line1Origin, "line1Origin")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(line1Direction, "line1Direction")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(line2Origin, "line2Origin")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(line2Direction, "line2Direction")) { return 0.0f; }
+
+ linesWidth = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(line1Direction))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(line1Origin, "[ 'line1Direction' is zero. DistanceLineToLine measure operation not executed.]
[line1Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.PointFallback(line2Origin, "[ 'line1Direction' is zero. DistanceLineToLine measure operation not executed.]
[line2Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(line2Direction))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(line1Origin, "[ 'line2Direction' is zero. DistanceLineToLine measure operation not executed.]
[line1Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.PointFallback(line2Origin, "[ 'line2Direction' is zero. DistanceLineToLine measure operation not executed.]
[line2Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ line1.Recreate(line1Origin, line1Direction, false);
+ line2.Recreate(line2Origin, line2Direction, false);
+ Vector3 posOnLine2_thatIsNearestToLine1 = line2.Get_posOnLine_thatIsNearestTo_passingOtherLine(line1);
+ if (float.IsNaN(posOnLine2_thatIsNearestToLine1.x))
+ {
+ posOnLine2_thatIsNearestToLine1 = line2.origin;
+ }
+ Vector3 pointsProjectionOntoLine1 = line1.Get_perpProjectionOfPoint_ontoThisLine(posOnLine2_thatIsNearestToLine1);
+
+ //Draw distance:
+ bool skipDrawing = DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped();
+ float distance = UtilitiesDXXL_Measurements.Distance(false, UtilitiesDXXL_Measurements.DistanceSpecifyingStringType.line_line, pointsProjectionOntoLine1, posOnLine2_thatIsNearestToLine1, color, linesWidth, text, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipDrawing);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return distance; }
+
+ //Draw lines:
+ float widthOfDirVector = UtilitiesDXXL_Math.ApproximatelyZero(linesWidth) ? 0.01f : (0.6f * linesWidth);
+ float alphaFactor_ofProlongedLines = 0.55f;
+ float alphaFactor_ofLineAttachments = 0.35f;
+ Color colorOfProlongedLine1 = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor1, alphaFactor_ofProlongedLines);
+ Color colorOfProlongedLine2 = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor2, alphaFactor_ofProlongedLines);
+ Color colorOfLine1Attachments = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor1, alphaFactor_ofLineAttachments);
+ Color colorOfLine2Attachments = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor2, alphaFactor_ofLineAttachments);
+
+ Vector3 projectionOnLine1ToLine1Origin = line1.origin - pointsProjectionOntoLine1;
+ float distance_projectionToLine1Origin = projectionOnLine1ToLine1Origin.magnitude;
+ float line1ExtentionPerSide = Mathf.Max(minimumLineLength_forDistanceLineToLine, 1.1f * distance_projectionToLine1Origin);
+ string line1IdentifyingText = ((line1Name == null) || (line1Name == "")) ? "line1 direction" : line1Name;
+ DrawBasics.VectorFrom(line1Origin, line1Direction, defaultColor1, widthOfDirVector, DrawText.MarkupColor(line1IdentifyingText, colorOfLine1Attachments), coneLength * 1.7f, false, false, default(Vector3), true, 0.0f, false, 0.0f, durationInSec, hiddenByNearerObjects);
+ Line_fadeableAnimSpeed.InternalDraw(line1Origin - line1.direction_normalized * line1ExtentionPerSide, line1Origin + line1.direction_normalized * line1ExtentionPerSide, colorOfProlongedLine1, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+
+ Vector3 projectionOnLine2ToLine2Origin = line2.origin - posOnLine2_thatIsNearestToLine1;
+ float distance_projectionToLine2Origin = projectionOnLine2ToLine2Origin.magnitude;
+ float line2ExtentionPerSide = Mathf.Max(minimumLineLength_forDistanceLineToLine, 1.1f * distance_projectionToLine2Origin);
+ string line2IdentifyingText = ((line2Name == null) || (line2Name == "")) ? "line2 direction" : line2Name;
+ DrawBasics.VectorFrom(line2Origin, line2Direction, defaultColor2, widthOfDirVector, DrawText.MarkupColor(line2IdentifyingText, colorOfLine2Attachments), coneLength * 1.7f, false, false, default(Vector3), true, 0.0f, false, 0.0f, durationInSec, hiddenByNearerObjects);
+ Line_fadeableAnimSpeed.InternalDraw(line2Origin - line2.direction_normalized * line2ExtentionPerSide, line2Origin + line2.direction_normalized * line2ExtentionPerSide, colorOfProlongedLine2, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+
+ UtilitiesDXXL_Measurements.WriteLineNameAtProjectionPlumbPos(false, line1Name, "line1", "", projectionOnLine1ToLine1Origin, distance_projectionToLine1Origin, posOnLine2_thatIsNearestToLine1, line1, pointsProjectionOntoLine1, 0.02f * distance, colorOfProlongedLine1, true, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Measurements.WriteLineNameAtProjectionPlumbPos(false, line2Name, "line2", "", projectionOnLine2ToLine2Origin, distance_projectionToLine2Origin, pointsProjectionOntoLine1, line2, posOnLine2_thatIsNearestToLine1, 0.02f * distance, colorOfProlongedLine2, true, durationInSec, hiddenByNearerObjects);
+
+ UtilitiesDXXL_Measurements.Draw90degSymbol(distance, pointsProjectionOntoLine1, posOnLine2_thatIsNearestToLine1, line1.direction_normalized, colorOfLine1Attachments, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Measurements.Draw90degSymbol(distance, posOnLine2_thatIsNearestToLine1, pointsProjectionOntoLine1, line2.direction_normalized, colorOfLine2Attachments, durationInSec, hiddenByNearerObjects);
+
+ return distance;
+ }
+
+ public static float DistancePerpToOrthoViewDir(Vector3 from, Vector3 to, Vector3 orthoViewDir, Color color = default(Color), float linesWidth = 0.0f, string text = null, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return 0.0f; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(from, "from")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(to, "to")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(orthoViewDir, "orthoViewDir")) { return 0.0f; }
+
+ linesWidth = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(orthoViewDir))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(from, "[ 'orthoViewDir' is zero. DistancePerpToOrthoViewDir measure operation not executed.]
[from]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.PointFallback(to, "[ 'orthoViewDir' is zero. DistancePerpToOrthoViewDir measure operation not executed.]
[to]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ orthoViewDir = UtilitiesDXXL_Math.ScaleNonZeroVectorIntoRegionOfFloatPrecision(orthoViewDir);
+ line1.Recreate(from, orthoViewDir, false);
+ line2.Recreate(to, orthoViewDir, false);
+ Vector3 fromPoint_projectedOntoLine2 = line2.Get_perpProjectionOfPoint_ontoThisLine(from);
+ if (float.IsNaN(fromPoint_projectedOntoLine2.x))
+ {
+ fromPoint_projectedOntoLine2 = line2.origin;
+ }
+
+ //Draw distance:
+ bool skipDrawing = DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped();
+ float distance = UtilitiesDXXL_Measurements.Distance(false, UtilitiesDXXL_Measurements.DistanceSpecifyingStringType.point_ll_point, from, fromPoint_projectedOntoLine2, color, linesWidth, text, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipDrawing);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return distance; }
+
+ //Draw lines:
+ Vector3 point1_to_point2_alongViewDir = to - fromPoint_projectedOntoLine2;
+ float distanceAlongViewDir = point1_to_point2_alongViewDir.magnitude;
+ Vector3 point1_to_point2_alongViewDir_normalized;
+ if (UtilitiesDXXL_Math.ApproximatelyZero(distanceAlongViewDir))
+ {
+ point1_to_point2_alongViewDir_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(orthoViewDir);
+ distanceAlongViewDir = 1.0f;
+ }
+ else
+ {
+ point1_to_point2_alongViewDir_normalized = point1_to_point2_alongViewDir / distanceAlongViewDir;
+ }
+
+ Color colorOfAttachments = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(Color.white, 0.2f);
+ float patternScaleFactor = distanceAlongViewDir;
+ patternScaleFactor = Mathf.Max(patternScaleFactor, 0.02f);
+
+ Vector3 line1_start = from - point1_to_point2_alongViewDir_normalized * (0.1f * distanceAlongViewDir);
+ Line_fadeableAnimSpeed.InternalDraw(line1_start, line1_start + point1_to_point2_alongViewDir_normalized * (1.2f * distanceAlongViewDir), colorOfAttachments, 0.0f, null, DrawBasics.LineStyle.dashedLong, patternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+
+ Vector3 line2_start = to + point1_to_point2_alongViewDir_normalized * (0.1f * distanceAlongViewDir);
+ Line_fadeableAnimSpeed.InternalDraw(line2_start, line2_start - point1_to_point2_alongViewDir_normalized * (1.2f * distanceAlongViewDir), colorOfAttachments, 0.0f, null, DrawBasics.LineStyle.dashedLong, patternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+
+ UtilitiesDXXL_Measurements.WriteOrthoViewDirNameAtProjectionPlumbPos(" ortho view dir throught 'from'", fromPoint_projectedOntoLine2, from, orthoViewDir, 0.02f * distance, colorOfAttachments, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Measurements.WriteOrthoViewDirNameAtProjectionPlumbPos(" ortho view dir throught 'to'", from, fromPoint_projectedOntoLine2, -orthoViewDir, 0.02f * distance, colorOfAttachments, durationInSec, hiddenByNearerObjects);
+
+ //Draw 'to'-Point:
+ Vector3 upVector_forLookRotationOf_toPoint = (orthoViewDir.y >= 0.0f) ? orthoViewDir : (-orthoViewDir);
+ Vector3 forwardVector_forLookRotationOf_toPoint = Vector3.Cross(orthoViewDir, from - fromPoint_projectedOntoLine2);
+ forwardVector_forLookRotationOf_toPoint = UtilitiesDXXL_Math.ScaleNonZeroVectorIntoRegionOfFloatPrecision(forwardVector_forLookRotationOf_toPoint);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(forwardVector_forLookRotationOf_toPoint))
+ {
+ forwardVector_forLookRotationOf_toPoint = Vector3.forward;
+ }
+ Quaternion rotation_ofToPoint = Quaternion.LookRotation(forwardVector_forLookRotationOf_toPoint, upVector_forLookRotationOf_toPoint);
+
+ UtilitiesDXXL_DrawBasics.Set_strokeWidth_forCoordinateTexts_onPointVisualiation_inPPM_reversible(0);
+ DrawBasics.Point(to, "to(distance perp to ortho)", color, distance * 0.1f, linesWidth, color, rotation_ofToPoint, false, true, false, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.Reverse_strokeWidth_forCoordinateTexts_onPointVisualiation_inPPM();
+
+ UtilitiesDXXL_Measurements.Draw90degSymbol(distance, from, fromPoint_projectedOntoLine2, line1.direction_normalized, colorOfAttachments, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Measurements.Draw90degSymbol(distance, fromPoint_projectedOntoLine2, from, line2.direction_normalized, colorOfAttachments, durationInSec, hiddenByNearerObjects);
+
+ return distance;
+ }
+
+ public static float DistanceAlongOrthoViewDir(Vector3 from, Vector3 to, Vector3 orthoViewDir, Color color = default(Color), float linesWidth = 0.0f, string text = null, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return 0.0f; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(from, "from")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(to, "to")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(orthoViewDir, "orthoViewDir")) { return 0.0f; }
+
+ linesWidth = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(orthoViewDir))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(from, "[ 'orthoViewDir' is zero. DistanceAlongOrthoViewDir measure operation not executed.]
[from]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.PointFallback(to, "[ 'orthoViewDir' is zero. DistanceAlongOrthoViewDir measure operation not executed.]
[to]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ orthoViewDir = UtilitiesDXXL_Math.ScaleNonZeroVectorIntoRegionOfFloatPrecision(orthoViewDir);
+ line1.Recreate(from, orthoViewDir, false);
+ line2.Recreate(to, orthoViewDir, false);
+ Vector3 fromPoint_projectedOntoLine2 = line2.Get_perpProjectionOfPoint_ontoThisLine(from);
+ if (float.IsNaN(fromPoint_projectedOntoLine2.x))
+ {
+ fromPoint_projectedOntoLine2 = line2.origin;
+ }
+ Vector3 toPoint_projectedOntoLine1 = line1.Get_perpProjectionOfPoint_ontoThisLine(to);
+
+ //Draw distance:
+ bool skipDrawing = DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped();
+ float distanceAlongViewDir = UtilitiesDXXL_Measurements.Distance(false, UtilitiesDXXL_Measurements.DistanceSpecifyingStringType.point_l_I_l_point, from, toPoint_projectedOntoLine1, color, linesWidth, text, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipDrawing);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return distanceAlongViewDir; }
+
+ //Draw viewDirLines:
+ float perpDistance_betweenLines = (fromPoint_projectedOntoLine2 - from).magnitude;
+ Vector3 point1_to_point2_alongViewDir = to - fromPoint_projectedOntoLine2;
+ Vector3 point1_to_point2_alongViewDir_normalized;
+ float extentionBase_forLinesAlongViewDir;
+ if (UtilitiesDXXL_Math.ApproximatelyZero(distanceAlongViewDir))
+ {
+ point1_to_point2_alongViewDir_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(orthoViewDir);
+ extentionBase_forLinesAlongViewDir = 1.0f;
+ }
+ else
+ {
+ point1_to_point2_alongViewDir_normalized = point1_to_point2_alongViewDir / distanceAlongViewDir;
+ extentionBase_forLinesAlongViewDir = distanceAlongViewDir;
+ }
+
+ Color colorOfAttachments = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(Color.white, 0.2f);
+
+ float patternScaleFactor = distanceAlongViewDir;
+ patternScaleFactor = Mathf.Max(patternScaleFactor, 0.02f);
+ Vector3 line1_start = from - point1_to_point2_alongViewDir_normalized * (0.6f * extentionBase_forLinesAlongViewDir);
+ Line_fadeableAnimSpeed.InternalDraw(line1_start, line1_start + point1_to_point2_alongViewDir_normalized * (2.2f * extentionBase_forLinesAlongViewDir), colorOfAttachments, 0.0f, null, DrawBasics.LineStyle.dashedLong, patternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ Vector3 line2_start = to + point1_to_point2_alongViewDir_normalized * (0.6f * extentionBase_forLinesAlongViewDir);
+ Line_fadeableAnimSpeed.InternalDraw(line2_start, line2_start - point1_to_point2_alongViewDir_normalized * (2.2f * extentionBase_forLinesAlongViewDir), colorOfAttachments, 0.0f, null, DrawBasics.LineStyle.dashedLong, patternScaleFactor, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+
+ UtilitiesDXXL_Measurements.WriteOrthoViewDirNameAtProjectionPlumbPos(" ortho view dir throught 'from'", fromPoint_projectedOntoLine2, from, orthoViewDir, 0.02f * perpDistance_betweenLines, colorOfAttachments, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Measurements.WriteOrthoViewDirNameAtProjectionPlumbPos(" ortho view dir throught 'to'", from, fromPoint_projectedOntoLine2, -orthoViewDir, 0.02f * perpDistance_betweenLines, colorOfAttachments, durationInSec, hiddenByNearerObjects);
+
+ //Draw 'to'-Point:
+ Vector3 upVector_forLookRotationOf_toPoint = (orthoViewDir.y >= 0.0f) ? orthoViewDir : (-orthoViewDir);
+ Vector3 forwardVector_forLookRotationOf_toPoint = Vector3.Cross(orthoViewDir, from - fromPoint_projectedOntoLine2);
+ forwardVector_forLookRotationOf_toPoint = UtilitiesDXXL_Math.ScaleNonZeroVectorIntoRegionOfFloatPrecision(forwardVector_forLookRotationOf_toPoint);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(forwardVector_forLookRotationOf_toPoint))
+ {
+ forwardVector_forLookRotationOf_toPoint = Vector3.forward;
+ }
+ Quaternion rotation_ofToPoint = Quaternion.LookRotation(forwardVector_forLookRotationOf_toPoint, upVector_forLookRotationOf_toPoint);
+
+ UtilitiesDXXL_DrawBasics.Set_strokeWidth_forCoordinateTexts_onPointVisualiation_inPPM_reversible(0);
+ DrawBasics.Point(to, "to(distance along ortho)", color, perpDistance_betweenLines * 0.1f, linesWidth, color, rotation_ofToPoint, false, true, false, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.Reverse_strokeWidth_forCoordinateTexts_onPointVisualiation_inPPM();
+
+ if (perpDistance_betweenLines > 0.0001f)
+ {
+ //Draw perp connection lines:
+ Line_fadeableAnimSpeed.InternalDraw(from, fromPoint_projectedOntoLine2, colorOfAttachments, 0.0f, null, DrawBasics.LineStyle.disconnectedAnchors, 1.0f, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ Line_fadeableAnimSpeed.InternalDraw(to, toPoint_projectedOntoLine1, colorOfAttachments, 0.0f, null, DrawBasics.LineStyle.disconnectedAnchors, 1.0f, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+
+ UtilitiesDXXL_Measurements.Draw90degSymbol(perpDistance_betweenLines, from, fromPoint_projectedOntoLine2, line1.direction_normalized, colorOfAttachments, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Measurements.Draw90degSymbol(perpDistance_betweenLines, fromPoint_projectedOntoLine2, from, line2.direction_normalized, colorOfAttachments, durationInSec, hiddenByNearerObjects);
+
+ UtilitiesDXXL_Measurements.Draw90degSymbol(perpDistance_betweenLines, to, toPoint_projectedOntoLine1, line1.direction_normalized, colorOfAttachments, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Measurements.Draw90degSymbol(perpDistance_betweenLines, toPoint_projectedOntoLine1, to, line2.direction_normalized, colorOfAttachments, durationInSec, hiddenByNearerObjects);
+ }
+
+ return distanceAlongViewDir;
+ }
+
+ public static float DistancePointToPlane(Vector3 point, Transform planeTransform, Color color = default(Color), float linesWidth = 0.0f, string text = null, string planeName = null, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(planeTransform, "planeTransform")) { return 0.0f; }
+ return DistancePointToPlane(point, planeTransform.position, planeTransform.up, color, linesWidth, text, planeName, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float DistancePointToPlane(Vector3 point, Plane plane, Color color = default(Color), float linesWidth = 0.0f, string text = null, string planeName = null, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ return DistancePointToPlane(point, plane.ClosestPointOnPlane(Vector3.zero), plane.normal, color, linesWidth, text, planeName, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ static InternalDXXL_Plane plane = new InternalDXXL_Plane();
+ public static float DistancePointToPlane(Vector3 point, Vector3 planeOrigin, Vector3 planeNormal, Color color = default(Color), float linesWidth = 0.0f, string text = null, string planeName = null, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return 0.0f; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(point, "point")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(planeOrigin, "planeOrigin")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(planeNormal, "planeNormal")) { return 0.0f; }
+
+ linesWidth = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(planeNormal))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(point, "[ 'planeNormal' is zero. DistancePointToPlane measure operation not executed.]
[point]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.PointFallback(planeOrigin, "[ 'planeNormal' is zero. DistancePointToPlane measure operation not executed.]
[planeOrigin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ plane.Recreate(planeOrigin, planeNormal);
+ Vector3 projectionOfPointOnPlane = plane.Get_perpProjectionOfPointOnPlane(point);
+ if (float.IsNaN(projectionOfPointOnPlane.x))
+ {
+ projectionOfPointOnPlane = point;
+ }
+
+ bool skipDrawing = DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped();
+ float distance = UtilitiesDXXL_Measurements.Distance(false, UtilitiesDXXL_Measurements.DistanceSpecifyingStringType.point_plane, point, projectionOfPointOnPlane, color, linesWidth, text, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipDrawing);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return distance; }
+
+ Color planeColor = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor2, 0.5f);
+ float planeSize_nonExtended = distance;
+ planeSize_nonExtended = Mathf.Max(planeSize_nonExtended, 1.0f);
+ float anchorVisualizationSize = 0.2f * planeSize_nonExtended;
+ float subSegments_signFlipsInterpretation;
+ Vector3 forward_insidePlane = preferredPlanePatternOrientation_forDistancePointToPlane; //-> The plane grid pattern orientation stance can rotate fast and unnaturally when "planeNormal" becomes similar to "preferredPlanePatternOrientation_forDistancePointToPlane". Though since there is no preferred plane stance expected to be used more often than others I don't see an easy fix for that.
+ UtilitiesDXXL_DrawBasics.OverwriteDefaultVectorsWithStandardIdentity(ref planeNormal, ref forward_insidePlane, true);
+ forward_insidePlane = plane.Get_projectionOfVectorOntoPlane(forward_insidePlane);
+
+ //Main Plane:
+ subSegments_signFlipsInterpretation = (-0.1f) * planeSize_nonExtended; //-> "negative sign" means "fixed world space size of segments"
+ DrawShapes.Plane(planeOrigin, planeNormal, projectionOfPointOnPlane, planeColor, planeSize_nonExtended, planeSize_nonExtended, forward_insidePlane, 0.0f, null, subSegments_signFlipsInterpretation, false, anchorVisualizationSize, false, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, hiddenByNearerObjects);
+
+ //Emphasizing plane at points projection on plane:
+ subSegments_signFlipsInterpretation = 20; //-> "positive sign" means "fixed number of segments"
+ DrawShapes.Plane(projectionOfPointOnPlane, planeNormal, default, planeColor, 0.2f * planeSize_nonExtended, 0.2f * planeSize_nonExtended, forward_insidePlane, 0.0f, null, subSegments_signFlipsInterpretation, false, 0.0f, false, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, hiddenByNearerObjects);
+
+ UtilitiesDXXL_Measurements.Draw90degSymbol(distance, projectionOfPointOnPlane, point, forward_insidePlane, planeColor, durationInSec, hiddenByNearerObjects);
+
+ if ((planeName == null) || (planeName == "")) { planeName = "plane"; }
+ UtilitiesDXXL_Text.WriteFramed(planeName, projectionOfPointOnPlane + 0.11f * planeSize_nonExtended * forward_insidePlane, planeColor, 0.05f * planeSize_nonExtended, forward_insidePlane, Vector3.Cross(planeNormal, forward_insidePlane), DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, true, durationInSec, hiddenByNearerObjects);
+ return distance;
+ }
+
+ public static float AngleLineToPlane(Ray line, Transform planeTransform, Color color = default(Color), float linesWidth = 0.0f, string text = null, string lineName = null, string planeName = null, bool returnObtuseAngleOver90deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(planeTransform, "planeTransform")) { return 0.0f; }
+ return AngleLineToPlane(line.origin, line.direction, planeTransform.position, planeTransform.up, color, linesWidth, text, lineName, planeName, returnObtuseAngleOver90deg, displayAndReturn_radInsteadOfDeg, coneLength, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float AngleLineToPlane(Ray line, Plane plane, Color color = default(Color), float linesWidth = 0.0f, string text = null, string lineName = null, string planeName = null, bool returnObtuseAngleOver90deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ return AngleLineToPlane(line.origin, line.direction, plane.ClosestPointOnPlane(Vector3.zero), plane.normal, color, linesWidth, text, lineName, planeName, returnObtuseAngleOver90deg, displayAndReturn_radInsteadOfDeg, coneLength, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float AngleLineToPlane(Ray line, Vector3 planeOrigin, Vector3 planeNormal, Color color = default(Color), float linesWidth = 0.0f, string text = null, string lineName = null, string planeName = null, bool returnObtuseAngleOver90deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ return AngleLineToPlane(line.origin, line.direction, planeOrigin, planeNormal, color, linesWidth, text, lineName, planeName, returnObtuseAngleOver90deg, displayAndReturn_radInsteadOfDeg, coneLength, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float AngleLineToPlane(Vector3 lineOrigin, Vector3 lineDirection, Transform planeTransform, Color color = default(Color), float linesWidth = 0.0f, string text = null, string lineName = null, string planeName = null, bool returnObtuseAngleOver90deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(planeTransform, "planeTransform")) { return 0.0f; }
+ return AngleLineToPlane(lineOrigin, lineDirection, planeTransform.position, planeTransform.up, color, linesWidth, text, lineName, planeName, returnObtuseAngleOver90deg, displayAndReturn_radInsteadOfDeg, coneLength, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float AngleLineToPlane(Vector3 lineOrigin, Vector3 lineDirection, Plane plane, Color color = default(Color), float linesWidth = 0.0f, string text = null, string lineName = null, string planeName = null, bool returnObtuseAngleOver90deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ return AngleLineToPlane(lineOrigin, lineDirection, plane.ClosestPointOnPlane(Vector3.zero), plane.normal, color, linesWidth, text, lineName, planeName, returnObtuseAngleOver90deg, displayAndReturn_radInsteadOfDeg, coneLength, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float AngleLineToPlane(Vector3 lineOrigin, Vector3 lineDirection, Vector3 planeOrigin, Vector3 planeNormal, Color color = default(Color), float linesWidth = 0.0f, string text = null, string lineName = null, string planeName = null, bool returnObtuseAngleOver90deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return 0.0f; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(lineOrigin, "lineOrigin")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(lineDirection, "lineDirection")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(planeOrigin, "planeOrigin")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(planeNormal, "planeNormal")) { return 0.0f; }
+
+ linesWidth = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(planeNormal))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(lineOrigin, "[ 'planeNormal' is zero. AngleLineToPlane measure operation not executed.]
[lineOrigin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.PointFallback(planeOrigin, "[ 'planeNormal' is zero. AngleLineToPlane measure operation not executed.]
[planeOrigin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(lineDirection))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(lineOrigin, "[ 'lineDirection' is zero. AngleLineToPlane measure operation not executed.]
[lineOrigin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.PointFallback(planeOrigin, "[ 'lineDirection' is zero. AngleLineToPlane measure operation not executed.]
[planeOrigin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ planeNormal = UtilitiesDXXL_Math.ScaleNonZeroVectorIntoRegionOfFloatPrecision(planeNormal);
+ Vector3 planeNormal_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(planeNormal);
+ line.Recreate(lineOrigin, lineDirection, false);
+ plane.Recreate(planeOrigin, planeNormal_normalized);
+
+ Color planeColor = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor2, 0.5f);
+ Color colorOfProlongedLine = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor1, 0.55f);
+ Color color_lowerAlpha = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.45f);
+ Color colorOfAttachments = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor1, 0.35f);
+
+ string lineIdentifyingText = ((lineName == null) || (lineName == "")) ? "line direction" : lineName;
+ float widthOfDirVector = UtilitiesDXXL_Math.ApproximatelyZero(linesWidth) ? 0.01f : (0.6f * linesWidth);
+ Vector3 lineOrigins_projectionOnPlane = plane.Get_perpProjectionOfPointOnPlane(line.origin);
+
+ if (Mathf.Abs(Vector3.Dot(plane.normalDir, line.direction_normalized)) < 0.0001f)
+ {
+ //line is parallel to plane:
+ UtilitiesDXXL_DrawBasics.Set_coneLength_interpretation_forStraightVectors_reversible(DrawBasics.LengthInterpretation.relativeToLineLength);
+ DrawBasics.VectorFrom(lineOrigin, lineDirection, defaultColor1, widthOfDirVector, DrawText.MarkupColor(lineIdentifyingText, colorOfAttachments), 0.17f, false, false, default(Vector3), true, 0.0f, false, 0.0f, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.Reverse_coneLength_interpretation_forStraightVectors();
+
+ Vector3 intersectionToLineOrigin_fallback = Vector3.zero;
+ float distance_intersectionToLineOrigin_fallback = 0.0f;
+ Line_fadeableAnimSpeed.InternalDraw(lineOrigin - line.direction_normalized * minimumLineLength_forAngleLineToPlane, lineOrigin + line.direction_normalized * minimumLineLength_forAngleLineToPlane, colorOfProlongedLine, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ UtilitiesDXXL_Measurements.WriteLineNameAtProjectionPlumbPos(false, lineName, "line", "", intersectionToLineOrigin_fallback, distance_intersectionToLineOrigin_fallback, lineOrigins_projectionOnPlane, line, line.origin, 0.1f, colorOfProlongedLine, false, durationInSec, hiddenByNearerObjects);
+ DistancePointToPlane(lineOrigin, planeOrigin, planeNormal_normalized, color, linesWidth, "[ Line is approximately parallel to plane -> fallback from 'Angle()' to 'Distance()']
" + text, planeName, coneLength, 0.0f, durationInSec, hiddenByNearerObjects);
+ return returnObtuseAngleOver90deg ? (displayAndReturn_radInsteadOfDeg ? (Mathf.Deg2Rad * 180.0f) : 180.0f) : 0.0f;
+ }
+
+ Vector3 intersectionPoint = line.Get_intersectionPoint_withPlane_withoutParallelCheck(plane);
+ Vector3 intersection_to_lineOrigin = line.origin - intersectionPoint;
+ float distance_intersection_to_lineOrigin = intersection_to_lineOrigin.magnitude;
+ Vector3 intersection_towardsLine_normalized;
+ if (distance_intersection_to_lineOrigin < 0.0001f)
+ {
+ intersection_towardsLine_normalized = planeNormal_normalized;
+ }
+ else
+ {
+ intersection_towardsLine_normalized = intersection_to_lineOrigin / distance_intersection_to_lineOrigin;
+ }
+
+ float radius = 0.5f * distance_intersection_to_lineOrigin;
+ radius = Mathf.Max(radius, 0.2f);
+
+ Vector3 lineOriginProjectionOnPlane_to_intersectionPos = intersectionPoint - lineOrigins_projectionOnPlane;
+ float distance_from_lineOriginProjectionOnPlane_to_intersectionPos = lineOriginProjectionOnPlane_to_intersectionPos.magnitude;
+
+ Vector3 forward_insidePlane_normalized = default;
+ if (distance_from_lineOriginProjectionOnPlane_to_intersectionPos < 0.0001f)
+ {
+ //angle is approximately 90deg:
+ UtilitiesDXXL_DrawBasics.OverwriteDefaultVectorsWithStandardIdentity(ref planeNormal_normalized, ref forward_insidePlane_normalized, true);
+ forward_insidePlane_normalized = plane.Get_projectionOfVectorOntoPlane(forward_insidePlane_normalized);
+ forward_insidePlane_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(forward_insidePlane_normalized);
+ }
+ else
+ {
+ forward_insidePlane_normalized = lineOriginProjectionOnPlane_to_intersectionPos / distance_from_lineOriginProjectionOnPlane_to_intersectionPos;
+ }
+
+ float planeSize_nonExtended;
+ if (distance_from_lineOriginProjectionOnPlane_to_intersectionPos < 0.1f)
+ {
+ planeSize_nonExtended = 1.0f;
+ }
+ else
+ {
+ planeSize_nonExtended = 1.2f * distance_from_lineOriginProjectionOnPlane_to_intersectionPos;
+ }
+ planeSize_nonExtended = Mathf.Max(planeSize_nonExtended, 1.0f);
+
+ float acuteAngle;
+ float obtuseAngle;
+ if (returnObtuseAngleOver90deg)
+ {
+ acuteAngle = UtilitiesDXXL_Measurements.Angle(false, false, false, intersection_towardsLine_normalized, -forward_insidePlane_normalized, intersectionPoint, color_lowerAlpha, radius, 0.0f, null, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ obtuseAngle = UtilitiesDXXL_Measurements.Angle(true, false, false, intersection_towardsLine_normalized, forward_insidePlane_normalized, intersectionPoint, color, radius, linesWidth, text, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ acuteAngle = UtilitiesDXXL_Measurements.Angle(true, false, false, intersection_towardsLine_normalized, -forward_insidePlane_normalized, intersectionPoint, color, radius, linesWidth, text, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ obtuseAngle = UtilitiesDXXL_Measurements.Angle(false, false, false, intersection_towardsLine_normalized, forward_insidePlane_normalized, intersectionPoint, color_lowerAlpha, radius, 0.0f, null, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped())
+ {
+ return ReturnAngleOfCorrectAcuteObtuseType(obtuseAngle, acuteAngle, returnObtuseAngleOver90deg);
+ }
+
+ //Draw plane:
+ float subSegments_signFlipsInterpretation = (-0.1f) * planeSize_nonExtended; //-> "negative sign" means "fixed world space size of segments"
+ float anchorVisualizationSize = 0.5f * planeSize_nonExtended;
+ DrawShapes.Plane(planeOrigin, planeNormal_normalized, intersectionPoint, planeColor, planeSize_nonExtended, planeSize_nonExtended, forward_insidePlane_normalized, 0.0f, null, subSegments_signFlipsInterpretation, false, anchorVisualizationSize, false, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, hiddenByNearerObjects);
+
+ Vector3 textUp_normalized = Vector3.Cross(planeNormal_normalized, forward_insidePlane_normalized);
+ if ((planeName == null) || (planeName == "")) { planeName = "plane"; }
+ UtilitiesDXXL_Text.Write(planeName, intersectionPoint - 0.05f * planeSize_nonExtended * forward_insidePlane_normalized, planeColor, 0.05f * planeSize_nonExtended, -forward_insidePlane_normalized, textUp_normalized, DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, true, durationInSec, hiddenByNearerObjects, false, false, true);
+
+ //Draw line:
+ UtilitiesDXXL_DrawBasics.Set_coneLength_interpretation_forStraightVectors_reversible(DrawBasics.LengthInterpretation.relativeToLineLength);
+ DrawBasics.VectorFrom(lineOrigin, lineDirection, defaultColor1, widthOfDirVector, DrawText.MarkupColor(lineIdentifyingText, colorOfAttachments), 0.17f, false, false, default(Vector3), true, 0.0f, false, 0.0f, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.Reverse_coneLength_interpretation_forStraightVectors();
+
+ float lineExtentionPerSide = Mathf.Max(minimumLineLength_forAngleLineToPlane, 1.1f * distance_intersection_to_lineOrigin);
+ Line_fadeableAnimSpeed.InternalDraw(lineOrigin - line.direction_normalized * lineExtentionPerSide, lineOrigin + line.direction_normalized * lineExtentionPerSide, colorOfProlongedLine, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ UtilitiesDXXL_Measurements.WriteLineNameAtProjectionPlumbPos(false, lineName, "line", " ", intersection_to_lineOrigin, distance_intersection_to_lineOrigin, lineOrigins_projectionOnPlane, line, intersectionPoint, 0.08f * radius, colorOfProlongedLine, false, durationInSec, hiddenByNearerObjects);
+
+ //Enforce line at radius of angleCone:
+ Vector3 posOnLine_whereAngleConeTouches = intersectionPoint + intersection_towardsLine_normalized * radius;
+ float halfLengthOfEnforcementLine = radius * 0.055f + 0.5f * linesWidth;
+ float widthOfEnforcementLine = radius * 0.003f;
+ Line_fadeableAnimSpeed.InternalDraw(posOnLine_whereAngleConeTouches - intersection_towardsLine_normalized * halfLengthOfEnforcementLine, posOnLine_whereAngleConeTouches + intersection_towardsLine_normalized * halfLengthOfEnforcementLine, color, widthOfEnforcementLine, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+
+ //Draw intersection pos coordinate:
+ UtilitiesDXXL_DrawBasics.Set_strokeWidth_forCoordinateTexts_onPointVisualiation_inPPM_reversible(0);
+ DrawBasics.Point(intersectionPoint, "intersection
position", color, 0.025f * planeSize_nonExtended, 0.0f, color, default, false, true, false, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.Reverse_strokeWidth_forCoordinateTexts_onPointVisualiation_inPPM();
+
+ //Draw circles at intersection pos:
+ DrawShapes.Decagon(intersectionPoint, radius * 0.02f, UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 1.0f), planeNormal, default(Vector3), 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, DrawBasics.LineStyle.invisible, false, false, durationInSec, hiddenByNearerObjects);
+ DrawShapes.Decagon(intersectionPoint, radius * 0.04f, UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.65f), planeNormal, default(Vector3), 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, DrawBasics.LineStyle.invisible, false, false, durationInSec, hiddenByNearerObjects);
+ DrawShapes.Circle(intersectionPoint, radius * 0.06f, UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.35f), planeNormal, default(Vector3), 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, DrawBasics.LineStyle.invisible, false, false, durationInSec, hiddenByNearerObjects);
+ DrawShapes.Circle(intersectionPoint, radius * 0.08f, UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.15f), planeNormal, default(Vector3), 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, DrawBasics.LineStyle.invisible, false, false, durationInSec, hiddenByNearerObjects);
+
+ return ReturnAngleOfCorrectAcuteObtuseType(obtuseAngle, acuteAngle, returnObtuseAngleOver90deg);
+ }
+
+ static float ReturnAngleOfCorrectAcuteObtuseType(float obtuseAngle, float acuteAngle, bool returnObtuseAngleOver90deg)
+ {
+ if (returnObtuseAngleOver90deg)
+ {
+ return obtuseAngle;
+ }
+ else
+ {
+ return acuteAngle;
+ }
+ }
+
+ public static float AnglePlaneToPlane(Transform plane1Transform, Transform plane2Transform, Color color = default(Color), float linesWidth = 0.0f, string text = null, string plane1Name = null, string plane2Name = null, bool returnObtuseAngleOver90deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(plane1Transform, "plane1Transform")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(plane2Transform, "plane2Transform")) { return 0.0f; }
+ return AnglePlaneToPlane(plane1Transform.position, plane1Transform.up, plane2Transform.position, plane2Transform.up, color, linesWidth, text, plane1Name, plane2Name, returnObtuseAngleOver90deg, displayAndReturn_radInsteadOfDeg, coneLength, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float AnglePlaneToPlane(Plane plane1, Plane plane2, Vector3 drawPositioinAsPlumb = default(Vector3), Color color = default(Color), float linesWidth = 0.0f, string text = null, string plane1Name = null, string plane2Name = null, bool returnObtuseAngleOver90deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(drawPositioinAsPlumb, "drawPositioinAsPlumb")) { return 0.0f; }
+ drawPositioinAsPlumb = UtilitiesDXXL_Math.OverwriteDefaultVectors(drawPositioinAsPlumb, Vector3.zero);
+
+ Vector3 closestPointOnPlane1 = plane1.ClosestPointOnPlane(drawPositioinAsPlumb);
+ Vector3 closestPointOnPlane2 = plane2.ClosestPointOnPlane(drawPositioinAsPlumb);
+ return AnglePlaneToPlane(closestPointOnPlane1, plane1.normal, closestPointOnPlane2, plane2.normal, color, linesWidth, text, plane1Name, plane2Name, returnObtuseAngleOver90deg, displayAndReturn_radInsteadOfDeg, coneLength, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ static InternalDXXL_Plane plane1 = new InternalDXXL_Plane();
+ static InternalDXXL_Plane plane2 = new InternalDXXL_Plane();
+ static InternalDXXL_Line intersectionLine = new InternalDXXL_Line();
+ public static float AnglePlaneToPlane(Vector3 plane1Origin, Vector3 plane1Normal, Vector3 plane2Origin, Vector3 plane2Normal, Color color = default(Color), float linesWidth = 0.0f, string text = null, string plane1Name = null, string plane2Name = null, bool returnObtuseAngleOver90deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return 0.0f; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(plane1Origin, "plane1Origin")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(plane1Normal, "plane1Normal")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(plane2Origin, "plane2Origin")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(plane2Normal, "plane2Normal")) { return 0.0f; }
+
+ linesWidth = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(plane1Normal))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(plane1Origin, "[ 'plane1Normal' is zero. AnglePlaneToPlane measure operation not executed.]
[plane1Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.PointFallback(plane2Origin, "[ 'plane1Normal' is zero. AnglePlaneToPlane measure operation not executed.]
[plane2Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(plane2Normal))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(plane1Origin, "[ 'plane2Normal' is zero. AnglePlaneToPlane measure operation not executed.]
[plane1Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.PointFallback(plane2Origin, "[ 'plane2Normal' is zero. AnglePlaneToPlane measure operation not executed.]
[plane2Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ Vector3 plane1Normal_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(plane1Normal);
+ Vector3 plane2Normal_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(plane2Normal);
+
+ plane1.Recreate(plane1Origin, plane1Normal_normalized);
+ plane2.Recreate(plane2Origin, plane2Normal_normalized);
+
+ Color plane1Color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor1, 0.5f);
+ Color plane2Color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(defaultColor2, 0.5f);
+ Color colorOfAdditionalAngle = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.55f);
+
+ if ((plane1Name == null) || (plane1Name == ""))
+ {
+ plane1Name = "plane1";
+ }
+ if ((plane2Name == null) || (plane2Name == ""))
+ {
+ plane2Name = "plane2";
+ }
+
+ if (Mathf.Abs(Vector3.Dot(plane1Normal_normalized, plane2Normal_normalized)) > 0.999999f)
+ {
+ //-> planes are approximately parallel
+
+ //thresholds:
+ //"0.9999f" -> minDetectableAngle: 0.8deg
+ //"0.99999f" -> minDetectableAngle: 0.26deg
+ //"0.999999f" -> minDetectableAngle: 0.09deg
+
+ Vector3 plane1Origins_projectionOnPlane2 = plane2.Get_perpProjectionOfPointOnPlane(plane1Origin);
+ float distance = UtilitiesDXXL_Measurements.Distance(false, UtilitiesDXXL_Measurements.DistanceSpecifyingStringType.plane_plane, plane1Origin, plane1Origins_projectionOnPlane2, color, linesWidth, "[ Planes are approximately parallel -> fallback from 'angle' to 'distance']
" + text, coneLength, 0.0f, durationInSec, hiddenByNearerObjects, false);
+ float bigPlaneSize = Mathf.Max(distance, 1.0f);
+ float smallPlaneSize = 0.2f * bigPlaneSize;
+ float textSize = 0.2f * smallPlaneSize;
+
+ Vector3 forwardInsidePlane_normalized = UtilitiesDXXL_Math.Get_aNormalizedVector_perpToGivenVector(plane1Normal_normalized);
+ Vector3 textDir_normalized = forwardInsidePlane_normalized;
+ Vector3 textUp_normalized = Vector3.Cross(forwardInsidePlane_normalized, plane1Normal_normalized);
+
+ DrawShapes.Plane(plane1Origin, plane1Normal_normalized, plane2Origin, plane1Color, bigPlaneSize, bigPlaneSize, forwardInsidePlane_normalized, 0.0f, null, 10, false, 0.0f, false, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, hiddenByNearerObjects);
+ DrawShapes.Plane(plane1Origin, plane1Normal_normalized, default, plane1Color, smallPlaneSize, smallPlaneSize, forwardInsidePlane_normalized, 0.0f, null, 10, false, 0.0f, false, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Text.Write(plane1Name, plane1Origin + textDir_normalized * (0.6f * smallPlaneSize), plane1Color, textSize, textDir_normalized, textUp_normalized, DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, true, durationInSec, hiddenByNearerObjects, false, false, true);
+
+ DrawShapes.Plane(plane2Origin, plane2Normal_normalized, plane1Origins_projectionOnPlane2, plane2Color, bigPlaneSize, bigPlaneSize, forwardInsidePlane_normalized, 0.0f, null, 10, false, 0.0f, false, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, hiddenByNearerObjects);
+ DrawShapes.Plane(plane1Origins_projectionOnPlane2, plane2Normal_normalized, default, plane2Color, smallPlaneSize, smallPlaneSize, forwardInsidePlane_normalized, 0.0f, null, 10, false, 0.0f, false, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Text.Write(plane2Name, plane1Origins_projectionOnPlane2 + textDir_normalized * (0.6f * smallPlaneSize), plane2Color, textSize, textDir_normalized, textUp_normalized, DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, true, durationInSec, hiddenByNearerObjects, false, false, true);
+
+ return returnObtuseAngleOver90deg ? (displayAndReturn_radInsteadOfDeg ? (Mathf.Deg2Rad * 180.0f) : 180.0f) : 0.0f;
+ }
+
+ InternalDXXL_Plane.Calc_intersectionLine_ofTwoPlanes(ref intersectionLine, plane1, plane2);
+ if (intersectionLine.ErrorLogForInvalidLineParameters() == false)
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(plane1Origin, "[ Couldn't calculate intersectionLine of the the planes. AnglePlaneToPlane measure operation not executed.]
[plane1Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.PointFallback(plane2Origin, "[ Couldn't calculate intersectionLine of the the planes. AnglePlaneToPlane measure operation not executed.]
[plane2Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ bool angleIsApproximately90Deg = (Mathf.Abs(Vector3.Dot(plane1Normal_normalized, plane2Normal_normalized)) < 0.0001f);
+
+ Vector3 plane1origin_projectedOnLine = intersectionLine.Get_perpProjectionOfPoint_ontoThisLine(plane1Origin);
+ Vector3 intersectionPos1_to_plane1Origin = plane1Origin - plane1origin_projectedOnLine;
+ float distance_intersection1_to_plane1Origin = intersectionPos1_to_plane1Origin.magnitude;
+
+ Vector3 plane2origin_projectedOnLine = intersectionLine.Get_perpProjectionOfPoint_ontoThisLine(plane2Origin);
+ Vector3 intersectionPos2_to_plane2Origin = plane2Origin - plane2origin_projectedOnLine;
+ float distance_intersection2_to_plane2Origin = intersectionPos2_to_plane2Origin.magnitude;
+
+ Vector3 angleCenterPos;
+ Vector3 intersection_towardsPlane1_normalized;
+ Vector3 intersection_towardsPlane2_normalized;
+ float radius = 0.2f;
+
+ if (distance_intersection1_to_plane1Origin < 0.0001f)
+ {
+ if (distance_intersection2_to_plane2Origin < 0.0001f)
+ {
+ //both planeOrigins lie on intersectionLine:
+ angleCenterPos = plane1Origin;
+ Vector3 aNormalizedVector_perpToLine = UtilitiesDXXL_Math.Get_aNormalizedVector_perpToGivenVector(intersectionLine.direction_normalized);
+ Quaternion seldomRotation_aroundLine = Quaternion.AngleAxis(UtilitiesDXXL_Math.arbitrarySeldomDir_precalced.x, intersectionLine.direction_normalized);
+ Vector3 aSeldomNormalizedVector_perpToLine = seldomRotation_aroundLine * aNormalizedVector_perpToLine;
+ intersection_towardsPlane1_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(plane1.Get_projectionOfVectorOntoPlane(aSeldomNormalizedVector_perpToLine));
+ if (angleIsApproximately90Deg)
+ {
+ Quaternion rotation90deg = Quaternion.AngleAxis(90.0f, intersectionLine.direction_normalized);
+ intersection_towardsPlane2_normalized = rotation90deg * intersection_towardsPlane1_normalized;
+ }
+ else
+ {
+ intersection_towardsPlane2_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(plane2.Get_projectionOfVectorOntoPlane(intersection_towardsPlane1_normalized));
+ }
+ }
+ else
+ {
+ //plane1Origin lies on intersectionLine, but plane2Origin NOT:
+ radius = 0.5f * distance_intersection2_to_plane2Origin;
+ angleCenterPos = plane2origin_projectedOnLine;
+ intersection_towardsPlane2_normalized = intersectionPos2_to_plane2Origin / distance_intersection2_to_plane2Origin;
+ if (angleIsApproximately90Deg)
+ {
+ Quaternion rotation90deg = Quaternion.AngleAxis(90.0f, intersectionLine.direction_normalized);
+ intersection_towardsPlane1_normalized = rotation90deg * intersection_towardsPlane2_normalized;
+ }
+ else
+ {
+ intersection_towardsPlane1_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(plane1.Get_projectionOfVectorOntoPlane(intersection_towardsPlane2_normalized));
+ }
+ }
+ }
+ else
+ {
+ //plane1Origin does NOT lie on intersectionLine:
+ if (distance_intersection2_to_plane2Origin < 0.0001f)
+ {
+ //plane2Origin lies on intersectionLine, but plane1Origin NOT:
+ radius = 0.5f * distance_intersection1_to_plane1Origin;
+ }
+ else
+ {
+ //both planeOrigins do NOT lie on intersectionLine:
+ float averageDistance_intersections_to_planeOrigins = 0.5f * (distance_intersection1_to_plane1Origin + distance_intersection2_to_plane2Origin);
+ radius = 0.5f * averageDistance_intersections_to_planeOrigins;
+ }
+
+ angleCenterPos = plane1origin_projectedOnLine;
+ intersection_towardsPlane1_normalized = intersectionPos1_to_plane1Origin / distance_intersection1_to_plane1Origin;
+ if (angleIsApproximately90Deg)
+ {
+ Quaternion rotation90deg = Quaternion.AngleAxis(90.0f, intersectionLine.direction_normalized);
+ intersection_towardsPlane2_normalized = rotation90deg * intersection_towardsPlane1_normalized;
+ }
+ else
+ {
+ intersection_towardsPlane2_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(plane2.Get_projectionOfVectorOntoPlane(intersection_towardsPlane1_normalized));
+ }
+ }
+
+ radius = Mathf.Max(radius, 0.2f);
+ float approxPlane1Length;
+ if (distance_intersection1_to_plane1Origin < 0.1f)
+ {
+ approxPlane1Length = 1.0f + (2.0f * radius);
+ }
+ else
+ {
+ approxPlane1Length = 1.2f * distance_intersection1_to_plane1Origin + (2.0f * radius);
+ }
+
+ float approxPlane2Length;
+ if (distance_intersection2_to_plane2Origin < 0.1f)
+ {
+ approxPlane2Length = 1.0f + (2.0f * radius);
+ }
+ else
+ {
+ approxPlane2Length = 1.2f * distance_intersection2_to_plane2Origin + (2.0f * radius);
+ }
+
+ float approxPlaneLength = Mathf.Max(approxPlane1Length, approxPlane2Length);
+ approxPlaneLength = Mathf.Max(approxPlaneLength, 2.5f * radius);
+ approxPlaneLength = Mathf.Max(approxPlaneLength, 1.0f);
+
+ float distance_betweenTheTwoProjectionsOntoTheIntersectionLine = (plane1origin_projectedOnLine - plane2origin_projectedOnLine).magnitude;
+ float planeWidth_thatProtrudesTheTwoProjectionsOnIntersectionLine = 0.25f * distance_betweenTheTwoProjectionsOntoTheIntersectionLine;
+ planeWidth_thatProtrudesTheTwoProjectionsOnIntersectionLine = Mathf.Max(planeWidth_thatProtrudesTheTwoProjectionsOnIntersectionLine, 1.0f);
+
+ float angleDeg_towards1_to_towards2 = Vector3.Angle(intersection_towardsPlane1_normalized, intersection_towardsPlane2_normalized);
+
+ float acuteAngle;
+ float obtuseAngle;
+ if (angleIsApproximately90Deg || angleDeg_towards1_to_towards2 < 90.0f)
+ {
+ //towards1-to-towards2 is acute:
+ if (returnObtuseAngleOver90deg)
+ {
+ acuteAngle = UtilitiesDXXL_Measurements.Angle(false, false, false, intersection_towardsPlane1_normalized, intersection_towardsPlane2_normalized, angleCenterPos, colorOfAdditionalAngle, radius, 0.0f, null, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ obtuseAngle = UtilitiesDXXL_Measurements.Angle(true, false, false, intersection_towardsPlane1_normalized, -intersection_towardsPlane2_normalized, angleCenterPos, color, radius, linesWidth, text, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ acuteAngle = UtilitiesDXXL_Measurements.Angle(true, false, false, intersection_towardsPlane1_normalized, intersection_towardsPlane2_normalized, angleCenterPos, color, radius, linesWidth, text, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ obtuseAngle = UtilitiesDXXL_Measurements.Angle(false, false, false, intersection_towardsPlane1_normalized, -intersection_towardsPlane2_normalized, angleCenterPos, colorOfAdditionalAngle, radius, 0.0f, null, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+ }
+ else
+ {
+ //towards1-to-towards2 is obtuse:
+ if (returnObtuseAngleOver90deg)
+ {
+ acuteAngle = UtilitiesDXXL_Measurements.Angle(false, false, false, intersection_towardsPlane1_normalized, -intersection_towardsPlane2_normalized, angleCenterPos, colorOfAdditionalAngle, radius, 0.0f, null, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ obtuseAngle = UtilitiesDXXL_Measurements.Angle(true, false, false, intersection_towardsPlane1_normalized, intersection_towardsPlane2_normalized, angleCenterPos, color, radius, linesWidth, text, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ acuteAngle = UtilitiesDXXL_Measurements.Angle(true, false, false, intersection_towardsPlane1_normalized, -intersection_towardsPlane2_normalized, angleCenterPos, color, radius, linesWidth, text, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ obtuseAngle = UtilitiesDXXL_Measurements.Angle(false, false, false, intersection_towardsPlane1_normalized, intersection_towardsPlane2_normalized, angleCenterPos, colorOfAdditionalAngle, radius, 0.0f, null, false, displayAndReturn_radInsteadOfDeg, coneLength, true, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped())
+ {
+ return ReturnAngleOfCorrectAcuteObtuseType(obtuseAngle, acuteAngle, returnObtuseAngleOver90deg);
+ }
+
+ //Draw circles as angle display mounting point:
+ Vector3 position_ofMountingPointDisplayCircle = angleCenterPos + intersection_towardsPlane1_normalized * radius;
+ Vector3 normal_ofMountingPointDisplayCircle = plane1Normal_normalized;
+ DrawShapes.Decagon(position_ofMountingPointDisplayCircle, radius * 0.02f, UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 1.0f), normal_ofMountingPointDisplayCircle, default(Vector3), 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, DrawBasics.LineStyle.invisible, false, false, durationInSec, hiddenByNearerObjects);
+ DrawShapes.Decagon(position_ofMountingPointDisplayCircle, radius * 0.04f, UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.65f), normal_ofMountingPointDisplayCircle, default(Vector3), 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, DrawBasics.LineStyle.invisible, false, false, durationInSec, hiddenByNearerObjects);
+ DrawShapes.Circle(position_ofMountingPointDisplayCircle, radius * 0.06f, UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.35f), normal_ofMountingPointDisplayCircle, default(Vector3), 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, DrawBasics.LineStyle.invisible, false, false, durationInSec, hiddenByNearerObjects);
+ DrawShapes.Circle(position_ofMountingPointDisplayCircle, radius * 0.08f, UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.15f), normal_ofMountingPointDisplayCircle, default(Vector3), 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, DrawBasics.LineStyle.invisible, false, false, durationInSec, hiddenByNearerObjects);
+
+ //Draw planes:
+ Vector3 pos_between_theTwoLineProjectedPlaneOrigins = 0.5f * (plane1origin_projectedOnLine + plane2origin_projectedOnLine);
+ float anchorVisualizationSize = 0.5f * planeWidth_thatProtrudesTheTwoProjectionsOnIntersectionLine;
+ float subSegments_signFlipsInterpretation = (-0.1f) * planeWidth_thatProtrudesTheTwoProjectionsOnIntersectionLine; //-> "negative sign" means "fixed world space size of segments"
+
+ DrawShapes.Plane(plane1Origin, plane1Normal_normalized, plane2origin_projectedOnLine, plane1Color, planeWidth_thatProtrudesTheTwoProjectionsOnIntersectionLine, planeWidth_thatProtrudesTheTwoProjectionsOnIntersectionLine, intersection_towardsPlane1_normalized, 0.0f, null, subSegments_signFlipsInterpretation, false, anchorVisualizationSize, false, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Text.Write(plane1Name, angleCenterPos - 0.05f * approxPlaneLength * intersection_towardsPlane1_normalized, plane1Color, 0.05f * approxPlaneLength, -intersection_towardsPlane1_normalized, intersectionLine.direction_normalized, DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, true, durationInSec, hiddenByNearerObjects, false, false, true);
+
+ DrawShapes.Plane(plane2Origin, plane2Normal_normalized, plane1origin_projectedOnLine, plane2Color, planeWidth_thatProtrudesTheTwoProjectionsOnIntersectionLine, planeWidth_thatProtrudesTheTwoProjectionsOnIntersectionLine, intersection_towardsPlane2_normalized, 0.0f, null, subSegments_signFlipsInterpretation, false, anchorVisualizationSize, false, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Text.Write(plane2Name, angleCenterPos - 0.05f * approxPlaneLength * intersection_towardsPlane2_normalized, plane2Color, 0.05f * approxPlaneLength, -intersection_towardsPlane2_normalized, intersectionLine.direction_normalized, DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, true, durationInSec, hiddenByNearerObjects, false, false, true);
+
+ //Draw additional emphasizing planes around intersectionline:
+ float length_ofAdditialPlanes = 0.3f * radius;
+ DrawShapes.Plane(plane1origin_projectedOnLine, plane1Normal_normalized, plane2origin_projectedOnLine, plane1Color, planeWidth_thatProtrudesTheTwoProjectionsOnIntersectionLine, length_ofAdditialPlanes, intersection_towardsPlane1_normalized, 0.0f, null, 10, false, 0.0f, false, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, hiddenByNearerObjects);
+ DrawShapes.Plane(plane2origin_projectedOnLine, plane2Normal_normalized, plane1origin_projectedOnLine, plane2Color, planeWidth_thatProtrudesTheTwoProjectionsOnIntersectionLine, length_ofAdditialPlanes, intersection_towardsPlane2_normalized, 0.0f, null, 10, false, 0.0f, false, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, hiddenByNearerObjects);
+
+ //Draw the emphasized intersection line:
+ float lineWidth_ofIntersectionLineVisualization = 0.01f * radius;
+ Vector3 intersectionLineVector_withLengthOfHalfWidthOfDisplayedPlanes = intersectionLine.direction_normalized * 0.5f * UtilitiesDXXL_Shapes.finalWidth_ofLastDrawnPlane;
+ DrawBasics.Line(pos_between_theTwoLineProjectedPlaneOrigins - intersectionLineVector_withLengthOfHalfWidthOfDisplayedPlanes, pos_between_theTwoLineProjectedPlaneOrigins + intersectionLineVector_withLengthOfHalfWidthOfDisplayedPlanes, color, lineWidth_ofIntersectionLineVisualization, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, default(Vector3), false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+
+ return ReturnAngleOfCorrectAcuteObtuseType(obtuseAngle, acuteAngle, returnObtuseAngleOver90deg);
+ }
+
+ public static void DistanceThreshold(Vector3 startPos, Vector3 endPos, float thresholdDistance, string text = null, bool displayDistanceAlsoAsText = false, float lineWidth = 0.0f, bool exactlyThresholdLength_countsAsShorter = true, float endPlates_size = 0.0f, DrawBasics.LineStyle overwriteStyle_forNear = DrawBasics.LineStyle.electricNoise, DrawBasics.LineStyle overwriteStyle_forFar = DrawBasics.LineStyle.solid, Color overwriteColor_forNear = default(Color), Color overwriteColor_forFar = default(Color), Vector3 customAmplitudeAndTextDir = default(Vector3), float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(thresholdDistance, "thresholdDistance")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(startPos, "startPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(endPos, "endPos")) { return; }
+
+ if (UtilitiesDXXL_Math.CheckIf_twoVectorsAreApproximatelyEqual(startPos, endPos))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(startPos, "[ DistanceThreshold with distance of 0]
" + text, UtilitiesDXXL_Colors.OverwriteDefaultColor(overwriteColor_forNear, UtilitiesDXXL_Colors.red_boolFalse), lineWidth, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+
+ Color usedColor = new Color();
+ DrawBasics.LineStyle usedLineStyle = DrawBasics.LineStyle.solid;
+ float distance = (endPos - startPos).magnitude;
+ float stylePatternScaleFactor = distance;
+
+ if (displayDistanceAlsoAsText)
+ {
+ text = string.IsNullOrEmpty(text) ? ("distance =
" + distance) : ("distance =
" + distance + "
" + text);
+ }
+
+ UtilitiesDXXL_Measurements.ChooseColorAndStyleForDistanceThresholdLine(ref usedColor, ref usedLineStyle, distance, thresholdDistance, exactlyThresholdLength_countsAsShorter, overwriteStyle_forNear, overwriteStyle_forFar, overwriteColor_forNear, overwriteColor_forFar);
+
+ UtilitiesDXXL_DrawBasics.Set_relSizeOfTextOnLines_reversible(0.65f);
+ UtilitiesDXXL_DrawBasics.Set_shiftTextPosOnLines_toNonIntersecting_reversible(true);
+ UtilitiesDXXL_DrawBasics.Line(startPos, endPos, usedColor, lineWidth, text, usedLineStyle, stylePatternScaleFactor, 0.0f, null, customAmplitudeAndTextDir, false, 0.0f, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, true, true, null, false, endPlates_size);
+ UtilitiesDXXL_DrawBasics.Reverse_relSizeOfTextOnLines();
+ UtilitiesDXXL_DrawBasics.Reverse_shiftTextPosOnLines_toNonIntersecting();
+ }
+
+ public static void DistanceThresholds(Vector3 startPos, Vector3 endPos, float smallerThresholdDistance, float biggerThresholdDistance, string text = null, bool displayDistanceAlsoAsText = false, float lineWidth = 0.0f, bool exactlyThresholdLength_countsAsShorter = true, float endPlates_size = 0.0f, DrawBasics.LineStyle overwriteStyle_forNear = DrawBasics.LineStyle.electricNoise, DrawBasics.LineStyle overwriteStyle_forMiddle = DrawBasics.LineStyle.electricImpulses, DrawBasics.LineStyle overwriteStyle_forFar = DrawBasics.LineStyle.solid, Color overwriteColor_forNear = default(Color), Color overwriteColor_forMiddle = default(Color), Color overwriteColor_forFar = default(Color), Vector3 customAmplitudeAndTextDir = default(Vector3), float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(smallerThresholdDistance, "smallerThresholdDistance")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(biggerThresholdDistance, "biggerThresholdDistance")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(startPos, "startPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(endPos, "endPos")) { return; }
+
+ if (UtilitiesDXXL_Math.CheckIf_twoVectorsAreApproximatelyEqual(startPos, endPos))
+ {
+ UtilitiesDXXL_DrawBasics.PointFallback(startPos, "[ DistanceThresholds with distance of 0]
" + text, UtilitiesDXXL_Colors.OverwriteDefaultColor(overwriteColor_forNear, UtilitiesDXXL_Colors.red_boolFalse), lineWidth, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+
+ if (smallerThresholdDistance > biggerThresholdDistance)
+ {
+ text = "[ threshold distances are automatically flipped: smaller (" + smallerThresholdDistance + " -> " + biggerThresholdDistance + ") / bigger (" + biggerThresholdDistance + " -> " + smallerThresholdDistance + ")]
" + text;
+ float smallerClipboard = smallerThresholdDistance;
+ smallerThresholdDistance = biggerThresholdDistance;
+ biggerThresholdDistance = smallerClipboard;
+ }
+
+ Color usedColor = new Color();
+ DrawBasics.LineStyle usedLineStyle = DrawBasics.LineStyle.solid;
+ float distance = (endPos - startPos).magnitude;
+ float stylePatternScaleFactor = distance;
+
+ if (displayDistanceAlsoAsText)
+ {
+ text = string.IsNullOrEmpty(text) ? ("distance =
" + distance) : ("distance =
" + distance + "
" + text);
+ }
+
+ UtilitiesDXXL_Measurements.ChooseColorAndStyleForDistanceThresholdsLine(ref usedColor, ref usedLineStyle, distance, smallerThresholdDistance, biggerThresholdDistance, exactlyThresholdLength_countsAsShorter, overwriteStyle_forNear, overwriteStyle_forMiddle, overwriteStyle_forFar, overwriteColor_forNear, overwriteColor_forMiddle, overwriteColor_forFar);
+
+ UtilitiesDXXL_DrawBasics.Set_relSizeOfTextOnLines_reversible(0.65f);
+ UtilitiesDXXL_DrawBasics.Set_shiftTextPosOnLines_toNonIntersecting_reversible(true);
+ UtilitiesDXXL_DrawBasics.Line(startPos, endPos, usedColor, lineWidth, text, usedLineStyle, stylePatternScaleFactor, 0.0f, null, customAmplitudeAndTextDir, false, 0.0f, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, true, true, null, false, endPlates_size);
+ UtilitiesDXXL_DrawBasics.Reverse_relSizeOfTextOnLines();
+ UtilitiesDXXL_DrawBasics.Reverse_shiftTextPosOnLines_toNonIntersecting();
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/DrawMeasurements.cs.meta b/Runtime/DrawDebugLibrary/DrawMeasurements.cs.meta
new file mode 100644
index 0000000..7a97ca5
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawMeasurements.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4ea9a952ec8d7154c9419ddd7735548e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawMeasurements2D.cs b/Runtime/DrawDebugLibrary/DrawMeasurements2D.cs
new file mode 100644
index 0000000..efce944
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawMeasurements2D.cs
@@ -0,0 +1,404 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+ public class DrawMeasurements2D
+ {
+ public static float minimumLineLength_forDistancePointToLine = 1000.0f;
+ public static float minimumLineLength_forAngleLineToLine = 1000.0f;
+
+ public static float Distance(Vector2 from, Vector2 to, Color color = default(Color), float lineWidth = 0.0f, string text = null, float custom_zPos = float.PositiveInfinity, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 fromV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(from, zPos);
+ Vector3 toV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(to, zPos);
+ return UtilitiesDXXL_Measurements.Distance(true, UtilitiesDXXL_Measurements.DistanceSpecifyingStringType.point_point, fromV3, toV3, color, lineWidth, text, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ public static float Angle(Vector2 from, Vector2 to, Vector2 turnCenter, Color color = default(Color), float forceRadius = 0.0f, float lineWidth = 0.0f, string text = null, float custom_zPos = float.PositiveInfinity, bool useReflexAngleOver180deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool drawBoundaryLines = true, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 turnCenterV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(turnCenter, zPos);
+ Vector3 fromV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(from);
+ Vector3 toV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(to);
+ return UtilitiesDXXL_Measurements.Angle(false, true, false, fromV3, toV3, turnCenterV3, color, forceRadius, lineWidth, text, useReflexAngleOver180deg, displayAndReturn_radInsteadOfDeg, coneLength, drawBoundaryLines, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float AngleSpan(Vector2 from, Vector2 to, Vector2 turnCenter, Color color = default(Color), float forceRadius = 0.0f, float lineWidth = 0.0f, string text = null, float custom_zPos = float.PositiveInfinity, bool useReflexAngleOver180deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool drawBoundaryLines = true, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 turnCenterV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(turnCenter, zPos);
+ Vector3 fromV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(from);
+ Vector3 toV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(to);
+ return UtilitiesDXXL_Measurements.Angle(false, true, true, fromV3, toV3, turnCenterV3, color, forceRadius, lineWidth, text, useReflexAngleOver180deg, displayAndReturn_radInsteadOfDeg, coneLength, drawBoundaryLines, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static float DistancePointToLine(Vector2 point, Ray2D line, Color color = default(Color), float linesWidth = 0.0f, string text = null, string lineName = null, float custom_zPos = float.PositiveInfinity, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ return DistancePointToLine(point, line.origin, line.direction, color, linesWidth, text, lineName, custom_zPos, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects);
+ }
+
+ static InternalDXXL_Line line_3D = new InternalDXXL_Line();
+ public static float DistancePointToLine(Vector2 point, Vector2 lineOrigin, Vector2 lineDirection, Color color = default(Color), float linesWidth = 0.0f, string text = null, string lineName = null, float custom_zPos = float.PositiveInfinity, float coneLength = 0.10f, float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return 0.0f; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(point, "point")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(lineOrigin, "lineOrigin")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(lineDirection, "lineDirection")) { return 0.0f; }
+
+ linesWidth = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth);
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(lineDirection))
+ {
+ UtilitiesDXXL_DrawBasics2D.PointFallback(point, zPos, "[ 'lineDirection' is zero. DistancePointToLine2D measure operation not executed.]
[point]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics2D.PointFallback(lineOrigin, zPos, "[ 'lineDirection' is zero. DistancePointToLine2D measure operation not executed.]
[lineOrigin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ Vector3 pointV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(point, zPos);
+ Vector3 lineOriginV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(lineOrigin, zPos);
+ Vector3 lineDirectionV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(lineDirection);
+
+ line_3D.Recreate(lineOriginV3, lineDirectionV3, false);
+ Vector3 pointsProjectionOntoLine = line_3D.Get_perpProjectionOfPoint_ontoThisLine(pointV3);
+
+ //Draw distance:
+ bool skipDrawing = DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped();
+ float distance = UtilitiesDXXL_Measurements.Distance(true, UtilitiesDXXL_Measurements.DistanceSpecifyingStringType.point_line, pointV3, pointsProjectionOntoLine, color, linesWidth, text, coneLength, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, skipDrawing);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return distance; }
+
+ //Draw line:
+ string lineIdentifyingText = ((lineName == null) || (lineName == "")) ? "line direction" : lineName;
+ float widthOfDirVector = UtilitiesDXXL_Math.ApproximatelyZero(linesWidth) ? 0.01f : (0.6f * linesWidth);
+ Color colorOfProlongedLine = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(DrawMeasurements.defaultColor2, 0.55f);
+ Color colorOfAttachments = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(DrawMeasurements.defaultColor2, 0.35f);
+ DrawBasics2D.VectorFrom(lineOriginV3, lineDirectionV3, DrawMeasurements.defaultColor2, widthOfDirVector, DrawText.MarkupColor(lineIdentifyingText, colorOfAttachments), coneLength * 1.7f, false, zPos, true, 0.0f, false, 0.0f, durationInSec, hiddenByNearerObjects);
+
+ Vector3 projectionToLineOrigin = line_3D.origin - pointsProjectionOntoLine;
+ float distance_projectionToLineOrigin = projectionToLineOrigin.magnitude;
+ float lineExtentionPerSide = Mathf.Max(minimumLineLength_forDistancePointToLine, 1.1f * distance_projectionToLineOrigin);
+ Line_fadeableAnimSpeed.InternalDraw(lineOriginV3 - line_3D.direction_normalized * lineExtentionPerSide, lineOriginV3 + line_3D.direction_normalized * lineExtentionPerSide, colorOfProlongedLine, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ UtilitiesDXXL_Measurements.WriteLineNameAtProjectionPlumbPos(true, lineName, "line", "", projectionToLineOrigin, distance_projectionToLineOrigin, pointV3, line_3D, pointsProjectionOntoLine, 0.02f * distance, colorOfProlongedLine, true, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Measurements.Draw90degSymbol(distance, pointsProjectionOntoLine, pointV3, line_3D.direction_normalized, colorOfAttachments, durationInSec, hiddenByNearerObjects);
+
+ return distance;
+ }
+
+ public static float AngleLineToLine(Ray2D line1, Ray2D line2, Color color = default(Color), float linesWidth = 0.0f, string text = null, string line1Name = null, string line2Name = null, float custom_zPos = float.PositiveInfinity, bool returnObtuseAngleOver90deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ return AngleLineToLine(line1.origin, line1.direction, line2.origin, line2.direction, color, linesWidth, text, line1Name, line2Name, custom_zPos, returnObtuseAngleOver90deg, displayAndReturn_radInsteadOfDeg, coneLength, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+
+ static InternalDXXL_Line line1_3D = new InternalDXXL_Line();
+ static InternalDXXL_Line line2_3D = new InternalDXXL_Line();
+ static InternalDXXL_Line2D line1_2D = new InternalDXXL_Line2D();
+ static InternalDXXL_Line2D line2_2D = new InternalDXXL_Line2D();
+ public static float AngleLineToLine(Vector2 line1Origin, Vector2 line1Direction, Vector2 line2Origin, Vector2 line2Direction, Color color = default(Color), float linesWidth = 0.0f, string text = null, string line1Name = null, string line2Name = null, float custom_zPos = float.PositiveInfinity, bool returnObtuseAngleOver90deg = false, bool displayAndReturn_radInsteadOfDeg = false, float coneLength = 0.13f, bool addTextForAlternativeAngleUnit = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return 0.0f; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(line1Origin, "line1Origin")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(line1Direction, "line1Direction")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(line2Origin, "line2Origin")) { return 0.0f; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(line2Direction, "line2Direction")) { return 0.0f; }
+
+ linesWidth = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth);
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(line1Direction))
+ {
+ UtilitiesDXXL_DrawBasics2D.PointFallback(line1Origin, zPos, "[ 'line1Direction' is zero. AngleLineToLine measure operation not executed.]
[line1Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics2D.PointFallback(line2Origin, zPos, "[ 'line1Direction' is zero. AngleLineToLine measure operation not executed.]
[line2Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(line2Direction))
+ {
+ UtilitiesDXXL_DrawBasics2D.PointFallback(line1Origin, zPos, "[ 'line2Direction' is zero. AngleLineToLine measure operation not executed.]
[line1Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics2D.PointFallback(line2Origin, zPos, "[ 'line2Direction' is zero. AngleLineToLine measure operation not executed.]
[line2Origin]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return 0.0f;
+ }
+
+ float length_ofLine1Direction;
+ float length_ofLine2Direction;
+ Vector2 line1_direction_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(line1Direction, out length_ofLine1Direction);
+ Vector2 line2_direction_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(line2Direction, out length_ofLine2Direction);
+
+ float alphaFactor_ofProlongedLines = 0.55f;
+ float alphaFactor_ofLineAttachments = 0.35f;
+ Color colorOfProlongedLine1 = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(DrawMeasurements.defaultColor1, alphaFactor_ofProlongedLines);
+ Color colorOfProlongedLine2 = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(DrawMeasurements.defaultColor2, alphaFactor_ofProlongedLines);
+ Color colorOfLine1Attachments = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(DrawMeasurements.defaultColor1, alphaFactor_ofLineAttachments);
+ Color colorOfLine2Attachments = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(DrawMeasurements.defaultColor2, alphaFactor_ofLineAttachments);
+
+ string line1IdentifyingText = ((line1Name == null) || (line1Name == "")) ? "line1 direction" : line1Name;
+ string line2IdentifyingText = ((line2Name == null) || (line2Name == "")) ? "line2 direction" : line2Name;
+
+ float widthOfDirVector = UtilitiesDXXL_Math.ApproximatelyZero(linesWidth) ? 0.01f : (0.6f * linesWidth);
+
+ //->calculation falls back to line-3D, because it is more precise
+ Vector3 line1OriginV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(line1Origin, zPos);
+ Vector3 line2OriginV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(line2Origin, zPos);
+ Vector3 line1DirectionV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(line1Direction);
+ Vector3 line2DirectionV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(line2Direction);
+ line1_3D.Recreate(line1OriginV3, line1DirectionV3, false);
+ line2_3D.Recreate(line2OriginV3, line2DirectionV3, false);
+
+ bool linesAreApproxParallel = CheckIfLinesAreApproxParallel(out float displayedAndReturnedAngle_forParallelLines, returnObtuseAngleOver90deg, displayAndReturn_radInsteadOfDeg, line1Direction, line2Direction);
+ if (linesAreApproxParallel)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return displayedAndReturnedAngle_forParallelLines; }
+ float distanceBetweenLines = line1_3D.Get_perpDistance_ofGivenPoint_toThisLine(line2OriginV3);
+ if (distanceBetweenLines < 0.001f)
+ {
+ //parallel and coinciding lines:
+ line1IdentifyingText = line1IdentifyingText + "
[ AngleLineToLine:
The two lines
lie approximately
parallel on top
of each other]";
+ float distanceBetweenLineOrigins = (line1Origin - line2Origin).magnitude;
+ if (distanceBetweenLineOrigins > Mathf.Max(length_ofLine1Direction, length_ofLine2Direction))
+ {
+ line2IdentifyingText = line2IdentifyingText + "
[ AngleLineToLine:
The two lines
lie approximately
parallel on top
of each other]";
+ }
+ }
+ else
+ {
+ //parallel lines with distance (not coinciding):
+ Vector3 line2origin_projectedOntoLine1 = line1_3D.Get_perpProjectionOfPoint_ontoThisLine(line2OriginV3);
+ Vector3 line1Origin_to_line2OriginOnLine1 = line2origin_projectedOntoLine1 - line1OriginV3;
+ float distanceBetweenLineOrigins_alongLineDir = line1Origin_to_line2OriginOnLine1.magnitude;
+
+ string textForDistanceFallback = "[ AngleLineToLine:
The two lines are
approximately parallel
-> Fallback to 'Distance()']
" + text;
+ if (distanceBetweenLineOrigins_alongLineDir < 5.0f)
+ {
+ Vector3 centerBetweenLineOrigins_onLine1 = line1OriginV3 + 0.5f * line1Origin_to_line2OriginOnLine1;
+ Distance(centerBetweenLineOrigins_onLine1, line2_3D.Get_perpProjectionOfPoint_ontoThisLine(centerBetweenLineOrigins_onLine1), color, linesWidth, textForDistanceFallback, zPos, coneLength, 0.005f, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ Distance(line1OriginV3, line2_3D.Get_perpProjectionOfPoint_ontoThisLine(line1OriginV3), color, linesWidth, textForDistanceFallback, zPos, coneLength, 0.005f, durationInSec, hiddenByNearerObjects);
+ Distance(line1_3D.Get_perpProjectionOfPoint_ontoThisLine(line2OriginV3), line2OriginV3, color, linesWidth, textForDistanceFallback, zPos, coneLength, 0.005f, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ //Draw lineVectors:
+ DrawBasics2D.VectorFrom(line1Origin, line1Direction, colorOfProlongedLine1, widthOfDirVector, line1IdentifyingText, coneLength, false, zPos, true, 0.005f, false, 0.0f, durationInSec, hiddenByNearerObjects);
+ DrawBasics2D.VectorFrom(line2Origin, line2Direction, colorOfProlongedLine2, widthOfDirVector, line2IdentifyingText, coneLength, false, zPos, true, 0.005f, false, 0.0f, durationInSec, hiddenByNearerObjects);
+
+ //Draw lineExtentions:
+ float lineExtentionPerSide = UtilitiesDXXL_Math.Max(minimumLineLength_forAngleLineToLine, line1Origin.magnitude, line2Origin.magnitude);
+ Line_fadeableAnimSpeed_2D.InternalDraw(line1Origin, line1Origin - line1_direction_normalized * lineExtentionPerSide, colorOfProlongedLine1, 0.0f, null, DrawBasics.LineStyle.solid, zPos, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ Line_fadeableAnimSpeed_2D.InternalDraw(line1Origin, line1Origin + line1_direction_normalized * lineExtentionPerSide, colorOfProlongedLine1, 0.0f, null, DrawBasics.LineStyle.solid, zPos, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ Line_fadeableAnimSpeed_2D.InternalDraw(line2Origin, line2Origin - line2_direction_normalized * lineExtentionPerSide, colorOfProlongedLine2, 0.0f, null, DrawBasics.LineStyle.solid, zPos, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ Line_fadeableAnimSpeed_2D.InternalDraw(line2Origin, line2Origin + line2_direction_normalized * lineExtentionPerSide, colorOfProlongedLine2, 0.0f, null, DrawBasics.LineStyle.solid, zPos, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+
+ return displayedAndReturnedAngle_forParallelLines;
+ }
+ else
+ {
+ //-> lines are not parallel
+
+ Vector2 intersectionPos = line1_3D.Get_posOnLine_thatIsNearestTo_passingOtherLine(line2_3D);
+ Vector2 intersectionToLine1Origin = line1Origin - intersectionPos;
+ Vector2 intersectionToLine2Origin = line2Origin - intersectionPos;
+ float distance_intersection_to_line1origin = intersectionToLine1Origin.magnitude;
+ float distance_intersection_to_line2origin = intersectionToLine2Origin.magnitude;
+ Vector2 intersectionTowardsLine1 = UtilitiesDXXL_Math.ApproximatelyZero(intersectionToLine1Origin) ? line1Direction : intersectionToLine1Origin;
+ Vector2 intersectionTowardsLine2 = UtilitiesDXXL_Math.ApproximatelyZero(intersectionToLine2Origin) ? line2Direction : intersectionToLine2Origin;
+
+ //Draw lineVectors:
+ DrawBasics2D.VectorFrom(line1Origin, line1Direction, colorOfProlongedLine1, widthOfDirVector, DrawText.MarkupColor(line1IdentifyingText, colorOfProlongedLine1), coneLength, false, zPos, true, 0.005f, false, 0.0f, durationInSec, hiddenByNearerObjects);
+ DrawBasics2D.VectorFrom(line2Origin, line2Direction, colorOfProlongedLine2, widthOfDirVector, DrawText.MarkupColor(line2IdentifyingText, colorOfProlongedLine2), coneLength, false, zPos, true, 0.005f, false, 0.0f, durationInSec, hiddenByNearerObjects);
+
+ //Draw lineExtentions:
+ float lineExtentionPerSide = UtilitiesDXXL_Math.Max(minimumLineLength_forAngleLineToLine, line1Origin.magnitude, line2Origin.magnitude, 1.1f * distance_intersection_to_line1origin, 1.1f * distance_intersection_to_line2origin);
+ Line_fadeableAnimSpeed_2D.InternalDraw(line1Origin, line1Origin - line1_direction_normalized * lineExtentionPerSide, colorOfProlongedLine1, 0.0f, null, DrawBasics.LineStyle.solid, zPos, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ Line_fadeableAnimSpeed_2D.InternalDraw(line1Origin, line1Origin + line1_direction_normalized * lineExtentionPerSide, colorOfProlongedLine1, 0.0f, null, DrawBasics.LineStyle.solid, zPos, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ Line_fadeableAnimSpeed_2D.InternalDraw(line2Origin, line2Origin - line2_direction_normalized * lineExtentionPerSide, colorOfProlongedLine2, 0.0f, null, DrawBasics.LineStyle.solid, zPos, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ Line_fadeableAnimSpeed_2D.InternalDraw(line2Origin, line2Origin + line2_direction_normalized * lineExtentionPerSide, colorOfProlongedLine2, 0.0f, null, DrawBasics.LineStyle.solid, zPos, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+
+ //Draw Angle Display:
+ float angleDeg_towards1toTowards2 = Vector2.Angle(intersectionTowardsLine1, intersectionTowardsLine2);
+ bool towards1_to_towards2_isAcuteBelow90deg = angleDeg_towards1toTowards2 <= 90.0f;
+ float radius = Mathf.Min(0.5f * distance_intersection_to_line1origin, 0.5f * distance_intersection_to_line2origin);
+ radius = Mathf.Max(radius, 0.3f);
+ // if (text != null) { text = DrawText.MarkupSize(text, 4); }
+ if (text != null) { text = "
" + text + ""; }
+
+ float returnedAngle;
+ if (returnObtuseAngleOver90deg)
+ {
+ if (towards1_to_towards2_isAcuteBelow90deg)
+ {
+ returnedAngle = Angle(intersectionTowardsLine1, -intersectionTowardsLine2, intersectionPos, color, radius, linesWidth, text, zPos, false, displayAndReturn_radInsteadOfDeg, coneLength, false, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ returnedAngle = Angle(intersectionTowardsLine1, intersectionTowardsLine2, intersectionPos, color, radius, linesWidth, text, zPos, false, displayAndReturn_radInsteadOfDeg, coneLength, false, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+ }
+ else
+ {
+ if (towards1_to_towards2_isAcuteBelow90deg)
+ {
+ returnedAngle = Angle(intersectionTowardsLine1, intersectionTowardsLine2, intersectionPos, color, radius, linesWidth, text, zPos, false, displayAndReturn_radInsteadOfDeg, coneLength, false, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ returnedAngle = Angle(intersectionTowardsLine1, -intersectionTowardsLine2, intersectionPos, color, radius, linesWidth, text, zPos, false, displayAndReturn_radInsteadOfDeg, coneLength, false, addTextForAlternativeAngleUnit, durationInSec, hiddenByNearerObjects);
+ }
+ }
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return returnedAngle; }
+
+ //Draw intersectionPos accentuating lines:
+ lineExtentionPerSide = radius * 0.1f;
+ float widthOfLineAccentuation = 0.015f * lineExtentionPerSide;
+ Vector2 halfLine1ExtentionVector = line1_direction_normalized * lineExtentionPerSide;
+ Vector2 halfLine2ExtentionVector = line2_direction_normalized * lineExtentionPerSide;
+ Line_fadeableAnimSpeed_2D.InternalDraw(intersectionPos - halfLine1ExtentionVector, intersectionPos + halfLine1ExtentionVector, colorOfProlongedLine1, widthOfLineAccentuation, null, DrawBasics.LineStyle.solid, zPos, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ Line_fadeableAnimSpeed_2D.InternalDraw(intersectionPos - halfLine2ExtentionVector, intersectionPos + halfLine2ExtentionVector, colorOfProlongedLine2, widthOfLineAccentuation, null, DrawBasics.LineStyle.solid, zPos, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ DrawBasics2D.Circle(intersectionPos, radius * 0.01f, color, 0.0f, null, DrawBasics.LineStyle.solid, zPos, 1.0f, DrawBasics.LineStyle.invisible, false, durationInSec, hiddenByNearerObjects);
+
+ UtilitiesDXXL_DrawBasics.Set_strokeWidth_forCoordinateTexts_onPointVisualiation_inPPM_reversible(0);
+ DrawBasics2D.Point(intersectionPos, color, radius * 0.2f, 0.0f, 0.0f, null, color, zPos, false, true, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_DrawBasics.Reverse_strokeWidth_forCoordinateTexts_onPointVisualiation_inPPM();
+
+ //Draw additional lineNameText at intersection pos:
+ line1_2D.Recalc_line_throughTwoPoints_returnSteepForVertLines(line1Origin, line1Origin + line1Direction);
+ line2_2D.Recalc_line_throughTwoPoints_returnSteepForVertLines(line2Origin, line2Origin + line2Direction);
+ bool line1_isSteeperUpwardsWhenWalkingAlongPositiveX = line1_2D.m >= line2_2D.m;
+ float minNecessaryDistanceToLineOrigin_forSeparateLineNameTextToBeDrawn = 2.5f;
+ float textSize = 0.03f * radius;
+
+ line1IdentifyingText = ((line1Name == null) || (line1Name == "")) ? " line1" : " " + line1Name;
+ line2IdentifyingText = ((line2Name == null) || (line2Name == "")) ? " line2" : " " + line2Name;
+
+ if (distance_intersection_to_line1origin > Mathf.Max(2.0f * length_ofLine1Direction, minNecessaryDistanceToLineOrigin_forSeparateLineNameTextToBeDrawn))
+ {
+ Vector2 textDir = (line1Direction.x > 0.0f) ? line1Direction : (-line1Direction);
+ DrawText.TextAnchorDXXL textAnchor = line1_isSteeperUpwardsWhenWalkingAlongPositiveX ? DrawText.TextAnchorDXXL.LowerLeft : DrawText.TextAnchorDXXL.UpperLeft;
+ UtilitiesDXXL_Text.Write2DFramed(line1IdentifyingText, intersectionPos, colorOfLine1Attachments, textSize, textDir, textAnchor, zPos, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.005f, 0.0f, 0.0f, true, durationInSec, hiddenByNearerObjects);
+ }
+
+ if (distance_intersection_to_line2origin > Mathf.Max(2.0f * length_ofLine2Direction, minNecessaryDistanceToLineOrigin_forSeparateLineNameTextToBeDrawn))
+ {
+ Vector2 textDir = (line2Direction.x > 0.0f) ? line2Direction : (-line2Direction);
+ DrawText.TextAnchorDXXL textAnchor = line1_isSteeperUpwardsWhenWalkingAlongPositiveX ? DrawText.TextAnchorDXXL.UpperLeft : DrawText.TextAnchorDXXL.LowerLeft;
+ UtilitiesDXXL_Text.Write2DFramed(line2IdentifyingText, intersectionPos, colorOfLine2Attachments, textSize, textDir, textAnchor, zPos, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.005f, 0.0f, 0.0f, true, durationInSec, hiddenByNearerObjects);
+ }
+
+ return returnedAngle;
+ }
+ }
+
+ static bool CheckIfLinesAreApproxParallel(out float displayedAndReturnedAngle_forParallelLines, bool returnObtuseAngleOver90deg, bool displayAndReturn_radInsteadOfDeg, Vector2 line1Direction, Vector2 line2Direction)
+ {
+ float angleDeg = Vector2.Angle(line1Direction, line2Direction);
+ float angleDeg_acute = (angleDeg > 90.0f) ? (180.0f - angleDeg) : angleDeg;
+ float angleDeg_obtuse = (angleDeg < 90.0f) ? (180.0f - angleDeg) : angleDeg;
+ float angleRad_acute = Mathf.Deg2Rad * angleDeg_acute;
+ float angleRad_obtuse = Mathf.Deg2Rad * angleDeg_obtuse;
+
+ if (returnObtuseAngleOver90deg)
+ {
+ if (displayAndReturn_radInsteadOfDeg)
+ {
+ displayedAndReturnedAngle_forParallelLines = angleRad_obtuse;
+ }
+ else
+ {
+ displayedAndReturnedAngle_forParallelLines = angleDeg_obtuse;
+ }
+ }
+ else
+ {
+ if (displayAndReturn_radInsteadOfDeg)
+ {
+ displayedAndReturnedAngle_forParallelLines = angleRad_acute;
+ }
+ else
+ {
+ displayedAndReturnedAngle_forParallelLines = angleDeg_acute;
+ }
+ }
+
+ bool linesAreApproxParallel = (angleDeg_acute < 0.02f); //the minimum angle that "UnityEngine.Vector2.Angle()" can return seems to be between "0.01" and "0.02". Below that it always returns 0.
+ return linesAreApproxParallel;
+ }
+
+ public static void DistanceThreshold(Vector2 startPos, Vector2 endPos, float thresholdDistance, string text = null, bool displayDistanceAlsoAsText = false, float lineWidth = 0.0f, float custom_zPos = float.PositiveInfinity, bool exactlyThresholdLength_countsAsShorter = true, float endPlates_size = 0.0f, DrawBasics.LineStyle overwriteStyle_forNear = DrawBasics.LineStyle.electricNoise, DrawBasics.LineStyle overwriteStyle_forFar = DrawBasics.LineStyle.solid, Color overwriteColor_forNear = default(Color), Color overwriteColor_forFar = default(Color), float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(thresholdDistance, "thresholdDistance")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(startPos, "startPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(endPos, "endPos")) { return; }
+
+ if (UtilitiesDXXL_Math.CheckIf_twoVectorsAreApproximatelyEqual(startPos, endPos))
+ {
+ UtilitiesDXXL_DrawBasics2D.PointFallback(startPos, "[ DistanceThreshold2D with distance of 0]
" + text, UtilitiesDXXL_Colors.OverwriteDefaultColor(overwriteColor_forNear, UtilitiesDXXL_Colors.red_boolFalse), lineWidth, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+
+ Color usedColor = new Color();
+ DrawBasics.LineStyle usedLineStyle = DrawBasics.LineStyle.solid;
+ float distance = (endPos - startPos).magnitude;
+ float stylePatternScaleFactor = distance;
+
+ if (displayDistanceAlsoAsText)
+ {
+ text = string.IsNullOrEmpty(text) ? ("distance =
" + distance) : ("distance =
" + distance + "
" + text);
+ }
+
+ UtilitiesDXXL_Measurements.ChooseColorAndStyleForDistanceThresholdLine(ref usedColor, ref usedLineStyle, distance, thresholdDistance, exactlyThresholdLength_countsAsShorter, overwriteStyle_forNear, overwriteStyle_forFar, overwriteColor_forNear, overwriteColor_forFar);
+
+ UtilitiesDXXL_DrawBasics.Set_relSizeOfTextOnLines_reversible(0.65f);
+ UtilitiesDXXL_DrawBasics.Set_shiftTextPosOnLines_toNonIntersecting_reversible(true);
+ Line_fadeableAnimSpeed_2D.InternalDraw(startPos, endPos, usedColor, lineWidth, text, usedLineStyle, custom_zPos, stylePatternScaleFactor, 0.0f, null, endPlates_size, 0.0f, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, true, true);
+ UtilitiesDXXL_DrawBasics.Reverse_relSizeOfTextOnLines();
+ UtilitiesDXXL_DrawBasics.Reverse_shiftTextPosOnLines_toNonIntersecting();
+ }
+
+ public static void DistanceThresholds(Vector2 startPos, Vector2 endPos, float smallerThresholdDistance, float biggerThresholdDistance, string text = null, bool displayDistanceAlsoAsText = false, float lineWidth = 0.0f, float custom_zPos = float.PositiveInfinity, bool exactlyThresholdLength_countsAsShorter = true, float endPlates_size = 0.0f, DrawBasics.LineStyle overwriteStyle_forNear = DrawBasics.LineStyle.electricNoise, DrawBasics.LineStyle overwriteStyle_forMiddle = DrawBasics.LineStyle.electricImpulses, DrawBasics.LineStyle overwriteStyle_forFar = DrawBasics.LineStyle.solid, Color overwriteColor_forNear = default(Color), Color overwriteColor_forMiddle = default(Color), Color overwriteColor_forFar = default(Color), float enlargeSmallTextToThisMinTextSize = 0.005f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(smallerThresholdDistance, "smallerThresholdDistance")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(biggerThresholdDistance, "biggerThresholdDistance")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(startPos, "startPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(endPos, "endPos")) { return; }
+
+ if (UtilitiesDXXL_Math.CheckIf_twoVectorsAreApproximatelyEqual(startPos, endPos))
+ {
+ UtilitiesDXXL_DrawBasics2D.PointFallback(startPos, "[ DistanceThresholds2D with distance of 0]
" + text, UtilitiesDXXL_Colors.OverwriteDefaultColor(overwriteColor_forNear, UtilitiesDXXL_Colors.red_boolFalse), lineWidth, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+
+ if (smallerThresholdDistance > biggerThresholdDistance)
+ {
+ text = "[ threshold distances are automatically flipped: smaller (" + smallerThresholdDistance + " -> " + biggerThresholdDistance + ") / bigger (" + biggerThresholdDistance + " -> " + smallerThresholdDistance + ")]
" + text;
+ float smallerClipboard = smallerThresholdDistance;
+ smallerThresholdDistance = biggerThresholdDistance;
+ biggerThresholdDistance = smallerClipboard;
+ }
+
+ Color usedColor = new Color();
+ DrawBasics.LineStyle usedLineStyle = DrawBasics.LineStyle.solid;
+ float distance = (endPos - startPos).magnitude;
+ float stylePatternScaleFactor = distance;
+
+ if (displayDistanceAlsoAsText)
+ {
+ text = string.IsNullOrEmpty(text) ? ("distance =
" + distance) : ("distance =
" + distance + "
" + text);
+ }
+
+ UtilitiesDXXL_Measurements.ChooseColorAndStyleForDistanceThresholdsLine(ref usedColor, ref usedLineStyle, distance, smallerThresholdDistance, biggerThresholdDistance, exactlyThresholdLength_countsAsShorter, overwriteStyle_forNear, overwriteStyle_forMiddle, overwriteStyle_forFar, overwriteColor_forNear, overwriteColor_forMiddle, overwriteColor_forFar);
+
+ UtilitiesDXXL_DrawBasics.Set_relSizeOfTextOnLines_reversible(0.65f);
+ UtilitiesDXXL_DrawBasics.Set_shiftTextPosOnLines_toNonIntersecting_reversible(true);
+ Line_fadeableAnimSpeed_2D.InternalDraw(startPos, endPos, usedColor, lineWidth, text, usedLineStyle, custom_zPos, stylePatternScaleFactor, 0.0f, null, endPlates_size, 0.0f, enlargeSmallTextToThisMinTextSize, durationInSec, hiddenByNearerObjects, true, true);
+ UtilitiesDXXL_DrawBasics.Reverse_relSizeOfTextOnLines();
+ UtilitiesDXXL_DrawBasics.Reverse_shiftTextPosOnLines_toNonIntersecting();
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/DrawMeasurements2D.cs.meta b/Runtime/DrawDebugLibrary/DrawMeasurements2D.cs.meta
new file mode 100644
index 0000000..b25d764
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawMeasurements2D.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 23267629324b1f541a71d41e2cef2607
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawPhysics.cs b/Runtime/DrawDebugLibrary/DrawPhysics.cs
new file mode 100644
index 0000000..09bc90a
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawPhysics.cs
@@ -0,0 +1,464 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ public class DrawPhysics
+ {
+ public static Color colorForNonHittingCasts = UtilitiesDXXL_Colors.red_boolFalse;
+ public static Color colorForHittingCasts = UtilitiesDXXL_Colors.green_boolTrue;
+ public static Color colorForCastLineBeyondHit = UtilitiesDXXL_Colors.orange_lineThresholdMiddleDistance;
+ public static Color colorForCastsHitText = UtilitiesDXXL_Colors.purple_raycastHitTextDefault;
+ public static Color overwriteColorForCastsHitNormals = default(Color);
+ public static float scaleFactor_forCastHitTextSize = 1.0f;
+ public static float castSilhouetteVisualizerDensity = 1.0f;
+ public static int maxSilhouettesPerCastVisualization = 100;
+ public static int hitResultsWithMoreDetailedDisplay = 2;
+ public static bool drawCastNameTag_atCastOrigin = true;
+ public static bool drawCastNameTag_atHitPositions = true;
+
+ public enum VisualizationQuality
+ {
+ high_withFullDetails,
+ medium_meaningReducedTextAndSilhouettes,
+ low_withoutAnyTextOrSilhouettes
+ };
+ public static VisualizationQuality visualizationQuality = VisualizationQuality.high_withFullDetails;
+
+ private static int maxListedColliders_inOverlapVolumesTextList = 10;
+ public static int MaxListedColliders_inOverlapVolumesTextList
+ {
+ get { return maxListedColliders_inOverlapVolumesTextList; }
+ set { maxListedColliders_inOverlapVolumesTextList = Mathf.Max(value, 1); }
+ }
+
+ public static int maxOverlapingCollidersWithUntruncatedText = 10;
+ public static float forcedConstantScreenspaceTextSize_relToScreenHeight_forOverlapResultTexts = 0.0f;
+ public static float forcedConstantWorldspaceTextSize_forOverlapResultTexts = 0.0f;
+
+ public static Vector2 directionOfHitResultText = default(Vector2);
+
+ /// 执行盒体投射并绘制首次碰撞结果(无 hitInfo 输出参数版本)
+ public static bool BoxCast(Vector3 center, Vector3 halfExtents, Vector3 direction, Quaternion orientation = default(Quaternion), float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+ bool hasHit = Physics.BoxCast(center, halfExtents, direction, out RaycastHit hitInfo, orientation, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawBoxcastTillFirstHit(hasHit, center, halfExtents, orientation, direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行盒体投射并绘制首次碰撞结果(带 hitInfo 输出参数版本)
+ public static bool BoxCast(Vector3 center, Vector3 halfExtents, Vector3 direction, out RaycastHit hitInfo, Quaternion orientation = default(Quaternion), float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+ bool hasHit = Physics.BoxCast(center, halfExtents, direction, out hitInfo, orientation, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawBoxcastTillFirstHit(hasHit, center, halfExtents, orientation, direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行盒体投射并绘制所有碰撞结果
+ public static RaycastHit[] BoxCastAll(Vector3 center, Vector3 halfExtents, Vector3 direction, Quaternion orientation = default(Quaternion), float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+ RaycastHit[] hitInfos = Physics.BoxCastAll(center, halfExtents, direction, orientation, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hitInfos; }
+ int numberOfUsedSlotsInHitInfoArray = 0;
+ if (hitInfos != null) { numberOfUsedSlotsInHitInfoArray = hitInfos.Length; }
+ UtilitiesDXXL_Physics.DrawBoxcastPotMultipleHits(center, halfExtents, orientation, direction, maxDistance, hitInfos, numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return hitInfos;
+ }
+
+ /// 执行盒体投射并将碰撞结果存入预分配数组,同时绘制所有碰撞结果
+ public static int BoxCastNonAlloc(Vector3 center, Vector3 halfExtents, Vector3 direction, RaycastHit[] results, Quaternion orientation = default(Quaternion), float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+ int numberOfUsedSlotsInHitInfoArray = Physics.BoxCastNonAlloc(center, halfExtents, direction, results, orientation, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoArray; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoArray, results);
+ UtilitiesDXXL_Physics.DrawBoxcastPotMultipleHits(center, halfExtents, orientation, direction, maxDistance, results, resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoArray;
+ }
+
+ /// 执行胶囊体投射并绘制首次碰撞结果(带 hitInfo 输出参数版本)
+ public static bool CapsuleCast(Vector3 point1, Vector3 point2, float radius, Vector3 direction, out RaycastHit hitInfo, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.CapsuleCast(point1, point2, radius, direction, out hitInfo, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawCapsulecastTillFirstHit(radius, hasHit, point1, point2, direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行胶囊体投射并绘制首次碰撞结果(无 hitInfo 输出参数版本)
+ public static bool CapsuleCast(Vector3 point1, Vector3 point2, float radius, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.CapsuleCast(point1, point2, radius, direction, out RaycastHit hitInfo, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawCapsulecastTillFirstHit(radius, hasHit, point1, point2, direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行胶囊体投射并绘制所有碰撞结果
+ public static RaycastHit[] CapsuleCastAll(Vector3 point1, Vector3 point2, float radius, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ RaycastHit[] hitInfos = Physics.CapsuleCastAll(point1, point2, radius, direction, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hitInfos; }
+ int numberOfUsedSlotsInHitInfoArray = 0;
+ if (hitInfos != null) { numberOfUsedSlotsInHitInfoArray = hitInfos.Length; }
+ UtilitiesDXXL_Physics.DrawCapsulecastPotMultipleHits(radius, point1, point2, direction, maxDistance, hitInfos, numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return hitInfos;
+ }
+
+ /// 执行胶囊体投射并将碰撞结果存入预分配数组,同时绘制所有碰撞结果
+ public static int CapsuleCastNonAlloc(Vector3 point1, Vector3 point2, float radius, Vector3 direction, RaycastHit[] results, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ int numberOfUsedSlotsInHitInfoArray = Physics.CapsuleCastNonAlloc(point1, point2, radius, direction, results, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoArray; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoArray, results);
+ UtilitiesDXXL_Physics.DrawCapsulecastPotMultipleHits(radius, point1, point2, direction, maxDistance, results, resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoArray;
+ }
+
+ /// 执行线段投射并绘制首次碰撞结果(带 hitInfo 输出参数版本)
+ public static bool Linecast(Vector3 start, Vector3 end, out RaycastHit hitInfo, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.Linecast(start, end, out hitInfo, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return hasHit; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(end, "end")) { return hasHit; }
+ Vector3 startToEnd = end - start;
+ float length = startToEnd.magnitude;
+ UtilitiesDXXL_Physics.DrawRaycastTillFirstHit(hasHit, start, startToEnd, length, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行线段投射并绘制首次碰撞结果(无 hitInfo 输出参数版本)
+ public static bool Linecast(Vector3 start, Vector3 end, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.Linecast(start, end, out RaycastHit hitInfo, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return hasHit; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(end, "end")) { return hasHit; }
+ Vector3 startToEnd = end - start;
+ float length = startToEnd.magnitude;
+ UtilitiesDXXL_Physics.DrawRaycastTillFirstHit(hasHit, start, startToEnd, length, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行射线投射并绘制首次碰撞结果(Ray + hitInfo 版本)
+ public static bool Raycast(Ray ray, out RaycastHit hitInfo, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.Raycast(ray, out hitInfo, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawRaycastTillFirstHit(hasHit, ray.origin, ray.direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行射线投射并绘制首次碰撞结果(Ray 无 hitInfo 版本)
+ public static bool Raycast(Ray ray, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.Raycast(ray, out RaycastHit hitInfo, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawRaycastTillFirstHit(hasHit, ray.origin, ray.direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行射线投射并绘制首次碰撞结果(Vector3 + hitInfo 版本)
+ public static bool Raycast(Vector3 origin, Vector3 direction, out RaycastHit hitInfo, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.Raycast(origin, direction, out hitInfo, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawRaycastTillFirstHit(hasHit, origin, direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行射线投射并绘制首次碰撞结果(Vector3 无 hitInfo 版本)
+ public static bool Raycast(Vector3 origin, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.Raycast(origin, direction, out RaycastHit hitInfo, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawRaycastTillFirstHit(hasHit, origin, direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行射线投射并绘制所有碰撞结果(Vector3 版本)
+ public static RaycastHit[] RaycastAll(Vector3 origin, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ RaycastHit[] hitInfos = Physics.RaycastAll(origin, direction, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hitInfos; }
+ int numberOfUsedSlotsInHitInfoArray = 0;
+ if (hitInfos != null) { numberOfUsedSlotsInHitInfoArray = hitInfos.Length; }
+ UtilitiesDXXL_Physics.DrawRaycastPotMultipleHits(origin, direction, maxDistance, hitInfos, numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return hitInfos;
+ }
+
+ /// 执行射线投射并绘制所有碰撞结果(Ray 版本)
+ public static RaycastHit[] RaycastAll(Ray ray, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ RaycastHit[] hitInfos = Physics.RaycastAll(ray, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hitInfos; }
+ int numberOfUsedSlotsInHitInfoArray = 0;
+ if (hitInfos != null) { numberOfUsedSlotsInHitInfoArray = hitInfos.Length; }
+ UtilitiesDXXL_Physics.DrawRaycastPotMultipleHits(ray.origin, ray.direction, maxDistance, hitInfos, numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return hitInfos;
+ }
+
+ /// 执行射线投射并将碰撞结果存入预分配数组,同时绘制所有碰撞结果(Ray 版本)
+ public static int RaycastNonAlloc(Ray ray, RaycastHit[] results, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ int numberOfUsedSlotsInHitInfoArray = Physics.RaycastNonAlloc(ray, results, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoArray; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoArray, results);
+ UtilitiesDXXL_Physics.DrawRaycastPotMultipleHits(ray.origin, ray.direction, maxDistance, results, resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoArray;
+ }
+
+ /// 执行射线投射并将碰撞结果存入预分配数组,同时绘制所有碰撞结果(Vector3 版本)
+ public static int RaycastNonAlloc(Vector3 origin, Vector3 direction, RaycastHit[] results, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ int numberOfUsedSlotsInHitInfoArray = Physics.RaycastNonAlloc(origin, direction, results, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoArray; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoArray, results);
+ UtilitiesDXXL_Physics.DrawRaycastPotMultipleHits(origin, direction, maxDistance, results, resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoArray;
+ }
+
+ /// 执行球体投射并绘制首次碰撞结果(Ray 无 hitInfo 版本)
+ public static bool SphereCast(Ray ray, float radius, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.SphereCast(ray, radius, out RaycastHit hitInfo, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawSpherecastTillFirstHit(radius, hasHit, ray.origin, ray.direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行球体投射并绘制首次碰撞结果(Ray + hitInfo 版本)
+ public static bool SphereCast(Ray ray, float radius, out RaycastHit hitInfo, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.SphereCast(ray, radius, out hitInfo, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawSpherecastTillFirstHit(radius, hasHit, ray.origin, ray.direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行球体投射并绘制首次碰撞结果(Vector3 无 hitInfo 版本)
+ public static bool SphereCast(Vector3 origin, float radius, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.SphereCast(origin, radius, direction, out RaycastHit hitInfo, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawSpherecastTillFirstHit(radius, hasHit, origin, direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行球体投射并绘制首次碰撞结果(Vector3 + hitInfo 版本)
+ public static bool SphereCast(Vector3 origin, float radius, Vector3 direction, out RaycastHit hitInfo, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ bool hasHit = Physics.SphereCast(origin, radius, direction, out hitInfo, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hasHit; }
+ UtilitiesDXXL_Physics.DrawSpherecastTillFirstHit(radius, hasHit, origin, direction, maxDistance, hitInfo, nameTag, durationInSec, hiddenByNearerObjects);
+ return hasHit;
+ }
+
+ /// 执行球体投射并绘制所有碰撞结果(Ray 版本)
+ public static RaycastHit[] SphereCastAll(Ray ray, float radius, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ RaycastHit[] hitInfos = Physics.SphereCastAll(ray, radius, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hitInfos; }
+ int numberOfUsedSlotsInHitInfoArray = 0;
+ if (hitInfos != null) { numberOfUsedSlotsInHitInfoArray = hitInfos.Length; }
+ UtilitiesDXXL_Physics.DrawSpherecastPotMultipleHits(radius, ray.origin, ray.direction, maxDistance, hitInfos, numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return hitInfos;
+ }
+
+ /// 执行球体投射并绘制所有碰撞结果(Vector3 版本)
+ public static RaycastHit[] SphereCastAll(Vector3 origin, float radius, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ RaycastHit[] hitInfos = Physics.SphereCastAll(origin, radius, direction, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return hitInfos; }
+ int numberOfUsedSlotsInHitInfoArray = 0;
+ if (hitInfos != null) { numberOfUsedSlotsInHitInfoArray = hitInfos.Length; }
+ UtilitiesDXXL_Physics.DrawSpherecastPotMultipleHits(radius, origin, direction, maxDistance, hitInfos, numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return hitInfos;
+ }
+
+ /// 执行球体投射并将碰撞结果存入预分配数组,同时绘制所有碰撞结果(Ray 版本)
+ public static int SphereCastNonAlloc(Ray ray, float radius, RaycastHit[] results, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ int numberOfUsedSlotsInHitInfoArray = Physics.SphereCastNonAlloc(ray, radius, results, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoArray; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoArray, results);
+ UtilitiesDXXL_Physics.DrawSpherecastPotMultipleHits(radius, ray.origin, ray.direction, maxDistance, results, resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoArray;
+ }
+
+ /// 执行球体投射并将碰撞结果存入预分配数组,同时绘制所有碰撞结果(Vector3 版本)
+ public static int SphereCastNonAlloc(Vector3 origin, float radius, Vector3 direction, RaycastHit[] results, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ int numberOfUsedSlotsInHitInfoArray = Physics.SphereCastNonAlloc(origin, radius, direction, results, maxDistance, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoArray; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoArray, results);
+ UtilitiesDXXL_Physics.DrawSpherecastPotMultipleHits(radius, origin, direction, maxDistance, results, resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoArray, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoArray;
+ }
+
+ /// 检测盒体是否与任何碰撞体重叠并绘制检测结果
+ public static bool CheckBox(Vector3 center, Vector3 halfExtents, Quaternion orientation = default(Quaternion), int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+ bool doesOverlap = Physics.CheckBox(center, halfExtents, orientation, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return doesOverlap; }
+ UtilitiesDXXL_Physics.DrawCheckedBox(doesOverlap, center, halfExtents, orientation, nameTag, durationInSec, hiddenByNearerObjects);
+ return doesOverlap;
+ }
+
+ /// 检测胶囊体是否与任何碰撞体重叠并绘制检测结果
+ public static bool CheckCapsule(Vector3 start, Vector3 end, float radius, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ bool doesOverlap = Physics.CheckCapsule(start, end, radius, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return doesOverlap; }
+ UtilitiesDXXL_Physics.DrawCheckedCapsule(doesOverlap, start, end, radius, nameTag, durationInSec, hiddenByNearerObjects);
+ return doesOverlap;
+ }
+
+ /// 检测球体是否与任何碰撞体重叠并绘制检测结果
+ public static bool CheckSphere(Vector3 position, float radius, int layerMask = Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ bool doesOverlap = Physics.CheckSphere(position, radius, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return doesOverlap; }
+ UtilitiesDXXL_Physics.DrawCheckedSphere(doesOverlap, position, radius, nameTag, durationInSec, hiddenByNearerObjects);
+ return doesOverlap;
+ }
+
+ /// 获取与盒体重叠的所有碰撞器并绘制重叠结果
+ public static Collider[] OverlapBox(Vector3 center, Vector3 halfExtents, Quaternion orientation = default(Quaternion), int layerMask = Physics.AllLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+ Collider[] overlappingColliders = Physics.OverlapBox(center, halfExtents, orientation, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingColliders; }
+
+ bool doesOverlap = false;
+ int numberOfOverlappingColliders = 0;
+ if (overlappingColliders != null && overlappingColliders.Length > 0)
+ {
+ doesOverlap = true;
+ numberOfOverlappingColliders = overlappingColliders.Length;
+ }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(center, "center")) { return overlappingColliders; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(halfExtents, "halfExtents")) { return overlappingColliders; }
+
+ float approxSize_ofOverlapVolume =UtilitiesDXXL_Math.GetAverageBoxExtent(2.0f* halfExtents);
+ UtilitiesDXXL_Physics.DrawMarkersAtOverlappingColliders(center, doesOverlap, overlappingColliders, numberOfOverlappingColliders, approxSize_ofOverlapVolume, durationInSec, hiddenByNearerObjects);
+ UtilitiesDXXL_Physics.DrawOverlapResultBox(doesOverlap, numberOfOverlappingColliders, overlappingColliders, center, halfExtents, orientation, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingColliders;
+ }
+
+ /// 获取与盒体重叠的碰撞器并存入预分配数组,同时绘制重叠结果
+ public static int OverlapBoxNonAlloc(Vector3 center, Vector3 halfExtents, Collider[] results, Quaternion orientation = default(Quaternion), int layerMask = Physics.AllLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ orientation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(orientation);
+ int numberOfOverlappingColliders = Physics.OverlapBoxNonAlloc(center, halfExtents, results, orientation, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(center, "center")) { return numberOfOverlappingColliders; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(halfExtents, "halfExtents")) { return numberOfOverlappingColliders; }
+
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ bool doesOverlap = (used_numberOfOverlappingColliders > 0);
+ float approxSize_ofOverlapVolume = UtilitiesDXXL_Math.GetAverageBoxExtent(2.0f * halfExtents);
+ UtilitiesDXXL_Physics.DrawMarkersAtOverlappingColliders(center, doesOverlap, results, used_numberOfOverlappingColliders, approxSize_ofOverlapVolume, durationInSec, hiddenByNearerObjects); ;
+ UtilitiesDXXL_Physics.DrawOverlapResultBox(doesOverlap, used_numberOfOverlappingColliders, results, center, halfExtents, orientation, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 获取与胶囊体重叠的所有碰撞器并绘制重叠结果
+ public static Collider[] OverlapCapsule(Vector3 point0, Vector3 point1, float radius, int layerMask = Physics.AllLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider[] overlappingColliders = Physics.OverlapCapsule(point0, point1, radius, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingColliders; }
+
+ bool doesOverlap = false;
+ int numberOfOverlappingColliders = 0;
+ if (overlappingColliders != null && overlappingColliders.Length > 0)
+ {
+ doesOverlap = true;
+ numberOfOverlappingColliders = overlappingColliders.Length;
+ }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return overlappingColliders; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(point0, "point0")) { return overlappingColliders; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(point1, "point1")) { return overlappingColliders; }
+
+ Vector3 capsuleCenter = 0.5f * (point0 + point1);
+ float approxSize_ofOverlapVolume = 3.0f * radius;
+ UtilitiesDXXL_Physics.DrawMarkersAtOverlappingColliders(capsuleCenter, doesOverlap, overlappingColliders, numberOfOverlappingColliders, approxSize_ofOverlapVolume, durationInSec, hiddenByNearerObjects); ;
+ UtilitiesDXXL_Physics.DrawOverlapResultCapsule(doesOverlap, numberOfOverlappingColliders, overlappingColliders, point0, point1, radius, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingColliders;
+ }
+
+ /// 获取与胶囊体重叠的碰撞器并存入预分配数组,同时绘制重叠结果
+ public static int OverlapCapsuleNonAlloc(Vector3 point0, Vector3 point1, float radius, Collider[] results, int layerMask = Physics.AllLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics.OverlapCapsuleNonAlloc(point0, point1, radius, results, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return numberOfOverlappingColliders; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(point0, "point0")) { return numberOfOverlappingColliders; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(point1, "point1")) { return numberOfOverlappingColliders; }
+
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ bool doesOverlap = (used_numberOfOverlappingColliders > 0);
+ Vector3 capsuleCenter = 0.5f * (point0 + point1);
+ float approxSize_ofOverlapVolume = 3.0f * radius;
+ UtilitiesDXXL_Physics.DrawMarkersAtOverlappingColliders(capsuleCenter, doesOverlap, results, used_numberOfOverlappingColliders, approxSize_ofOverlapVolume, durationInSec, hiddenByNearerObjects); ;
+ UtilitiesDXXL_Physics.DrawOverlapResultCapsule(doesOverlap, used_numberOfOverlappingColliders, results, point0, point1, radius, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 获取与球体重叠的所有碰撞器并绘制重叠结果
+ public static Collider[] OverlapSphere(Vector3 position, float radius, int layerMask = Physics.AllLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider[] overlappingColliders = Physics.OverlapSphere(position, radius, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingColliders; }
+
+ bool doesOverlap = false;
+ int numberOfOverlappingColliders = 0;
+ if (overlappingColliders != null && overlappingColliders.Length > 0)
+ {
+ doesOverlap = true;
+ numberOfOverlappingColliders = overlappingColliders.Length;
+ }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return overlappingColliders; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(position, "position")) { return overlappingColliders; }
+
+ float approxSize_ofOverlapVolume = 2.0f * radius;
+ UtilitiesDXXL_Physics.DrawMarkersAtOverlappingColliders(position, doesOverlap, overlappingColliders, numberOfOverlappingColliders, approxSize_ofOverlapVolume, durationInSec, hiddenByNearerObjects); ;
+ UtilitiesDXXL_Physics.DrawOverlapResultSphere(doesOverlap, numberOfOverlappingColliders, overlappingColliders, position, radius, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingColliders;
+ }
+
+ /// 获取与球体重叠的碰撞器并存入预分配数组,同时绘制重叠结果
+ public static int OverlapSphereNonAlloc(Vector3 position, float radius, Collider[] results, int layerMask = Physics.AllLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics.OverlapSphereNonAlloc(position, radius, results, layerMask, queryTriggerInteraction);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return numberOfOverlappingColliders; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(position, "position")) { return numberOfOverlappingColliders; }
+
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ bool doesOverlap = (used_numberOfOverlappingColliders > 0);
+ float approxSize_ofOverlapVolume = 2.0f * radius;
+ UtilitiesDXXL_Physics.DrawMarkersAtOverlappingColliders(position, doesOverlap, results, used_numberOfOverlappingColliders, approxSize_ofOverlapVolume, durationInSec, hiddenByNearerObjects); ;
+ UtilitiesDXXL_Physics.DrawOverlapResultSphere(doesOverlap, used_numberOfOverlappingColliders, results, position, radius, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/DrawPhysics.cs.meta b/Runtime/DrawDebugLibrary/DrawPhysics.cs.meta
new file mode 100644
index 0000000..2ea2f61
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawPhysics.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8948cc163159cee4eada74209f65b5ea
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawPhysics2D.cs b/Runtime/DrawDebugLibrary/DrawPhysics2D.cs
new file mode 100644
index 0000000..f66a1a3
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawPhysics2D.cs
@@ -0,0 +1,682 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System.Collections.Generic;
+
+ public class DrawPhysics2D
+ {
+ public static Color colorForNonHittingCasts = UtilitiesDXXL_Colors.red_boolFalse;
+ public static Color colorForHittingCasts = UtilitiesDXXL_Colors.green_boolTrue;
+ public static Color colorForCastLineBeyondHit = UtilitiesDXXL_Colors.orange_lineThresholdMiddleDistance;
+ public static Color colorForCastsHitText = UtilitiesDXXL_Colors.purple_raycastHitTextDefault;
+ public static Color overwriteColorForCastsHitNormals = default(Color);
+ public static float scaleFactor_forCastHitTextSize = 1.0f;
+ public static float castCorridorVisualizerDensity = 1.0f;
+ public static int maxCorridorVisualizersPerCastVisualization = 600;
+ public static int hitResultsWithMoreDetailedDisplay = 2;
+ public static bool drawCastNameTag_atCastOrigin = true;
+ public static bool drawCastNameTag_atHitPositions = true;
+ public static DrawPhysics.VisualizationQuality visualizationQuality = DrawPhysics.VisualizationQuality.high_withFullDetails;
+
+ private static int maxListedColliders_inOverlapVolumesTextList = 10;
+ public static int MaxListedColliders_inOverlapVolumesTextList
+ {
+ get { return maxListedColliders_inOverlapVolumesTextList; }
+ set { maxListedColliders_inOverlapVolumesTextList = Mathf.Max(value, 1); }
+ }
+
+ public static int maxOverlapingCollidersWithUntruncatedText = 10;
+
+ private static int maxNumberOfPreallocatedHits = 100;
+ public static int MaxNumberOfPreallocatedHits
+ {
+ get { return maxNumberOfPreallocatedHits; }
+ set
+ {
+ maxNumberOfPreallocatedHits = value;
+ if (maxNumberOfPreallocatedHits < 1)
+ {
+ Debug.LogWarning("Minimum value for 'maxNumberOfPreallocatedHits' is 1. Delivered value of " + maxNumberOfPreallocatedHits + " has been rounded up to 1.");
+ maxNumberOfPreallocatedHits = 1;
+ }
+ if (maxNumberOfPreallocatedHits > 100000000)
+ {
+ Debug.LogWarning("Maximum value for 'maxNumberOfPreallocatedHits' is 100000000. Delivered value of " + maxNumberOfPreallocatedHits + " has been rounded down to 100000000.");
+ maxNumberOfPreallocatedHits = 100000000;
+ }
+ UtilitiesDXXL_Physics2D.preallocatedRayHit2DResultsArray_copiedFromList = new RaycastHit2D[maxNumberOfPreallocatedHits];
+ UtilitiesDXXL_Physics2D.preallocatedCollider2DResultsArray_copiedFromList = new Collider2D[maxNumberOfPreallocatedHits];
+ }
+ }
+
+ public static float custom_zPos_forCastVisualisation = float.PositiveInfinity;
+ public static float forcedConstantScreenspaceTextSize_relToScreenHeight_forOverlapResultTexts = 0.0f;
+ public static float forcedConstantWorldspaceTextSize_forOverlapResultTexts = 0.0f;
+
+ public static Vector2 directionOfHitResultText = default(Vector2);
+
+ /// 绘制 BoxCast 调试可视化,返回第一个命中结果
+ public static RaycastHit2D BoxCast(Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance = Mathf.Infinity, int layerMask = Physics2D.AllLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D result = Physics2D.BoxCast(origin, size, angle, direction, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return result; }
+ bool hasHit = (result.collider != null);
+ UtilitiesDXXL_Physics2D.DrawBoxcastTillFirstHit(hasHit, origin, size, angle, direction, distance, result, nameTag, durationInSec, hiddenByNearerObjects);
+ return result;
+ }
+
+ /// 绘制 BoxCast 调试可视化,返回命中数量(数组重载)
+ public static int BoxCast(Vector2 origin, Vector2 size, float angle, Vector2 direction, ContactFilter2D contactFilter, RaycastHit2D[] results, float distance = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.BoxCast(origin, size, angle, direction, contactFilter, results, distance);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int used_numberOfUsedSlotsInHitInfoCollection = resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoCollection;
+ UtilitiesDXXL_Physics2D.DrawBoxcastPotMultipleHits(origin, size, angle, direction, distance, results, used_numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 BoxCast 调试可视化,返回命中数量(List 重载)
+ public static int BoxCast(Vector2 origin, Vector2 size, float angle, Vector2 direction, ContactFilter2D contactFilter, List results, float distance = float.PositiveInfinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.BoxCast(origin, size, angle, direction, contactFilter, results, distance);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultList(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int numberOfCopiedSlots = UtilitiesDXXL_Physics2D.CopyHitResultsFromListToPreallocatedArray(out bool preallocatedArrayIsTooSmall, results, numberOfUsedSlotsInHitInfoCollection);
+ UtilitiesDXXL_Physics2D.ExtentNameTagForPreallocatedArrayIsTooSmallForFilledInListResults(preallocatedArrayIsTooSmall, ref nameTag, numberOfUsedSlotsInHitInfoCollection);
+ UtilitiesDXXL_Physics2D.DrawBoxcastPotMultipleHits(origin, size, angle, direction, distance, UtilitiesDXXL_Physics2D.preallocatedRayHit2DResultsArray_copiedFromList, numberOfCopiedSlots, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 BoxCastAll 调试可视化,返回所有命中结果
+ public static RaycastHit2D[] BoxCastAll(Vector2 origin, Vector2 size, float angle, Vector2 direction, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D[] results = Physics2D.BoxCastAll(origin, size, angle, direction, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return results; }
+ int numberOfUsedSlotsInHitInfoCollection = (results == null) ? 0 : results.Length;
+ UtilitiesDXXL_Physics2D.DrawBoxcastPotMultipleHits(origin, size, angle, direction, distance, results, numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return results;
+ }
+
+ /// 绘制 BoxCastNonAlloc 调试可视化,将结果存入预分配数组
+ public static int BoxCastNonAlloc(Vector2 origin, Vector2 size, float angle, Vector2 direction, RaycastHit2D[] results, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.BoxCastNonAlloc(origin, size, angle, direction, results, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int used_numberOfUsedSlotsInHitInfoCollection = resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoCollection;
+ UtilitiesDXXL_Physics2D.DrawBoxcastPotMultipleHits(origin, size, angle, direction, distance, results, used_numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 CapsuleCast 调试可视化,返回第一个命中结果
+ public static RaycastHit2D CapsuleCast(Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D result = Physics2D.CapsuleCast(origin, size, capsuleDirection, angle, direction, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return result; }
+ bool hasHit = (result.collider != null);
+ UtilitiesDXXL_Physics2D.DrawCapsulecastTillFirstHit(hasHit, origin, size, direction, capsuleDirection, angle, distance, result, nameTag, durationInSec, hiddenByNearerObjects);
+ return result;
+ }
+
+ /// 绘制 CapsuleCast 调试可视化,返回命中数量(数组重载)
+ public static int CapsuleCast(Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, ContactFilter2D contactFilter, RaycastHit2D[] results, float distance = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.CapsuleCast(origin, size, capsuleDirection, angle, direction, contactFilter, results, distance);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int used_numberOfUsedSlotsInHitInfoCollection = resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoCollection;
+ UtilitiesDXXL_Physics2D.DrawCapsulecastPotMultipleHits(origin, size, direction, capsuleDirection, angle, distance, results, used_numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 CapsuleCast 调试可视化,返回命中数量(List 重载)
+ public static int CapsuleCast(Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, ContactFilter2D contactFilter, List results, float distance = float.PositiveInfinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.CapsuleCast(origin, size, capsuleDirection, angle, direction, contactFilter, results, distance);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultList(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int numberOfCopiedSlots = UtilitiesDXXL_Physics2D.CopyHitResultsFromListToPreallocatedArray(out bool preallocatedArrayIsTooSmall, results, numberOfUsedSlotsInHitInfoCollection);
+ UtilitiesDXXL_Physics2D.ExtentNameTagForPreallocatedArrayIsTooSmallForFilledInListResults(preallocatedArrayIsTooSmall, ref nameTag, numberOfUsedSlotsInHitInfoCollection);
+ UtilitiesDXXL_Physics2D.DrawCapsulecastPotMultipleHits(origin, size, direction, capsuleDirection, angle, distance, UtilitiesDXXL_Physics2D.preallocatedRayHit2DResultsArray_copiedFromList, numberOfCopiedSlots, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 CapsuleCastAll 调试可视化,返回所有命中结果
+ public static RaycastHit2D[] CapsuleCastAll(Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D[] results = Physics2D.CapsuleCastAll(origin, size, capsuleDirection, angle, direction, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return results; }
+ int numberOfUsedSlotsInHitInfoCollection = (results == null) ? 0 : results.Length;
+ UtilitiesDXXL_Physics2D.DrawCapsulecastPotMultipleHits(origin, size, direction, capsuleDirection, angle, distance, results, numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return results;
+ }
+
+ /// 绘制 CapsuleCastNonAlloc 调试可视化,将结果存入预分配数组
+ public static int CapsuleCastNonAlloc(Vector2 origin, Vector2 size, CapsuleDirection2D capsuleDirection, float angle, Vector2 direction, RaycastHit2D[] results, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.CapsuleCastNonAlloc(origin, size, capsuleDirection, angle, direction, results, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int used_numberOfUsedSlotsInHitInfoCollection = resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoCollection;
+ UtilitiesDXXL_Physics2D.DrawCapsulecastPotMultipleHits(origin, size, direction, capsuleDirection, angle, distance, results, used_numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 CircleCast 调试可视化,返回第一个命中结果
+ public static RaycastHit2D CircleCast(Vector2 origin, float radius, Vector2 direction, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D result = Physics2D.CircleCast(origin, radius, direction, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return result; }
+ bool hasHit = (result.collider != null);
+ UtilitiesDXXL_Physics2D.DrawCirclecastTillFirstHit(radius, hasHit, origin, direction, distance, result, nameTag, durationInSec, hiddenByNearerObjects);
+ return result;
+ }
+
+ /// 绘制 CircleCast 调试可视化,返回命中数量(数组重载)
+ public static int CircleCast(Vector2 origin, float radius, Vector2 direction, ContactFilter2D contactFilter, RaycastHit2D[] results, float distance = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.CircleCast(origin, radius, direction, contactFilter, results, distance);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int used_numberOfUsedSlotsInHitInfoCollection = resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoCollection;
+ UtilitiesDXXL_Physics2D.DrawCirclecastPotMultipleHits(radius, origin, direction, distance, results, used_numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 CircleCast 调试可视化,返回命中数量(List 重载)
+ public static int CircleCast(Vector2 origin, float radius, Vector2 direction, ContactFilter2D contactFilter, List results, float distance = float.PositiveInfinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.CircleCast(origin, radius, direction, contactFilter, results, distance);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultList(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int numberOfCopiedSlots = UtilitiesDXXL_Physics2D.CopyHitResultsFromListToPreallocatedArray(out bool preallocatedArrayIsTooSmall, results, numberOfUsedSlotsInHitInfoCollection);
+ UtilitiesDXXL_Physics2D.ExtentNameTagForPreallocatedArrayIsTooSmallForFilledInListResults(preallocatedArrayIsTooSmall, ref nameTag, numberOfUsedSlotsInHitInfoCollection);
+ UtilitiesDXXL_Physics2D.DrawCirclecastPotMultipleHits(radius, origin, direction, distance, UtilitiesDXXL_Physics2D.preallocatedRayHit2DResultsArray_copiedFromList, numberOfCopiedSlots, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 CircleCastAll 调试可视化,返回所有命中结果
+ public static RaycastHit2D[] CircleCastAll(Vector2 origin, float radius, Vector2 direction, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D[] results = Physics2D.CircleCastAll(origin, radius, direction, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return results; }
+ int numberOfUsedSlotsInHitInfoCollection = (results == null) ? 0 : results.Length;
+ UtilitiesDXXL_Physics2D.DrawCirclecastPotMultipleHits(radius, origin, direction, distance, results, numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return results;
+ }
+
+ /// 绘制 CircleCastNonAlloc 调试可视化,将结果存入预分配数组
+ public static int CircleCastNonAlloc(Vector2 origin, float radius, Vector2 direction, RaycastHit2D[] results, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.CircleCastNonAlloc(origin, radius, direction, results, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int used_numberOfUsedSlotsInHitInfoCollection = resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoCollection;
+ UtilitiesDXXL_Physics2D.DrawCirclecastPotMultipleHits(radius, origin, direction, distance, results, used_numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 3D 射线与 2D 碰撞体相交检测的调试可视化,返回第一个交点结果
+ public static RaycastHit2D GetRayIntersection(Ray ray, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D result = Physics2D.GetRayIntersection(ray, distance, layerMask);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return result; }
+ bool hasHit = (result.collider != null);
+ UtilitiesDXXL_Physics2D.DrawRaycast3DTillFirstHit(hasHit, ray, distance, result, nameTag, durationInSec, hiddenByNearerObjects);
+ return result;
+
+ }
+
+ /// 绘制 GetRayIntersectionAll 调试可视化,返回所有交点结果
+ public static RaycastHit2D[] GetRayIntersectionAll(Ray ray, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D[] results = Physics2D.GetRayIntersectionAll(ray, distance, layerMask);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return results; }
+ int numberOfUsedSlotsInHitInfoCollection = (results == null) ? 0 : results.Length;
+ UtilitiesDXXL_Physics2D.DrawRaycast3DPotMultipleHits(ray, distance, results, numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return results;
+ }
+
+ /// 绘制 GetRayIntersectionNonAlloc 调试可视化,将交点结果存入预分配数组
+ public static int GetRayIntersectionNonAlloc(Ray ray, RaycastHit2D[] results, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.GetRayIntersectionNonAlloc(ray, results, distance, layerMask);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int used_numberOfUsedSlotsInHitInfoCollection = resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoCollection;
+ UtilitiesDXXL_Physics2D.DrawRaycast3DPotMultipleHits(ray, distance, results, used_numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 Linecast 调试可视化,返回第一个命中结果
+ public static RaycastHit2D Linecast(Vector2 start, Vector2 end, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D result = Physics2D.Linecast(start, end, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return result; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return result; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(end, "end")) { return result; }
+
+ bool hasHit = (result.collider != null);
+ Vector2 startToEnd = end - start;
+ float length = startToEnd.magnitude;
+ UtilitiesDXXL_Physics2D.DrawRaycastTillFirstHit(hasHit, start, startToEnd, length, result, nameTag, durationInSec, hiddenByNearerObjects);
+ return result;
+ }
+
+ /// 绘制 Linecast 调试可视化,返回命中数量(数组重载)
+ public static int Linecast(Vector2 start, Vector2 end, ContactFilter2D contactFilter, RaycastHit2D[] results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.Linecast(start, end, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return numberOfUsedSlotsInHitInfoCollection; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(end, "end")) { return numberOfUsedSlotsInHitInfoCollection; }
+
+ Vector2 startToEnd = end - start;
+ float length = startToEnd.magnitude;
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int used_numberOfUsedSlotsInHitInfoCollection = resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoCollection;
+ UtilitiesDXXL_Physics2D.DrawRaycastPotMultipleHits(start, startToEnd, length, results, used_numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 Linecast 调试可视化,返回命中数量(List 重载)
+ public static int Linecast(Vector2 start, Vector2 end, ContactFilter2D contactFilter, List results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.Linecast(start, end, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return numberOfUsedSlotsInHitInfoCollection; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(end, "end")) { return numberOfUsedSlotsInHitInfoCollection; }
+
+ Vector2 startToEnd = end - start;
+ float length = startToEnd.magnitude;
+ UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultList(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int numberOfCopiedSlots = UtilitiesDXXL_Physics2D.CopyHitResultsFromListToPreallocatedArray(out bool preallocatedArrayIsTooSmall, results, numberOfUsedSlotsInHitInfoCollection);
+ UtilitiesDXXL_Physics2D.ExtentNameTagForPreallocatedArrayIsTooSmallForFilledInListResults(preallocatedArrayIsTooSmall, ref nameTag, numberOfUsedSlotsInHitInfoCollection);
+ UtilitiesDXXL_Physics2D.DrawRaycastPotMultipleHits(start, startToEnd, length, UtilitiesDXXL_Physics2D.preallocatedRayHit2DResultsArray_copiedFromList, numberOfCopiedSlots, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 LinecastAll 调试可视化,返回所有命中结果
+ public static RaycastHit2D[] LinecastAll(Vector2 start, Vector2 end, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D[] results = Physics2D.LinecastAll(start, end, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return results; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return results; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(end, "end")) { return results; }
+
+ int numberOfUsedSlotsInHitInfoCollection = (results == null) ? 0 : results.Length;
+ Vector2 startToEnd = end - start;
+ float length = startToEnd.magnitude;
+ UtilitiesDXXL_Physics2D.DrawRaycastPotMultipleHits(start, startToEnd, length, results, numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return results;
+ }
+
+ /// 绘制 LinecastNonAlloc 调试可视化,将命中结果存入预分配数组
+ public static int LinecastNonAlloc(Vector2 start, Vector2 end, RaycastHit2D[] results, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.LinecastNonAlloc(start, end, results, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return numberOfUsedSlotsInHitInfoCollection; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(end, "end")) { return numberOfUsedSlotsInHitInfoCollection; }
+
+ Vector2 startToEnd = end - start;
+ float length = startToEnd.magnitude;
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int used_numberOfUsedSlotsInHitInfoCollection = resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoCollection;
+ UtilitiesDXXL_Physics2D.DrawRaycastPotMultipleHits(start, startToEnd, length, results, used_numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 Raycast 调试可视化,返回第一个命中结果
+ public static RaycastHit2D Raycast(Vector2 origin, Vector2 direction, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D result = Physics2D.Raycast(origin, direction, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return result; }
+ bool hasHit = (result.collider != null);
+ UtilitiesDXXL_Physics2D.DrawRaycastTillFirstHit(hasHit, origin, direction, distance, result, nameTag, durationInSec, hiddenByNearerObjects);
+ return result;
+ }
+
+ /// 绘制 Raycast 调试可视化,返回命中数量(数组重载)
+ public static int Raycast(Vector2 origin, Vector2 direction, ContactFilter2D contactFilter, RaycastHit2D[] results, float distance = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.Raycast(origin, direction, contactFilter, results, distance);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int used_numberOfUsedSlotsInHitInfoCollection = resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoCollection;
+ UtilitiesDXXL_Physics2D.DrawRaycastPotMultipleHits(origin, direction, distance, results, used_numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 Raycast 调试可视化,返回命中数量(List 重载)
+ public static int Raycast(Vector2 origin, Vector2 direction, ContactFilter2D contactFilter, List results, float distance = float.PositiveInfinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.Raycast(origin, direction, contactFilter, results, distance);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultList(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int numberOfCopiedSlots = UtilitiesDXXL_Physics2D.CopyHitResultsFromListToPreallocatedArray(out bool preallocatedArrayIsTooSmall, results, numberOfUsedSlotsInHitInfoCollection);
+ UtilitiesDXXL_Physics2D.ExtentNameTagForPreallocatedArrayIsTooSmallForFilledInListResults(preallocatedArrayIsTooSmall, ref nameTag, numberOfUsedSlotsInHitInfoCollection);
+ UtilitiesDXXL_Physics2D.DrawRaycastPotMultipleHits(origin, direction, distance, UtilitiesDXXL_Physics2D.preallocatedRayHit2DResultsArray_copiedFromList, numberOfCopiedSlots, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 RaycastAll 调试可视化,返回所有命中结果
+ public static RaycastHit2D[] RaycastAll(Vector2 origin, Vector2 direction, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ RaycastHit2D[] results = Physics2D.RaycastAll(origin, direction, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return results; }
+ int numberOfUsedSlotsInHitInfoCollection = (results == null) ? 0 : results.Length;
+ UtilitiesDXXL_Physics2D.DrawRaycastPotMultipleHits(origin, direction, distance, results, numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return results;
+ }
+
+ /// 绘制 RaycastNonAlloc 调试可视化,将结果存入预分配数组
+ public static int RaycastNonAlloc(Vector2 origin, Vector2 direction, RaycastHit2D[] results, float distance = Mathf.Infinity, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfUsedSlotsInHitInfoCollection = Physics2D.RaycastNonAlloc(origin, direction, results, distance, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfUsedSlotsInHitInfoCollection; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfUsedSlotsInHitInfoCollection, results);
+ int used_numberOfUsedSlotsInHitInfoCollection = resultsArrayIsNull ? 0 : numberOfUsedSlotsInHitInfoCollection;
+ UtilitiesDXXL_Physics2D.DrawRaycastPotMultipleHits(origin, direction, distance, results, used_numberOfUsedSlotsInHitInfoCollection, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfUsedSlotsInHitInfoCollection;
+ }
+
+ /// 绘制 OverlapArea 调试可视化,返回第一个重叠碰撞体
+ public static Collider2D OverlapArea(Vector2 pointA, Vector2 pointB, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider2D overlappingCollider = Physics2D.OverlapArea(pointA, pointB, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingCollider; }
+ UtilitiesDXXL_Physics2D.Area2D_to_Box2D(out Vector2 boxCenterPos_V2, out Vector2 boxSize_V2, pointA, pointB);
+ UtilitiesDXXL_Physics2D.DrawBoxOverlapResultOfMax1Collision(true, boxCenterPos_V2, boxSize_V2, 0.0f, overlappingCollider, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingCollider;
+ }
+
+ /// 绘制 OverlapArea 调试可视化,返回重叠碰撞体数量(数组重载)
+ public static int OverlapArea(Vector2 pointA, Vector2 pointB, ContactFilter2D contactFilter, Collider2D[] results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapArea(pointA, pointB, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ UtilitiesDXXL_Physics2D.Area2D_to_Box2D(out Vector2 boxCenterPos_V2, out Vector2 boxSize_V2, pointA, pointB);
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ UtilitiesDXXL_Physics2D.DrawBoxOverlapResultOfPotMultipleCollisions(true, boxCenterPos_V2, boxSize_V2, 0.0f, used_numberOfOverlappingColliders, results, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapArea 调试可视化,返回重叠碰撞体数量(List 重载)
+ public static int OverlapArea(Vector2 pointA, Vector2 pointB, ContactFilter2D contactFilter, List results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapArea(pointA, pointB, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ UtilitiesDXXL_Physics2D.Area2D_to_Box2D(out Vector2 boxCenterPos_V2, out Vector2 boxSize_V2, pointA, pointB);
+ UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultList(ref nameTag, numberOfOverlappingColliders, results);
+ int numberOfCopiedSlots = UtilitiesDXXL_Physics2D.CopyHitResultsFromListToPreallocatedArray(out bool preallocatedArrayIsTooSmall, results, numberOfOverlappingColliders);
+ UtilitiesDXXL_Physics2D.ExtentNameTagForPreallocatedArrayIsTooSmallForFilledInListResults(preallocatedArrayIsTooSmall, ref nameTag, numberOfOverlappingColliders);
+ UtilitiesDXXL_Physics2D.DrawBoxOverlapResultOfPotMultipleCollisions(true, boxCenterPos_V2, boxSize_V2, 0.0f, numberOfCopiedSlots, UtilitiesDXXL_Physics2D.preallocatedCollider2DResultsArray_copiedFromList, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapAreaAll 调试可视化,返回所有重叠碰撞体
+ public static Collider2D[] OverlapAreaAll(Vector2 pointA, Vector2 pointB, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider2D[] overlappingColliders = Physics2D.OverlapAreaAll(pointA, pointB, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingColliders; }
+ UtilitiesDXXL_Physics2D.Area2D_to_Box2D(out Vector2 boxCenterPos_V2, out Vector2 boxSize_V2, pointA, pointB);
+ int numberOfOverlappingColliders = 0;
+ if (overlappingColliders != null && overlappingColliders.Length > 0)
+ {
+ numberOfOverlappingColliders = overlappingColliders.Length;
+ }
+ UtilitiesDXXL_Physics2D.DrawBoxOverlapResultOfPotMultipleCollisions(true, boxCenterPos_V2, boxSize_V2, 0.0f, numberOfOverlappingColliders, overlappingColliders, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingColliders;
+ }
+
+ /// 绘制 OverlapAreaNonAlloc 调试可视化,将重叠碰撞体结果存入预分配数组
+ public static int OverlapAreaNonAlloc(Vector2 pointA, Vector2 pointB, Collider2D[] results, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapAreaNonAlloc(pointA, pointB, results, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ UtilitiesDXXL_Physics2D.Area2D_to_Box2D(out Vector2 boxCenterPos_V2, out Vector2 boxSize_V2, pointA, pointB);
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ UtilitiesDXXL_Physics2D.DrawBoxOverlapResultOfPotMultipleCollisions(true, boxCenterPos_V2, boxSize_V2, 0.0f, used_numberOfOverlappingColliders, results, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapBox 调试可视化,返回第一个重叠碰撞体
+ public static Collider2D OverlapBox(Vector2 point, Vector2 size, float angle, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider2D overlappingCollider = Physics2D.OverlapBox(point, size, angle, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingCollider; }
+ UtilitiesDXXL_Physics2D.DrawBoxOverlapResultOfMax1Collision(false, point, size, angle, overlappingCollider, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingCollider;
+ }
+
+ /// 绘制 OverlapBox 调试可视化,返回重叠碰撞体数量(数组重载)
+ public static int OverlapBox(Vector2 point, Vector2 size, float angle, ContactFilter2D contactFilter, Collider2D[] results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapBox(point, size, angle, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ UtilitiesDXXL_Physics2D.DrawBoxOverlapResultOfPotMultipleCollisions(false, point, size, angle, used_numberOfOverlappingColliders, results, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapBox 调试可视化,返回重叠碰撞体数量(List 重载)
+ public static int OverlapBox(Vector2 point, Vector2 size, float angle, ContactFilter2D contactFilter, List results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapBox(point, size, angle, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultList(ref nameTag, numberOfOverlappingColliders, results);
+ int numberOfCopiedSlots = UtilitiesDXXL_Physics2D.CopyHitResultsFromListToPreallocatedArray(out bool preallocatedArrayIsTooSmall, results, numberOfOverlappingColliders);
+ UtilitiesDXXL_Physics2D.ExtentNameTagForPreallocatedArrayIsTooSmallForFilledInListResults(preallocatedArrayIsTooSmall, ref nameTag, numberOfOverlappingColliders);
+ UtilitiesDXXL_Physics2D.DrawBoxOverlapResultOfPotMultipleCollisions(false, point, size, angle, numberOfCopiedSlots, UtilitiesDXXL_Physics2D.preallocatedCollider2DResultsArray_copiedFromList, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapBoxAll 调试可视化,返回所有重叠碰撞体
+ public static Collider2D[] OverlapBoxAll(Vector2 point, Vector2 size, float angle, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider2D[] overlappingColliders = Physics2D.OverlapBoxAll(point, size, angle, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingColliders; }
+ int numberOfOverlappingColliders = 0;
+ if (overlappingColliders != null && overlappingColliders.Length > 0)
+ {
+ numberOfOverlappingColliders = overlappingColliders.Length;
+ }
+ UtilitiesDXXL_Physics2D.DrawBoxOverlapResultOfPotMultipleCollisions(false, point, size, angle, numberOfOverlappingColliders, overlappingColliders, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingColliders;
+ }
+
+ /// 绘制 OverlapBoxNonAlloc 调试可视化,将重叠碰撞体结果存入预分配数组
+ public static int OverlapBoxNonAlloc(Vector2 point, Vector2 size, float angle, Collider2D[] results, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapBoxNonAlloc(point, size, angle, results, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ UtilitiesDXXL_Physics2D.DrawBoxOverlapResultOfPotMultipleCollisions(false, point, size, angle, used_numberOfOverlappingColliders, results, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapCapsule 调试可视化,返回第一个重叠碰撞体
+ public static Collider2D OverlapCapsule(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider2D overlappingCollider = Physics2D.OverlapCapsule(point, size, direction, angle, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingCollider; }
+ UtilitiesDXXL_Physics2D.DrawCapsuleOverlapResultOfMax1Collision(point, size, direction, angle, overlappingCollider, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingCollider;
+ }
+
+ /// 绘制 OverlapCapsule 调试可视化,返回重叠碰撞体数量(数组重载)
+ public static int OverlapCapsule(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, ContactFilter2D contactFilter, Collider2D[] results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapCapsule(point, size, direction, angle, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ UtilitiesDXXL_Physics2D.DrawCapsuleOverlapResultOfPotMultipleCollisions(point, size, direction, angle, used_numberOfOverlappingColliders, results, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapCapsule 调试可视化,返回重叠碰撞体数量(List 重载)
+ public static int OverlapCapsule(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, ContactFilter2D contactFilter, List results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapCapsule(point, size, direction, angle, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultList(ref nameTag, numberOfOverlappingColliders, results);
+ int numberOfCopiedSlots = UtilitiesDXXL_Physics2D.CopyHitResultsFromListToPreallocatedArray(out bool preallocatedArrayIsTooSmall, results, numberOfOverlappingColliders);
+ UtilitiesDXXL_Physics2D.ExtentNameTagForPreallocatedArrayIsTooSmallForFilledInListResults(preallocatedArrayIsTooSmall, ref nameTag, numberOfOverlappingColliders);
+ UtilitiesDXXL_Physics2D.DrawCapsuleOverlapResultOfPotMultipleCollisions(point, size, direction, angle, numberOfCopiedSlots, UtilitiesDXXL_Physics2D.preallocatedCollider2DResultsArray_copiedFromList, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapCapsuleAll 调试可视化,返回所有重叠碰撞体
+ public static Collider2D[] OverlapCapsuleAll(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider2D[] overlappingColliders = Physics2D.OverlapCapsuleAll(point, size, direction, angle, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingColliders; }
+ int numberOfOverlappingColliders = 0;
+ if (overlappingColliders != null && overlappingColliders.Length > 0)
+ {
+ numberOfOverlappingColliders = overlappingColliders.Length;
+ }
+ UtilitiesDXXL_Physics2D.DrawCapsuleOverlapResultOfPotMultipleCollisions(point, size, direction, angle, numberOfOverlappingColliders, overlappingColliders, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingColliders;
+ }
+
+ /// 绘制 OverlapCapsuleNonAlloc 调试可视化,将重叠碰撞体结果存入预分配数组
+ public static int OverlapCapsuleNonAlloc(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D[] results, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapCapsuleNonAlloc(point, size, direction, angle, results, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ UtilitiesDXXL_Physics2D.DrawCapsuleOverlapResultOfPotMultipleCollisions(point, size, direction, angle, used_numberOfOverlappingColliders, results, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapCircle 调试可视化,返回第一个重叠碰撞体
+ public static Collider2D OverlapCircle(Vector2 point, float radius, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider2D overlappingCollider = Physics2D.OverlapCircle(point, radius, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingCollider; }
+ UtilitiesDXXL_Physics2D.DrawCircleOverlapResultOfMax1Collision(point, radius, overlappingCollider, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingCollider;
+ }
+
+ /// 绘制 OverlapCircle 调试可视化,返回重叠碰撞体数量(数组重载)
+ public static int OverlapCircle(Vector2 point, float radius, ContactFilter2D contactFilter, Collider2D[] results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapCircle(point, radius, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ UtilitiesDXXL_Physics2D.DrawCircleOverlapResultOfPotMultipleCollisions(point, radius, used_numberOfOverlappingColliders, results, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapCircle 调试可视化,返回重叠碰撞体数量(List 重载)
+ public static int OverlapCircle(Vector2 point, float radius, ContactFilter2D contactFilter, List results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapCircle(point, radius, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultList(ref nameTag, numberOfOverlappingColliders, results);
+ int numberOfCopiedSlots = UtilitiesDXXL_Physics2D.CopyHitResultsFromListToPreallocatedArray(out bool preallocatedArrayIsTooSmall, results, numberOfOverlappingColliders);
+ UtilitiesDXXL_Physics2D.ExtentNameTagForPreallocatedArrayIsTooSmallForFilledInListResults(preallocatedArrayIsTooSmall, ref nameTag, numberOfOverlappingColliders);
+ UtilitiesDXXL_Physics2D.DrawCircleOverlapResultOfPotMultipleCollisions(point, radius, numberOfCopiedSlots, UtilitiesDXXL_Physics2D.preallocatedCollider2DResultsArray_copiedFromList, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapCircleAll 调试可视化,返回所有重叠碰撞体
+ public static Collider2D[] OverlapCircleAll(Vector2 point, float radius, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider2D[] overlappingColliders = Physics2D.OverlapCircleAll(point, radius, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingColliders; }
+ int numberOfOverlappingColliders = 0;
+ if (overlappingColliders != null && overlappingColliders.Length > 0)
+ {
+ numberOfOverlappingColliders = overlappingColliders.Length;
+ }
+ UtilitiesDXXL_Physics2D.DrawCircleOverlapResultOfPotMultipleCollisions(point, radius, numberOfOverlappingColliders, overlappingColliders, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingColliders;
+ }
+
+ /// 绘制 OverlapCircleNonAlloc 调试可视化,将重叠碰撞体结果存入预分配数组
+ public static int OverlapCircleNonAlloc(Vector2 point, float radius, Collider2D[] results, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapCircleNonAlloc(point, radius, results, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ UtilitiesDXXL_Physics2D.DrawCircleOverlapResultOfPotMultipleCollisions(point, radius, used_numberOfOverlappingColliders, results, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapPoint 调试可视化,返回第一个重叠碰撞体
+ public static Collider2D OverlapPoint(Vector2 point, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider2D overlappingCollider = Physics2D.OverlapPoint(point, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingCollider; }
+ UtilitiesDXXL_Physics2D.DrawPointOverlapResultOfMax1Collision(point, overlappingCollider, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingCollider;
+ }
+
+ /// 绘制 OverlapPoint 调试可视化,返回重叠碰撞体数量(数组重载)
+ public static int OverlapPoint(Vector2 point, ContactFilter2D contactFilter, Collider2D[] results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapPoint(point, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ UtilitiesDXXL_Physics2D.DrawPointOverlapResultOfPotMultipleCollisions(point, used_numberOfOverlappingColliders, results, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapPoint 调试可视化,返回重叠碰撞体数量(List 重载)
+ public static int OverlapPoint(Vector2 point, ContactFilter2D contactFilter, List results, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapPoint(point, contactFilter, results);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultList(ref nameTag, numberOfOverlappingColliders, results);
+ int numberOfCopiedSlots = UtilitiesDXXL_Physics2D.CopyHitResultsFromListToPreallocatedArray(out bool preallocatedArrayIsTooSmall, results, numberOfOverlappingColliders);
+ UtilitiesDXXL_Physics2D.ExtentNameTagForPreallocatedArrayIsTooSmallForFilledInListResults(preallocatedArrayIsTooSmall, ref nameTag, numberOfOverlappingColliders);
+ UtilitiesDXXL_Physics2D.DrawPointOverlapResultOfPotMultipleCollisions(point, numberOfCopiedSlots, UtilitiesDXXL_Physics2D.preallocatedCollider2DResultsArray_copiedFromList, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ /// 绘制 OverlapPointAll 调试可视化,返回所有重叠碰撞体
+ public static Collider2D[] OverlapPointAll(Vector2 point, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ Collider2D[] overlappingColliders = Physics2D.OverlapPointAll(point, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return overlappingColliders; }
+ int numberOfOverlappingColliders = 0;
+ if (overlappingColliders != null && overlappingColliders.Length > 0)
+ {
+ numberOfOverlappingColliders = overlappingColliders.Length;
+ }
+ UtilitiesDXXL_Physics2D.DrawPointOverlapResultOfPotMultipleCollisions(point, numberOfOverlappingColliders, overlappingColliders, nameTag, durationInSec, hiddenByNearerObjects);
+ return overlappingColliders;
+ }
+
+ /// 绘制 OverlapPointNonAlloc 调试可视化,将重叠碰撞体结果存入预分配数组
+ public static int OverlapPointNonAlloc(Vector2 point, Collider2D[] results, int layerMask = Physics2D.DefaultRaycastLayers, float minDepth = Mathf.NegativeInfinity, float maxDepth = Mathf.Infinity, string nameTag = null, float durationInSec = 0.0f, bool hiddenByNearerObjects = false)
+ {
+ int numberOfOverlappingColliders = Physics2D.OverlapPointNonAlloc(point, results, layerMask, minDepth, maxDepth);
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return numberOfOverlappingColliders; }
+ bool resultsArrayIsNull = UtilitiesDXXL_Physics2D.ExtentNameTagForNonSuitingResultArray(ref nameTag, numberOfOverlappingColliders, results);
+ int used_numberOfOverlappingColliders = resultsArrayIsNull ? 0 : numberOfOverlappingColliders;
+ UtilitiesDXXL_Physics2D.DrawPointOverlapResultOfPotMultipleCollisions(point, used_numberOfOverlappingColliders, results, nameTag, durationInSec, hiddenByNearerObjects);
+ return numberOfOverlappingColliders;
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/DrawPhysics2D.cs.meta b/Runtime/DrawDebugLibrary/DrawPhysics2D.cs.meta
new file mode 100644
index 0000000..e2d9cf4
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawPhysics2D.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 06f686b93af4fb6428505e60f2389ef0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawScreenspace.cs b/Runtime/DrawDebugLibrary/DrawScreenspace.cs
new file mode 100644
index 0000000..b31d83c
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawScreenspace.cs
@@ -0,0 +1,1749 @@
+namespace DrawXXL
+{
+ using System.Collections.Generic;
+ using UnityEngine;
+
+ public class DrawScreenspace
+ {
+ public enum DefaultScreenspaceWindowForDrawing
+ {
+ sceneViewWindow,
+ gameViewWindow
+ };
+ public static DefaultScreenspaceWindowForDrawing defaultScreenspaceWindowForDrawing = DefaultScreenspaceWindowForDrawing.gameViewWindow;
+
+ public static Camera defaultCameraForDrawing = null;
+ public const float minTextSize_relToViewportHeight = 0.01f;
+ public static float drawOffsetBehindCamsNearPlane = 0.01f;
+
+ public static void Line(Vector2 start, Vector2 end, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Line") == false) { return; }
+ Line(automaticallyFoundCamera, start, end, color, width_relToViewportHeight, text, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void Line(Camera targetCamera, Vector2 start, Vector2 end, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLine.Add(new ScreenspaceLine(targetCamera, start, end, color, width_relToViewportHeight, text, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, start, end, color, width_relToViewportHeight, text, style, stylePatternScaleFactor, animationSpeed, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void Ray(Vector2 start, Vector2 direction, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Ray") == false) { return; }
+ Ray(automaticallyFoundCamera, start, direction, color, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+ public static void Ray(Camera targetCamera, Vector2 start, Vector2 direction, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceRay.Add(new ScreenspaceRay(targetCamera, start, direction, color, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ Ray_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, start, direction, color, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineFrom(Vector2 start, Vector2 direction, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineFrom") == false) { return; }
+ LineFrom(automaticallyFoundCamera, start, direction, color, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineFrom(Camera targetCamera, Vector2 start, Vector2 direction, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineFrom.Add(new ScreenspaceLineFrom(targetCamera, start, direction, color, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ LineFrom_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, start, direction, color, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineTo(Vector2 direction, Vector2 end, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineTo") == false) { return; }
+ LineTo(automaticallyFoundCamera, direction, end, color, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineTo(Camera targetCamera, Vector2 direction, Vector2 end, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineTo.Add(new ScreenspaceLineTo(targetCamera, direction, end, color, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ LineTo_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, direction, end, color, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineColorFade(Vector2 start, Vector2 end, Color startColor, Color endColor, float width_relToViewportHeight = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineColorFade") == false) { return; }
+ LineColorFade(automaticallyFoundCamera, start, end, startColor, endColor, width_relToViewportHeight, text, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+ public static void LineColorFade(Camera targetCamera, Vector2 start, Vector2 end, Color startColor, Color endColor, float width_relToViewportHeight = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineColorFade.Add(new ScreenspaceLineColorFade(targetCamera, start, end, startColor, endColor, width_relToViewportHeight, text, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ Line_fadeableAnimSpeed_screenspace.InternalDrawColorFade(targetCamera, start, end, startColor, endColor, width_relToViewportHeight, text, style, stylePatternScaleFactor, animationSpeed, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void RayColorFade(Vector2 start, Vector2 direction, Color startColor, Color endColor, float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.RayColorFade") == false) { return; }
+ RayColorFade(automaticallyFoundCamera, start, direction, startColor, endColor, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+ public static void RayColorFade(Camera targetCamera, Vector2 start, Vector2 direction, Color startColor, Color endColor, float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceRayColorFade.Add(new ScreenspaceRayColorFade(targetCamera, start, direction, startColor, endColor, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ Ray_fadeableAnimSpeed_screenspace.InternalDrawColorFade(targetCamera, start, direction, startColor, endColor, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineFrom_withColorFade(Vector2 start, Vector2 direction, Color startColor, Color endColor, float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineFrom_withColorFade") == false) { return; }
+ LineFrom_withColorFade(automaticallyFoundCamera, start, direction, startColor, endColor, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineFrom_withColorFade(Camera targetCamera, Vector2 start, Vector2 direction, Color startColor, Color endColor, float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineFrom_withColorFade.Add(new ScreenspaceLineFrom_withColorFade(targetCamera, start, direction, startColor, endColor, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ LineFrom_fadeableAnimSpeed_screenspace.InternalDraw_withColorFade(targetCamera, start, direction, startColor, endColor, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineTo_withColorFade(Vector2 direction, Vector2 end, Color startColor, Color endColor, float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineTo_withColorFade") == false) { return; }
+ LineTo_withColorFade(automaticallyFoundCamera, direction, end, startColor, endColor, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineTo_withColorFade(Camera targetCamera, Vector2 direction, Vector2 end, Color startColor, Color endColor, float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineTo_withColorFade.Add(new ScreenspaceLineTo_withColorFade(targetCamera, direction, end, startColor, endColor, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ LineTo_fadeableAnimSpeed_screenspace.InternalDraw_withColorFade(targetCamera, direction, end, startColor, endColor, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, stylePatternScaleFactor, animationSpeed, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineCircled(Vector2 circleCenter, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool skipFallbackDisplayOfZeroAngles = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineCircled") == false) { return; }
+
+ LineCircled(automaticallyFoundCamera, circleCenter, startAngleDegCC_relativeToUp, endAngleDegCC_relativeToUp, radius_relToViewportHeight, color, width_relToViewportHeight, text, skipFallbackDisplayOfZeroAngles, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec);
+ }
+ public static void LineCircled(Camera targetCamera, Vector2 circleCenter, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool skipFallbackDisplayOfZeroAngles = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(startAngleDegCC_relativeToUp, "startAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(endAngleDegCC_relativeToUp, "endAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius_relToViewportHeight, "radius_relToViewportHeight")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineCircled_angleToAngle_cam.Add(new ScreenspaceLineCircled_angleToAngle_cam(targetCamera, circleCenter, startAngleDegCC_relativeToUp, endAngleDegCC_relativeToUp, radius_relToViewportHeight, color, width_relToViewportHeight, text, skipFallbackDisplayOfZeroAngles, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec));
+ return;
+ }
+
+ Quaternion rotation_fromGlobalUp_toLineStartAngleInXYplane = Quaternion.AngleAxis(startAngleDegCC_relativeToUp, Vector3.forward);
+ Vector3 circleCenter_to_startPos_inUnwarpedSpace_normalized = rotation_fromGlobalUp_toLineStartAngleInXYplane * Vector3.up;
+ Vector2 circleCenter_to_startPos_inWarpedSpace_normalized = DirectionInUnitsOfUnwarpedSpace_to_sameLookingDirectionInUnitsOfWarpedSpace(circleCenter_to_startPos_inUnwarpedSpace_normalized, targetCamera);
+ Vector2 circleCenter_to_startPos_inWarpedScreenspaceSpace = circleCenter_to_startPos_inWarpedSpace_normalized * radius_relToViewportHeight;
+ Vector2 startPos = circleCenter + circleCenter_to_startPos_inWarpedScreenspaceSpace;
+ float turnAngleDegCC = endAngleDegCC_relativeToUp - startAngleDegCC_relativeToUp;
+ LineCircled(targetCamera, startPos, circleCenter, turnAngleDegCC, color, width_relToViewportHeight, text, skipFallbackDisplayOfZeroAngles, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec);
+ }
+
+ public static void LineCircled(Vector2 startPos, Vector2 circleCenter, float turnAngleDegCC, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool skipFallbackDisplayOfZeroAngles = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineCircled") == false) { return; }
+ LineCircled(automaticallyFoundCamera, startPos, circleCenter, turnAngleDegCC, color, width_relToViewportHeight, text, skipFallbackDisplayOfZeroAngles, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec);
+ }
+ public static void LineCircled(Camera targetCamera, Vector2 startPos, Vector2 circleCenter, float turnAngleDegCC, Color color = default(Color), float width_relToViewportHeight = 0.0f, string text = null, bool skipFallbackDisplayOfZeroAngles = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineCircled_angleFromStartPos_cam.Add(new ScreenspaceLineCircled_angleFromStartPos_cam(targetCamera, startPos, circleCenter, turnAngleDegCC, color, width_relToViewportHeight, text, skipFallbackDisplayOfZeroAngles, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec));
+ return;
+ }
+
+ UtilitiesDXXL_LineCircled.LineCircledScreenspace(targetCamera, startPos, circleCenter, turnAngleDegCC, color, width_relToViewportHeight, text, skipFallbackDisplayOfZeroAngles, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec, true);
+ }
+
+ public static void CircleSegment(Vector2 circleCenter, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius_relToViewportHeight = 0.05f, Color color = default(Color), string text = null, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.CircleSegment") == false) { return; }
+ CircleSegment(automaticallyFoundCamera, circleCenter, startAngleDegCC_relativeToUp, endAngleDegCC_relativeToUp, radius_relToViewportHeight, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, minAngleDeg_withoutTextLineBreak, durationInSec);
+ }
+ public static void CircleSegment(Camera targetCamera, Vector2 circleCenter, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius_relToViewportHeight = 0.05f, Color color = default(Color), string text = null, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(startAngleDegCC_relativeToUp, "startAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(endAngleDegCC_relativeToUp, "endAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius_relToViewportHeight, "radius_relToViewportHeight")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCircleSegment_angleToAngle_cam.Add(new ScreenspaceCircleSegment_angleToAngle_cam(targetCamera, circleCenter, startAngleDegCC_relativeToUp, endAngleDegCC_relativeToUp, radius_relToViewportHeight, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, minAngleDeg_withoutTextLineBreak, durationInSec));
+ return;
+ }
+
+ Quaternion rotation_fromGlobalUp_toLineStartAngleInXYplane = Quaternion.AngleAxis(startAngleDegCC_relativeToUp, Vector3.forward);
+ Vector3 circleCenter_to_startPos_inUnwarpedSpace_normalized = rotation_fromGlobalUp_toLineStartAngleInXYplane * Vector3.up;
+ Vector2 circleCenter_to_startPos_inWarpedSpace_normalized = DirectionInUnitsOfUnwarpedSpace_to_sameLookingDirectionInUnitsOfWarpedSpace(circleCenter_to_startPos_inUnwarpedSpace_normalized, targetCamera);
+ Vector2 circleCenter_to_startPosOnPerimeter_inWarpedScreenspaceSpace = circleCenter_to_startPos_inWarpedSpace_normalized * radius_relToViewportHeight;
+ Vector2 startPosOnPerimeter = circleCenter + circleCenter_to_startPosOnPerimeter_inWarpedScreenspaceSpace;
+ float turnAngleDegCC = endAngleDegCC_relativeToUp - startAngleDegCC_relativeToUp;
+ CircleSegment(targetCamera, startPosOnPerimeter, circleCenter, turnAngleDegCC, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, minAngleDeg_withoutTextLineBreak, durationInSec);
+ }
+
+ public static void CircleSegment(Vector2 startPosOnPerimeter, Vector2 circleCenter, float turnAngleDegCC, Color color = default(Color), string text = null, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.CircleSegment") == false) { return; }
+ CircleSegment(automaticallyFoundCamera, startPosOnPerimeter, circleCenter, turnAngleDegCC, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, minAngleDeg_withoutTextLineBreak, durationInSec);
+ }
+ public static void CircleSegment(Camera targetCamera, Vector2 startPosOnPerimeter, Vector2 circleCenter, float turnAngleDegCC, Color color = default(Color), string text = null, float radiusPortionWhereDrawFillStarts = 0.0f, bool skipFallbackDisplayOfZeroAngles = false, float fillDensity = 1.0f, float minAngleDeg_withoutTextLineBreak = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCircleSegment_angleFromStartPos_cam.Add(new ScreenspaceCircleSegment_angleFromStartPos_cam(targetCamera, startPosOnPerimeter, circleCenter, turnAngleDegCC, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, minAngleDeg_withoutTextLineBreak, durationInSec));
+ return;
+ }
+
+ UtilitiesDXXL_LineCircled.CircleSegmentScreenspace(targetCamera, startPosOnPerimeter, circleCenter, turnAngleDegCC, color, text, radiusPortionWhereDrawFillStarts, skipFallbackDisplayOfZeroAngles, fillDensity, minAngleDeg_withoutTextLineBreak, DrawText.TextAnchorCircledDXXL.LowerLeftOfWholeTextBlock, durationInSec, true);
+ }
+
+ public static void LineString(Vector2[] points, Color color = default(Color), bool closeGapBetweenLastAndFirstPoint = false, float width_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineString") == false) { return; }
+ LineString(automaticallyFoundCamera, points, color, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec);
+ }
+
+ public static void LineString(Camera targetCamera, Vector2[] points, Color color = default(Color), bool closeGapBetweenLastAndFirstPoint = false, float width_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineString_array_cam.Add(new ScreenspaceLineString_array_cam(targetCamera, points, color, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec));
+ return;
+ }
+
+ if (points.Length == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width_relToViewportHeight, "width_relToViewportHeight")) { return; }
+ width_relToViewportHeight = UtilitiesDXXL_Math.AbsNonZeroValue(width_relToViewportHeight);
+
+ for (int i = 0; i < (points.Length - 1); i++)
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, points[i], points[i + 1], color, width_relToViewportHeight, null, style, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, points[points.Length - 1], points[0], color, width_relToViewportHeight, null, style, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ }
+
+ if (drawPointerIfOffscreen || (text != null && text != ""))
+ {
+ UtilitiesDXXL_List.CopyContentOfVector2ArrayToList(ref UtilitiesDXXL_Screenspace.vertices_inViewportSpace0to1, ref points, points.Length);
+ Color invertedColor = UtilitiesDXXL_Colors.Invert_andAlphaTo1(color);
+ UtilitiesDXXL_Screenspace.TagPointCollection(targetCamera, text, null, points.Length, 0.3f * width_relToViewportHeight, invertedColor, invertedColor, drawPointerIfOffscreen, false, durationInSec, 1.0f, true);
+ }
+ }
+
+ public static void LineString(List points, Color color = default(Color), bool closeGapBetweenLastAndFirstPoint = false, float width_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineString") == false) { return; }
+ LineString(automaticallyFoundCamera, points, color, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec);
+ }
+ public static void LineString(Camera targetCamera, List points, Color color = default(Color), bool closeGapBetweenLastAndFirstPoint = false, float width_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineString_list_cam.Add(new ScreenspaceLineString_list_cam(targetCamera, points, color, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec));
+ return;
+ }
+
+ if (points.Count == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width_relToViewportHeight, "width_relToViewportHeight")) { return; }
+ width_relToViewportHeight = UtilitiesDXXL_Math.AbsNonZeroValue(width_relToViewportHeight);
+
+ for (int i = 0; i < (points.Count - 1); i++)
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, points[i], points[i + 1], color, width_relToViewportHeight, null, style, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, points[points.Count - 1], points[0], color, width_relToViewportHeight, null, style, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ }
+
+ if (drawPointerIfOffscreen || (text != null && text != ""))
+ {
+ UtilitiesDXXL_List.CopyContentOfVector2Lists(ref UtilitiesDXXL_Screenspace.vertices_inViewportSpace0to1, ref points, points.Count);
+ Color invertedColor = UtilitiesDXXL_Colors.Invert_andAlphaTo1(color);
+ UtilitiesDXXL_Screenspace.TagPointCollection(targetCamera, text, null, points.Count, 0.3f * width_relToViewportHeight, invertedColor, invertedColor, drawPointerIfOffscreen, false, durationInSec, 1.0f, true);
+ }
+ }
+
+ public static void LineStringColorFade(Vector2[] points, Color startColor, Color endColor, bool closeGapBetweenLastAndFirstPoint = false, float width_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineStringColorFade") == false) { return; }
+ LineStringColorFade(automaticallyFoundCamera, points, startColor, endColor, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec);
+ }
+ public static void LineStringColorFade(Camera targetCamera, Vector2[] points, Color startColor, Color endColor, bool closeGapBetweenLastAndFirstPoint = false, float width_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineStringColorFade_array_cam.Add(new ScreenspaceLineStringColorFade_array_cam(targetCamera, points, startColor, endColor, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width_relToViewportHeight, "width_relToViewportHeight")) { return; }
+ width_relToViewportHeight = UtilitiesDXXL_Math.AbsNonZeroValue(width_relToViewportHeight);
+
+ if (points.Length == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ int iOffset_forColorFade = -1;
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ iOffset_forColorFade = 0;
+ }
+
+ for (int i = 0; i < (points.Length - 1); i++)
+ {
+ Color color = UtilitiesDXXL_DrawBasics.GetFadedColorFromSegments(startColor, endColor, i, points.Length + iOffset_forColorFade);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, points[i], points[i + 1], color, width_relToViewportHeight, null, style, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, points[points.Length - 1], points[0], endColor, width_relToViewportHeight, null, style, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ }
+
+ if (drawPointerIfOffscreen || (text != null && text != ""))
+ {
+ UtilitiesDXXL_List.CopyContentOfVector2ArrayToList(ref UtilitiesDXXL_Screenspace.vertices_inViewportSpace0to1, ref points, points.Length);
+ Color invertedAverageColor = UtilitiesDXXL_Colors.Invert_andAlphaTo1(Color.Lerp(startColor, endColor, 0.5f));
+ UtilitiesDXXL_Screenspace.TagPointCollection(targetCamera, text, null, points.Length, 0.3f * width_relToViewportHeight, invertedAverageColor, invertedAverageColor, drawPointerIfOffscreen, false, durationInSec, 1.0f, true);
+ }
+
+ }
+ public static void LineStringColorFade(List points, Color startColor, Color endColor, bool closeGapBetweenLastAndFirstPoint = false, float width_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineStringColorFade") == false) { return; }
+ LineStringColorFade(automaticallyFoundCamera, points, startColor, endColor, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec);
+ }
+ public static void LineStringColorFade(Camera targetCamera, List points, Color startColor, Color endColor, bool closeGapBetweenLastAndFirstPoint = false, float width_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineStringColorFade_list_cam.Add(new ScreenspaceLineStringColorFade_list_cam(targetCamera, points, startColor, endColor, closeGapBetweenLastAndFirstPoint, width_relToViewportHeight, text, drawPointerIfOffscreen, style, stylePatternScaleFactor, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width_relToViewportHeight, "width_relToViewportHeight")) { return; }
+ width_relToViewportHeight = UtilitiesDXXL_Math.AbsNonZeroValue(width_relToViewportHeight);
+
+ if (points.Count == 0)
+ {
+ Debug.Log("'points' has 0 items -> no drawing");
+ return;
+ }
+
+ int iOffset_forColorFade = -1;
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ iOffset_forColorFade = 0;
+ }
+
+ for (int i = 0; i < (points.Count - 1); i++)
+ {
+ Color color = UtilitiesDXXL_DrawBasics.GetFadedColorFromSegments(startColor, endColor, i, points.Count + iOffset_forColorFade);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, points[i], points[i + 1], color, width_relToViewportHeight, null, style, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ }
+
+ if (closeGapBetweenLastAndFirstPoint)
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, points[points.Count - 1], points[0], endColor, width_relToViewportHeight, null, style, stylePatternScaleFactor, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ }
+
+ if (drawPointerIfOffscreen || (text != null && text != ""))
+ {
+ UtilitiesDXXL_List.CopyContentOfVector2Lists(ref UtilitiesDXXL_Screenspace.vertices_inViewportSpace0to1, ref points, points.Count);
+ Color invertedAverageColor = UtilitiesDXXL_Colors.Invert_andAlphaTo1(Color.Lerp(startColor, endColor, 0.5f));
+ UtilitiesDXXL_Screenspace.TagPointCollection(targetCamera, text, null, points.Count, 0.3f * width_relToViewportHeight, invertedAverageColor, invertedAverageColor, drawPointerIfOffscreen, false, durationInSec, 1.0f, true);
+ }
+ }
+
+ public static void Shape(Vector3 centerPosition_in3DWorldspace, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, Color color = default(Color), float width_relToViewportHeight = 0.1f, float height_relToViewportHeight = 0.1f, float zRotationDegCC = 0.0f, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = true, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceShape_3Dpos.Add(new ScreenspaceShape_3Dpos(centerPosition_in3DWorldspace, shape, color, width_relToViewportHeight, height_relToViewportHeight, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Shape") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, centerPosition_in3DWorldspace, false);
+ Shape(position_in2DViewportSpace, shape, color, width_relToViewportHeight, height_relToViewportHeight, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Shape(Camera targetCamera, Vector3 centerPosition_in3DWorldspace, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, Color color = default(Color), float width_relToViewportHeight = 0.1f, float height_relToViewportHeight = 0.1f, float zRotationDegCC = 0.0f, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = true, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceShape_3Dpos_cam.Add(new ScreenspaceShape_3Dpos_cam(targetCamera, centerPosition_in3DWorldspace, shape, color, width_relToViewportHeight, height_relToViewportHeight, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(targetCamera, centerPosition_in3DWorldspace, false);
+ Shape(targetCamera, position_in2DViewportSpace, shape, color, width_relToViewportHeight, height_relToViewportHeight, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Shape(Vector2 centerPosition_in2DViewportSpace, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, Color color = default(Color), float width_relToViewportHeight = 0.1f, float height_relToViewportHeight = 0.1f, float zRotationDegCC = 0.0f, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = true, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Shape") == false) { return; }
+ Shape(automaticallyFoundCamera, centerPosition_in2DViewportSpace, shape, color, width_relToViewportHeight, height_relToViewportHeight, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Shape(Camera targetCamera, Vector2 centerPosition_in2DViewportSpace, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, Color color = default(Color), float width_relToViewportHeight = 0.1f, float height_relToViewportHeight = 0.1f, float zRotationDegCC = 0.0f, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = true, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceShape_2Dpos_cam.Add(new ScreenspaceShape_2Dpos_cam(targetCamera, centerPosition_in2DViewportSpace, shape, color, width_relToViewportHeight, height_relToViewportHeight, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ UtilitiesDXXL_Screenspace.DrawShape(targetCamera, centerPosition_in2DViewportSpace, shape, color, color, width_relToViewportHeight, height_relToViewportHeight, zRotationDegCC, linesWidth_relToViewportHeight, text, lineStyle, stylePatternScaleFactor, fillStyle, drawPointerIfOffscreen, addTextForOutsideDistance_toOffscreenPointer, durationInSec, 1.0f, null, true);
+ }
+
+ public static void Rectangle(Rect rect, Color color = default(Color), DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth_relTScreenHeight = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Rectangle") == false) { return; }
+ Rectangle(automaticallyFoundCamera, rect, color, shape, linesWidth_relTScreenHeight, text, lineStyle, stylePatternScaleFactor, fillStyle, durationInSec);
+ }
+ public static void Rectangle(Camera targetCamera, Rect rect, Color color = default(Color), DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth_relToScreenHeight = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Rectangle(targetCamera, rect.position, rect.width, rect.height, color, shape, linesWidth_relToScreenHeight, text, lineStyle, stylePatternScaleFactor, fillStyle, durationInSec);
+ }
+
+ static InternalDXXL_Plane rectPlane = new InternalDXXL_Plane();
+ public static void Rectangle(Vector2 lowLeftCorner, float width_relToScreenWidth, float height_relToScreenHeight, Color color = default(Color), DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth_relToScreenHeight = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Rectangle") == false) { return; }
+ Rectangle(automaticallyFoundCamera, lowLeftCorner, width_relToScreenWidth, height_relToScreenHeight, color, shape, linesWidth_relToScreenHeight, text, lineStyle, stylePatternScaleFactor, fillStyle, durationInSec);
+ }
+ public static void Rectangle(Camera targetCamera, Vector2 lowLeftCorner, float width_relToScreenWidth, float height_relToScreenHeight, Color color = default(Color), DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth_relToScreenHeight = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth_relToScreenHeight, "linesWidth_relToScreenHeight")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceRectangle.Add(new ScreenspaceRectangle(targetCamera, lowLeftCorner, width_relToScreenWidth, height_relToScreenHeight, color, shape, linesWidth_relToScreenHeight, text, lineStyle, stylePatternScaleFactor, fillStyle, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width_relToScreenWidth, "width_relToScreenWidth")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(height_relToScreenHeight, "height_relToScreenHeight")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth_relToScreenHeight, "linesWidth_relToScreenHeight")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(stylePatternScaleFactor, "stylePatternScaleFactor")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(lowLeftCorner, "lowLeftCorner")) { return; }
+
+ if (UtilitiesDXXL_Screenspace.HasDefaultViewPortRect(targetCamera) == false)
+ {
+ text = "[ 'DrawScreenspace.Rectangle()' is not fit for non-default camera viewport rects
-> Fallback to 'Shape()']
" + text;
+ Vector2 centerPosition = new Vector2(lowLeftCorner.x + 0.5f * width_relToScreenWidth, lowLeftCorner.y + 0.5f * height_relToScreenHeight);
+ float width_relToScreenHeight = width_relToScreenWidth * targetCamera.aspect;
+ Shape(targetCamera, centerPosition, shape, color, width_relToScreenHeight, height_relToScreenHeight, 0.0f, linesWidth_relToScreenHeight, text, false, lineStyle, stylePatternScaleFactor, fillStyle, false, durationInSec);
+ return;
+ }
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(width_relToScreenWidth) && UtilitiesDXXL_Math.ApproximatelyZero(height_relToScreenHeight))
+ {
+ UtilitiesDXXL_Screenspace.PointFallback(targetCamera, lowLeftCorner, "[ RectangleScreenspace with extent of 0]
" + text, color, linesWidth_relToScreenHeight, durationInSec);
+ return;
+ }
+
+ Rect rect = new Rect(lowLeftCorner, new Vector2(width_relToScreenWidth, height_relToScreenHeight));
+ lineStyle = UtilitiesDXXL_LineStyles.FallbackTo2DLineStyle(lineStyle);
+ float distanceToRectPlane = targetCamera.nearClipPlane + drawOffsetBehindCamsNearPlane;
+ Vector3 screenSpaceCenter_insideRectPlane = targetCamera.transform.position + targetCamera.transform.forward * distanceToRectPlane;
+ float heightOfScreenSpace_insideRectPlane;
+ if (targetCamera.orthographic)
+ {
+ //orthographic cam:
+ heightOfScreenSpace_insideRectPlane = 2.0f * targetCamera.orthographicSize;
+ stylePatternScaleFactor = stylePatternScaleFactor * targetCamera.orthographicSize;
+ }
+ else
+ {
+ //perspective cam:
+ float tanOfHalfFieldOfView = Mathf.Tan(0.5f * targetCamera.fieldOfView * Mathf.Deg2Rad);
+ heightOfScreenSpace_insideRectPlane = 2.0f * distanceToRectPlane * tanOfHalfFieldOfView;
+ stylePatternScaleFactor = stylePatternScaleFactor * heightOfScreenSpace_insideRectPlane;
+ }
+ float linesWidth_worldSpace = heightOfScreenSpace_insideRectPlane * linesWidth_relToScreenHeight;
+ linesWidth_worldSpace = UtilitiesDXXL_Math.AbsNonZeroValue(linesWidth_worldSpace);
+ float halfLinesWidth_worldSpace = 0.5f * linesWidth_worldSpace;
+ float widthOfScreenspace_insideRectPlane = heightOfScreenSpace_insideRectPlane * targetCamera.aspect;
+ Vector3 camLeftNormalized = Vector3.Cross(targetCamera.transform.forward, targetCamera.transform.up);
+ Vector3 camRightNormalized = -camLeftNormalized;
+ Vector3 screenSpaceLowLeft_insideRectPlane = screenSpaceCenter_insideRectPlane + camLeftNormalized * (0.5f * widthOfScreenspace_insideRectPlane) - targetCamera.transform.up * (0.5f * heightOfScreenSpace_insideRectPlane);
+ Vector3 screenSpaceXspan0to1_insideRectPlane = camRightNormalized * widthOfScreenspace_insideRectPlane;
+ Vector3 screenSpaceYspan0to1_insideRectPlane = targetCamera.transform.up * heightOfScreenSpace_insideRectPlane;
+ Vector3 centerOfDrawnRect = screenSpaceLowLeft_insideRectPlane + screenSpaceXspan0to1_insideRectPlane * rect.center.x + screenSpaceYspan0to1_insideRectPlane * rect.center.y;
+ float heightOfDrawnRect = heightOfScreenSpace_insideRectPlane * rect.height;
+ float widthOfDrawnRect = widthOfScreenspace_insideRectPlane * rect.width;
+ int usedSlotsIn_verticesGlobal;
+
+ if (shape == DrawShapes.Shape2DType.square)
+ {
+ Vector3 bottomLeftCorner_ofDrawnRect_worldSpace = screenSpaceLowLeft_insideRectPlane + screenSpaceXspan0to1_insideRectPlane * rect.x + screenSpaceYspan0to1_insideRectPlane * rect.y;
+ Vector3 topLeftCorner_ofDrawnRect_worldSpace = screenSpaceLowLeft_insideRectPlane + screenSpaceXspan0to1_insideRectPlane * rect.x + screenSpaceYspan0to1_insideRectPlane * (rect.y + rect.height);
+ Vector3 bottomRightCorner_ofDrawnRect_worldSpace = screenSpaceLowLeft_insideRectPlane + screenSpaceXspan0to1_insideRectPlane * (rect.x + rect.width) + screenSpaceYspan0to1_insideRectPlane * rect.y;
+ Vector3 topRightCorner_ofDrawnRect_worldSpace = screenSpaceLowLeft_insideRectPlane + screenSpaceXspan0to1_insideRectPlane * (rect.x + rect.width) + screenSpaceYspan0to1_insideRectPlane * (rect.y + rect.height);
+ rectPlane.Recreate(centerOfDrawnRect, targetCamera.transform.forward);
+
+ UtilitiesDXXL_DrawBasics.Line(bottomLeftCorner_ofDrawnRect_worldSpace - targetCamera.transform.up * halfLinesWidth_worldSpace, topLeftCorner_ofDrawnRect_worldSpace + targetCamera.transform.up * halfLinesWidth_worldSpace, color, linesWidth_worldSpace, null, lineStyle, stylePatternScaleFactor, 0.0f, null, rectPlane, true, 0.0f, 0.0f, durationInSec, false, false, false, null, false, 0.0f);
+ UtilitiesDXXL_DrawBasics.Line(bottomRightCorner_ofDrawnRect_worldSpace - targetCamera.transform.up * halfLinesWidth_worldSpace, topRightCorner_ofDrawnRect_worldSpace + targetCamera.transform.up * halfLinesWidth_worldSpace, color, linesWidth_worldSpace, null, lineStyle, stylePatternScaleFactor, 0.0f, null, rectPlane, true, 0.0f, 0.0f, durationInSec, false, false, false, null, false, 0.0f);
+ UtilitiesDXXL_DrawBasics.Line(bottomLeftCorner_ofDrawnRect_worldSpace + camLeftNormalized * halfLinesWidth_worldSpace, bottomRightCorner_ofDrawnRect_worldSpace + camRightNormalized * halfLinesWidth_worldSpace, color, linesWidth_worldSpace, null, lineStyle, stylePatternScaleFactor, 0.0f, null, rectPlane, true, 0.0f, 0.0f, durationInSec, false, false, false, null, false, 0.0f);
+ UtilitiesDXXL_DrawBasics.Line(topLeftCorner_ofDrawnRect_worldSpace + camLeftNormalized * halfLinesWidth_worldSpace, topRightCorner_ofDrawnRect_worldSpace + camRightNormalized * halfLinesWidth_worldSpace, color, linesWidth_worldSpace, null, lineStyle, stylePatternScaleFactor, 0.0f, null, rectPlane, true, 0.0f, 0.0f, durationInSec, false, false, false, null, false, 0.0f);
+ usedSlotsIn_verticesGlobal = 4;
+
+ UtilitiesDXXL_List.AddToAVectorList(ref UtilitiesDXXL_Shapes.verticesGlobal, bottomLeftCorner_ofDrawnRect_worldSpace, 0);
+ UtilitiesDXXL_List.AddToAVectorList(ref UtilitiesDXXL_Shapes.verticesGlobal, bottomRightCorner_ofDrawnRect_worldSpace, 1);
+ UtilitiesDXXL_List.AddToAVectorList(ref UtilitiesDXXL_Shapes.verticesGlobal, topRightCorner_ofDrawnRect_worldSpace, 2);
+ UtilitiesDXXL_List.AddToAVectorList(ref UtilitiesDXXL_Shapes.verticesGlobal, topLeftCorner_ofDrawnRect_worldSpace, 3);
+ }
+ else
+ {
+ usedSlotsIn_verticesGlobal = DrawShapes.FlatShape(centerOfDrawnRect, shape, widthOfDrawnRect, heightOfDrawnRect, color, targetCamera.transform.forward, targetCamera.transform.up, linesWidth_worldSpace, null, lineStyle, stylePatternScaleFactor, true, DrawBasics.LineStyle.invisible, false, durationInSec, false);
+ }
+
+ if (fillStyle != DrawBasics.LineStyle.invisible)
+ {
+ Color fillColor = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.3f);
+ fillStyle = UtilitiesDXXL_LineStyles.FallbackTo2DLineStyle(fillStyle);
+ rectPlane.Recreate(centerOfDrawnRect, targetCamera.transform.forward);
+ float distanceBetweenLines_screenSpace = 0.01f;
+ float distanceBetweenLines_worldSpace = UtilitiesDXXL_Screenspace.VertExtentInsideViewportSpace_to_WorldSpaceExtentOnDrawPlane(targetCamera, rect.center, true, distanceBetweenLines_screenSpace);
+ UtilitiesDXXL_Shapes.DrawShapeFilling(shape, fillStyle, usedSlotsIn_verticesGlobal, distanceBetweenLines_worldSpace, fillColor, targetCamera.transform.up, stylePatternScaleFactor, rectPlane, durationInSec, false);
+ }
+
+ if (text != null && text != "")
+ {
+ float lineHeight = 0.02f * heightOfScreenSpace_insideRectPlane;
+ lineHeight = Mathf.Min(lineHeight, 0.9f * heightOfDrawnRect);
+ Vector3 topLeftCorner_ofDrawnRect = screenSpaceLowLeft_insideRectPlane + screenSpaceXspan0to1_insideRectPlane * rect.x + screenSpaceYspan0to1_insideRectPlane * (rect.y + rect.height);
+ Vector3 textPosition = topLeftCorner_ofDrawnRect + (0.02f * widthOfDrawnRect + halfLinesWidth_worldSpace) * camRightNormalized - (1.7f * lineHeight + halfLinesWidth_worldSpace) * targetCamera.transform.up;
+ UtilitiesDXXL_Text.Write(text, textPosition, color, lineHeight, camRightNormalized, targetCamera.transform.up, DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.96f * widthOfDrawnRect - linesWidth_worldSpace, false, durationInSec, false, false, false, true);
+ }
+ }
+
+ public static void Box(Rect rect, Color color = default(Color), float zRotationDegCC = 0.0f, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Box") == false) { return; }
+ Box(automaticallyFoundCamera, rect, color, zRotationDegCC, shape, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Box(Camera targetCamera, Rect rect, Color color = default(Color), float zRotationDegCC = 0.0f, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceBox_rect_cam.Add(new ScreenspaceBox_rect_cam(targetCamera, rect, color, zRotationDegCC, shape, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ float width_relToViewportHeight = rect.size.x * targetCamera.aspect;
+ Shape(targetCamera, rect.center, shape, color, width_relToViewportHeight, rect.size.y, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Box(Vector3 centerPosition_in3DWorldspace, Vector2 size_relToViewportHeight, Color color = default(Color), float zRotationDegCC = 0.0f, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool forceSizeInterpretationToWarpedViewportSpace = false, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceBox_3Dpos_vec.Add(new ScreenspaceBox_3Dpos_vec(centerPosition_in3DWorldspace, size_relToViewportHeight, color, zRotationDegCC, shape, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Box") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, centerPosition_in3DWorldspace, false);
+ Box(position_in2DViewportSpace, size_relToViewportHeight, color, zRotationDegCC, shape, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Box(Camera targetCamera, Vector3 centerPosition_in3DWorldspace, Vector2 size_relToViewportHeight, Color color = default(Color), float zRotationDegCC = 0.0f, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool forceSizeInterpretationToWarpedViewportSpace = false, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceBox_3Dpos_vec_cam.Add(new ScreenspaceBox_3Dpos_vec_cam(targetCamera, centerPosition_in3DWorldspace, size_relToViewportHeight, color, zRotationDegCC, shape, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(targetCamera, centerPosition_in3DWorldspace, false);
+ Box(targetCamera, position_in2DViewportSpace, size_relToViewportHeight, color, zRotationDegCC, shape, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Box(Vector2 centerPosition_in2DViewportSpace, Vector2 size_relToViewportHeight, Color color = default(Color), float zRotationDegCC = 0.0f, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool forceSizeInterpretationToWarpedViewportSpace = false, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Box") == false) { return; }
+ Box(automaticallyFoundCamera, centerPosition_in2DViewportSpace, size_relToViewportHeight, color, zRotationDegCC, shape, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Box(Camera targetCamera, Vector2 centerPosition_in2DViewportSpace, Vector2 size_relToViewportHeight, Color color = default(Color), float zRotationDegCC = 0.0f, DrawShapes.Shape2DType shape = DrawShapes.Shape2DType.square, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool forceSizeInterpretationToWarpedViewportSpace = false, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceBox_2Dpos_vec_cam.Add(new ScreenspaceBox_2Dpos_vec_cam(targetCamera, centerPosition_in2DViewportSpace, size_relToViewportHeight, color, zRotationDegCC, shape, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ if (forceSizeInterpretationToWarpedViewportSpace)
+ {
+ size_relToViewportHeight = DirectionInUnitsOfWarpedSpace_to_sameLookingDirectionInUnitsOfUnwarpedSpace(size_relToViewportHeight, targetCamera);
+ }
+ Shape(targetCamera, centerPosition_in2DViewportSpace, shape, color, size_relToViewportHeight.x, size_relToViewportHeight.y, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Circle(Rect rect, Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Circle") == false) { return; }
+ Circle(automaticallyFoundCamera, rect, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Circle(Camera targetCamera, Rect rect, Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCircle_rect_cam.Add(new ScreenspaceCircle_rect_cam(targetCamera, rect, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ Box(targetCamera, rect, color, 0.0f, DrawShapes.Shape2DType.circle, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Circle(Vector3 centerPosition_in3DWorldspace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCircle_3Dpos_vecRad.Add(new ScreenspaceCircle_3Dpos_vecRad(centerPosition_in3DWorldspace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Circle") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, centerPosition_in3DWorldspace, false);
+ Circle(position_in2DViewportSpace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Circle(Camera targetCamera, Vector3 centerPosition_in3DWorldspace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCircle_3Dpos_vecRad_cam.Add(new ScreenspaceCircle_3Dpos_vecRad_cam(targetCamera, centerPosition_in3DWorldspace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(targetCamera, centerPosition_in3DWorldspace, false);
+ Circle(targetCamera, position_in2DViewportSpace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Circle(Vector2 centerPosition_in2DViewportSpace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Circle") == false) { return; }
+ Circle(automaticallyFoundCamera, centerPosition_in2DViewportSpace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Circle(Camera targetCamera, Vector2 centerPosition_in2DViewportSpace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius_relToViewportHeight, "radius_relToViewportHeight")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCircle_2Dpos_vecRad_cam.Add(new ScreenspaceCircle_2Dpos_vecRad_cam(targetCamera, centerPosition_in2DViewportSpace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ float diameter_relToViewportHeight = 2.0f * radius_relToViewportHeight;
+ bool forceSizeInterpretationToWarpedViewportSpace = false;
+ Box(targetCamera, centerPosition_in2DViewportSpace, new Vector2(diameter_relToViewportHeight, diameter_relToViewportHeight), color, 0.0f, DrawShapes.Shape2DType.circle, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Capsule(Vector3 posOfCircle1_in3DWorldspace, Vector3 posOfCircle2_in3DWorldspace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCapsule_3Dpos_vecC1C2Pos.Add(new ScreenspaceCapsule_3Dpos_vecC1C2Pos(posOfCircle1_in3DWorldspace, posOfCircle2_in3DWorldspace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Capsule") == false) { return; }
+ Vector2 position1_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, posOfCircle1_in3DWorldspace, false);
+ Vector2 position2_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, posOfCircle2_in3DWorldspace, false);
+ Capsule(position1_in2DViewportSpace, position2_in2DViewportSpace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Capsule(Camera targetCamera, Vector3 posOfCircle1_in3DWorldspace, Vector3 posOfCircle2_in3DWorldspace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCapsule_3Dpos_vecC1C2Pos_cam.Add(new ScreenspaceCapsule_3Dpos_vecC1C2Pos_cam(targetCamera, posOfCircle1_in3DWorldspace, posOfCircle2_in3DWorldspace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ Vector2 position1_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(targetCamera, posOfCircle1_in3DWorldspace, false);
+ Vector2 position2_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(targetCamera, posOfCircle2_in3DWorldspace, false);
+ Capsule(targetCamera, position1_in2DViewportSpace, position2_in2DViewportSpace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Capsule(Vector2 posOfCircle1_in2DViewportSpace, Vector2 posOfCircle2_in2DViewportSpace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Capsule") == false) { return; }
+ Capsule(automaticallyFoundCamera, posOfCircle1_in2DViewportSpace, posOfCircle2_in2DViewportSpace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Capsule(Camera targetCamera, Vector2 posOfCircle1_in2DViewportSpace, Vector2 posOfCircle2_in2DViewportSpace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCapsule_2Dpos_vecC1C2Pos_cam.Add(new ScreenspaceCapsule_2Dpos_vecC1C2Pos_cam(targetCamera, posOfCircle1_in2DViewportSpace, posOfCircle2_in2DViewportSpace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ UtilitiesDXXL_Screenspace.Capsule(targetCamera, posOfCircle1_in2DViewportSpace, posOfCircle2_in2DViewportSpace, radius_relToViewportHeight, color, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Capsule(Rect rect, Color color = default(Color), CapsuleDirection2D capsuleDirection = CapsuleDirection2D.Vertical, float zRotationDegCC = 0.0f, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Capsule") == false) { return; }
+ Capsule(automaticallyFoundCamera, rect, color, capsuleDirection, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Capsule(Camera targetCamera, Rect rect, Color color = default(Color), CapsuleDirection2D capsuleDirection = CapsuleDirection2D.Vertical, float zRotationDegCC = 0.0f, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCapsule_rect_cam.Add(new ScreenspaceCapsule_rect_cam(targetCamera, rect, color, capsuleDirection, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ float width_relToViewportHeight = rect.size.x * targetCamera.aspect;
+ Vector2 size_relToViewportHeight = new Vector2(width_relToViewportHeight, rect.size.y);
+ bool forceSizeInterpretationToWarpedViewportSpace = false;
+ Capsule(targetCamera, rect.center, size_relToViewportHeight, color, capsuleDirection, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Capsule(Vector3 centerPosition_in3DWorldspace, Vector2 size_relToViewportHeight, Color color = default(Color), CapsuleDirection2D capsuleDirection = CapsuleDirection2D.Vertical, float zRotationDegCC = 0.0f, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool forceSizeInterpretationToWarpedViewportSpace = false, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCapsule_3Dpos_vecPosSize.Add(new ScreenspaceCapsule_3Dpos_vecPosSize(centerPosition_in3DWorldspace, size_relToViewportHeight, color, capsuleDirection, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Capsule") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, centerPosition_in3DWorldspace, false);
+ Capsule(position_in2DViewportSpace, size_relToViewportHeight, color, capsuleDirection, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Capsule(Camera targetCamera, Vector3 centerPosition_in3DWorldspace, Vector2 size_relToViewportHeight, Color color = default(Color), CapsuleDirection2D capsuleDirection = CapsuleDirection2D.Vertical, float zRotationDegCC = 0.0f, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool forceSizeInterpretationToWarpedViewportSpace = false, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCapsule_3Dpos_vecPosSize_cam.Add(new ScreenspaceCapsule_3Dpos_vecPosSize_cam(targetCamera, centerPosition_in3DWorldspace, size_relToViewportHeight, color, capsuleDirection, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(targetCamera, centerPosition_in3DWorldspace, false);
+ Capsule(targetCamera, position_in2DViewportSpace, size_relToViewportHeight, color, capsuleDirection, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Capsule(Vector2 centerPosition_in2DViewportSpace, Vector2 size_relToViewportHeight, Color color = default(Color), CapsuleDirection2D capsuleDirection = CapsuleDirection2D.Vertical, float zRotationDegCC = 0.0f, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool forceSizeInterpretationToWarpedViewportSpace = false, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Capsule") == false) { return; }
+ Capsule(automaticallyFoundCamera, centerPosition_in2DViewportSpace, size_relToViewportHeight, color, capsuleDirection, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Capsule(Camera targetCamera, Vector2 centerPosition_in2DViewportSpace, Vector2 size_relToViewportHeight, Color color = default(Color), CapsuleDirection2D capsuleDirection = CapsuleDirection2D.Vertical, float zRotationDegCC = 0.0f, float linesWidth_relToViewportHeight = 0.0f, string text = null, bool drawPointerIfOffscreen = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool forceSizeInterpretationToWarpedViewportSpace = false, bool addTextForOutsideDistance_toOffscreenPointer = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceCapsule_2Dpos_vecPosSize_cam.Add(new ScreenspaceCapsule_2Dpos_vecPosSize_cam(targetCamera, centerPosition_in2DViewportSpace, size_relToViewportHeight, color, capsuleDirection, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, forceSizeInterpretationToWarpedViewportSpace, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ if (forceSizeInterpretationToWarpedViewportSpace)
+ {
+ size_relToViewportHeight = DirectionInUnitsOfWarpedSpace_to_sameLookingDirectionInUnitsOfUnwarpedSpace(size_relToViewportHeight, targetCamera);
+ }
+ UtilitiesDXXL_Screenspace.Capsule(targetCamera, centerPosition_in2DViewportSpace, size_relToViewportHeight, color, capsuleDirection, zRotationDegCC, linesWidth_relToViewportHeight, text, drawPointerIfOffscreen, lineStyle, stylePatternScaleFactor, fillStyle, addTextForOutsideDistance_toOffscreenPointer, durationInSec, true);
+ }
+
+ public static void PointArray(Vector2[] points, Color color = default(Color), float sizeOfMarkingCross_relToViewportHeight = 0.1f, float markingCrossLinesWidth_relToViewportHeight = 0.0f, bool drawCoordsAsText = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.PointArray") == false) { return; }
+ PointArray(automaticallyFoundCamera, points, color, sizeOfMarkingCross_relToViewportHeight, markingCrossLinesWidth_relToViewportHeight, drawCoordsAsText, durationInSec);
+ }
+ public static void PointArray(Camera targetCamera, Vector2[] points, Color color = default(Color), float sizeOfMarkingCross_relToViewportHeight = 0.1f, float markingCrossLinesWidth_relToViewportHeight = 0.0f, bool drawCoordsAsText = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspacePointArray.Add(new ScreenspacePointArray(targetCamera, points, color, sizeOfMarkingCross_relToViewportHeight, markingCrossLinesWidth_relToViewportHeight, drawCoordsAsText, durationInSec));
+ return;
+ }
+
+ for (int i = 0; i < points.Length; i++)
+ {
+ Point(targetCamera, points[i], null, color, sizeOfMarkingCross_relToViewportHeight, markingCrossLinesWidth_relToViewportHeight, 0.0f, false, false, drawCoordsAsText, false, durationInSec);
+ }
+ }
+ public static void PointList(List points, Color color = default(Color), float sizeOfMarkingCross_relToViewportHeight = 0.1f, float markingCrossLinesWidth_relToViewportHeight = 0.0f, bool drawCoordsAsText = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.PointList") == false) { return; }
+ PointList(automaticallyFoundCamera, points, color, sizeOfMarkingCross_relToViewportHeight, markingCrossLinesWidth_relToViewportHeight, drawCoordsAsText, durationInSec);
+ }
+ public static void PointList(Camera targetCamera, List points, Color color = default(Color), float sizeOfMarkingCross_relToViewportHeight = 0.1f, float markingCrossLinesWidth_relToViewportHeight = 0.0f, bool drawCoordsAsText = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(points, "points")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspacePointList.Add(new ScreenspacePointList(targetCamera, points, color, sizeOfMarkingCross_relToViewportHeight, markingCrossLinesWidth_relToViewportHeight, drawCoordsAsText, durationInSec));
+ return;
+ }
+
+ for (int i = 0; i < points.Count; i++)
+ {
+ Point(targetCamera, points[i], null, color, sizeOfMarkingCross_relToViewportHeight, markingCrossLinesWidth_relToViewportHeight, 0.0f, false, false, drawCoordsAsText, false, durationInSec);
+ }
+ }
+
+ public static void Point(Vector2 position, Color color, float sizeOfMarkingCross_relToViewportHeight = 0.1f, float zRotationDegCC = 0.0f, float markingCrossLinesWidth_relToViewportHeight = 0.0f, bool drawPointerIfOffscreen = false, string text = null, bool pointer_as_textAttachStyle = true, bool drawCoordsAsText = true, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspacePoint.Add(new ScreenspacePoint(position, color, sizeOfMarkingCross_relToViewportHeight, zRotationDegCC, markingCrossLinesWidth_relToViewportHeight, drawPointerIfOffscreen, text, pointer_as_textAttachStyle, drawCoordsAsText, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Point") == false) { return; }
+ Point(automaticallyFoundCamera, position, color, sizeOfMarkingCross_relToViewportHeight, zRotationDegCC, markingCrossLinesWidth_relToViewportHeight, drawPointerIfOffscreen, text, pointer_as_textAttachStyle, drawCoordsAsText, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Point(Camera targetCamera, Vector2 position, Color color, float sizeOfMarkingCross_relToViewportHeight = 0.1f, float zRotationDegCC = 0.0f, float markingCrossLinesWidth_relToViewportHeight = 0.0f, bool drawPointerIfOffscreen = false, string text = null, bool pointer_as_textAttachStyle = true, bool drawCoordsAsText = true, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Point(targetCamera, position, text, color, sizeOfMarkingCross_relToViewportHeight, markingCrossLinesWidth_relToViewportHeight, zRotationDegCC, drawPointerIfOffscreen, pointer_as_textAttachStyle, drawCoordsAsText, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+
+ public static void Point(Vector2 position, string text = null, Color color = default(Color), float sizeOfMarkingCross_relToViewportHeight = 0.1f, float markingCrossLinesWidth_relToViewportHeight = 0.0f, float zRotationDegCC = 0.0f, bool drawPointerIfOffscreen = false, bool pointer_as_textAttachStyle = true, bool drawCoordsAsText = true, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Point") == false) { return; }
+ Point(automaticallyFoundCamera, position, text, color, sizeOfMarkingCross_relToViewportHeight, markingCrossLinesWidth_relToViewportHeight, zRotationDegCC, drawPointerIfOffscreen, pointer_as_textAttachStyle, drawCoordsAsText, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ public static void Point(Camera targetCamera, Vector2 position, string text = null, Color color = default(Color), float sizeOfMarkingCross_relToViewportHeight = 0.1f, float markingCrossLinesWidth_relToViewportHeight = 0.0f, float zRotationDegCC = 0.0f, bool drawPointerIfOffscreen = false, bool pointer_as_textAttachStyle = true, bool drawCoordsAsText = true, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(sizeOfMarkingCross_relToViewportHeight, "sizeOfMarkingCross_relToViewportHeight")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(markingCrossLinesWidth_relToViewportHeight, "markingCrossLinesWidth_relToViewportHeight")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zRotationDegCC, "zRotationDegCC")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(position, "position")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspacePoint_prioText_cam.Add(new ScreenspacePoint_prioText_cam(targetCamera, position, text, color, sizeOfMarkingCross_relToViewportHeight, markingCrossLinesWidth_relToViewportHeight, zRotationDegCC, drawPointerIfOffscreen, pointer_as_textAttachStyle, drawCoordsAsText, addTextForOutsideDistance_toOffscreenPointer, durationInSec));
+ return;
+ }
+
+ bool isOffscreen = !InternalDXXL_BoundsCamViewportSpace.IsInsideViewportInclBorder(position);
+ color = UtilitiesDXXL_Colors.OverwriteDefaultColor(color);
+ markingCrossLinesWidth_relToViewportHeight = UtilitiesDXXL_Math.AbsNonZeroValue(markingCrossLinesWidth_relToViewportHeight);
+ sizeOfMarkingCross_relToViewportHeight = Mathf.Abs(sizeOfMarkingCross_relToViewportHeight);
+ sizeOfMarkingCross_relToViewportHeight = UtilitiesDXXL_Math.Max(sizeOfMarkingCross_relToViewportHeight, 4.0f * markingCrossLinesWidth_relToViewportHeight, 0.016f);
+
+ if (isOffscreen == false)
+ {
+ bool isZeroRotation = UtilitiesDXXL_Math.ApproximatelyZero(zRotationDegCC);
+
+ float halfAbsMarkingCrossLinesWidth_relToViewportHeight = 0.5f * markingCrossLinesWidth_relToViewportHeight;
+ float halfAbsMarkingCrossLinesWidth_relToViewportWidth = halfAbsMarkingCrossLinesWidth_relToViewportHeight / targetCamera.aspect;
+
+ float halfMarkingCrossSize_relToViewportHeight = 0.5f * sizeOfMarkingCross_relToViewportHeight;
+ float halfMarkingCrossSize_relToViewportWidth = halfMarkingCrossSize_relToViewportHeight / targetCamera.aspect;
+
+ Vector2 point_toUnrotatedLeftMiddle = new Vector2(-halfMarkingCrossSize_relToViewportWidth, 0.0f);
+ Vector2 point_toUnrotatedRightMiddle = new Vector2(halfMarkingCrossSize_relToViewportWidth, 0.0f);
+ Vector2 point_toUnrotatedLowMiddle = new Vector2(0.0f, -halfMarkingCrossSize_relToViewportHeight);
+ Vector2 point_toUnrotatedHighMiddle = new Vector2(0.0f, halfMarkingCrossSize_relToViewportHeight);
+
+ Vector2 leftMiddlePos_viewportSpace = position + point_toUnrotatedLeftMiddle;
+ Vector2 rightMiddlePos_viewportSpace = position + point_toUnrotatedRightMiddle;
+ Vector2 lowMiddlePos_viewportSpace = position + point_toUnrotatedLowMiddle;
+ Vector2 highMiddlePos_viewportSpace = position + point_toUnrotatedHighMiddle;
+
+ Color colorOf_nonRotLinesAndCoordsText = color;
+
+ if (isZeroRotation)
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, leftMiddlePos_viewportSpace, rightMiddlePos_viewportSpace, color, markingCrossLinesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, lowMiddlePos_viewportSpace, highMiddlePos_viewportSpace, color, markingCrossLinesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ }
+ else
+ {
+ if (drawCoordsAsText)
+ {
+ colorOf_nonRotLinesAndCoordsText = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, (markingCrossLinesWidth_relToViewportHeight > 0.0f) ? 0.6f : 0.4f);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, leftMiddlePos_viewportSpace, rightMiddlePos_viewportSpace, colorOf_nonRotLinesAndCoordsText, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, lowMiddlePos_viewportSpace, highMiddlePos_viewportSpace, colorOf_nonRotLinesAndCoordsText, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ }
+
+ point_toUnrotatedLeftMiddle = new Vector2(-halfMarkingCrossSize_relToViewportHeight, 0.0f);
+ point_toUnrotatedRightMiddle = new Vector2(halfMarkingCrossSize_relToViewportHeight, 0.0f);
+ point_toUnrotatedLowMiddle = new Vector2(0.0f, -halfMarkingCrossSize_relToViewportHeight);
+ point_toUnrotatedHighMiddle = new Vector2(0.0f, halfMarkingCrossSize_relToViewportHeight);
+
+ Quaternion rotation = Quaternion.AngleAxis(zRotationDegCC, Vector3.forward);
+
+ Vector2 point_toRotatedLeftMiddle = rotation * point_toUnrotatedLeftMiddle;
+ point_toRotatedLeftMiddle = new Vector2(point_toRotatedLeftMiddle.x / targetCamera.aspect, point_toRotatedLeftMiddle.y);
+ Vector2 point_toRotatedRightMiddle = rotation * point_toUnrotatedRightMiddle;
+ point_toRotatedRightMiddle = new Vector2(point_toRotatedRightMiddle.x / targetCamera.aspect, point_toRotatedRightMiddle.y);
+ Vector2 point_toRotatedLowMiddle = rotation * point_toUnrotatedLowMiddle;
+ point_toRotatedLowMiddle = new Vector2(point_toRotatedLowMiddle.x / targetCamera.aspect, point_toRotatedLowMiddle.y);
+ Vector2 point_toRotatedHighMiddle = rotation * point_toUnrotatedHighMiddle;
+ point_toRotatedHighMiddle = new Vector2(point_toRotatedHighMiddle.x / targetCamera.aspect, point_toRotatedHighMiddle.y);
+
+ leftMiddlePos_viewportSpace = position + point_toRotatedLeftMiddle;
+ rightMiddlePos_viewportSpace = position + point_toRotatedRightMiddle;
+ lowMiddlePos_viewportSpace = position + point_toRotatedLowMiddle;
+ highMiddlePos_viewportSpace = position + point_toRotatedHighMiddle;
+
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, leftMiddlePos_viewportSpace, rightMiddlePos_viewportSpace, color, markingCrossLinesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, lowMiddlePos_viewportSpace, highMiddlePos_viewportSpace, color, markingCrossLinesWidth_relToViewportHeight, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, 0.0f, 0.0f, 0.0f, durationInSec);
+ }
+
+ DrawCoordsAsText(drawCoordsAsText, targetCamera, position, colorOf_nonRotLinesAndCoordsText, halfMarkingCrossSize_relToViewportHeight, halfMarkingCrossSize_relToViewportWidth, halfAbsMarkingCrossLinesWidth_relToViewportWidth, halfAbsMarkingCrossLinesWidth_relToViewportHeight, minTextSize_relToViewportHeight, durationInSec);
+ }
+
+ bool forcePointerDueToIsOffscreen = (isOffscreen && drawPointerIfOffscreen);
+ if (forcePointerDueToIsOffscreen || (text != null && text != ""))
+ {
+ if (pointer_as_textAttachStyle || isOffscreen)
+ {
+ float widthOfLinesTowardsText = 0.3f * markingCrossLinesWidth_relToViewportHeight;
+ PointTag(targetCamera, position, text, null, color, drawPointerIfOffscreen, widthOfLinesTowardsText, sizeOfMarkingCross_relToViewportHeight, default, 1.6f, false, addTextForOutsideDistance_toOffscreenPointer, durationInSec);
+ }
+ else
+ {
+ float textSize_relToViewportHeight = 0.25f * sizeOfMarkingCross_relToViewportHeight;
+ textSize_relToViewportHeight = Mathf.Max(textSize_relToViewportHeight, minTextSize_relToViewportHeight);
+ UtilitiesDXXL_Text.WriteScreenspace(targetCamera, " " + text, position, color, textSize_relToViewportHeight, zRotationDegCC, DrawText.TextAnchorDXXL.UpperLeft, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, true, 0.0f, false, durationInSec, false);
+ }
+ }
+
+ return;
+ }
+
+ static void DrawCoordsAsText(bool drawCoordsAsText, Camera camera, Vector2 position, Color colorOf_nonRotLinesAndCoordsText, float halfMarkingCrossSize_relToViewportHeight, float halfMarkingCrossSize_relToViewportWidth, float halfAbsMarkingCrossLinesWidth_relToViewportWidth, float halfAbsMarkingCrossLinesWidth_relToViewportHeight, float minTextSizeInScreenSpace, float durationInSec)
+ {
+ if (drawCoordsAsText)
+ {
+ Color colorOf_xySigns = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(colorOf_nonRotLinesAndCoordsText, 0.35f);
+ float coordsTextSize = Mathf.Max(0.1f * halfMarkingCrossSize_relToViewportHeight, minTextSizeInScreenSpace);
+
+ float nonForced_yTextWidth = halfMarkingCrossSize_relToViewportWidth - halfAbsMarkingCrossLinesWidth_relToViewportWidth;
+ Vector2 posOf_yText = new Vector2(position.x + halfMarkingCrossSize_relToViewportWidth - nonForced_yTextWidth, position.y + halfAbsMarkingCrossLinesWidth_relToViewportHeight + 0.3f * coordsTextSize * camera.aspect);
+ UtilitiesDXXL_Text.WriteScreenspace(camera, " " + position.y, posOf_yText, colorOf_nonRotLinesAndCoordsText, coordsTextSize, 0.0f, DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, nonForced_yTextWidth, 0.0f, false, 0.0f, false, durationInSec, false);
+ float sizeOfBiggestCharInFirstLine_inYValueText = DrawText.parsedTextSpecs.sizeOfBiggestCharInFirstLine;
+ Vector2 posOf_ySign = new Vector2(position.x - halfMarkingCrossSize_relToViewportWidth, posOf_yText.y);
+ UtilitiesDXXL_Text.WriteScreenspace(camera, "y=", posOf_ySign, colorOf_xySigns, sizeOfBiggestCharInFirstLine_inYValueText, 0.0f, DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, false, 0.0f, false, durationInSec, false);
+
+ float nonForced_xTextWidth = halfMarkingCrossSize_relToViewportHeight - halfAbsMarkingCrossLinesWidth_relToViewportHeight;
+ Vector2 posOf_xText = new Vector2(position.x - halfAbsMarkingCrossLinesWidth_relToViewportWidth - 0.3f * coordsTextSize, position.y + halfMarkingCrossSize_relToViewportHeight - nonForced_xTextWidth);
+ UtilitiesDXXL_Text.WriteScreenspace(camera, " " + position.x, posOf_xText, colorOf_nonRotLinesAndCoordsText, coordsTextSize, 90.0f, DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, nonForced_xTextWidth / camera.aspect, 0.0f, false, 0.0f, false, durationInSec, false);
+ float sizeOfBiggestCharInFirstLine_inXValueText = DrawText.parsedTextSpecs.sizeOfBiggestCharInFirstLine;
+ Vector2 posOf_xSign = new Vector2(posOf_xText.x, position.y - halfMarkingCrossSize_relToViewportHeight);
+ UtilitiesDXXL_Text.WriteScreenspace(camera, "x=", posOf_xSign, colorOf_xySigns, sizeOfBiggestCharInFirstLine_inXValueText, 90.0f, DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, false, 0.0f, false, durationInSec, false);
+ }
+ }
+
+ public static void PointTag(Vector3 position_in3DWorldspace, string text = null, string titleText = null, Color color = default(Color), bool drawPointerIfOffscreen = true, float linesWidth_relToViewportHeight = 0.0f, float size_asTextOffsetDistance_relToViewportHeight = 0.2f, Vector2 textOffsetDirection = default(Vector2), float textSizeScaleFactor = 1.0f, bool skipConeDrawing = false, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f, Vector2 customTowardsPoint_ofDefaultTextOffsetDirection = default(Vector2))
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspacePointTag_3Dpos.Add(new ScreenspacePointTag_3Dpos(position_in3DWorldspace, text, titleText, color, drawPointerIfOffscreen, linesWidth_relToViewportHeight, size_asTextOffsetDistance_relToViewportHeight, textOffsetDirection, textSizeScaleFactor, skipConeDrawing, addTextForOutsideDistance_toOffscreenPointer, durationInSec, customTowardsPoint_ofDefaultTextOffsetDirection));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.PointTag") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ PointTag(position_in2DViewportSpace, text, titleText, color, drawPointerIfOffscreen, linesWidth_relToViewportHeight, size_asTextOffsetDistance_relToViewportHeight, textOffsetDirection, textSizeScaleFactor, skipConeDrawing, addTextForOutsideDistance_toOffscreenPointer, durationInSec, customTowardsPoint_ofDefaultTextOffsetDirection);
+ }
+ public static void PointTag(Camera targetCamera, Vector3 position_in3DWorldspace, string text = null, string titleText = null, Color color = default(Color), bool drawPointerIfOffscreen = true, float linesWidth_relToViewportHeight = 0.0f, float size_asTextOffsetDistance_relToViewportHeight = 0.2f, Vector2 textOffsetDirection = default(Vector2), float textSizeScaleFactor = 1.0f, bool skipConeDrawing = false, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f, Vector2 customTowardsPoint_ofDefaultTextOffsetDirection = default(Vector2))
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspacePointTag_3Dpos_cam.Add(new ScreenspacePointTag_3Dpos_cam(targetCamera, position_in3DWorldspace, text, titleText, color, drawPointerIfOffscreen, linesWidth_relToViewportHeight, size_asTextOffsetDistance_relToViewportHeight, textOffsetDirection, textSizeScaleFactor, skipConeDrawing, addTextForOutsideDistance_toOffscreenPointer, durationInSec, customTowardsPoint_ofDefaultTextOffsetDirection));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(targetCamera, position_in3DWorldspace, false);
+ PointTag(targetCamera, position_in2DViewportSpace, text, titleText, color, drawPointerIfOffscreen, linesWidth_relToViewportHeight, size_asTextOffsetDistance_relToViewportHeight, textOffsetDirection, textSizeScaleFactor, skipConeDrawing, addTextForOutsideDistance_toOffscreenPointer, durationInSec, customTowardsPoint_ofDefaultTextOffsetDirection);
+ }
+
+ public static void PointTag(Vector2 position_in2DViewportSpace, string text = null, string titleText = null, Color color = default(Color), bool drawPointerIfOffscreen = true, float linesWidth_relToViewportHeight = 0.0f, float size_asTextOffsetDistance_relToViewportHeight = 0.2f, Vector2 textOffsetDirection = default(Vector2), float textSizeScaleFactor = 1.0f, bool skipConeDrawing = false, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f, Vector2 customTowardsPoint_ofDefaultTextOffsetDirection = default(Vector2))
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.PointTag") == false) { return; }
+ PointTag(automaticallyFoundCamera, position_in2DViewportSpace, text, titleText, color, drawPointerIfOffscreen, linesWidth_relToViewportHeight, size_asTextOffsetDistance_relToViewportHeight, textOffsetDirection, textSizeScaleFactor, skipConeDrawing, addTextForOutsideDistance_toOffscreenPointer, durationInSec, customTowardsPoint_ofDefaultTextOffsetDirection);
+ }
+ public static void PointTag(Camera targetCamera, Vector2 position_in2DViewportSpace, string text = null, string titleText = null, Color color = default(Color), bool drawPointerIfOffscreen = true, float linesWidth_relToViewportHeight = 0.0f, float size_asTextOffsetDistance_relToViewportHeight = 0.2f, Vector2 textOffsetDirection = default(Vector2), float textSizeScaleFactor = 1.0f, bool skipConeDrawing = false, bool addTextForOutsideDistance_toOffscreenPointer = true, float durationInSec = 0.0f, Vector2 customTowardsPoint_ofDefaultTextOffsetDirection = default(Vector2))
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspacePointTag_2Dpos_cam.Add(new ScreenspacePointTag_2Dpos_cam(targetCamera, position_in2DViewportSpace, text, titleText, color, drawPointerIfOffscreen, linesWidth_relToViewportHeight, size_asTextOffsetDistance_relToViewportHeight, textOffsetDirection, textSizeScaleFactor, skipConeDrawing, addTextForOutsideDistance_toOffscreenPointer, durationInSec, customTowardsPoint_ofDefaultTextOffsetDirection));
+ return;
+ }
+
+ UtilitiesDXXL_Screenspace.PointTag(targetCamera, position_in2DViewportSpace, text, titleText, color, color, drawPointerIfOffscreen, linesWidth_relToViewportHeight, size_asTextOffsetDistance_relToViewportHeight, textOffsetDirection, textSizeScaleFactor, skipConeDrawing, addTextForOutsideDistance_toOffscreenPointer, durationInSec, customTowardsPoint_ofDefaultTextOffsetDirection);
+ }
+
+ public static void Vector(Vector2 vectorStartPos, Vector2 vectorEndPos, Color color = default(Color), float lineWidth_relToViewportHeight = 0.0f, string text = null, float coneLength_relToViewportHeight = 0.05f, bool pointerAtBothSides = false, bool writeComponentValuesAsText = false, float endPlatesSize_relToViewportHeight = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Vector") == false) { return; }
+ Vector(automaticallyFoundCamera, vectorStartPos, vectorEndPos, color, lineWidth_relToViewportHeight, text, coneLength_relToViewportHeight, pointerAtBothSides, writeComponentValuesAsText, endPlatesSize_relToViewportHeight, durationInSec);
+ }
+ public static void Vector(Camera targetCamera, Vector2 vectorStartPos, Vector2 vectorEndPos, Color color = default(Color), float lineWidth_relToViewportHeight = 0.0f, string text = null, float coneLength_relToViewportHeight = 0.05f, bool pointerAtBothSides = false, bool writeComponentValuesAsText = false, float endPlatesSize_relToViewportHeight = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorStartPos, "vectorStartPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorEndPos, "vectorEndPos")) { return; }
+ VectorFrom(targetCamera, vectorStartPos, vectorEndPos - vectorStartPos, color, lineWidth_relToViewportHeight, text, false, coneLength_relToViewportHeight, pointerAtBothSides, writeComponentValuesAsText, endPlatesSize_relToViewportHeight, durationInSec);
+ }
+
+ public static void VectorFrom(Vector2 vectorStartPos, Vector2 vector, Color color = default(Color), float lineWidth_relToViewportHeight = 0.0f, string text = null, bool interpretVectorAsUnwarped = false, float coneLength_relToViewportHeight = 0.05f, bool pointerAtBothSides = false, bool writeComponentValuesAsText = false, float endPlatesSize_relToViewportHeight = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.VectorFrom") == false) { return; }
+ VectorFrom(automaticallyFoundCamera, vectorStartPos, vector, color, lineWidth_relToViewportHeight, text, interpretVectorAsUnwarped, coneLength_relToViewportHeight, pointerAtBothSides, writeComponentValuesAsText, endPlatesSize_relToViewportHeight, durationInSec);
+ }
+ public static void VectorFrom(Camera targetCamera, Vector2 vectorStartPos, Vector2 vector, Color color = default(Color), float lineWidth_relToViewportHeight = 0.0f, string text = null, bool interpretVectorAsUnwarped = false, float coneLength_relToViewportHeight = 0.05f, bool pointerAtBothSides = false, bool writeComponentValuesAsText = false, float endPlatesSize_relToViewportHeight = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(lineWidth_relToViewportHeight, "lineWidth_relToViewportHeight")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(coneLength_relToViewportHeight, "coneLength_relToViewportHeight")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorStartPos, "vectorStartPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vector, "vector")) { return; }
+
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceVectorFrom.Add(new ScreenspaceVectorFrom(targetCamera, vectorStartPos, vector, color, lineWidth_relToViewportHeight, text, interpretVectorAsUnwarped, coneLength_relToViewportHeight, pointerAtBothSides, writeComponentValuesAsText, endPlatesSize_relToViewportHeight, durationInSec));
+ return;
+ }
+
+ lineWidth_relToViewportHeight = UtilitiesDXXL_Math.AbsNonZeroValue(lineWidth_relToViewportHeight);
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(vector))
+ {
+ UtilitiesDXXL_Screenspace.PointFallback(targetCamera, vectorStartPos, "[ VectorScreenspace with length of 0]
" + text, color, lineWidth_relToViewportHeight, durationInSec);
+ return;
+ }
+
+ Vector2 vector_inNonSquareViewportSpace = interpretVectorAsUnwarped ? DirectionInUnitsOfUnwarpedSpace_to_sameLookingDirectionInUnitsOfWarpedSpace(vector, targetCamera) : vector;
+ Vector2 vectorEndPos_inNonSquareViewportSpace = vectorStartPos + vector_inNonSquareViewportSpace;
+ Vector2 middleOfVector_inNonSquareViewportSpace = 0.5f * (vectorStartPos + vectorEndPos_inNonSquareViewportSpace);
+
+ bool isThinLine;
+ float lineWidth_worldSpace = 0.0f;
+ if (UtilitiesDXXL_Math.ApproximatelyZero(lineWidth_relToViewportHeight))
+ {
+ isThinLine = true;
+ }
+ else
+ {
+ lineWidth_worldSpace = UtilitiesDXXL_Screenspace.VertExtentInsideViewportSpace_to_WorldSpaceExtentOnDrawPlane(targetCamera, middleOfVector_inNonSquareViewportSpace, true, lineWidth_relToViewportHeight);
+ isThinLine = false;
+ }
+
+ Vector3 vectorStartPos_worldSpace = UtilitiesDXXL_Screenspace.ViewportSpacePos_to_WorldPosOnDrawPlane(targetCamera, vectorStartPos, false);
+ Vector3 vectorEndPos_worldSpace = UtilitiesDXXL_Screenspace.ViewportSpacePos_to_WorldPosOnDrawPlane(targetCamera, vectorEndPos_inNonSquareViewportSpace, false);
+ Vector3 vector_worldSpace = vectorEndPos_worldSpace - vectorStartPos_worldSpace;
+ Vector3 vectorNormalized_worldSpace = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(vector_worldSpace, out float vectorLength_worldSpace);
+ coneLength_relToViewportHeight = Mathf.Max(coneLength_relToViewportHeight, 0.0f);
+ float coneLength_worldSpace = UtilitiesDXXL_Screenspace.VertExtentInsideViewportSpace_to_WorldSpaceExtentOnDrawPlane(targetCamera, middleOfVector_inNonSquareViewportSpace, true, coneLength_relToViewportHeight);
+ coneLength_worldSpace = Mathf.Clamp(coneLength_worldSpace, 0.01f * vectorLength_worldSpace, 0.45f * vectorLength_worldSpace);
+
+ float coneAngleDeg = 25.0f;
+ if (isThinLine == false)
+ {
+ float coneSize_to_lineWidth_scaler = 1.3f;
+ float minConeAngleDeg = 2.0f * Mathf.Rad2Deg * Mathf.Atan(coneSize_to_lineWidth_scaler * lineWidth_worldSpace / coneLength_worldSpace);
+ coneAngleDeg = Mathf.Max(coneAngleDeg, minConeAngleDeg);
+ }
+
+ float lengthTillConeStart_worldSpace = vectorLength_worldSpace - coneLength_worldSpace;
+ Vector3 endConeBaseCenter_worldSpace = vectorStartPos_worldSpace + vectorNormalized_worldSpace * lengthTillConeStart_worldSpace;
+ Vector3 startConeBaseCenter_worldSpace = vectorStartPos_worldSpace;
+ if (pointerAtBothSides)
+ {
+ startConeBaseCenter_worldSpace = vectorStartPos_worldSpace + vectorNormalized_worldSpace * coneLength_worldSpace;
+ }
+
+ Vector3 startPos_ofNonConedLineSegment_worldSpace;
+ Vector3 endPos_ofNonConedLineSegment_worldSpace;
+ if (vectorStartPos.x < vectorEndPos_inNonSquareViewportSpace.x)
+ {
+ startPos_ofNonConedLineSegment_worldSpace = startConeBaseCenter_worldSpace;
+ endPos_ofNonConedLineSegment_worldSpace = endConeBaseCenter_worldSpace;
+ }
+ else
+ {
+ startPos_ofNonConedLineSegment_worldSpace = endConeBaseCenter_worldSpace;
+ endPos_ofNonConedLineSegment_worldSpace = startConeBaseCenter_worldSpace;
+ }
+
+ UtilitiesDXXL_Screenspace.camPlane.Recreate(targetCamera.transform.position, targetCamera.transform.forward);
+ if (writeComponentValuesAsText)
+ {
+ text = "( " + vector.x + " , " + vector.y + " )
" + text;
+ }
+ float minTextSize_worldSpace = UtilitiesDXXL_Screenspace.VertExtentInsideViewportSpace_to_WorldSpaceExtentOnDrawPlane(targetCamera, middleOfVector_inNonSquareViewportSpace, true, minTextSize_relToViewportHeight);
+ UtilitiesDXXL_DrawBasics.Line(startPos_ofNonConedLineSegment_worldSpace, endPos_ofNonConedLineSegment_worldSpace, color, lineWidth_worldSpace, text, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, UtilitiesDXXL_Screenspace.camPlane, true, 0.0f, minTextSize_worldSpace, durationInSec, false, false, false, targetCamera, false, 0.0f);
+
+ float shorteningOf_straightLineInsideCone_worldSpace = 0.0f;
+ if (isThinLine == false)
+ {
+ shorteningOf_straightLineInsideCone_worldSpace = (0.5f * lineWidth_worldSpace) / Mathf.Tan(Mathf.Deg2Rad * 0.5f * coneAngleDeg);
+ shorteningOf_straightLineInsideCone_worldSpace = Mathf.Min(shorteningOf_straightLineInsideCone_worldSpace, 0.99f * coneLength_worldSpace);
+ }
+
+ Vector3 lineEndInsideEndCone_worldSpace = vectorEndPos_worldSpace - vectorNormalized_worldSpace * shorteningOf_straightLineInsideCone_worldSpace;
+ UtilitiesDXXL_DrawBasics.Line(endConeBaseCenter_worldSpace, lineEndInsideEndCone_worldSpace, color, lineWidth_worldSpace, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, UtilitiesDXXL_Screenspace.camPlane, true, 0.0f, 0.0f, durationInSec, false, false, false, targetCamera, false, 0.0f);
+ if (pointerAtBothSides)
+ {
+ Vector3 lineEndInsideStartCone_worldSpace = vectorStartPos_worldSpace + vectorNormalized_worldSpace * shorteningOf_straightLineInsideCone_worldSpace;
+ UtilitiesDXXL_DrawBasics.Line(startConeBaseCenter_worldSpace, lineEndInsideStartCone_worldSpace, color, lineWidth_worldSpace, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, UtilitiesDXXL_Screenspace.camPlane, true, 0.0f, 0.0f, durationInSec, false, false, false, targetCamera, false, 0.0f);
+ }
+
+ Vector3 upVector_ofConeBaseRect_worldSpace = targetCamera.transform.forward;
+ DrawShapes.ConeFilled(vectorEndPos_worldSpace, coneLength_worldSpace, -vector_worldSpace, upVector_ofConeBaseRect_worldSpace, 0.0f, coneAngleDeg, color, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, false);
+ if (pointerAtBothSides)
+ {
+ DrawShapes.ConeFilled(vectorStartPos_worldSpace, coneLength_worldSpace, vector_worldSpace, upVector_ofConeBaseRect_worldSpace, 0.0f, coneAngleDeg, color, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, false, durationInSec, false);
+ }
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(endPlatesSize_relToViewportHeight) == false)
+ {
+ DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.invisible;
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, vectorStartPos, vectorEndPos_inNonSquareViewportSpace, color, 0.0f, null, lineStyle, 1.0f, 0.0f, null, endPlatesSize_relToViewportHeight, 0.0f, 0.0f, durationInSec);
+ }
+ }
+
+ public static void VectorTo(Vector2 vector, Vector2 vectorEndPos, Color color = default(Color), float lineWidth_relToViewportHeight = 0.0f, string text = null, bool interpretVectorAsUnwarped = false, float coneLength_relToViewportHeight = 0.05f, bool pointerAtBothSides = false, bool writeComponentValuesAsText = false, float endPlatesSize_relToViewportHeight = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.VectorTo") == false) { return; }
+ VectorTo(automaticallyFoundCamera, vector, vectorEndPos, color, lineWidth_relToViewportHeight, text, interpretVectorAsUnwarped, coneLength_relToViewportHeight, pointerAtBothSides, writeComponentValuesAsText, endPlatesSize_relToViewportHeight, durationInSec);
+ }
+ public static void VectorTo(Camera targetCamera, Vector2 vector, Vector2 vectorEndPos, Color color = default(Color), float lineWidth_relToViewportHeight = 0.0f, string text = null, bool interpretVectorAsUnwarped = false, float coneLength_relToViewportHeight = 0.05f, bool pointerAtBothSides = false, bool writeComponentValuesAsText = false, float endPlatesSize_relToViewportHeight = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vectorEndPos, "vectorEndPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(vector, "vector")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceVectorTo.Add(new ScreenspaceVectorTo(targetCamera, vector, vectorEndPos, color, lineWidth_relToViewportHeight, text, interpretVectorAsUnwarped, coneLength_relToViewportHeight, pointerAtBothSides, writeComponentValuesAsText, endPlatesSize_relToViewportHeight, durationInSec));
+ return;
+ }
+
+ Vector2 vectorEndPos_inNonSquareViewportSpace = vectorEndPos;
+ Vector2 vectorStartPos_inNonSquareViewportSpace;
+ if (interpretVectorAsUnwarped)
+ {
+ vectorStartPos_inNonSquareViewportSpace = vectorEndPos_inNonSquareViewportSpace - DirectionInUnitsOfUnwarpedSpace_to_sameLookingDirectionInUnitsOfWarpedSpace(vector, targetCamera);
+ }
+ else
+ {
+ vectorStartPos_inNonSquareViewportSpace = vectorEndPos_inNonSquareViewportSpace - vector;
+ }
+ VectorFrom(targetCamera, vectorStartPos_inNonSquareViewportSpace, vector, color, lineWidth_relToViewportHeight, text, interpretVectorAsUnwarped, coneLength_relToViewportHeight, pointerAtBothSides, writeComponentValuesAsText, endPlatesSize_relToViewportHeight, durationInSec);
+ }
+
+ public static void VectorCircled(Vector2 circleCenter, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float lineWidth_relToViewportHeight = 0.0f, string text = null, float coneLength_relToViewportHeight = 0.05f, bool skipFallbackDisplayOfZeroAngles = false, bool pointerAtBothSides = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.VectorCircled") == false) { return; }
+ VectorCircled(automaticallyFoundCamera, circleCenter, startAngleDegCC_relativeToUp, endAngleDegCC_relativeToUp, radius_relToViewportHeight, color, lineWidth_relToViewportHeight, text, coneLength_relToViewportHeight, skipFallbackDisplayOfZeroAngles, pointerAtBothSides, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec);
+ }
+ public static void VectorCircled(Camera targetCamera, Vector2 circleCenter, float startAngleDegCC_relativeToUp, float endAngleDegCC_relativeToUp, float radius_relToViewportHeight = 0.05f, Color color = default(Color), float lineWidth_relToViewportHeight = 0.0f, string text = null, float coneLength_relToViewportHeight = 0.05f, bool skipFallbackDisplayOfZeroAngles = false, bool pointerAtBothSides = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(startAngleDegCC_relativeToUp, "startAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(endAngleDegCC_relativeToUp, "endAngleDegCC_relativeToUp")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius_relToViewportHeight, "radius_relToViewportHeight")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceVectorCircled_angleToAngle_cam.Add(new ScreenspaceVectorCircled_angleToAngle_cam(targetCamera, circleCenter, startAngleDegCC_relativeToUp, endAngleDegCC_relativeToUp, radius_relToViewportHeight, color, lineWidth_relToViewportHeight, text, coneLength_relToViewportHeight, skipFallbackDisplayOfZeroAngles, pointerAtBothSides, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec));
+ return;
+ }
+
+ Quaternion rotation_fromGlobalUp_toLineStartAngleInXYplane = Quaternion.AngleAxis(startAngleDegCC_relativeToUp, Vector3.forward);
+ Vector3 circleCenter_to_startPos_inUnwarpedSpace_normalized = rotation_fromGlobalUp_toLineStartAngleInXYplane * Vector3.up;
+ Vector2 circleCenter_to_startPos_inWarpedSpace_normalized = DirectionInUnitsOfUnwarpedSpace_to_sameLookingDirectionInUnitsOfWarpedSpace(circleCenter_to_startPos_inUnwarpedSpace_normalized, targetCamera);
+ Vector2 circleCenter_to_startPos_inWarpedScreenspaceSpace = circleCenter_to_startPos_inWarpedSpace_normalized * radius_relToViewportHeight;
+ Vector2 startPos = circleCenter + circleCenter_to_startPos_inWarpedScreenspaceSpace;
+ float turnAngleDegCC = endAngleDegCC_relativeToUp - startAngleDegCC_relativeToUp;
+ VectorCircled(targetCamera, startPos, circleCenter, turnAngleDegCC, color, lineWidth_relToViewportHeight, text, coneLength_relToViewportHeight, skipFallbackDisplayOfZeroAngles, pointerAtBothSides, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec);
+ }
+
+ public static void VectorCircled(Vector2 startPos, Vector2 circleCenter, float turnAngleDegCC, Color color = default(Color), float lineWidth_relToViewportHeight = 0.0f, string text = null, float coneLength_relToViewportHeight = 0.05f, bool skipFallbackDisplayOfZeroAngles = false, bool pointerAtBothSides = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.VectorCircled") == false) { return; }
+ VectorCircled(automaticallyFoundCamera, startPos, circleCenter, turnAngleDegCC, color, lineWidth_relToViewportHeight, text, coneLength_relToViewportHeight, skipFallbackDisplayOfZeroAngles, pointerAtBothSides, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec);
+ }
+ public static void VectorCircled(Camera targetCamera, Vector2 startPos, Vector2 circleCenter, float turnAngleDegCC, Color color = default(Color), float lineWidth_relToViewportHeight = 0.0f, string text = null, float coneLength_relToViewportHeight = 0.05f, bool skipFallbackDisplayOfZeroAngles = false, bool pointerAtBothSides = false, float minAngleDeg_withoutTextLineBreak = 45.0f, DrawText.TextAnchorCircledDXXL textAnchor = DrawText.TextAnchorCircledDXXL.LowerLeftOfFirstLine, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceVectorCircled_angleFromStartPos_cam.Add(new ScreenspaceVectorCircled_angleFromStartPos_cam(targetCamera, startPos, circleCenter, turnAngleDegCC, color, lineWidth_relToViewportHeight, text, coneLength_relToViewportHeight, skipFallbackDisplayOfZeroAngles, pointerAtBothSides, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec));
+ return;
+ }
+ UtilitiesDXXL_LineCircled.VectorCircledScreenspace(targetCamera, startPos, circleCenter, turnAngleDegCC, color, lineWidth_relToViewportHeight, text, coneLength_relToViewportHeight, skipFallbackDisplayOfZeroAngles, pointerAtBothSides, minAngleDeg_withoutTextLineBreak, textAnchor, durationInSec);
+ }
+
+ public static void Icon(Vector3 position_in3DWorldspace, DrawBasics.IconType icon, Color color = default(Color), float size_relToViewportHeight = 0.1f, string text = null, float zRotationDegCC = 0.0f, float strokeWidth_relToViewportHeight = 0.0f, bool displayPointerIfOffscreen = false, bool mirrorHorizontally = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceIcon_3Dpos.Add(new ScreenspaceIcon_3Dpos(position_in3DWorldspace, icon, color, size_relToViewportHeight, text, zRotationDegCC, strokeWidth_relToViewportHeight, displayPointerIfOffscreen, mirrorHorizontally, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Icon") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ Icon(position_in2DViewportSpace, icon, color, size_relToViewportHeight, text, zRotationDegCC, strokeWidth_relToViewportHeight, displayPointerIfOffscreen, mirrorHorizontally, durationInSec);
+ }
+ public static void Icon(Camera targetCamera, Vector3 position_in3DWorldspace, DrawBasics.IconType icon, Color color = default(Color), float size_relToViewportHeight = 0.1f, string text = null, float zRotationDegCC = 0.0f, float strokeWidth_relToViewportHeight = 0.0f, bool displayPointerIfOffscreen = false, bool mirrorHorizontally = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceIcon_3Dpos_cam.Add(new ScreenspaceIcon_3Dpos_cam(targetCamera, position_in3DWorldspace, icon, color, size_relToViewportHeight, text, zRotationDegCC, strokeWidth_relToViewportHeight, displayPointerIfOffscreen, mirrorHorizontally, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(targetCamera, position_in3DWorldspace, false);
+ Icon(targetCamera, position_in2DViewportSpace, icon, color, size_relToViewportHeight, text, zRotationDegCC, strokeWidth_relToViewportHeight, displayPointerIfOffscreen, mirrorHorizontally, durationInSec);
+ }
+
+ public static void Icon(Vector2 position_in2DViewportSpace, DrawBasics.IconType icon, Color color = default(Color), float size_relToViewportHeight = 0.1f, string text = null, float zRotationDegCC = 0.0f, float strokeWidth_relToViewportHeight = 0.0f, bool displayPointerIfOffscreen = false, bool mirrorHorizontally = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Icon") == false) { return; }
+ Icon(automaticallyFoundCamera, position_in2DViewportSpace, icon, color, size_relToViewportHeight, text, zRotationDegCC, strokeWidth_relToViewportHeight, displayPointerIfOffscreen, mirrorHorizontally, durationInSec);
+ }
+ public static void Icon(Camera targetCamera, Vector2 position_in2DViewportSpace, DrawBasics.IconType icon, Color color = default(Color), float size_relToViewportHeight = 0.1f, string text = null, float zRotationDegCC = 0.0f, float strokeWidth_relToViewportHeight = 0.0f, bool displayPointerIfOffscreen = false, bool mirrorHorizontally = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(size_relToViewportHeight, "size_relToViewportHeight")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zRotationDegCC, "zRotationDegCC")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(position_in2DViewportSpace, "position")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceIcon_2Dpos_cam.Add(new ScreenspaceIcon_2Dpos_cam(targetCamera, position_in2DViewportSpace, icon, color, size_relToViewportHeight, text, zRotationDegCC, strokeWidth_relToViewportHeight, displayPointerIfOffscreen, mirrorHorizontally, durationInSec));
+ return;
+ }
+
+ float distanceThresholdOutsideScreen_relToViewportHeight = 0.4f * size_relToViewportHeight;
+ if (InternalDXXL_BoundsCamViewportSpace.IsOutsideViewportYWithPadding(position_in2DViewportSpace, distanceThresholdOutsideScreen_relToViewportHeight))
+ {
+ if (displayPointerIfOffscreen)
+ {
+ Point(targetCamera, position_in2DViewportSpace, "[Icon(ScreenSpace) " + DrawText.MarkupIcon(icon) + " offscreen at " + UtilitiesDXXL_Log.Get_vectorComponentsAsString(position_in2DViewportSpace) + "]
" + text, color, 0.1f, 0.0f, 0.0f, true, true, false, true, durationInSec);
+ }
+ return;
+ }
+ float distanceThresholdOutsideScreen_relToViewportWidth = distanceThresholdOutsideScreen_relToViewportHeight / targetCamera.aspect;
+ if (InternalDXXL_BoundsCamViewportSpace.IsOutsideViewportXWithPadding(position_in2DViewportSpace, distanceThresholdOutsideScreen_relToViewportWidth))
+ {
+ if (displayPointerIfOffscreen)
+ {
+ Point(targetCamera, position_in2DViewportSpace, "[Icon(ScreenSpace) " + DrawText.MarkupIcon(icon) + " offscreen at " + UtilitiesDXXL_Log.Get_vectorComponentsAsString(position_in2DViewportSpace) + "]
" + text, color, 0.1f, 0.0f, 0.0f, true, true, false, true, durationInSec);
+ }
+ return;
+ }
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(size_relToViewportHeight))
+ {
+ UtilitiesDXXL_Screenspace.PointFallback(targetCamera, position_in2DViewportSpace, "[Icon(ScreenSpace) " + DrawText.MarkupIcon(icon) + " with size of 0]
" + text, color, 0.0f, durationInSec);
+ return;
+ }
+
+ Vector3 position_worldSpace = UtilitiesDXXL_Screenspace.ViewportSpacePos_to_WorldPosOnDrawPlane(targetCamera, position_in2DViewportSpace, false);
+ float size_worldSpace = UtilitiesDXXL_Screenspace.VertExtentInsideViewportSpace_to_WorldSpaceExtentOnDrawPlane(targetCamera, position_in2DViewportSpace, true, size_relToViewportHeight);
+ Quaternion rotation_worldSpace = UtilitiesDXXL_Math.ApproximatelyZero(zRotationDegCC) ? targetCamera.transform.rotation : (Quaternion.AngleAxis(zRotationDegCC, targetCamera.transform.forward) * targetCamera.transform.rotation);
+ float minTextSize_worldSpace = UtilitiesDXXL_Screenspace.VertExtentInsideViewportSpace_to_WorldSpaceExtentOnDrawPlane(targetCamera, position_in2DViewportSpace, true, minTextSize_relToViewportHeight);
+
+ int strokeWidth_asPPMofSize = 0;
+ if ((UtilitiesDXXL_Math.ApproximatelyZero(strokeWidth_relToViewportHeight) == false) && (UtilitiesDXXL_Math.ApproximatelyZero(size_relToViewportHeight) == false))
+ {
+ float strokeWidth_relToIconSize = strokeWidth_relToViewportHeight / size_relToViewportHeight;
+ strokeWidth_asPPMofSize = (int)(1000000.0f * strokeWidth_relToIconSize);
+ }
+
+ bool autoFlipMirroredText_toFitObserverCam = false;
+ UtilitiesDXXL_DrawBasics.Icon(position_worldSpace, icon, color, size_worldSpace, text, rotation_worldSpace, strokeWidth_asPPMofSize, mirrorHorizontally, durationInSec, false, 0.15f, minTextSize_worldSpace, autoFlipMirroredText_toFitObserverCam);
+ }
+
+ public static void Dot(Vector3 position_in3DWorldspace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), string text = null, float density = 1.0f, bool displayPointerIfOffscreen = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceDot_3Dpos.Add(new ScreenspaceDot_3Dpos(position_in3DWorldspace, radius_relToViewportHeight, color, text, density, displayPointerIfOffscreen, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Dot") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ Dot(position_in2DViewportSpace, radius_relToViewportHeight, color, text, density, displayPointerIfOffscreen, durationInSec);
+ }
+
+ public static void Dot(Camera targetCamera, Vector3 position_in3DWorldspace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), string text = null, float density = 1.0f, bool displayPointerIfOffscreen = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceDot_3Dpos_cam.Add(new ScreenspaceDot_3Dpos_cam(targetCamera, position_in3DWorldspace, radius_relToViewportHeight, color, text, density, displayPointerIfOffscreen, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(targetCamera, position_in3DWorldspace, false);
+ Dot(targetCamera, position_in2DViewportSpace, radius_relToViewportHeight, color, text, density, displayPointerIfOffscreen, durationInSec);
+ }
+
+ public static void Dot(Vector2 position_in2DViewportSpace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), string text = null, float density = 1.0f, bool displayPointerIfOffscreen = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.Dot") == false) { return; }
+ Dot(automaticallyFoundCamera, position_in2DViewportSpace, radius_relToViewportHeight, color, text, density, displayPointerIfOffscreen, durationInSec);
+ }
+
+ public static void Dot(Camera targetCamera, Vector2 position_in2DViewportSpace, float radius_relToViewportHeight = 0.05f, Color color = default(Color), string text = null, float density = 1.0f, bool displayPointerIfOffscreen = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius_relToViewportHeight, "radius_relToViewportHeight")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(density, "density")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(position_in2DViewportSpace, "position")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceDot_2Dpos_cam.Add(new ScreenspaceDot_2Dpos_cam(targetCamera, position_in2DViewportSpace, radius_relToViewportHeight, color, text, density, displayPointerIfOffscreen, durationInSec));
+ return;
+ }
+
+ float distanceThresholdOutsideScreen_relToViewportHeight = 0.975f * radius_relToViewportHeight;
+ if (InternalDXXL_BoundsCamViewportSpace.IsOutsideViewportYWithPadding(position_in2DViewportSpace, distanceThresholdOutsideScreen_relToViewportHeight))
+ {
+ if (displayPointerIfOffscreen)
+ {
+ Point(targetCamera, position_in2DViewportSpace, "[Dot(ScreenSpace) offscreen at " + UtilitiesDXXL_Log.Get_vectorComponentsAsString(position_in2DViewportSpace) + "]
" + text, color, 0.1f, 0.0f, 0.0f, true, true, false, true, durationInSec);
+ }
+ return;
+ }
+ float distanceThresholdOutsideScreen_relToViewportWidth = distanceThresholdOutsideScreen_relToViewportHeight / targetCamera.aspect;
+ if (InternalDXXL_BoundsCamViewportSpace.IsOutsideViewportXWithPadding(position_in2DViewportSpace, distanceThresholdOutsideScreen_relToViewportWidth))
+ {
+ if (displayPointerIfOffscreen)
+ {
+ Point(targetCamera, position_in2DViewportSpace, "[Dot(ScreenSpace) offscreen at " + UtilitiesDXXL_Log.Get_vectorComponentsAsString(position_in2DViewportSpace) + "]
" + text, color, 0.1f, 0.0f, 0.0f, true, true, false, true, durationInSec);
+ }
+ return;
+ }
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(radius_relToViewportHeight))
+ {
+ UtilitiesDXXL_Screenspace.PointFallback(targetCamera, position_in2DViewportSpace, "[Dot(ScreenSpace) with size of 0]
" + text, color, 0.0f, durationInSec);
+ return;
+ }
+
+ Vector3 position_worldSpace = UtilitiesDXXL_Screenspace.ViewportSpacePos_to_WorldPosOnDrawPlane(targetCamera, position_in2DViewportSpace, false);
+ float radius_worldSpace = UtilitiesDXXL_Screenspace.VertExtentInsideViewportSpace_to_WorldSpaceExtentOnDrawPlane(targetCamera, position_in2DViewportSpace, true, radius_relToViewportHeight);
+ Quaternion rotation_worldSpace = targetCamera.transform.rotation;
+ float minTextSize_worldSpace = UtilitiesDXXL_Screenspace.VertExtentInsideViewportSpace_to_WorldSpaceExtentOnDrawPlane(targetCamera, position_in2DViewportSpace, true, minTextSize_relToViewportHeight);
+
+ bool autoFlipMirroredText_toFitObserverCam = false;
+ UtilitiesDXXL_DrawBasics.Dot(position_worldSpace, radius_worldSpace, rotation_worldSpace, color, text, density, durationInSec, false, 0.15f, minTextSize_worldSpace, autoFlipMirroredText_toFitObserverCam);
+ }
+
+ public static void MovingArrowsRay(Vector2 start, Vector2 direction, Color color = default(Color), float lineWidth_relToViewportHeight = 0.016f, float distanceBetweenArrows_relToViewportHeight = 0.11f, float lengthOfArrows_relToViewportHeight = 0.05f, string text = null, float animationSpeed = 0.5f, bool backwardAnimationFlipsArrowDirection = true, bool interpretDirectionAsUnwarped = false, float endPlatesSize_relToViewportHeight = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.MovingArrowsRay") == false) { return; }
+ MovingArrowsRay(automaticallyFoundCamera, start, direction, color, lineWidth_relToViewportHeight, distanceBetweenArrows_relToViewportHeight, lengthOfArrows_relToViewportHeight, text, animationSpeed, backwardAnimationFlipsArrowDirection, interpretDirectionAsUnwarped, endPlatesSize_relToViewportHeight, durationInSec);
+ }
+ public static void MovingArrowsRay(Camera targetCamera, Vector2 start, Vector2 direction, Color color = default(Color), float lineWidth_relToViewportHeight = 0.016f, float distanceBetweenArrows_relToViewportHeight = 0.11f, float lengthOfArrows_relToViewportHeight = 0.05f, string text = null, float animationSpeed = 0.5f, bool backwardAnimationFlipsArrowDirection = true, bool interpretDirectionAsUnwarped = false, float endPlatesSize_relToViewportHeight = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceMovingArrowsRay.Add(new ScreenspaceMovingArrowsRay(targetCamera, start, direction, color, lineWidth_relToViewportHeight, distanceBetweenArrows_relToViewportHeight, lengthOfArrows_relToViewportHeight, text, animationSpeed, backwardAnimationFlipsArrowDirection, interpretDirectionAsUnwarped, endPlatesSize_relToViewportHeight, durationInSec));
+ return;
+ }
+
+ MovingArrowsRay_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, start, direction, color, lineWidth_relToViewportHeight, distanceBetweenArrows_relToViewportHeight, lengthOfArrows_relToViewportHeight, text, animationSpeed, null, backwardAnimationFlipsArrowDirection, interpretDirectionAsUnwarped, endPlatesSize_relToViewportHeight, durationInSec);
+ }
+
+ public static void MovingArrowsLine(Vector2 start, Vector2 end, Color color = default(Color), float lineWidth_relToViewportHeight = 0.016f, float distanceBetweenArrows_relToViewportHeight = 0.11f, float lengthOfArrows_relToViewportHeight = 0.05f, string text = null, float animationSpeed = 0.5f, bool backwardAnimationFlipsArrowDirection = true, float endPlatesSize_relToViewportHeight = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.MovingArrowsLine") == false) { return; }
+ MovingArrowsLine(automaticallyFoundCamera, start, end, color, lineWidth_relToViewportHeight, distanceBetweenArrows_relToViewportHeight, lengthOfArrows_relToViewportHeight, text, animationSpeed, backwardAnimationFlipsArrowDirection, endPlatesSize_relToViewportHeight, durationInSec);
+ }
+
+ public static void MovingArrowsLine(Camera targetCamera, Vector2 start, Vector2 end, Color color = default(Color), float lineWidth_relToViewportHeight = 0.016f, float distanceBetweenArrows_relToViewportHeight = 0.11f, float lengthOfArrows_relToViewportHeight = 0.05f, string text = null, float animationSpeed = 0.5f, bool backwardAnimationFlipsArrowDirection = true, float endPlatesSize_relToViewportHeight = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceMovingArrowsLine.Add(new ScreenspaceMovingArrowsLine(targetCamera, start, end, color, lineWidth_relToViewportHeight, distanceBetweenArrows_relToViewportHeight, lengthOfArrows_relToViewportHeight, text, animationSpeed, backwardAnimationFlipsArrowDirection, endPlatesSize_relToViewportHeight, durationInSec));
+ return;
+ }
+
+ MovingArrowsLine_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, start, end, color, lineWidth_relToViewportHeight, distanceBetweenArrows_relToViewportHeight, lengthOfArrows_relToViewportHeight, text, animationSpeed, null, backwardAnimationFlipsArrowDirection, endPlatesSize_relToViewportHeight, durationInSec);
+ }
+
+ public static void RayWithAlternatingColors(Vector2 start, Vector2 direction, Color color1 = default(Color), Color color2 = default(Color), float lineWidth_relToViewportHeight = 0.0f, float lengthOfStripes_relToViewportHeight = 0.03f, string text = null, bool interpretDirectionAsUnwarped = false, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.RayWithAlternatingColors") == false) { return; }
+ RayWithAlternatingColors(automaticallyFoundCamera, start, direction, color1, color2, lineWidth_relToViewportHeight, lengthOfStripes_relToViewportHeight, text, interpretDirectionAsUnwarped, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, durationInSec);
+ }
+ public static void RayWithAlternatingColors(Camera targetCamera, Vector2 start, Vector2 direction, Color color1 = default(Color), Color color2 = default(Color), float lineWidth_relToViewportHeight = 0.0f, float lengthOfStripes_relToViewportHeight = 0.03f, string text = null, bool interpretDirectionAsUnwarped = false, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceRayWithAlternatingColors.Add(new ScreenspaceRayWithAlternatingColors(targetCamera, start, direction, color1, color2, lineWidth_relToViewportHeight, lengthOfStripes_relToViewportHeight, text, interpretDirectionAsUnwarped, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, durationInSec));
+ return;
+ }
+
+ RayWithAlternatingColors_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, start, direction, color1, color2, lineWidth_relToViewportHeight, lengthOfStripes_relToViewportHeight, text, interpretDirectionAsUnwarped, animationSpeed, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, durationInSec);
+ }
+
+ public static void LineWithAlternatingColors(Vector2 start, Vector2 end, Color color1 = default(Color), Color color2 = default(Color), float lineWidth_relToViewportHeight = 0.0f, float lengthOfStripes_relToViewportHeight = 0.03f, string text = null, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineWithAlternatingColors") == false) { return; }
+ LineWithAlternatingColors(automaticallyFoundCamera, start, end, color1, color2, lineWidth_relToViewportHeight, lengthOfStripes_relToViewportHeight, text, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, durationInSec);
+ }
+ public static void LineWithAlternatingColors(Camera targetCamera, Vector2 start, Vector2 end, Color color1 = default(Color), Color color2 = default(Color), float lineWidth_relToViewportHeight = 0.0f, float lengthOfStripes_relToViewportHeight = 0.03f, string text = null, float animationSpeed = 0.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineWithAlternatingColors.Add(new ScreenspaceLineWithAlternatingColors(targetCamera, start, end, color1, color2, lineWidth_relToViewportHeight, lengthOfStripes_relToViewportHeight, text, animationSpeed, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, durationInSec));
+ return;
+ }
+ LineWithAlternatingColors_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, start, end, color1, color2, lineWidth_relToViewportHeight, lengthOfStripes_relToViewportHeight, text, animationSpeed, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, durationInSec);
+ }
+
+ public static void BlinkingRay(Vector2 start, Vector2 direction, Color primaryColor = default(Color), float blinkDurationInSec = 0.5f, float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, Color blinkColor = default(Color), float stylePatternScaleFactor = 1.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.BlinkingRay") == false) { return; }
+ BlinkingRay(automaticallyFoundCamera, start, direction, primaryColor, blinkDurationInSec, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, blinkColor, stylePatternScaleFactor, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+ public static void BlinkingRay(Camera targetCamera, Vector2 start, Vector2 direction, Color primaryColor = default(Color), float blinkDurationInSec = 0.5f, float width_relToViewportHeight = 0.0f, string text = null, bool interpretDirectionAsUnwarped = false, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, Color blinkColor = default(Color), float stylePatternScaleFactor = 1.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(direction, "direction")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceBlinkingRay.Add(new ScreenspaceBlinkingRay(targetCamera, start, direction, primaryColor, blinkDurationInSec, width_relToViewportHeight, text, interpretDirectionAsUnwarped, style, blinkColor, stylePatternScaleFactor, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ Vector2 direction_inNonSquareViewportSpace = interpretDirectionAsUnwarped ? DirectionInUnitsOfUnwarpedSpace_to_sameLookingDirectionInUnitsOfWarpedSpace(direction, targetCamera) : direction;
+ Vector2 end = start + direction_inNonSquareViewportSpace;
+ BlinkingLine(targetCamera, start, end, primaryColor, blinkDurationInSec, width_relToViewportHeight, text, style, blinkColor, stylePatternScaleFactor, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void BlinkingLine(Vector2 start, Vector2 end, Color primaryColor = default(Color), float blinkDurationInSec = 0.5f, float width_relToViewportHeight = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, Color blinkColor = default(Color), float stylePatternScaleFactor = 1.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.BlinkingLine") == false) { return; }
+ BlinkingLine(automaticallyFoundCamera, start, end, primaryColor, blinkDurationInSec, width_relToViewportHeight, text, style, blinkColor, stylePatternScaleFactor, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+ public static void BlinkingLine(Camera targetCamera, Vector2 start, Vector2 end, Color primaryColor = default(Color), float blinkDurationInSec = 0.5f, float width_relToViewportHeight = 0.0f, string text = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, Color blinkColor = default(Color), float stylePatternScaleFactor = 1.0f, float endPlatesSize_relToViewportHeight = 0.0f, float alphaFadeOutLength_0to1 = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(blinkDurationInSec, "blinkDurationInSec")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceBlinkingLine.Add(new ScreenspaceBlinkingLine(targetCamera, start, end, primaryColor, blinkDurationInSec, width_relToViewportHeight, text, style, blinkColor, stylePatternScaleFactor, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ blinkDurationInSec = Mathf.Max(blinkDurationInSec, UtilitiesDXXL_DrawBasics.min_blinkDurationInSec);
+ float passedBlinkIntervallsSinceStartup = UtilitiesDXXL_LineStyles.GetTime() / blinkDurationInSec;
+ primaryColor = UtilitiesDXXL_Colors.OverwriteDefaultColor(primaryColor);
+ if (UtilitiesDXXL_Math.CheckIf_givenNumberIs_evenNotOdd(Mathf.FloorToInt(passedBlinkIntervallsSinceStartup)))
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, start, end, primaryColor, width_relToViewportHeight, text, style, stylePatternScaleFactor, 0.0f, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+ else
+ {
+ if (UtilitiesDXXL_Colors.IsDefaultColor(blinkColor))
+ {
+ Color alternatingBlinkColor = UtilitiesDXXL_Colors.Invert_andAlphaTo1(primaryColor);
+ alternatingBlinkColor = UtilitiesDXXL_Colors.OverwriteColorNearGreyWithBlack(alternatingBlinkColor);
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, start, end, alternatingBlinkColor, width_relToViewportHeight, text, style, stylePatternScaleFactor, 0.0f, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+ else
+ {
+ Line_fadeableAnimSpeed_screenspace.InternalDraw(targetCamera, start, end, blinkColor, width_relToViewportHeight, text, style, stylePatternScaleFactor, 0.0f, null, endPlatesSize_relToViewportHeight, alphaFadeOutLength_0to1, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+ }
+ }
+
+ public static void RayUnderTension(Vector2 start, Vector2 direction, float relaxedLength_relToViewportHeight = 0.4f, Color relaxedColor = default(Color), DrawBasics.LineStyle style = DrawBasics.LineStyle.sine, float stretchFactor_forStretchedTensionColor = 2.0f, Color color_forStretchedTension = default(Color), float stretchFactor_forSqueezedTensionColor = 0.0f, Color color_forSqueezedTension = default(Color), float width_relToViewportHeight = 0.0f, string text = null, float alphaOfReferenceLengthDisplay = 0.1f, bool interpretDirectionAsUnwarped = false, float stylePatternScaleFactor = 1.0f, float endPlatesSize_relToViewportHeight = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.RayUnderTension") == false) { return; }
+ RayUnderTension(automaticallyFoundCamera, start, direction, relaxedLength_relToViewportHeight, relaxedColor, style, stretchFactor_forStretchedTensionColor, color_forStretchedTension, stretchFactor_forSqueezedTensionColor, color_forSqueezedTension, width_relToViewportHeight, text, alphaOfReferenceLengthDisplay, interpretDirectionAsUnwarped, stylePatternScaleFactor, endPlatesSize_relToViewportHeight, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void RayUnderTension(Camera targetCamera, Vector2 start, Vector2 direction, float relaxedLength_relToViewportHeight = 0.4f, Color relaxedColor = default(Color), DrawBasics.LineStyle style = DrawBasics.LineStyle.sine, float stretchFactor_forStretchedTensionColor = 2.0f, Color color_forStretchedTension = default(Color), float stretchFactor_forSqueezedTensionColor = 0.0f, Color color_forSqueezedTension = default(Color), float width_relToViewportHeight = 0.0f, string text = null, float alphaOfReferenceLengthDisplay = 0.1f, bool interpretDirectionAsUnwarped = false, float stylePatternScaleFactor = 1.0f, float endPlatesSize_relToViewportHeight = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(start, "start")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(direction, "direction")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceRayUnderTension.Add(new ScreenspaceRayUnderTension(targetCamera, start, direction, relaxedLength_relToViewportHeight, relaxedColor, style, stretchFactor_forStretchedTensionColor, color_forStretchedTension, stretchFactor_forSqueezedTensionColor, color_forSqueezedTension, width_relToViewportHeight, text, alphaOfReferenceLengthDisplay, interpretDirectionAsUnwarped, stylePatternScaleFactor, endPlatesSize_relToViewportHeight, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ Vector2 direction_inNonSquareViewportSpace = interpretDirectionAsUnwarped ? DirectionInUnitsOfUnwarpedSpace_to_sameLookingDirectionInUnitsOfWarpedSpace(direction, targetCamera) : direction;
+ LineUnderTension(targetCamera, start, start + direction_inNonSquareViewportSpace, relaxedLength_relToViewportHeight, relaxedColor, style, stretchFactor_forStretchedTensionColor, color_forStretchedTension, stretchFactor_forSqueezedTensionColor, color_forSqueezedTension, width_relToViewportHeight, text, alphaOfReferenceLengthDisplay, stylePatternScaleFactor, endPlatesSize_relToViewportHeight, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineUnderTension(Vector2 start, Vector2 end, float relaxedLength_relToViewportHeight = 0.4f, Color relaxedColor = default(Color), DrawBasics.LineStyle style = DrawBasics.LineStyle.sine, float stretchFactor_forStretchedTensionColor = 2.0f, Color color_forStretchedTension = default(Color), float stretchFactor_forSqueezedTensionColor = 0.0f, Color color_forSqueezedTension = default(Color), float width_relToViewportHeight = 0.0f, string text = null, float alphaOfReferenceLengthDisplay = 0.1f, float stylePatternScaleFactor = 1.0f, float endPlatesSize_relToViewportHeight = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawScreenspace.LineUnderTension") == false) { return; }
+ LineUnderTension(automaticallyFoundCamera, start, end, relaxedLength_relToViewportHeight, relaxedColor, style, stretchFactor_forStretchedTensionColor, color_forStretchedTension, stretchFactor_forSqueezedTensionColor, color_forSqueezedTension, width_relToViewportHeight, text, alphaOfReferenceLengthDisplay, stylePatternScaleFactor, endPlatesSize_relToViewportHeight, enlargeSmallTextToThisMinRelTextSize, durationInSec);
+ }
+
+ public static void LineUnderTension(Camera targetCamera, Vector2 start, Vector2 end, float relaxedLength_relToViewportHeight = 0.4f, Color relaxedColor = default(Color), DrawBasics.LineStyle style = DrawBasics.LineStyle.sine, float stretchFactor_forStretchedTensionColor = 2.0f, Color color_forStretchedTension = default(Color), float stretchFactor_forSqueezedTensionColor = 0.0f, Color color_forSqueezedTension = default(Color), float width_relToViewportHeight = 0.0f, string text = null, float alphaOfReferenceLengthDisplay = 0.1f, float stylePatternScaleFactor = 1.0f, float endPlatesSize_relToViewportHeight = 0.0f, float enlargeSmallTextToThisMinRelTextSize = minTextSize_relToViewportHeight, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceLineUnderTension.Add(new ScreenspaceLineUnderTension(targetCamera, start, end, relaxedLength_relToViewportHeight, relaxedColor, style, stretchFactor_forStretchedTensionColor, color_forStretchedTension, stretchFactor_forSqueezedTensionColor, color_forSqueezedTension, width_relToViewportHeight, text, alphaOfReferenceLengthDisplay, stylePatternScaleFactor, endPlatesSize_relToViewportHeight, enlargeSmallTextToThisMinRelTextSize, durationInSec));
+ return;
+ }
+
+ InternalDXXL_LineParamsFromCamViewportSpace lineParams = UtilitiesDXXL_Screenspace.GetLineParamsFromCamViewportSpace(targetCamera, start, end, width_relToViewportHeight, style, stylePatternScaleFactor, enlargeSmallTextToThisMinRelTextSize, 0.0f, endPlatesSize_relToViewportHeight);
+ if (lineParams == null) { return; }
+
+ Vector2 middleV2 = 0.5f * (start + end);
+ float relaxedLength_worldSpace = UtilitiesDXXL_Screenspace.VertExtentInsideViewportSpace_to_WorldSpaceExtentOnDrawPlane(targetCamera, middleV2, true, relaxedLength_relToViewportHeight);
+ bool parametersAreInvalid = UtilitiesDXXL_DrawBasics.GetSpecsOfLineUnderTension(out float tensionFactor, out Color usedColor, out float lineLength_worldSpace, lineParams.startAnchor_worldSpace, lineParams.endAnchor_worldSpace, relaxedLength_worldSpace, relaxedColor, color_forStretchedTension, color_forSqueezedTension, stretchFactor_forStretchedTensionColor, stretchFactor_forSqueezedTensionColor);
+ if (parametersAreInvalid) { return; }
+
+ UtilitiesDXXL_DrawBasics.TryDrawReferenceLengthDisplay_ofLineUnderTension(lineParams.startAnchor_worldSpace, lineParams.endAnchor_worldSpace, alphaOfReferenceLengthDisplay, relaxedLength_worldSpace, relaxedColor, lineLength_worldSpace, lineParams.camPlane, durationInSec, false);
+
+ UtilitiesDXXL_DrawBasics.Set_endPlates_sizeInterpretation_reversible(DrawBasics.LengthInterpretation.absoluteUnits);
+ UtilitiesDXXL_DrawBasics.Line(lineParams.startAnchor_worldSpace, lineParams.endAnchor_worldSpace, usedColor, lineParams.width_worldSpace, text, lineParams.lineStyleForcedTo2D, lineParams.patternScaleFactor_worldSpace, 0.0f, null, lineParams.camPlane, true, 0.0f, lineParams.enlargeSmallTextToThisMinTextSize_worldSpace, durationInSec, false, false, false, targetCamera, false, lineParams.endPlatesSize_inAbsoluteWorldSpaceUnits, tensionFactor);
+ UtilitiesDXXL_DrawBasics.Reverse_endPlates_sizeInterpretation();
+ }
+
+ public static Vector2 DirectionInUnitsOfWarpedSpace_to_sameLookingDirectionInUnitsOfUnwarpedSpace(Vector2 directionInsideWarpedNonUniformViewportSpace_toConvert, Camera camera)
+ {
+ //when drawing in screenspace there is the problem that the interpretation of direction vectors is ambiguous. This is because the mostly non-squared screens result in a screenSpace/viewportSpace that has differnt length units for the x axis and y axis. For example the Vector (1,1) in a normal unwarped coordinate system goes to the upper right side with an angle of 45 degrees. In viewportSpace with an aspect ratio of 16 (width) : 9 (height), the same vector is horizontally stretched (warped) resulting in a flatter direction (of around 30 degrees)
+ //If you have a direction vector in units of the non-uniform viewportSpace and want the same looking vector (meaning appearing with the same angle and same length to the human viewer), but expressed in units of an unwarped uniform coordinate space, then you can use this function.
+ //Convention of the conversion executed by this function: The height of the camera viewport counts as 1 unit in the unwarped uniform coordinate space.
+ //see also the "DirectionInUnwarpedSpace_toSameLookingDirectionInWarpedSpace" function
+
+ if (camera == null)
+ {
+ Debug.LogError("Cannot convert to unwarped space, because camera is 'null'.");
+ return directionInsideWarpedNonUniformViewportSpace_toConvert;
+ }
+
+ return new Vector2(directionInsideWarpedNonUniformViewportSpace_toConvert.x * camera.aspect, directionInsideWarpedNonUniformViewportSpace_toConvert.y);
+ }
+
+ public static Vector2 DirectionInUnitsOfUnwarpedSpace_to_sameLookingDirectionInUnitsOfWarpedSpace(Vector2 directionInsideUniform1by1SquareSpace_toConvert, Camera camera)
+ {
+ if (camera == null)
+ {
+ Debug.LogError("Cannot convert to warped space, because camera is 'null'.");
+ return directionInsideUniform1by1SquareSpace_toConvert;
+ }
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(camera.aspect))
+ {
+ Debug.LogError("Cannot convert to warped space, because camera.aspect is 0.");
+ return directionInsideUniform1by1SquareSpace_toConvert;
+ }
+
+ return new Vector2(directionInsideUniform1by1SquareSpace_toConvert.x / camera.aspect, directionInsideUniform1by1SquareSpace_toConvert.y);
+ }
+
+ public static Camera VisualizeAutomaticCameraForDrawing(bool visualizeFrustum = true, bool logPositionToConsole = true, Color color = default(Color), float durationInSec = 0.0f)
+ {
+ //If you want find out to which camera the Screenspace functions without camera parameter are drawing you can use this function. It can be handy if you have multiple cameras in the Scene and don't know which one is used for drawing to screenspace. See also "defaultCameraForDrawing" and "defaultScreenspaceWindowForDrawing". Note that it can also be the Scene View camera, in which case you cannot find the camera in your hierarchy.
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return null; }
+ UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, null, false);
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ScreenspaceVisualizeAutomaticCameraForDrawing.Add(new ScreenspaceVisualizeAutomaticCameraForDrawing(visualizeFrustum, logPositionToConsole, color, durationInSec));
+ return automaticallyFoundCamera;
+ }
+
+ if (automaticallyFoundCamera != null)
+ {
+ if (logPositionToConsole)
+ {
+ Debug.Log("[Draw XXL] Position of the 'Automatic Camera for Drawing': " + UtilitiesDXXL_Log.Get_vectorComponentsAsString(automaticallyFoundCamera.transform.position));
+ }
+
+ if (visualizeFrustum)
+ {
+ string displayedText = "This is the camera to which Draw XXL draws when using the
DrawScreenspace
class.";
+ bool hiddenByNearerObjects = false;
+ DrawEngineBasics.CameraFrustum(automaticallyFoundCamera, color, 0.18f, 0.0f, 60, displayedText, true, default(Vector3), durationInSec, hiddenByNearerObjects);
+ }
+ }
+ return automaticallyFoundCamera;
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/DrawScreenspace.cs.meta b/Runtime/DrawDebugLibrary/DrawScreenspace.cs.meta
new file mode 100644
index 0000000..85dcc56
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawScreenspace.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3de7fccd43155f5458797acdf9bbf363
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawShapes.cs b/Runtime/DrawDebugLibrary/DrawShapes.cs
new file mode 100644
index 0000000..e3312d8
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawShapes.cs
@@ -0,0 +1,1184 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+ public class DrawShapes
+ {
+ public enum Shape2DType { square, triangle, pentagon, hexagon, septagon, octagon, decagon, circle, circle4struts, star3, star4, star5, star6, star8, star10, star16, star32, star64, ellipse05, ellipse025, ellipse0125 };
+ public enum PlaneNormalFromTransform { right, up, forward, left, down, back };
+
+ public enum AutomaticOrientationOfFlatShapes
+ {
+ screen,
+ screen_butVerticalInWorldSpace,
+ xyPlane,
+ xzPlane,
+ zyPlane
+ }
+ public static AutomaticOrientationOfFlatShapes automaticOrientationOfFlatShapes = AutomaticOrientationOfFlatShapes.screen;
+ public static float forcedConstantScreenspaceTextSize_relToScreenHeight_forTextAtShapes = 0.0f;
+ public static float forcedConstantWorldspaceTextSize_forTextAtShapes = 0.0f;
+
+ private static float shapeFillDensity = 1.0f;
+ public static float ShapeFillDensity
+ {
+ get { return shapeFillDensity; }
+ set
+ {
+ shapeFillDensity = value;
+ shapeFillDensity = Mathf.Abs(shapeFillDensity);
+ shapeFillDensity = Mathf.Max(shapeFillDensity, 0.01f);
+ }
+ }
+
+ private static int linesPerSphereCircle = 64;
+ public static int LinesPerSphereCircle
+ {
+ get { return linesPerSphereCircle; }
+ set
+ {
+ if ((value == 64) || (value == 32) || (value == 16) || (value == 8))
+ {
+ linesPerSphereCircle = value;
+ }
+ else
+ {
+ Debug.LogError("It is not supported to set 'LinesPerSphereAndCapsuleCircle' to anything other than 64, 32, 16 or 8.");
+ }
+ }
+ }
+
+ /// 使用四元数旋转,绘制指定边数的正多边形
+ public static int RegularPolygon(int corners, Vector3 centerPosition, float hullRadius = 0.5f, Color color = default(Color), Quaternion rotation = default(Quaternion), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return RegularPolygon(corners, centerPosition, hullRadius, color, normal, up_insideFlatPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制指定边数的正多边形
+ public static int RegularPolygon(int corners, Vector3 centerPosition, float hullRadius, Color color, Vector3 normal, Vector3 up_insidePolygonPlane = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(hullRadius, "hullRadius")) { return 0; }
+ return UtilitiesDXXL_Shapes.DrawFlatPolygon(0.0f, corners, centerPosition, Mathf.Abs(hullRadius), normal, up_insidePolygonPlane, color, lineWidth, text, durationInSec, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, hiddenByNearerObjects, textBlockAboveLine, false);
+ }
+
+ /// 使用四元数旋转,绘制三角形
+ public static int Triangle(Vector3 centerPosition, float hullRadius = 0.5f, Color color = default(Color), Quaternion rotation = default(Quaternion), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return Triangle(centerPosition, hullRadius, color, normal, up_insideFlatPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制三角形
+ public static int Triangle(Vector3 centerPosition, float hullRadius, Color color, Vector3 normal, Vector3 up_insideTrianglePlane = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Triangle(centerPosition, hullRadius, color, normal, up_insideTrianglePlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ /// 使用四元数旋转,绘制正方形
+ public static int Square(Vector3 centerPosition, float sideLength = 1.0f, Color color = default(Color), Quaternion rotation = default(Quaternion), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return Square(centerPosition, sideLength, color, normal, up_insideFlatPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制正方形
+ public static int Square(Vector3 centerPosition, float sideLength, Color color, Vector3 normal, Vector3 up_insideSquarePlane = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Square(centerPosition, sideLength, color, normal, up_insideSquarePlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ /// 使用四元数旋转,绘制五边形
+ public static int Pentagon(Vector3 centerPosition, float hullRadius = 0.5f, Color color = default(Color), Quaternion rotation = default(Quaternion), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return Pentagon(centerPosition, hullRadius, color, normal, up_insideFlatPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制五边形
+ public static int Pentagon(Vector3 centerPosition, float hullRadius, Color color, Vector3 normal, Vector3 up_insidePentagonPlane = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Pentagon(centerPosition, hullRadius, color, normal, up_insidePentagonPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ /// 使用四元数旋转,绘制六边形
+ public static int Hexagon(Vector3 centerPosition, float hullRadius = 0.5f, Color color = default(Color), Quaternion rotation = default(Quaternion), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return Hexagon(centerPosition, hullRadius, color, normal, up_insideFlatPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制六边形
+ public static int Hexagon(Vector3 centerPosition, float hullRadius, Color color, Vector3 normal, Vector3 up_insideHexagonPlane = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Hexagon(centerPosition, hullRadius, color, normal, up_insideHexagonPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ /// 使用四元数旋转,绘制七边形
+ public static int Septagon(Vector3 centerPosition, float hullRadius = 0.5f, Color color = default(Color), Quaternion rotation = default(Quaternion), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return Septagon(centerPosition, hullRadius, color, normal, up_insideFlatPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制七边形
+ public static int Septagon(Vector3 centerPosition, float hullRadius, Color color, Vector3 normal, Vector3 up_insideSeptagonPlane = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Septagon(centerPosition, hullRadius, color, normal, up_insideSeptagonPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ /// 使用四元数旋转,绘制八边形
+ public static int Octagon(Vector3 centerPosition, float hullRadius = 0.5f, Color color = default(Color), Quaternion rotation = default(Quaternion), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return Octagon(centerPosition, hullRadius, color, normal, up_insideFlatPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制八边形
+ public static int Octagon(Vector3 centerPosition, float hullRadius, Color color, Vector3 normal, Vector3 up_insideOctagonPlane = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Octagon(centerPosition, hullRadius, color, normal, up_insideOctagonPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ /// 使用四元数旋转,绘制十边形
+ public static int Decagon(Vector3 centerPosition, float hullRadius = 0.5f, Color color = default(Color), Quaternion rotation = default(Quaternion), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return Decagon(centerPosition, hullRadius, color, normal, up_insideFlatPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制十边形
+ public static int Decagon(Vector3 centerPosition, float hullRadius, Color color, Vector3 normal, Vector3 up_insideDecagonPlane = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Decagon(centerPosition, hullRadius, color, normal, up_insideDecagonPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ /// 使用四元数旋转,绘制圆形
+ public static int Circle(Vector3 centerPosition, float radius = 0.5f, Color color = default(Color), Quaternion rotation = default(Quaternion), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return Circle(centerPosition, radius, color, normal, up_insideFlatPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制圆形
+ public static int Circle(Vector3 centerPosition, float radius, Color color, Vector3 normal, Vector3 up_insideCirclePlane = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Circle(centerPosition, radius, color, normal, up_insideCirclePlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ /// 使用四元数旋转,绘制椭圆
+ public static int Ellipse(Vector3 centerPosition, float radiusSideward = 0.25f, float radiusUpward = 0.5f, Color color = default(Color), Quaternion rotation = default(Quaternion), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return Ellipse(centerPosition, radiusSideward, radiusUpward, color, normal, up_insideFlatPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制椭圆
+ public static int Ellipse(Vector3 centerPosition, float radiusSideward, float radiusUpward, Color color, Vector3 normal, Vector3 up_insideEllipsePlane = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Ellipse(centerPosition, radiusSideward, radiusUpward, color, normal, up_insideEllipsePlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ /// 使用四元数旋转,绘制星形
+ public static int Star(Vector3 centerPosition, float outerRadius = 0.5f, Color color = default(Color), int corners = 5, float innerRadiusFactor = 0.5f, Quaternion rotation = default(Quaternion), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return Star(centerPosition, outerRadius, color, corners, innerRadiusFactor, normal, up_insideFlatPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制星形
+ public static int Star(Vector3 centerPosition, float outerRadius, Color color, int corners, float innerRadiusFactor, Vector3 normal, Vector3 up_insideStarPlane = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Star(centerPosition, outerRadius, color, corners, innerRadiusFactor, normal, up_insideStarPlane, lineWidth, text, outlineStyle, stylePatternScaleFactor, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false);
+ }
+
+ /// 指定两个圆心位置,绘制平面胶囊形状
+ public static int FlatCapsule(Vector3 posOfCircle1, Vector3 posOfCircle2, float radius = 0.5f, Color color = default(Color), Vector3 normal = default(Vector3), float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.FlatCapsule(posOfCircle1, posOfCircle2, radius, color, normal, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 使用四元数旋转,绘制平面胶囊形状
+ public static int FlatCapsule(Vector3 centerPosition, float width = 0.5f, float height = 1.0f, Color color = default(Color), Quaternion rotation = default(Quaternion), CapsuleDirection2D direction = CapsuleDirection2D.Vertical, float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return FlatCapsule(centerPosition, width, height, color, normal, up_insideFlatPlane, direction, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定法线方向,绘制平面胶囊形状
+ public static int FlatCapsule(Vector3 centerPosition, float width, float height, Color color, Vector3 normal, Vector3 upAlongVert_insideCapsulePlane = default(Vector3), CapsuleDirection2D direction = CapsuleDirection2D.Vertical, float lineWidth = 0.0f, string text = null, DrawBasics.LineStyle outlineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.FlatCapsule(centerPosition, width, height, color, normal, upAlongVert_insideCapsulePlane, direction, lineWidth, text, outlineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 通过 Transform 组件绘制平面
+ public static void Plane(Transform planeTransform, PlaneNormalFromTransform normal = PlaneNormalFromTransform.up, Vector3 planeAreaExtentionPosition = default(Vector3), Color color = default(Color), float widthFactor = 10.0f, float lengthFactor = 10.0f, float linesWidth = 0.0f, string text = null, float subSegments_signFlipsInterpretation = 10.0f, bool pointer_as_textAttachStyle = false, float anchorVisualizationSize = 0.0f, bool drawPlumbLine_fromExtentionPosition = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(planeTransform, "planeTransform")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(widthFactor, "widthFactor")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(lengthFactor, "lengthFactor")) { return; }
+
+ Vector3 normal_asV3 = UtilitiesDXXL_Shapes.GetPlaneNormalFromTransformEnum(planeTransform, normal);
+ Vector3 forward_insidePlane = UtilitiesDXXL_Shapes.Get_forwardInsidePlane_FromPlameTransformEnum(planeTransform, normal);
+ float width = widthFactor * UtilitiesDXXL_Shapes.Get_width_FromPlameTransformEnum(planeTransform, normal);
+ float length = lengthFactor * UtilitiesDXXL_Shapes.Get_length_FromPlameTransformEnum(planeTransform, normal);
+ Plane(planeTransform.position, normal_asV3, planeAreaExtentionPosition, color, width, length, forward_insidePlane, linesWidth, text, subSegments_signFlipsInterpretation, pointer_as_textAttachStyle, anchorVisualizationSize, drawPlumbLine_fromExtentionPosition, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 通过 Unity Plane 结构体绘制平面
+ public static void Plane(Plane plane, Vector3 drawPositionApproximately, Color color = default(Color), float width = 10.0f, float length = 10.0f, Vector3 forward_insidePlane = default(Vector3), float linesWidth = 0.0f, string text = null, float subSegments_signFlipsInterpretation = 10.0f, bool pointer_as_textAttachStyle = false, bool drawPlumbLine_fromApproximateDrawPosition = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(drawPositionApproximately, "drawPositionApproximately")) { return; }
+
+ Vector3 closestPointOnPlane = plane.ClosestPointOnPlane(drawPositionApproximately);
+ float anchorVisualizationSize = 0.0f; //-> this overload doesn't need the "anchorVisualization", since there is no "planeAreaExtentionPosition" that could vary the plane extent. "drawPlumbLine_fromApproximateDrawPosition" already shows the mounting point.
+ Plane(closestPointOnPlane, plane.normal, drawPositionApproximately, color, width, length, forward_insidePlane, linesWidth, text, subSegments_signFlipsInterpretation, pointer_as_textAttachStyle, anchorVisualizationSize, drawPlumbLine_fromApproximateDrawPosition, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ static InternalDXXL_Plane plane_toDraw = new InternalDXXL_Plane();
+ /// 通过挂载点和法线绘制平面
+ public static void Plane(Vector3 planeMountingPoint, Vector3 normal = default(Vector3), Vector3 planeAreaExtentionPosition = default(Vector3), Color color = default(Color), float width = 10.0f, float length = 10.0f, Vector3 forward_insidePlane = default(Vector3), float linesWidth = 0.0f, string text = null, float subSegments_signFlipsInterpretation = 10.0f, bool pointer_as_textAttachStyle = false, float anchorVisualizationSize = 0.0f, bool drawPlumbLine_fromExtentionPosition = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(planeMountingPoint, "planeMountingPoint")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(planeAreaExtentionPosition, "planeAreaExtentionPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(normal, "normal")) { return; }
+
+ if (UtilitiesDXXL_Math.IsDefaultVector(planeAreaExtentionPosition))
+ {
+ UtilitiesDXXL_Shapes.Plane(planeMountingPoint, default(Vector3), normal, color, width, length, forward_insidePlane, linesWidth, text, subSegments_signFlipsInterpretation, pointer_as_textAttachStyle, anchorVisualizationSize, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width, "width")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(length, "length")) { return; }
+
+ normal = UtilitiesDXXL_Math.OverwriteDefaultVectors(normal, Vector3.up);
+ plane_toDraw.Recreate(planeMountingPoint, normal);
+ Vector3 closestPointOnPlane = plane_toDraw.Get_perpProjectionOfPointOnPlane(planeAreaExtentionPosition);
+
+ if (drawPlumbLine_fromExtentionPosition)
+ {
+ float sphereSize = 0.005f * Mathf.Min(width, length);
+ Color plumbColor = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, 0.4f);
+ Sphere(closestPointOnPlane, sphereSize, plumbColor, normal, forward_insidePlane, 0.0f, null, 2, false, lineStyle, stylePatternScaleFactor, false, false, durationInSec, hiddenByNearerObjects);
+ Sphere(planeAreaExtentionPosition, sphereSize, plumbColor, normal, forward_insidePlane, 0.0f, null, 2, false, lineStyle, stylePatternScaleFactor, false, false, durationInSec, hiddenByNearerObjects);
+ Line_fadeableAnimSpeed.InternalDraw(planeAreaExtentionPosition, closestPointOnPlane, plumbColor, 0.0f, null, DrawBasics.LineStyle.dashedLong, 3.0f, 0.0f, null, default, false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ UtilitiesDXXL_Shapes.Plane(planeMountingPoint, closestPointOnPlane, normal, color, width, length, forward_insidePlane, linesWidth, text, subSegments_signFlipsInterpretation, pointer_as_textAttachStyle, anchorVisualizationSize, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ /// 以中心位置绘制菱形
+ public static void RhombusAroundCenter(Vector3 centerPosition, Vector3 firstEdge, Vector3 secondEdge, Color color = default(Color), float linesWidth = 0.0f, string text = null, int subSegments = 10, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(centerPosition, "centerPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(firstEdge, "firstEdge")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(secondEdge, "secondEdge")) { return; }
+
+ Vector3 startCornerPosition = centerPosition - 0.5f * firstEdge - 0.5f * secondEdge;
+ Rhombus(startCornerPosition, firstEdge, secondEdge, color, linesWidth, text, subSegments, lineStyle, stylePatternScaleFactor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 以起始角位置绘制菱形
+ public static void Rhombus(Vector3 startCornerPosition, Vector3 firstEdge, Vector3 secondEdge, Color color = default(Color), float linesWidth = 0.0f, string text = null, int subSegments = 10, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Shapes.Rhombus(startCornerPosition, firstEdge, secondEdge, color, linesWidth, text, subSegments, lineStyle, stylePatternScaleFactor, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 通过 Transform 组件绘制立方体线框
+ public static int Cube(Transform transform, Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform, "transform")) { return 0; }
+ return Cube(transform.position, transform.lossyScale, color, transform.up, transform.forward, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 使用四元数旋转,绘制立方体线框
+ public static int Cube(Vector3 position, Vector3 scale, Color color = default(Color), Quaternion rotation = default(Quaternion), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ return UtilitiesDXXL_Shapes.Cube(position, scale, color, color, rotation * Vector3.up, rotation * Vector3.forward, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false, null);
+ }
+ /// 指定朝上和朝前方向,绘制立方体线框
+ public static int Cube(Vector3 position, Vector3 scale, Color color, Vector3 up, Vector3 forward, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Cube(position, scale, color, color, up, forward, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects, false, null);
+ }
+
+ /// 通过 Transform 组件绘制填充立方体(含内部网格线)
+ public static void CubeFilled(Transform transform, Color color = default(Color), float alphaFactor_forInnerLines = 0.3f, float linesWidthOfEdges = 0.0f, int segmentsPerSide = 6, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(alphaFactor_forInnerLines, "alphaFactor_forInnerLines")) { return; }
+
+ color = UtilitiesDXXL_Colors.OverwriteDefaultColor(color);
+ Color colorOfInnerFrames = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, alphaFactor_forInnerLines);
+ CubeFilled(transform, colorOfInnerFrames, 0.0f, segmentsPerSide, text, lineStyle, color, linesWidthOfEdges, stylePatternScaleFactor, true, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 使用四元数旋转,绘制填充立方体(含内部网格线)
+ public static void CubeFilled(Vector3 position, Vector3 scale, Color color = default(Color), float alphaFactor_forInnerLines = 0.3f, Quaternion rotation = default(Quaternion), float linesWidthOfEdges = 0.0f, int segmentsPerSide = 6, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(alphaFactor_forInnerLines, "alphaFactor_forInnerLines")) { return; }
+
+ color = UtilitiesDXXL_Colors.OverwriteDefaultColor(color);
+ Color colorOfInnerFrames = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, alphaFactor_forInnerLines);
+ CubeFilled(position, scale, colorOfInnerFrames, rotation, 0.0f, segmentsPerSide, text, lineStyle, color, linesWidthOfEdges, stylePatternScaleFactor, true, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定朝上和朝前方向,绘制填充立方体(含内部网格线)
+ public static void CubeFilled(Vector3 position, Vector3 scale, Color color, float alphaFactor_forInnerLines, Vector3 up, Vector3 forward, float linesWidthOfEdges = 0.0f, int segmentsPerSide = 6, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(alphaFactor_forInnerLines, "alphaFactor_forInnerLines")) { return; }
+
+ color = UtilitiesDXXL_Colors.OverwriteDefaultColor(color);
+ Color colorOfInnerFrames = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, alphaFactor_forInnerLines);
+ CubeFilled(position, scale, colorOfInnerFrames, up, forward, 0.0f, segmentsPerSide, text, lineStyle, color, linesWidthOfEdges, stylePatternScaleFactor, true, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 通过 Transform 绘制填充立方体(可自定义边框颜色和线宽)
+ public static void CubeFilled(Transform transform, Color color, float linesWidth, int segmentsPerSide, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, Color colorOfEdges = default(Color), float linesWidthOfEdges = 0.01f, float stylePatternScaleFactor = 1.0f, bool useEdgesColorAsTextColor_ifAvailable = true, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform, "transform")) { return; }
+ CubeFilled(transform.position, transform.lossyScale, color, transform.up, transform.forward, linesWidth, segmentsPerSide, text, lineStyle, colorOfEdges, linesWidthOfEdges, stylePatternScaleFactor, useEdgesColorAsTextColor_ifAvailable, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 使用四元数旋转,绘制填充立方体(可自定义边框颜色和线宽)
+ public static void CubeFilled(Vector3 position, Vector3 scale, Color color, Quaternion rotation, float linesWidth = 0.0f, int segmentsPerSide = 6, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, Color colorOfEdges = default(Color), float linesWidthOfEdges = 0.01f, float stylePatternScaleFactor = 1.0f, bool useEdgesColorAsTextColor_ifAvailable = true, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ CubeFilled(position, scale, color, rotation * Vector3.up, rotation * Vector3.forward, linesWidth, segmentsPerSide, text, lineStyle, colorOfEdges, linesWidthOfEdges, stylePatternScaleFactor, useEdgesColorAsTextColor_ifAvailable, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定朝上和朝前方向,绘制填充立方体(可自定义边框颜色和线宽)
+ public static void CubeFilled(Vector3 position, Vector3 scale, Color color, Vector3 up, Vector3 forward, float linesWidth = 0.0f, int segmentsPerSide = 6, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, Color colorOfEdges = default(Color), float linesWidthOfEdges = 0.01f, float stylePatternScaleFactor = 1.0f, bool useEdgesColorAsTextColor_ifAvailable = true, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Shapes.CubeFilled(position, scale, color, up, forward, linesWidth, segmentsPerSide, text, lineStyle, colorOfEdges, linesWidthOfEdges, stylePatternScaleFactor, useEdgesColorAsTextColor_ifAvailable, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 通过 Transform 组件绘制球体线框
+ public static int Sphere(Transform transform, Color color = default(Color), float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalf = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool skipDrawingEquator = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform, "transform")) { return 0; }
+ return Sphere(transform.position, 0.5f * UtilitiesDXXL_Math.GetBiggestAbsComponent(transform.lossyScale), color, transform.rotation * Vector3.up, transform.rotation * Vector3.forward, linesWidth, text, struts, onlyUpperHalf, lineStyle, stylePatternScaleFactor, skipDrawingEquator, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 使用四元数旋转,绘制球体线框
+ public static int Sphere(Vector3 position, float radius = 0.5f, Color color = default(Color), Quaternion rotation = default(Quaternion), float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalf = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool skipDrawingEquator = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ return Sphere(position, radius, color, rotation * Vector3.up, rotation * Vector3.forward, linesWidth, text, struts, onlyUpperHalf, lineStyle, stylePatternScaleFactor, skipDrawingEquator, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定朝上和朝前方向,绘制球体线框
+ public static int Sphere(Vector3 position, float radius, Color color, Vector3 up, Vector3 forward, float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalf = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool skipDrawingEquator = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Sphere(position, radius, color, up, forward, linesWidth, text, struts, onlyUpperHalf, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects, skipDrawingEquator);
+ }
+
+ /// 通过 Transform 组件绘制椭球体线框
+ public static int Ellipsoid(Transform transform, Color color = default(Color), float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalf = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool skipDrawingEquator = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform, "transform")) { return 0; }
+ return Ellipsoid(transform.position, transform.lossyScale, color, transform.rotation * Vector3.up, transform.rotation * Vector3.forward, linesWidth, text, struts, onlyUpperHalf, lineStyle, stylePatternScaleFactor, skipDrawingEquator, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 使用四元数旋转,绘制椭球体线框
+ public static int Ellipsoid(Vector3 position, Vector3 radius, Color color = default(Color), Quaternion rotation = default(Quaternion), float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalf = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool skipDrawingEquator = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ return Ellipsoid(position, radius, color, rotation * Vector3.up, rotation * Vector3.forward, linesWidth, text, struts, onlyUpperHalf, lineStyle, stylePatternScaleFactor, skipDrawingEquator, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定朝上和朝前方向,绘制椭球体线框
+ public static int Ellipsoid(Vector3 position, Vector3 radius, Color color, Vector3 up, Vector3 forward, float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalf = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool skipDrawingEquator = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.Ellipsoid(position, radius, color, up, forward, linesWidth, text, struts, onlyUpperHalf, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects, skipDrawingEquator);
+ }
+
+ /// 使用四元数旋转,绘制非均匀椭球体线框(上下半轴可分别指定)
+ public static void EllipsoidNonUniform(Vector3 position, float radius_x, float radius_y_upward, float radius_y_downward, float radius_z, Color color = default(Color), Quaternion rotation = default(Quaternion), float linesWidth = 0.0f, string text = null, int struts = 2, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool skipDrawingEquator = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ EllipsoidNonUniform(position, radius_x, radius_y_upward, radius_y_downward, radius_z, color, rotation * Vector3.up, rotation * Vector3.forward, linesWidth, text, struts, lineStyle, stylePatternScaleFactor, skipDrawingEquator, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定朝上和朝前方向,绘制非均匀椭球体线框(上下半轴可分别指定)
+ public static void EllipsoidNonUniform(Vector3 position, float radius_x, float radius_y_upward, float radius_y_downward, float radius_z, Color color, Vector3 up, Vector3 forward, float linesWidth = 0.0f, string text = null, int struts = 2, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool skipDrawingEquator = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius_x, "radius_x")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius_y_upward, "radius_y_upward")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius_y_downward, "radius_y_downward")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius_z, "radius_z")) { return; }
+ if (UtilitiesDXXL_Math.ApproximatelyZero(radius_x) && UtilitiesDXXL_Math.ApproximatelyZero(radius_y_upward) && UtilitiesDXXL_Math.ApproximatelyZero(radius_y_downward) && UtilitiesDXXL_Math.ApproximatelyZero(radius_z))
+ {
+ //-> already outside of "UtilitiesDXXL_Shapes.Ellipsoid()", because otherwise the message would already be displayed if only one halfShell is zero:
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(linesWidth, "linesWidth")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(position, "position")) { return; }
+
+ UtilitiesDXXL_DrawBasics.PointFallback(position, "[ Ellipsoid with extent of 0]
" + text, color, linesWidth, durationInSec, hiddenByNearerObjects);
+ return;
+ }
+
+ if ((UtilitiesDXXL_Math.ApproximatelyZero(radius_x) == false) || (UtilitiesDXXL_Math.ApproximatelyZero(radius_y_upward) == false) || (UtilitiesDXXL_Math.ApproximatelyZero(radius_z) == false))
+ {
+ Vector3 radius_ofUpperHalfShell = new Vector3(radius_x, radius_y_upward, radius_z);
+ UtilitiesDXXL_Shapes.Ellipsoid(position, radius_ofUpperHalfShell, color, up, forward, linesWidth, text, struts, true, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects, skipDrawingEquator);
+ }
+
+ if ((UtilitiesDXXL_Math.ApproximatelyZero(radius_x) == false) || (UtilitiesDXXL_Math.ApproximatelyZero(radius_y_downward) == false) || (UtilitiesDXXL_Math.ApproximatelyZero(radius_z) == false))
+ {
+ Vector3 radius_ofLowerHalfShell = new Vector3(radius_x, -radius_y_downward, radius_z);
+ UtilitiesDXXL_Shapes.Ellipsoid(position, radius_ofLowerHalfShell, color, up, forward, linesWidth, null, struts, true, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects, true);
+ }
+ }
+
+ /// 指定两个球心位置,绘制胶囊体线框
+ public static void Capsule(Vector3 posOfCapsuleSphere1, Vector3 posOfCapsuleSphere2, float radius, Color color = default(Color), Vector3 forward_insideCrosssectionPlane = default(Vector3), float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalfSphere = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(posOfCapsuleSphere1, "posOfCapsuleSphere1")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(posOfCapsuleSphere2, "posOfCapsuleSphere2")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(forward_insideCrosssectionPlane, "forward_insideCrosssectionPlane")) { return; }
+ if (UtilitiesDXXL_Math.CheckIf_twoVectorsAreApproximatelyEqual(posOfCapsuleSphere1, posOfCapsuleSphere2))
+ {
+ Vector3 up = default(Vector3);
+ UtilitiesDXXL_DrawBasics.OverwriteDefaultVectorsWithStandardIdentity(ref up, ref forward_insideCrosssectionPlane, false);
+ Sphere(posOfCapsuleSphere1, radius, color, up, forward_insideCrosssectionPlane, linesWidth, text, struts, onlyUpperHalfSphere, lineStyle, stylePatternScaleFactor, false, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ Vector3 up = posOfCapsuleSphere2 - posOfCapsuleSphere1;
+ UtilitiesDXXL_DrawBasics.OverwriteDefaultVectorsWithStandardIdentity(ref up, ref forward_insideCrosssectionPlane, true);
+ Vector3 centerPos = 0.5f * (posOfCapsuleSphere2 + posOfCapsuleSphere1);
+ Vector3 startToEndSphere = posOfCapsuleSphere2 - posOfCapsuleSphere1;
+ float height = startToEndSphere.magnitude + 2.0f * radius;
+ Capsule(centerPos, radius, height, color, up, forward_insideCrosssectionPlane, linesWidth, text, struts, onlyUpperHalfSphere, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ }
+ /// 通过 Transform 组件绘制胶囊体线框
+ public static void Capsule(Transform transform, Color color = default(Color), float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalfSphere = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(transform, "transform")) { return; }
+ Capsule(transform.position, transform.lossyScale, color, transform.rotation * Vector3.up, transform.rotation * Vector3.forward, linesWidth, text, struts, onlyUpperHalfSphere, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 使用四元数旋转,绘制胶囊体线框(通过 Scale 指定尺寸)
+ public static void Capsule(Vector3 position, Vector3 scale, Color color = default(Color), Quaternion rotation = default(Quaternion), float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalfSphere = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Capsule(position, scale, color, rotation * Vector3.up, rotation * Vector3.forward, linesWidth, text, struts, onlyUpperHalfSphere, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定朝上和朝前方向,绘制胶囊体线框(通过 Scale 指定尺寸)
+ public static void Capsule(Vector3 position, Vector3 scale, Color color, Vector3 up, Vector3 forward_insideCrosssectionPlane = default(Vector3), float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalfSphere = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float absBiggestNonYDim = Mathf.Max(Mathf.Abs(scale.x), Mathf.Abs(scale.z));
+ float absDiameter = absBiggestNonYDim;
+ float absRadius = 0.5f * absDiameter;
+ float heightInclBothCaps = 2.0f * scale.y;
+ if (Mathf.Abs(heightInclBothCaps) < absDiameter)
+ {
+ heightInclBothCaps = Mathf.Sign(scale.y) * absDiameter;
+ }
+ UtilitiesDXXL_Shapes.Capsule(position, color, absRadius, heightInclBothCaps, up, forward_insideCrosssectionPlane, linesWidth, text, struts, onlyUpperHalfSphere, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 使用四元数旋转,绘制胶囊体线框(通过半径和高度指定尺寸)
+ public static void Capsule(Vector3 position, float radius = 0.5f, float height = 1.0f, Color color = default(Color), Quaternion rotation = default(Quaternion), float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalfSphere = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Capsule(position, radius, height, color, rotation * Vector3.up, rotation * Vector3.forward, linesWidth, text, struts, onlyUpperHalfSphere, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定朝上和朝前方向,绘制胶囊体线框(通过半径和高度指定尺寸)
+ public static void Capsule(Vector3 position, float radius, float height, Color color, Vector3 up, Vector3 forward_insideCrosssectionPlane = default(Vector3), float linesWidth = 0.0f, string text = null, int struts = 2, bool onlyUpperHalfSphere = false, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(height, "height")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(position, "position")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(up, "up")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(forward_insideCrosssectionPlane, "forward_insideCrosssectionPlane")) { return; }
+
+ float absRadius = Mathf.Abs(radius);
+ float absDiameter = 2.0f * absRadius;
+ Vector3 shiftedPosition = position;
+ float heightInclBothCaps = height;
+
+ if (onlyUpperHalfSphere == false)
+ {
+ if (Mathf.Abs(height) < absDiameter)
+ {
+ heightInclBothCaps = Mathf.Sign(height) * absDiameter;
+ }
+ }
+ else
+ {
+ if (Mathf.Abs(height) < absRadius)
+ {
+ heightInclBothCaps = Mathf.Sign(height) * absDiameter;
+ }
+ else
+ {
+ heightInclBothCaps = height + Mathf.Sign(height) * absRadius;
+ if (Mathf.Abs(height) < absDiameter)
+ {
+ float heightExclBothCaps = heightInclBothCaps - Mathf.Sign(height) * absDiameter;
+ shiftedPosition = position - UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(up) * heightExclBothCaps * 0.5f;
+ }
+ else
+ {
+ shiftedPosition = position - Mathf.Sign(height) * UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(up) * absRadius * 0.5f;
+ }
+ }
+ }
+
+ UtilitiesDXXL_Shapes.Capsule(shiftedPosition, color, absRadius, heightInclBothCaps, up, forward_insideCrosssectionPlane, linesWidth, text, struts, onlyUpperHalfSphere, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,从顶点位置绘制棱锥体
+ public static void Pyramid(Vector3 apexPosition, float height, Quaternion rotation = default(Quaternion), float angleDeg_inVertDir = 90.0f, float angleDeg_inHorizDir = 90.0f, Color color = default(Color), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Pyramid(apexPosition, height, rotation * Vector3.forward, rotation * Vector3.up, angleDeg_inVertDir, angleDeg_inHorizDir, color, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定朝前和朝上方向,从顶点位置绘制棱锥体
+ public static void Pyramid(Vector3 apexPosition, float height, Vector3 forward_fromApexTowardsBase, Vector3 up_insideBasePlane = default(Vector3), float angleDeg_inVertDir = 90.0f, float angleDeg_inHorizDir = 90.0f, Color color = default(Color), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(height, "height")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(angleDeg_inVertDir, "angleDeg_inVertDir")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(angleDeg_inHorizDir, "angleDeg_inHorizDir")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(apexPosition, "apexPosition")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(forward_fromApexTowardsBase, "forward_fromApexTowardsBase")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(up_insideBasePlane, "up_insideBasePlane")) { return; }
+
+ UtilitiesDXXL_DrawBasics.OverwriteDefaultVectorsWithStandardIdentity(ref up_insideBasePlane, ref forward_fromApexTowardsBase, false);
+ Vector3 forwardNormalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(forward_fromApexTowardsBase);
+ Vector3 baseCenterPosition = apexPosition + forwardNormalized * height;
+ angleDeg_inVertDir = Mathf.Clamp(angleDeg_inVertDir, 0.0f, 179.99f);
+ float tanOfHalfVertFieldOfView = Mathf.Tan(0.5f * angleDeg_inVertDir * Mathf.Deg2Rad);
+ float heightOfBaseRect = 2.0f * height * tanOfHalfVertFieldOfView;
+ angleDeg_inHorizDir = Mathf.Clamp(angleDeg_inHorizDir, 0.0f, 179.99f);
+ float tanOfHalfHorizFieldOfView = Mathf.Tan(0.5f * angleDeg_inHorizDir * Mathf.Deg2Rad);
+ float widthOfBaseRect = 2.0f * height * tanOfHalfHorizFieldOfView;
+ Pyramid(baseCenterPosition, height, widthOfBaseRect, heightOfBaseRect, color, (-forward_fromApexTowardsBase), up_insideBasePlane, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和四元数旋转,绘制棱锥体
+ public static void Pyramid(Rect baseRect, float zPos_ofBaseRectCenter, float height, Quaternion rotation = default(Quaternion), Color color = default(Color), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zPos_ofBaseRectCenter, "zPos_ofBaseRectCenter")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(height, "height")) { return; }
+
+ Vector3 baseCenterPosition = new Vector3(baseRect.center.x, baseRect.center.y, zPos_ofBaseRectCenter);
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Pyramid(baseCenterPosition, height, baseRect.width, baseRect.height, color, rotation * Vector3.forward, rotation * Vector3.up, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和法线方向,绘制棱锥体
+ public static void Pyramid(Rect baseRect, float zPos_ofBaseRectCenter, float height, Vector3 normal_ofBaseTowardsApex, Vector3 up_insideBaseRectPlane = default(Vector3), Color color = default(Color), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zPos_ofBaseRectCenter, "zPos_ofBaseRectCenter")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(up_insideBaseRectPlane, "up_insideBaseRectPlane")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(normal_ofBaseTowardsApex, "normal_ofBaseTowardsApex")) { return; }
+
+ UtilitiesDXXL_DrawBasics.OverwriteDefaultVectorsWithStandardIdentity(ref up_insideBaseRectPlane, ref normal_ofBaseTowardsApex, false);
+ Vector3 baseCenterPosition = new Vector3(baseRect.center.x, baseRect.center.y, zPos_ofBaseRectCenter);
+ Pyramid(baseCenterPosition, height, baseRect.width, baseRect.height, color, normal_ofBaseTowardsApex, up_insideBaseRectPlane, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 通过 Hull 体积中心和缩放,绘制棱锥体
+ public static void Pyramid(Vector3 center_ofPyramidHullVolume, Vector3 scale_ofPyramidHullVolume, Quaternion rotation = default(Quaternion), Color color = default(Color), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(center_ofPyramidHullVolume, "center_ofPyramidHullVolume")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(scale_ofPyramidHullVolume, "scale_ofPyramidHullVolume")) { return; }
+
+ //scale = OverwriteDefaultVectors(scale, new Vector3(1.0f, 1.0f, 1.0f));
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Vector3 vectorUpNormalized = rotation * Vector3.up;
+ Vector3 baseCenterPosition = center_ofPyramidHullVolume - 0.5f * vectorUpNormalized * scale_ofPyramidHullVolume.y;
+ Pyramid(baseCenterPosition, scale_ofPyramidHullVolume.y, scale_ofPyramidHullVolume.x, scale_ofPyramidHullVolume.z, color, vectorUpNormalized, rotation * Vector3.forward, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,通过底面中心绘制棱锥体
+ public static void Pyramid(Vector3 center_ofBasePlane, float height, float width_ofBase, float length_ofBase, Color color = default(Color), Quaternion rotation = default(Quaternion), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Pyramid(center_ofBasePlane, height, width_ofBase, length_ofBase, color, rotation * Vector3.up, rotation * Vector3.forward, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定法线和朝上方向,通过底面中心绘制棱锥体
+ public static void Pyramid(Vector3 center_ofBasePlane, float height, float width_ofBase, float length_ofBase, Color color, Vector3 normal_ofBaseTowardsApex, Vector3 up_insideBasePlane = default(Vector3), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Shapes.Pyramid(center_ofBasePlane, height, width_ofBase, length_ofBase, color, normal_ofBaseTowardsApex, up_insideBasePlane, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,从顶点位置绘制圆锥体
+ public static void Cone(Vector3 apexPosition, float height, Quaternion rotation = default(Quaternion), float angleDeg_inVertDir = 90.0f, float angleDeg_inHorizDir = 90.0f, Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Cone(apexPosition, height, rotation * Vector3.forward, rotation * Vector3.up, angleDeg_inVertDir, angleDeg_inHorizDir, color, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定朝前和朝上方向,从顶点位置绘制圆锥体
+ public static void Cone(Vector3 apexPosition, float height, Vector3 forward_fromApexTowardsBase, Vector3 up_insideBaseCircle = default(Vector3), float angleDeg_inVertDir = 90.0f, float angleDeg_inHorizDir = 90.0f, Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Pyramid(apexPosition, height, forward_fromApexTowardsBase, up_insideBaseCircle, angleDeg_inVertDir, angleDeg_inHorizDir, color, Shape2DType.circle4struts, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 通过 Hull 体积中心和缩放,绘制圆锥体
+ public static void Cone(Vector3 center_ofConeHullVolume, Vector3 scale_ofConeHullVolume, Quaternion rotation = default(Quaternion), Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Pyramid(center_ofConeHullVolume, scale_ofConeHullVolume, rotation, color, Shape2DType.circle4struts, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,通过底面中心绘制圆锥体
+ public static void Cone(Vector3 center_ofBaseCircle, float height, float width_ofBaseCircle, float length_ofBaseCircle, Color color = default(Color), Quaternion rotation = default(Quaternion), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Cone(center_ofBaseCircle, height, width_ofBaseCircle, length_ofBaseCircle, color, rotation * Vector3.up, rotation * Vector3.forward, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定法线和朝上方向,通过底面中心绘制圆锥体
+ public static void Cone(Vector3 center_ofBaseCircle, float height, float width_ofBaseCircle, float length_ofBaseCircle, Color color, Vector3 normal_ofBaseCircleTowardsApex, Vector3 up_insideBaseCircle = default(Vector3), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Pyramid(center_ofBaseCircle, height, width_ofBaseCircle, length_ofBaseCircle, color, normal_ofBaseCircleTowardsApex, up_insideBaseCircle, Shape2DType.circle4struts, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,从顶点位置绘制填充圆锥体
+ public static void ConeFilled(Vector3 apexPosition, float height, Quaternion rotation = default(Quaternion), float angleDeg_inVertDir = 90.0f, float angleDeg_inHorizDir = 90.0f, Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ ConeFilled(apexPosition, height, rotation * Vector3.forward, rotation * Vector3.up, angleDeg_inVertDir, angleDeg_inHorizDir, color, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定朝前和朝上方向,从顶点位置绘制填充圆锥体
+ public static void ConeFilled(Vector3 apexPosition, float height, Vector3 forward_fromApexTowardsBase, Vector3 up_insideBaseCircle = default(Vector3), float angleDeg_inVertDir = 90.0f, float angleDeg_inHorizDir = 90.0f, Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Pyramid(apexPosition, height, forward_fromApexTowardsBase, up_insideBaseCircle, angleDeg_inVertDir, angleDeg_inHorizDir, color, Shape2DType.circle, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 通过 Hull 体积中心和缩放,绘制填充圆锥体
+ public static void ConeFilled(Vector3 center_ofConeHullVolume, Vector3 scale_ofConeHullVolume, Quaternion rotation = default(Quaternion), Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Pyramid(center_ofConeHullVolume, scale_ofConeHullVolume, rotation, color, Shape2DType.circle, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,通过底面中心绘制填充圆锥体
+ public static void ConeFilled(Vector3 center_ofBaseCircle, float height, float width_ofBaseCircle, float length_ofBaseCircle, Color color = default(Color), Quaternion rotation = default(Quaternion), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ ConeFilled(center_ofBaseCircle, height, width_ofBaseCircle, length_ofBaseCircle, color, rotation * Vector3.up, rotation * Vector3.forward, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定法线和朝上方向,通过底面中心绘制填充圆锥体
+ public static void ConeFilled(Vector3 center_ofBaseCircle, float height, float width_ofBaseCircle, float length_ofBaseCircle, Color color, Vector3 normal_ofBaseCircleTowardsApex, Vector3 up_insideBaseCircle = default(Vector3), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Pyramid(center_ofBaseCircle, height, width_ofBaseCircle, length_ofBaseCircle, color, normal_ofBaseCircleTowardsApex, up_insideBaseCircle, Shape2DType.circle, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和四元数旋转,绘制双棱锥体
+ public static void Bipyramid(Rect baseRect, float zPos_ofBaseRectCenter, float heightUp, float heightDown, Quaternion rotation = default(Quaternion), Color color = default(Color), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zPos_ofBaseRectCenter, "zPos_ofBaseRectCenter")) { return; }
+
+ Vector3 baseCenterPosition = new Vector3(baseRect.center.x, baseRect.center.y, zPos_ofBaseRectCenter);
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Bipyramid(baseCenterPosition, heightUp, heightDown, baseRect.width, baseRect.height, color, rotation * Vector3.forward, rotation * Vector3.up, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和法线方向,绘制双棱锥体
+ public static void Bipyramid(Rect baseRect, float zPos_ofBaseRectCenter, float heightUp, float heightDown, Vector3 normal_ofBaseTowardsUpperApex, Vector3 up_insideBaseRectPlane = default(Vector3), Color color = default(Color), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zPos_ofBaseRectCenter, "zPos_ofBaseRectCenter")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(up_insideBaseRectPlane, "up_insideBaseRectPlane")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(normal_ofBaseTowardsUpperApex, "normal_ofBaseTowardsUpperApex")) { return; }
+
+ UtilitiesDXXL_DrawBasics.OverwriteDefaultVectorsWithStandardIdentity(ref up_insideBaseRectPlane, ref normal_ofBaseTowardsUpperApex, false);
+ Vector3 baseCenterPosition = new Vector3(baseRect.center.x, baseRect.center.y, zPos_ofBaseRectCenter);
+ Bipyramid(baseCenterPosition, heightUp, heightDown, baseRect.width, baseRect.height, color, normal_ofBaseTowardsUpperApex, up_insideBaseRectPlane, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 通过 Hull 体积中心和缩放,绘制双棱锥体
+ public static void Bipyramid(Vector3 center_ofBasePlane, Vector3 scale_ofBipyramidHullVolume, Quaternion rotation = default(Quaternion), Color color = default(Color), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(scale_ofBipyramidHullVolume, "scale_ofBipyramidHullVolume")) { return; }
+
+ //scale = OverwriteDefaultVectors(scale, new Vector3(1.0f, 1.0f, 1.0f));
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Bipyramid(center_ofBasePlane, 0.5f * scale_ofBipyramidHullVolume.y, -0.5f * scale_ofBipyramidHullVolume.y, scale_ofBipyramidHullVolume.x, scale_ofBipyramidHullVolume.z, color, rotation * Vector3.up, rotation * Vector3.forward, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,通过底面中心绘制双棱锥体
+ public static void Bipyramid(Vector3 center_ofBasePlane, float heightUp, float heightDown, float width_ofBase, float length_ofBase, Color color = default(Color), Quaternion rotation = default(Quaternion), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Bipyramid(center_ofBasePlane, heightUp, heightDown, width_ofBase, length_ofBase, color, rotation * Vector3.up, rotation * Vector3.forward, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定法线和朝上方向,通过底面中心绘制双棱锥体
+ public static void Bipyramid(Vector3 center_ofBasePlane, float heightUp, float heightDown, float width_ofBase, float length_ofBase, Color color, Vector3 normal_ofBaseTowardsUpperApex, Vector3 up_insideBasePlane = default(Vector3), Shape2DType baseShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Shapes.Bipyramid(center_ofBasePlane, heightUp, heightDown, width_ofBase, length_ofBase, color, normal_ofBaseTowardsUpperApex, up_insideBasePlane, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和四元数旋转,绘制圆柱体
+ public static void Cylinder(Rect crossSectionHullRect, float zPos_ofHullRectCenter, float height, Quaternion rotation = default(Quaternion), Color color = default(Color), Shape2DType baseShape = Shape2DType.circle4struts, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Vector3 baseCenterPosition = new Vector3(crossSectionHullRect.center.x, crossSectionHullRect.center.y, zPos_ofHullRectCenter);
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Cylinder(baseCenterPosition, height, crossSectionHullRect.width, crossSectionHullRect.height, color, rotation * Vector3.forward, rotation * Vector3.up, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和挤出方向,绘制圆柱体
+ public static void Cylinder(Rect crossSectionHullRect, float zPos_ofHullRectCenter, float height, Vector3 extrusionDirection, Vector3 up_insideCrossSectionPlane = default(Vector3), Color color = default(Color), Shape2DType baseShape = Shape2DType.circle4struts, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(up_insideCrossSectionPlane, "up_insideCrossSectionPlane")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(extrusionDirection, "extrusionDirection")) { return; }
+
+ UtilitiesDXXL_DrawBasics.OverwriteDefaultVectorsWithStandardIdentity(ref up_insideCrossSectionPlane, ref extrusionDirection, false);
+ Vector3 baseCenterPosition = new Vector3(crossSectionHullRect.center.x, crossSectionHullRect.center.y, zPos_ofHullRectCenter);
+ Cylinder(baseCenterPosition, height, crossSectionHullRect.width, crossSectionHullRect.height, color, extrusionDirection, up_insideCrossSectionPlane, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 通过 Hull 体积中心和缩放,绘制圆柱体
+ public static void Cylinder(Vector3 center_ofCylinderHullVolume, Vector3 scale_ofCylinderHullVolume, Quaternion rotation = default(Quaternion), Color color = default(Color), Shape2DType baseShape = Shape2DType.circle4struts, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(scale_ofCylinderHullVolume, "scale_ofCylinderHullVolume")) { return; }
+
+ //scale = OverwriteDefaultVectors(scale, new Vector3(1.0f, 1.0f, 1.0f));
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Cylinder(center_ofCylinderHullVolume, scale_ofCylinderHullVolume.y, scale_ofCylinderHullVolume.x, scale_ofCylinderHullVolume.z, color, rotation * Vector3.up, rotation * Vector3.forward, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,通过底面尺寸绘制圆柱体
+ public static void Cylinder(Vector3 center_ofCylinderHullVolume, float height, float width_ofBase, float length_ofBase, Color color = default(Color), Quaternion rotation = default(Quaternion), Shape2DType baseShape = Shape2DType.circle4struts, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Cylinder(center_ofCylinderHullVolume, height, width_ofBase, length_ofBase, color, rotation * Vector3.up, rotation * Vector3.forward, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定挤出方向,通过底面尺寸绘制圆柱体
+ public static void Cylinder(Vector3 center_ofCylinderHullVolume, float height, float width_ofBase, float length_ofBase, Color color, Vector3 extrusionDirection, Vector3 up_insideCrossSectionPlane = default(Vector3), Shape2DType baseShape = Shape2DType.circle4struts, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Shapes.Cylinder(center_ofCylinderHullVolume, height, width_ofBase, length_ofBase, color, extrusionDirection, up_insideCrossSectionPlane, baseShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和四元数旋转,绘制挤出体
+ public static void Extrusion(Rect hullRect_ofExtrudedCrosssection, float zPos_ofExtrudedRect, float extrusionDistanceForward, float extrusionDistanceBackward, Quaternion rotation = default(Quaternion), Color color = default(Color), Shape2DType extrusionShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zPos_ofExtrudedRect, "zPos_ofExtrudedRect")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(extrusionDistanceForward, "extrusionDistanceForward")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(extrusionDistanceBackward, "extrusionDistanceBackward")) { return; }
+
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Vector3 forwardNormalized = rotation * Vector3.forward;
+ float cumulatedExtrusionHeight = extrusionDistanceForward - extrusionDistanceBackward;
+ Vector3 rectCenterPosition = new Vector3(hullRect_ofExtrudedCrosssection.center.x, hullRect_ofExtrudedCrosssection.center.y, zPos_ofExtrudedRect);
+ Vector3 negativeEndOfExtrusionCylinder = rectCenterPosition + forwardNormalized * extrusionDistanceBackward;
+ Vector3 cylinderCenterPos = negativeEndOfExtrusionCylinder + forwardNormalized * (0.5f * cumulatedExtrusionHeight);
+ Cylinder(cylinderCenterPos, cumulatedExtrusionHeight, hullRect_ofExtrudedCrosssection.width, hullRect_ofExtrudedCrosssection.height, color, rotation * Vector3.forward, rotation * Vector3.up, extrusionShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和挤出方向,绘制挤出体
+ public static void Extrusion(Rect hullRect_ofExtrudedCrosssection, float zPos_ofExtrudedRect, float extrusionDistanceForward, float extrusionDistanceBackward, Vector3 extrusionDirection, Vector3 up_insideCrosssectionPlane = default(Vector3), Color color = default(Color), Shape2DType extrusionShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zPos_ofExtrudedRect, "zPos_ofExtrudedRect")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(extrusionDistanceForward, "extrusionDistanceForward")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(extrusionDistanceBackward, "extrusionDistanceBackward")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(up_insideCrosssectionPlane, "up_insideCrosssectionPlane")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(extrusionDirection, "extrusionDirection")) { return; }
+
+ UtilitiesDXXL_DrawBasics.OverwriteDefaultVectorsWithStandardIdentity(ref up_insideCrosssectionPlane, ref extrusionDirection, false);
+ Vector3 forwardNormalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(extrusionDirection);
+ float cumulatedExtrusionHeight = extrusionDistanceForward - extrusionDistanceBackward;
+ Vector3 rectCenterPosition = new Vector3(hullRect_ofExtrudedCrosssection.center.x, hullRect_ofExtrudedCrosssection.center.y, zPos_ofExtrudedRect);
+ Vector3 negativeEndOfExtrusionCylinder = rectCenterPosition + forwardNormalized * extrusionDistanceBackward;
+ Vector3 cylinderCenterPos = negativeEndOfExtrusionCylinder + forwardNormalized * (0.5f * cumulatedExtrusionHeight);
+ Cylinder(cylinderCenterPos, cumulatedExtrusionHeight, hullRect_ofExtrudedCrosssection.width, hullRect_ofExtrudedCrosssection.height, color, extrusionDirection, up_insideCrosssectionPlane, extrusionShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,通过基底位置绘制挤出体
+ public static void Extrusion(Vector3 centerPos_ofExtrusionBase, float extrusionHeightUp, float extrusionHeightDown, float width_ofExtrudedCrosssection, float length_ofExtrudedCrosssection, Color color = default(Color), Quaternion rotation = default(Quaternion), Shape2DType extrusionShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Extrusion(centerPos_ofExtrusionBase, extrusionHeightUp, extrusionHeightDown, width_ofExtrudedCrosssection, length_ofExtrudedCrosssection, color, rotation * Vector3.up, rotation * Vector3.forward, extrusionShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定挤出方向,通过基底位置绘制挤出体
+ public static void Extrusion(Vector3 centerPos_ofExtrusionBase, float extrusionHeightUp, float extrusionHeightDown, float width_ofExtrudedCrosssection, float length_ofExtrudedCrosssection, Color color, Vector3 extrusionDirection, Vector3 up_insideCrossSectionPlane = default(Vector3), Shape2DType extrusionShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(extrusionHeightUp, "extrusionHeight")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(extrusionHeightDown, "extrusionHeightDown")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(centerPos_ofExtrusionBase, "centerPos_ofExtrusionBase")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(extrusionDirection, "extrusionDirection")) { return; }
+
+ extrusionDirection = UtilitiesDXXL_Math.OverwriteDefaultVectors(extrusionDirection, Vector3.up);
+ Vector3 extrusionDirNormalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(extrusionDirection);
+ float cumulatedExtrusionHeight = extrusionHeightUp - extrusionHeightDown;
+ Vector3 negativeEndOfExtrusionCylinder = centerPos_ofExtrusionBase + extrusionDirNormalized * extrusionHeightDown;
+ Vector3 cylinderCenterPos = negativeEndOfExtrusionCylinder + extrusionDirNormalized * (0.5f * cumulatedExtrusionHeight);
+ Cylinder(cylinderCenterPos, cumulatedExtrusionHeight, width_ofExtrudedCrosssection, length_ofExtrudedCrosssection, color, extrusionDirection, up_insideCrossSectionPlane, extrusionShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 通过 Camera 组件绘制视锥体裁剪面
+ public static void Frustum(Camera camera, Color color = default(Color), Shape2DType clipPlanesShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(camera, "camera")) { return; }
+ Frustum(camera.transform.position, camera.transform.forward, camera.transform.up, camera.fieldOfView, camera.aspect, camera.nearClipPlane, camera.farClipPlane, color, clipPlanesShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,通过相机参数绘制视锥体裁剪面
+ public static void Frustum(Vector3 cameraPosition_frustumApex, Quaternion cameraRotation, float angleDeg_verticalFieldOfView = 60.0f, float aspectRatio = (16.0f / 9.0f), float distanceApexToNearPlane = 0.5f, float distanceApexToFarPlane = 1.0f, Color color = default(Color), Shape2DType clipPlanesShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ cameraRotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(cameraRotation);
+ Vector3 cameraForward = cameraRotation * Vector3.forward;
+ Vector3 cameraUp = cameraRotation * Vector3.up;
+ Frustum(cameraPosition_frustumApex, cameraForward, cameraUp, angleDeg_verticalFieldOfView, aspectRatio, distanceApexToNearPlane, distanceApexToFarPlane, color, clipPlanesShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 指定朝前和朝上方向,通过相机参数绘制视锥体裁剪面
+ public static void Frustum(Vector3 cameraPosition_frustumApex, Vector3 cameraForward, Vector3 cameraUp, float angleDeg_verticalFieldOfView = 60.0f, float aspectRatio = (16.0f / 9.0f), float distanceApexToNearPlane = 0.5f, float distanceApexToFarPlane = 1.0f, Color color = default(Color), Shape2DType clipPlanesShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(angleDeg_verticalFieldOfView, "angleDeg_verticalFieldOfView")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(aspectRatio, "aspectRatio")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(distanceApexToNearPlane, "distanceApexToNearPlane")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(distanceApexToFarPlane, "distanceApexToFarPlane")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(cameraPosition_frustumApex, "cameraPosition_frustumApex")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(cameraForward, "cameraForward")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(cameraUp, "cameraUp")) { return; }
+
+ UtilitiesDXXL_DrawBasics.OverwriteDefaultVectorsWithStandardIdentity(ref cameraUp, ref cameraForward, false);
+ Vector3 forwardNormalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(cameraForward);
+ Vector3 bigPlaneCenterPos = cameraPosition_frustumApex + forwardNormalized * distanceApexToFarPlane;
+ Vector3 smallPlaneCenterPos = cameraPosition_frustumApex + forwardNormalized * distanceApexToNearPlane;
+ angleDeg_verticalFieldOfView = Mathf.Clamp(angleDeg_verticalFieldOfView, 0.0f, 179.99f);
+ float tanOfHalfFieldOfView = Mathf.Tan(0.5f * angleDeg_verticalFieldOfView * Mathf.Deg2Rad);
+ float heightAtFarPlane = 2.0f * distanceApexToFarPlane * tanOfHalfFieldOfView;
+ float heightAtNearPlane = 2.0f * distanceApexToNearPlane * tanOfHalfFieldOfView;
+ Frustum(bigPlaneCenterPos, smallPlaneCenterPos, heightAtFarPlane * aspectRatio, heightAtFarPlane, heightAtNearPlane * aspectRatio, heightAtNearPlane, color, cameraUp, cameraForward, clipPlanesShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和四元数旋转,绘制视锥体裁剪面
+ public static void Frustum(Rect bigClipPlaneRect, float zPos_ofBigClipPlaneCenter, float distanceBetweenClipPlanes, float scalingFactor_forSmallClipPlane, Quaternion rotation = default(Quaternion), Color color = default(Color), Shape2DType clipPlanesShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zPos_ofBigClipPlaneCenter, "zPos_ofBigClipPlaneCenter")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(distanceBetweenClipPlanes, "distanceBetweenClipPlanes")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(scalingFactor_forSmallClipPlane, "scalingFactor_forSmallClipPlane")) { return; }
+
+ Vector3 baseCenterPosition = new Vector3(bigClipPlaneRect.center.x, bigClipPlaneRect.center.y, zPos_ofBigClipPlaneCenter);
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Vector3 forwardNormalized = rotation * Vector3.forward;
+ Vector3 smallPlaneCenterPos = baseCenterPosition + forwardNormalized * distanceBetweenClipPlanes;
+ Frustum(baseCenterPosition, smallPlaneCenterPos, bigClipPlaneRect.width, bigClipPlaneRect.height, scalingFactor_forSmallClipPlane * bigClipPlaneRect.width, scalingFactor_forSmallClipPlane * bigClipPlaneRect.height, color, rotation * Vector3.up, forwardNormalized, clipPlanesShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和法线方向,绘制视锥体裁剪面
+ public static void Frustum(Rect bigClipPlaneRect, float zPos_ofBigClipPlaneCenter, float distanceBetweenClipPlanes, float scalingFactor_forSmallClipPlane, Vector3 normal_ofClipPlaneRects_towardsApex, Vector3 up_insideClippedRects = default(Vector3), Color color = default(Color), Shape2DType clipPlanesShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zPos_ofBigClipPlaneCenter, "zPos_ofBigClipPlaneCenter")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(distanceBetweenClipPlanes, "distanceBetweenClipPlanes")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(scalingFactor_forSmallClipPlane, "scalingFactor_forSmallClipPlane")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(up_insideClippedRects, "up_insideClippedRects")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(normal_ofClipPlaneRects_towardsApex, "normal_ofClipPlaneRects_towardsApex")) { return; }
+
+ Vector3 baseCenterPosition = new Vector3(bigClipPlaneRect.center.x, bigClipPlaneRect.center.y, zPos_ofBigClipPlaneCenter);
+ UtilitiesDXXL_DrawBasics.OverwriteDefaultVectorsWithStandardIdentity(ref up_insideClippedRects, ref normal_ofClipPlaneRects_towardsApex, false);
+ Vector3 forwardNormalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(normal_ofClipPlaneRects_towardsApex);
+ Vector3 smallPlaneCenterPos = baseCenterPosition + forwardNormalized * distanceBetweenClipPlanes;
+ Frustum(baseCenterPosition, smallPlaneCenterPos, bigClipPlaneRect.width, bigClipPlaneRect.height, scalingFactor_forSmallClipPlane * bigClipPlaneRect.width, scalingFactor_forSmallClipPlane * bigClipPlaneRect.height, color, up_insideClippedRects, forwardNormalized, clipPlanesShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 通过 Hull 体积中心和缩放,绘制视锥体裁剪面
+ public static void Frustum(Vector3 center_ofFrustumHullVolume, Vector3 scale_ofFrustumHullVolume, Quaternion rotation, float scalingFactor_forSmallClipPlane = 0.5f, Color color = default(Color), Shape2DType clipPlanesShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(scalingFactor_forSmallClipPlane, "scalingFactor_forSmallClipPlane")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(center_ofFrustumHullVolume, "center_ofFrustumHullVolume")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(scale_ofFrustumHullVolume, "scale_ofFrustumHullVolume")) { return; }
+
+ //scale = OverwriteDefaultVectors(scale, new Vector3(1.0f, 1.0f, 1.0f));
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Vector3 upNormalized = rotation * Vector3.up;
+ Vector3 bigPlaneCenterPos = center_ofFrustumHullVolume - upNormalized * 0.5f * scale_ofFrustumHullVolume.y;
+ Vector3 smallPlaneCenterPos = center_ofFrustumHullVolume + upNormalized * 0.5f * scale_ofFrustumHullVolume.y;
+ Frustum(bigPlaneCenterPos, smallPlaneCenterPos, scale_ofFrustumHullVolume.x, scale_ofFrustumHullVolume.z, scalingFactor_forSmallClipPlane * scale_ofFrustumHullVolume.x, scalingFactor_forSmallClipPlane * scale_ofFrustumHullVolume.z, color, rotation * Vector3.forward, upNormalized, clipPlanesShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,通过裁剪面距离和尺寸绘制视锥体裁剪面
+ public static void Frustum(float distance_bigClipPlaneToApex, float distanceBetweenClipPlanes, Vector3 center_ofBigClipPlane, Quaternion rotation = default(Quaternion), float width_ofBigClipPlane = 1.0f, float height_ofBigClipPlane = 1.0f, Color color = default(Color), Shape2DType clipPlanesShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Vector3 normal_ofClipPlanes_towardsApex = rotation * Vector3.up;
+ Vector3 up_insideClippedPlanes = rotation * Vector3.forward;
+ Frustum(distance_bigClipPlaneToApex, distanceBetweenClipPlanes, center_ofBigClipPlane, normal_ofClipPlanes_towardsApex, up_insideClippedPlanes, width_ofBigClipPlane, height_ofBigClipPlane, color, clipPlanesShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定法线方向,通过裁剪面距离和尺寸绘制视锥体裁剪面
+ public static void Frustum(float distance_bigClipPlaneToApex, float distanceBetweenClipPlanes, Vector3 center_ofBigClipPlane, Vector3 normal_ofClipPlanes_towardsApex, Vector3 up_insideClippedPlanes = default(Vector3), float width_ofBigClipPlane = 1.0f, float height_ofBigClipPlane = 1.0f, Color color = default(Color), Shape2DType clipPlanesShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width_ofBigClipPlane, "width_ofBigClipPlane")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(height_ofBigClipPlane, "height_ofBigClipPlane")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(distanceBetweenClipPlanes, "distanceBetweenClipPlanes")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(distance_bigClipPlaneToApex, "distance_bigClipPlaneToApex")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(center_ofBigClipPlane, "center_ofBigClipPlane")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(normal_ofClipPlanes_towardsApex, "normal_ofClipPlanes_towardsApex")) { return; }
+
+ float smallPlaneScaleFactor = (distance_bigClipPlaneToApex - distanceBetweenClipPlanes) / distance_bigClipPlaneToApex;
+ Frustum(center_ofBigClipPlane, center_ofBigClipPlane + UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(normal_ofClipPlanes_towardsApex) * distanceBetweenClipPlanes, width_ofBigClipPlane, height_ofBigClipPlane, width_ofBigClipPlane * smallPlaneScaleFactor, height_ofBigClipPlane * smallPlaneScaleFactor, color, up_insideClippedPlanes, normal_ofClipPlanes_towardsApex, clipPlanesShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用四元数旋转,通过裁剪面距离和缩放因子绘制视锥体裁剪面
+ public static void Frustum(Vector3 center_ofBigClipPlane, float distanceBetweenClipPlanes, float scalingFactor_forSmallClipPlane, Quaternion rotation = default(Quaternion), float width_ofBigClipPlane = 1.0f, float height_ofBigClipPlane = 1.0f, Color color = default(Color), Shape2DType clipPlanesShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ rotation = UtilitiesDXXL_Math.OverwriteDefaultQuaternionToIdentity(rotation);
+ Vector3 normal_ofClipPlanes_towardsApex = rotation * Vector3.up;
+ Vector3 up_insideClippedPlanes = rotation * Vector3.forward;
+ Frustum(center_ofBigClipPlane, distanceBetweenClipPlanes, scalingFactor_forSmallClipPlane, normal_ofClipPlanes_towardsApex, up_insideClippedPlanes, width_ofBigClipPlane, height_ofBigClipPlane, color, clipPlanesShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定法线方向,通过裁剪面距离和缩放因子绘制视锥体裁剪面
+ public static void Frustum(Vector3 center_ofBigClipPlane, float distanceBetweenClipPlanes, float scalingFactor_forSmallClipPlane, Vector3 normal_ofClipPlanes_towardsApex, Vector3 up_insideClippedPlanes = default(Vector3), float width_ofBigClipPlane = 1.0f, float height_ofBigClipPlane = 1.0f, Color color = default(Color), Shape2DType clipPlanesShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(width_ofBigClipPlane, "width_ofBigClipPlane")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(height_ofBigClipPlane, "height_ofBigClipPlane")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(distanceBetweenClipPlanes, "distanceBetweenClipPlanes")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(scalingFactor_forSmallClipPlane, "scalingFactor_forSmallClipPlane")) { return; }
+
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(center_ofBigClipPlane, "center_ofBigClipPlane")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(normal_ofClipPlanes_towardsApex, "normal_ofClipPlanes_towardsApex")) { return; }
+
+ Frustum(center_ofBigClipPlane, center_ofBigClipPlane + UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(normal_ofClipPlanes_towardsApex) * distanceBetweenClipPlanes, width_ofBigClipPlane, height_ofBigClipPlane, scalingFactor_forSmallClipPlane * width_ofBigClipPlane, scalingFactor_forSmallClipPlane * height_ofBigClipPlane, color, up_insideClippedPlanes, normal_ofClipPlanes_towardsApex, clipPlanesShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定远裁剪面和近裁剪面的中心位置和尺寸,绘制视锥体裁剪面
+ public static void Frustum(Vector3 center_ofBigClipPlane, Vector3 center_ofSmallClipPlane, float width_ofBigClipPlane, float height_ofBigClipPlane, float width_ofSmallClipPlane, float height_ofSmallClipPlane, Color color = default(Color), Vector3 up_insideClippedPlanes = default(Vector3), Vector3 fallback_for_normalOfClipPlanesTowardsApex = default(Vector3), Shape2DType clipPlanesShape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Shapes.Frustum(center_ofBigClipPlane, center_ofSmallClipPlane, width_ofBigClipPlane, height_ofBigClipPlane, width_ofSmallClipPlane, height_ofSmallClipPlane, color, up_insideClippedPlanes, fallback_for_normalOfClipPlanesTowardsApex, clipPlanesShape, linesWidth, text, lineStyle, stylePatternScaleFactor, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和四元数旋转,绘制二维平面形状
+ public static int FlatShape(Rect hullRect, Shape2DType shapeType = Shape2DType.square, float zPos_ofRectCenter = 0.0f, Quaternion rotation = default(Quaternion), Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool flattenRoundLines_intoShapePlane = true, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zPos_ofRectCenter, "zPos_ofRectCenter")) { return 0; }
+
+ Vector3 baseCenterPosition = new Vector3(hullRect.center.x, hullRect.center.y, zPos_ofRectCenter);
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return FlatShape(baseCenterPosition, shapeType, hullRect.width, hullRect.height, color, normal, up_insideFlatPlane, linesWidth, text, lineStyle, stylePatternScaleFactor, flattenRoundLines_intoShapePlane, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和法线方向,绘制二维平面形状
+ public static int FlatShape(Rect hullRect, Shape2DType shapeType, float zPos_ofRectCenter, Vector3 normal, Vector3 up_insideShapePlane = default(Vector3), Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool flattenRoundLines_intoShapePlane = true, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(zPos_ofRectCenter, "zPos_ofRectCenter")) { return 0; }
+
+ Vector3 baseCenterPosition = new Vector3(hullRect.center.x, hullRect.center.y, zPos_ofRectCenter);
+ return FlatShape(baseCenterPosition, shapeType, hullRect.width, hullRect.height, color, normal, up_insideShapePlane, linesWidth, text, lineStyle, stylePatternScaleFactor, flattenRoundLines_intoShapePlane, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用中心位置、尺寸和四元数旋转,绘制二维平面形状
+ public static int FlatShape(Vector3 centerPosition, Shape2DType shapeType = Shape2DType.square, float width = 1.0f, float height = 1.0f, Color color = default(Color), Quaternion rotation = default(Quaternion), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool flattenRoundLines_intoShapePlane = true, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ UtilitiesDXXL_Shapes.ConvertQuaternionToFlatShapesNormalAndUpInsideFlatPlane(out Vector3 normal, out Vector3 up_insideFlatPlane, rotation);
+ return FlatShape(centerPosition, shapeType, width, height, color, normal, up_insideFlatPlane, linesWidth, text, lineStyle, stylePatternScaleFactor, flattenRoundLines_intoShapePlane, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定法线和朝上方向,绘制二维平面形状
+ public static int FlatShape(Vector3 centerPosition, Shape2DType shapeType, float width, float height, Color color, Vector3 normal, Vector3 up_insideShapePlane = default(Vector3), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool flattenRoundLines_intoShapePlane = true, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return 0; }
+ return UtilitiesDXXL_Shapes.FlatShape(centerPosition, width, height, color, normal, up_insideShapePlane, shapeType, linesWidth, text, lineStyle, stylePatternScaleFactor, flattenRoundLines_intoShapePlane, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和四元数旋转,绘制矩形
+ public static void Rectangle(Rect rect, float zPos_ofRectCenter = 0.0f, Quaternion rotation = default(Quaternion), Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool flattenRoundLines_intoShapePlane = true, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ FlatShape(rect, Shape2DType.square, zPos_ofRectCenter, rotation, color, linesWidth, text, lineStyle, stylePatternScaleFactor, flattenRoundLines_intoShapePlane, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 和法线方向,绘制矩形
+ public static void Rectangle(Rect rect, float zPos_ofRectCenter, Vector3 normal, Vector3 up_insideRectPlane = default(Vector3), Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool flattenRoundLines_intoShapePlane = true, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ FlatShape(rect, Shape2DType.square, zPos_ofRectCenter, normal, up_insideRectPlane, color, linesWidth, text, lineStyle, stylePatternScaleFactor, flattenRoundLines_intoShapePlane, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用中心位置、尺寸和四元数旋转,绘制矩形
+ public static void Rectangle(Vector3 centerPosition, Vector2 size, Quaternion rotation = default(Quaternion), Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool flattenRoundLines_intoShapePlane = true, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ FlatShape(centerPosition, Shape2DType.square, size.x, size.y, color, rotation, linesWidth, text, lineStyle, stylePatternScaleFactor, flattenRoundLines_intoShapePlane, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定法线和朝上方向,绘制矩形
+ public static void Rectangle(Vector3 centerPosition, Vector2 size, Vector3 normal, Vector3 up_insideBoxPlane = default(Vector3), Color color = default(Color), float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, bool flattenRoundLines_intoShapePlane = true, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ FlatShape(centerPosition, Shape2DType.square, size.x, size.y, color, normal, up_insideBoxPlane, linesWidth, text, lineStyle, stylePatternScaleFactor, flattenRoundLines_intoShapePlane, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 绘制二维矩形框
+ public static void Box2D(Rect boxRect, Color color = default(Color), float zPos = 0.0f, float angleDegCC = 0.0f, Shape2DType shape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //-> not documented, because it creates confusion with "DrawBasics2D.Box".
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Box2D(boxRect.center, boxRect.size, color, zPos, angleDegCC, shape, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用中心位置和尺寸绘制二维矩形框
+ public static void Box2D(Vector2 centerPosition, Vector2 size, Color color = default(Color), float zPos = 0.0f, float angleDegCC = 0.0f, Shape2DType shape = Shape2DType.square, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //-> not documented, because it creates confusion with "DrawBasics2D.Box".
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(angleDegCC, "angleDeg")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(size, "size")) { return; }
+
+ Vector3 up_insideBoxPlane = UtilitiesDXXL_Math.ApproximatelyZero(angleDegCC) ? Vector3.up : Quaternion.AngleAxis(angleDegCC, Vector3.forward) * Vector3.up;
+ Vector3 positionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(centerPosition, zPos);
+ lineStyle = UtilitiesDXXL_LineStyles.FallbackTo2DLineStyle(lineStyle);
+ fillStyle = UtilitiesDXXL_LineStyles.FallbackTo2DLineStyle(fillStyle);
+ UtilitiesDXXL_Shapes.FlatShape(positionV3, size.x, size.y, color, Vector3.forward, up_insideBoxPlane, shape, linesWidth, text, lineStyle, stylePatternScaleFactor, true, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用 Rect 绘制二维圆形
+ public static void Circle2D(Rect hullRect, Color color = default(Color), float zPos = 0.0f, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //-> not documented, because it creates confusion with "DrawBasics2D.Circle".
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Box2D(hullRect.center, hullRect.size, color, zPos, 0.0f, Shape2DType.circle, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 使用中心位置和半径绘制二维圆形
+ public static void Circle2D(Vector2 centerPosition, float radius = 0.5f, Color color = default(Color), float zPos = 0.0f, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //-> not documented, because it creates confusion with "DrawBasics2D.Circle".
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(radius, "radius")) { return; }
+
+ float diameter = 2.0f * radius;
+ Box2D(centerPosition, new Vector2(diameter, diameter), color, zPos, 0.0f, Shape2DType.circle, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ /// 指定两个圆心位置,绘制二维胶囊体
+ public static void Capsule2D(Vector2 posOfCircle1, Vector2 posOfCircle2, float radius = 0.5f, Color color = default(Color), float zPos = 0.0f, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //-> not documented, because it creates confusion with "DrawBasics2D.Capsule".
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Vector3 posOfCircle1_asV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(posOfCircle1, zPos);
+ Vector3 posOfCircle2_asV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(posOfCircle2, zPos);
+ lineStyle = UtilitiesDXXL_LineStyles.FallbackTo2DLineStyle(lineStyle);
+ fillStyle = UtilitiesDXXL_LineStyles.FallbackTo2DLineStyle(fillStyle);
+ FlatCapsule(posOfCircle1_asV3, posOfCircle2_asV3, radius, color, Vector3.forward, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 使用 Rect 绘制二维胶囊体
+ public static void Capsule2D(Rect hullRect, Color color = default(Color), float zPos = 0.0f, CapsuleDirection2D capsuleDirection = CapsuleDirection2D.Vertical, float angleDegCC = 0.0f, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //-> not documented, because it creates confusion with "DrawBasics2D.Capsule".
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Capsule2D(hullRect.center, hullRect.size, color, zPos, capsuleDirection, angleDegCC, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+ /// 使用中心位置和尺寸绘制二维胶囊体
+ public static void Capsule2D(Vector2 centerPosition, Vector2 size, Color color = default(Color), float zPos = 0.0f, CapsuleDirection2D capsuleDirection = CapsuleDirection2D.Vertical, float angleDegCC = 0.0f, float linesWidth = 0.0f, string text = null, DrawBasics.LineStyle lineStyle = DrawBasics.LineStyle.solid, float stylePatternScaleFactor = 1.0f, DrawBasics.LineStyle fillStyle = DrawBasics.LineStyle.invisible, bool filledWithSpokes = false, bool textBlockAboveLine = false, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //-> not documented, because it creates confusion with "DrawBasics2D.Capsule".
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidFloats(angleDegCC, "angleDeg")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(size, "size")) { return; }
+
+ Vector3 upAlongVert_insideCapsulePlane = UtilitiesDXXL_Math.ApproximatelyZero(angleDegCC) ? Vector3.up : Quaternion.AngleAxis(angleDegCC, Vector3.forward) * Vector3.up;
+ Vector3 positionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(centerPosition, zPos);
+ lineStyle = UtilitiesDXXL_LineStyles.FallbackTo2DLineStyle(lineStyle);
+ fillStyle = UtilitiesDXXL_LineStyles.FallbackTo2DLineStyle(fillStyle);
+ FlatCapsule(positionV3, size.x, size.y, color, Vector3.forward, upAlongVert_insideCapsulePlane, capsuleDirection, linesWidth, text, lineStyle, stylePatternScaleFactor, fillStyle, filledWithSpokes, textBlockAboveLine, durationInSec, hiddenByNearerObjects);
+ }
+
+ }
+
+}
+
+
+
+
+
diff --git a/Runtime/DrawDebugLibrary/DrawShapes.cs.meta b/Runtime/DrawDebugLibrary/DrawShapes.cs.meta
new file mode 100644
index 0000000..fb65d69
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawShapes.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: aeeafc67d666379449eca4d735475afd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/DrawText.cs b/Runtime/DrawDebugLibrary/DrawText.cs
new file mode 100644
index 0000000..50463e9
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawText.cs
@@ -0,0 +1,1802 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System.Collections.Generic;
+
+ public class DrawText
+ {
+ public enum TextAnchorDXXL { UpperLeft, UpperCenter, UpperRight, MiddleLeft, MiddleCenter, MiddleRight, LowerLeft, LowerCenter, LowerRight, LowerLeftOfFirstLine, LowerCenterOfFirstLine, LowerRightOfFirstLine }
+ public enum TextAnchorCircledDXXL
+ {
+ LowerLeftOfFirstLine,
+ LowerLeftOfWholeTextBlock
+ }
+
+ public enum AutomaticTextOrientation
+ {
+ screen,
+ screen_butVerticalInWorldSpace,
+ xyPlane,
+ xzPlane,
+ zyPlane
+ }
+ public static AutomaticTextOrientation automaticTextOrientation = AutomaticTextOrientation.screen;
+
+ public static ParsedTextSpecs parsedTextSpecs = new ParsedTextSpecs(); //is filled with the values of the most recently called WriteText-function.
+ public static ParsedTextOnCircleSpecs parsedTextOnCircleSpecs = new ParsedTextOnCircleSpecs(); //is filled with the values of the most recently called WriteTextCircled-function.
+
+ /// 在屏幕空间中绘制 3D 文本标签,使用 3D 世界坐标和方向向量指定文本位置与方向
+ public static void WriteScreenspace(string text, Vector3 position_in3DWorldspace, Color color, float size_relToViewportHeight, Vector2 textDirection, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteScreenspace") == false) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspace_3Dpos_dirViaVec_cam.Add(new TextScreenspace_3Dpos_dirViaVec_cam(automaticallyFoundCamera, text, position_in3DWorldspace, color, size_relToViewportHeight, textDirection, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteScreenspace(text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+
+ /// 在屏幕空间中绘制 3D 文本标签,使用指定摄像机和 3D 世界坐标与方向向量
+ public static void WriteScreenspace(Camera screenCamera, string text, Vector3 position_in3DWorldspace, Color color, float size_relToViewportHeight, Vector2 textDirection, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspace_3Dpos_dirViaVec_cam.Add(new TextScreenspace_3Dpos_dirViaVec_cam(screenCamera, text, position_in3DWorldspace, color, size_relToViewportHeight, textDirection, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteScreenspace(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+
+ /// 在屏幕空间中绘制文本标签,使用视口坐标和方向向量指定位置与方向
+ public static void WriteScreenspace(string text, Vector2 position_in2DViewportSpace, Color color, float size_relToViewportHeight, Vector2 textDirection, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteScreenspace") == false) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspace_2Dpos_dirViaVec_cam.Add(new TextScreenspace_2Dpos_dirViaVec_cam(automaticallyFoundCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ WriteScreenspace(automaticallyFoundCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+
+ /// 在屏幕空间中绘制文本标签,使用指定摄像机、视口坐标和方向向量
+ public static void WriteScreenspace(Camera screenCamera, string text, Vector2 position_in2DViewportSpace, Color color, float size_relToViewportHeight, Vector2 textDirection, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspace_2Dpos_dirViaVec_cam.Add(new TextScreenspace_2Dpos_dirViaVec_cam(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ WriteScreenspaceFramed(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+
+ public static void WriteScreenspaceFramed(string text, Vector3 position_in3DWorldspace, Color color, float size_relToViewportHeight, Vector2 textDirection, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteScreenspaceFramed") == false) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspaceFramed_3Dpos_dirViaVec_cam.Add(new TextScreenspaceFramed_3Dpos_dirViaVec_cam(automaticallyFoundCamera, text, position_in3DWorldspace, color, size_relToViewportHeight, textDirection, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteScreenspaceFramed(text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+ public static void WriteScreenspaceFramed(Camera screenCamera, string text, Vector3 position_in3DWorldspace, Color color, float size_relToViewportHeight, Vector2 textDirection, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspaceFramed_3Dpos_dirViaVec_cam.Add(new TextScreenspaceFramed_3Dpos_dirViaVec_cam(screenCamera, text, position_in3DWorldspace, color, size_relToViewportHeight, textDirection, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteScreenspaceFramed(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+
+ public static void WriteScreenspaceFramed(string text, Vector2 position_in2DViewportSpace, Color color, float size_relToViewportHeight, Vector2 textDirection, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteScreenspaceFramed") == false) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspaceFramed_2Dpos_dirViaVec_cam.Add(new TextScreenspaceFramed_2Dpos_dirViaVec_cam(automaticallyFoundCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ WriteScreenspaceFramed(automaticallyFoundCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+ public static void WriteScreenspaceFramed(Camera screenCamera, string text, Vector2 position_in2DViewportSpace, Color color, float size_relToViewportHeight, Vector2 textDirection, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(screenCamera, "screenCamera")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspaceFramed_2Dpos_dirViaVec_cam.Add(new TextScreenspaceFramed_2Dpos_dirViaVec_cam(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ bool skipDraw = false; //-> The corresponding method in "TextUtilitiesDXXL" has the same parameters and can be used interchangeably, except that it has the additional parameter "skipDraw". This can be set to 'true' if only the 'parsedTextSpecs' should be filled (e.g. as decision base for the final placement of the text via an additinal DrawText-call).
+ UtilitiesDXXL_Text.WriteScreenSpace(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, textDirection, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec, skipDraw);
+ }
+
+ public static void WriteScreenspace(string text, Vector3 position_in3DWorldspace, Color color = default(Color), float size_relToViewportHeight = 0.025f, float zRotationDegCC = 0.0f, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteScreenspace") == false) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspace_3Dpos_dirViaAngle_cam.Add(new TextScreenspace_3Dpos_dirViaAngle_cam(automaticallyFoundCamera, text, position_in3DWorldspace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteScreenspace(text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+ public static void WriteScreenspace(Camera screenCamera, string text, Vector3 position_in3DWorldspace, Color color = default(Color), float size_relToViewportHeight = 0.025f, float zRotationDegCC = 0.0f, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspace_3Dpos_dirViaAngle_cam.Add(new TextScreenspace_3Dpos_dirViaAngle_cam(screenCamera, text, position_in3DWorldspace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteScreenspace(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+
+ public static void WriteScreenspace(string text, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), float size_relToViewportHeight = 0.025f, float zRotationDegCC = 0.0f, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteScreenspace") == false) { return; }
+
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspace_2Dpos_dirViaAngle_cam.Add(new TextScreenspace_2Dpos_dirViaAngle_cam(automaticallyFoundCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ WriteScreenspace(automaticallyFoundCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+ public static void WriteScreenspace(Camera screenCamera, string text, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), float size_relToViewportHeight = 0.025f, float zRotationDegCC = 0.0f, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspace_2Dpos_dirViaAngle_cam.Add(new TextScreenspace_2Dpos_dirViaAngle_cam(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ WriteScreenspaceFramed(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+
+ public static void WriteScreenspaceFramed(string text, Vector3 position_in3DWorldspace, Color color = default(Color), float size_relToViewportHeight = 0.025f, float zRotationDegCC = 0.0f, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteScreenspaceFramed") == false) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspaceFramed_3Dpos_dirViaAngle_cam.Add(new TextScreenspaceFramed_3Dpos_dirViaAngle_cam(automaticallyFoundCamera, text, position_in3DWorldspace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteScreenspaceFramed(text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+ public static void WriteScreenspaceFramed(Camera screenCamera, string text, Vector3 position_in3DWorldspace, Color color = default(Color), float size_relToViewportHeight = 0.025f, float zRotationDegCC = 0.0f, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspaceFramed_3Dpos_dirViaAngle_cam.Add(new TextScreenspaceFramed_3Dpos_dirViaAngle_cam(screenCamera, text, position_in3DWorldspace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteScreenspaceFramed(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+
+ public static void WriteScreenspaceFramed(string text, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), float size_relToViewportHeight = 0.025f, float zRotationDegCC = 0.0f, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteScreenspaceFramed") == false) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspaceFramed_2Dpos_dirViaAngle_cam.Add(new TextScreenspaceFramed_2Dpos_dirViaAngle_cam(automaticallyFoundCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ WriteScreenspaceFramed(automaticallyFoundCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec);
+ }
+ public static void WriteScreenspaceFramed(Camera screenCamera, string text, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), float size_relToViewportHeight = 0.025f, float zRotationDegCC = 0.0f, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth_relToViewportWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth = 0.0f, bool autoLineBreakAtViewportBorder = true, float autoLineBreakWidth_relToViewportWidth = 0.0f, bool autoFlipTextToPreventUpsideDown = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(screenCamera, "screenCamera")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextScreenspaceFramed_2Dpos_dirViaAngle_cam.Add(new TextScreenspaceFramed_2Dpos_dirViaAngle_cam(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec));
+ return;
+ }
+
+ bool skipDraw = false; //-> The corresponding method in "TextUtilitiesDXXL" has the same parameters and can be used interchangeably, except that it has the additional parameter "skipDraw". This can be set to 'true' if only the 'parsedTextSpecs' should be filled (e.g. as decision base for the final placement of the text via an additinal DrawText-call).
+ UtilitiesDXXL_Text.WriteScreenspace(screenCamera, text, position_in2DViewportSpace, color, size_relToViewportHeight, zRotationDegCC, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth_relToViewportWidth, forceRestrictTextBlockSizeToThisMaxTextWidth_relToViewportWidth, autoLineBreakAtViewportBorder, autoLineBreakWidth_relToViewportWidth, autoFlipTextToPreventUpsideDown, durationInSec, skipDraw);
+ }
+
+ public static void Write2D(string text, Vector2 position, Color color = default(Color), float size = 0.1f, Vector2 textDirection = default(Vector2), TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float custom_zPos = float.PositiveInfinity, float forceTextBlockEnlargementToThisMinWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth = 0.0f, float autoLineBreakWidth = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Write2DFramed(text, position, color, size, textDirection, textAnchor, custom_zPos, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, forceTextBlockEnlargementToThisMinWidth, forceRestrictTextBlockSizeToThisMaxTextWidth, autoLineBreakWidth, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Write2DFramed(string text, Vector2 position, Color color = default(Color), float size = 0.1f, Vector2 textDirection = default(Vector2), TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float custom_zPos = float.PositiveInfinity, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth = 0.0f, float autoLineBreakWidth = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Text.Write2DFramed(text, position, color, size, textDirection, textAnchor, custom_zPos, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth, forceRestrictTextBlockSizeToThisMaxTextWidth, autoLineBreakWidth, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Write2D(string text, Vector2 position, Color color, float size, float zRotationDegCC, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float custom_zPos = float.PositiveInfinity, float forceTextBlockEnlargementToThisMinWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth = 0.0f, float autoLineBreakWidth = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ Write2DFramed(text, position, color, size, zRotationDegCC, textAnchor, custom_zPos, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, forceTextBlockEnlargementToThisMinWidth, forceRestrictTextBlockSizeToThisMaxTextWidth, autoLineBreakWidth, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Write2DFramed(string text, Vector2 position, Color color, float size, float zRotationDegCC, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float custom_zPos = float.PositiveInfinity, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth = 0.0f, float autoLineBreakWidth = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Text.Write2DFramed(text, position, color, size, zRotationDegCC, textAnchor, custom_zPos, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth, forceRestrictTextBlockSizeToThisMaxTextWidth, autoLineBreakWidth, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Write(string text, Vector3 position, Color color, float size, Quaternion rotation, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float forceTextBlockEnlargementToThisMinWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth = 0.0f, float autoLineBreakWidth = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ WriteFramed(text, position, color, size, rotation, textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, forceTextBlockEnlargementToThisMinWidth, forceRestrictTextBlockSizeToThisMaxTextWidth, autoLineBreakWidth, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteFramed(string text, Vector3 position, Color color, float size, Quaternion rotation, TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth = 0.0f, float autoLineBreakWidth = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Text.WriteFramed(text, position, color, size, rotation, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth, forceRestrictTextBlockSizeToThisMaxTextWidth, autoLineBreakWidth, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void Write(string text, Vector3 position, Color color = default(Color), float size = 0.1f, Vector3 textDirection = default(Vector3), Vector3 textUp = default(Vector3), TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, float forceTextBlockEnlargementToThisMinWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth = 0.0f, float autoLineBreakWidth = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ WriteFramed(text, position, color, size, textDirection, textUp, textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, forceTextBlockEnlargementToThisMinWidth, forceRestrictTextBlockSizeToThisMaxTextWidth, autoLineBreakWidth, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects);
+ }
+ public static void WriteFramed(string text, Vector3 position, Color color = default(Color), float size = 0.1f, Vector3 textDirection = default(Vector3), Vector3 textUp = default(Vector3), TextAnchorDXXL textAnchor = TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle enclosingBoxLineStyle = DrawBasics.LineStyle.solid, float enclosingBox_lineWidth_relToTextSize = 0.0f, float enclosingBox_paddingSize_relToTextSize = 0.0f, float forceTextBlockEnlargementToThisMinWidth = 0.0f, float forceRestrictTextBlockSizeToThisMaxTextWidth = 0.0f, float autoLineBreakWidth = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ UtilitiesDXXL_Text.WriteFramed(text, position, color, size, textDirection, textUp, textAnchor, enclosingBoxLineStyle, enclosingBox_lineWidth_relToTextSize, enclosingBox_paddingSize_relToTextSize, forceTextBlockEnlargementToThisMinWidth, forceRestrictTextBlockSizeToThisMaxTextWidth, autoLineBreakWidth, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteOnCircleScreenspace(string text, Vector2 textStartPos, Vector2 circleCenterPosition, Color color = default(Color), float size_relToViewportHeight = 0.025f, TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteOnCircleScreenspace") == false) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextOnCircleScreenspace_viaStartPos_cam.Add(new TextOnCircleScreenspace_viaStartPos_cam(automaticallyFoundCamera, text, textStartPos, circleCenterPosition, color, size_relToViewportHeight, textAnchor, autoLineBreakAngleDeg, durationInSec));
+ return;
+ }
+
+ WriteOnCircleScreenspace(automaticallyFoundCamera, text, textStartPos, circleCenterPosition, color, size_relToViewportHeight, textAnchor, autoLineBreakAngleDeg, durationInSec);
+ }
+
+ public static void WriteOnCircleScreenspace(Camera screenCamera, string text, Vector2 textStartPos, Vector2 circleCenterPosition, Color color = default(Color), float size_relToViewportHeight = 0.025f, TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(textStartPos, "textStartPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(circleCenterPosition, "circleCenterPosition")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextOnCircleScreenspace_viaStartPos_cam.Add(new TextOnCircleScreenspace_viaStartPos_cam(screenCamera, text, textStartPos, circleCenterPosition, color, size_relToViewportHeight, textAnchor, autoLineBreakAngleDeg, durationInSec));
+ return;
+ }
+
+ Vector2 textStartPos_inWarpedViewportSpace = textStartPos;
+ Vector2 circleCenterPosition_inWarpedViewportSpace = circleCenterPosition;
+ Vector2 textsInitialUp_inWarpedViewportSpace = textStartPos_inWarpedViewportSpace - circleCenterPosition_inWarpedViewportSpace;
+ Vector2 textsInitialUp_inUniformSpace = DrawScreenspace.DirectionInUnitsOfWarpedSpace_to_sameLookingDirectionInUnitsOfUnwarpedSpace(textsInitialUp_inWarpedViewportSpace, screenCamera);
+ float radius_inUniformSpace = textsInitialUp_inUniformSpace.magnitude;
+ float radius_relToViewportHeight = radius_inUniformSpace; //-> this is equal, because the convention of "DrawScreenspace.DirectionInUnitsOfWarpedSpace_to_sameLookingDirectionInUnitsOfUnwarpedSpace()" is, that the screenHeight is 1 unit in the uniform space.
+
+ bool skipDraw = false; //-> The corresponding method in "TextUtilitiesDXXL" has the same parameters and can be used interchangeably, except that it has the additional parameter "skipDraw". This can be set to 'true' if only the 'parsedTextSpecs' should be filled (e.g. as decision base for the final placement of the text via an additinal DrawText-call).
+ UtilitiesDXXL_Text.WriteOnCircleScreenspace(screenCamera, text, circleCenterPosition, radius_relToViewportHeight, color, size_relToViewportHeight, textsInitialUp_inUniformSpace, textAnchor, autoLineBreakAngleDeg, durationInSec, skipDraw);
+ }
+
+ public static void WriteOnCircleScreenspace(string text, Vector2 circleCenterPosition, float radius_relToViewportHeight, Color color, float size_relToViewportHeight, Vector2 textsInitialUp, TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteOnCircleScreenspace") == false) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextOnCircleScreenspace_dirViaVecUp_cam.Add(new TextOnCircleScreenspace_dirViaVecUp_cam(automaticallyFoundCamera, text, circleCenterPosition, radius_relToViewportHeight, color, size_relToViewportHeight, textsInitialUp, textAnchor, autoLineBreakAngleDeg, durationInSec));
+ return;
+ }
+
+ WriteOnCircleScreenspace(automaticallyFoundCamera, text, circleCenterPosition, radius_relToViewportHeight, color, size_relToViewportHeight, textsInitialUp, textAnchor, autoLineBreakAngleDeg, durationInSec);
+ }
+ public static void WriteOnCircleScreenspace(Camera screenCamera, string text, Vector2 circleCenterPosition, float radius_relToViewportHeight, Color color, float size_relToViewportHeight, Vector2 textsInitialUp, TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(screenCamera, "screenCamera")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextOnCircleScreenspace_dirViaVecUp_cam.Add(new TextOnCircleScreenspace_dirViaVecUp_cam(screenCamera, text, circleCenterPosition, radius_relToViewportHeight, color, size_relToViewportHeight, textsInitialUp, textAnchor, autoLineBreakAngleDeg, durationInSec));
+ return;
+ }
+
+ bool skipDraw = false; //-> The corresponding method in "TextUtilitiesDXXL" has the same parameters and can be used interchangeably, except that it has the additional parameter "skipDraw". This can be set to 'true' if only the 'parsedTextSpecs' should be filled (e.g. as decision base for the final placement of the text via an additinal DrawText-call).
+ UtilitiesDXXL_Text.WriteOnCircleScreenspace(screenCamera, text, circleCenterPosition, radius_relToViewportHeight, color, size_relToViewportHeight, textsInitialUp, textAnchor, autoLineBreakAngleDeg, durationInSec, skipDraw);
+ }
+
+ public static void WriteOnCircleScreenspace(string text, Vector2 circleCenterPosition, float radius_relToViewportHeight, Color color = default(Color), float size_relToViewportHeight = 0.025f, float initialTextDirection_as_zRotationDegCCfromCamUp = 0.0f, TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteOnCircleScreenspace") == false) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextOnCircleScreenspace_dirViaAngle_cam.Add(new TextOnCircleScreenspace_dirViaAngle_cam(automaticallyFoundCamera, text, circleCenterPosition, radius_relToViewportHeight, color, size_relToViewportHeight, initialTextDirection_as_zRotationDegCCfromCamUp, textAnchor, autoLineBreakAngleDeg, durationInSec));
+ return;
+ }
+
+ WriteOnCircleScreenspace(automaticallyFoundCamera, text, circleCenterPosition, radius_relToViewportHeight, color, size_relToViewportHeight, initialTextDirection_as_zRotationDegCCfromCamUp, textAnchor, autoLineBreakAngleDeg, durationInSec);
+ }
+ public static void WriteOnCircleScreenspace(Camera screenCamera, string text, Vector2 circleCenterPosition, float radius_relToViewportHeight, Color color = default(Color), float size_relToViewportHeight = 0.025f, float initialTextDirection_as_zRotationDegCCfromCamUp = 0.0f, TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(screenCamera, "screenCamera")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_TextOnCircleScreenspace_dirViaAngle_cam.Add(new TextOnCircleScreenspace_dirViaAngle_cam(screenCamera, text, circleCenterPosition, radius_relToViewportHeight, color, size_relToViewportHeight, initialTextDirection_as_zRotationDegCCfromCamUp, textAnchor, autoLineBreakAngleDeg, durationInSec));
+ return;
+ }
+
+ bool skipDraw = false; //-> The corresponding method in "TextUtilitiesDXXL" has the same parameters and can be used interchangeably, except that it has the additional parameter "skipDraw". This can be set to 'true' if only the 'parsedTextSpecs' should be filled (e.g. as decision base for the final placement of the text via an additinal DrawText-call).
+ UtilitiesDXXL_Text.WriteOnCircleScreenspace(screenCamera, text, circleCenterPosition, radius_relToViewportHeight, color, size_relToViewportHeight, initialTextDirection_as_zRotationDegCCfromCamUp, textAnchor, autoLineBreakAngleDeg, durationInSec, skipDraw);
+ }
+
+ public static void WriteOnCircle2D(string text, Vector2 textStartPos, Vector2 circleCenterPosition, Color color = default(Color), float size = 0.1f, float custom_zPos = float.PositiveInfinity, TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(textStartPos, "textStartPos")) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForInvalidVectors(circleCenterPosition, "circleCenterPosition")) { return; }
+
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector2 textStartPosV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(textStartPos, zPos);
+ Vector2 circleCenterPositionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenterPosition, zPos);
+
+ Vector3 textsInitialUp = textStartPosV3 - circleCenterPositionV3;
+ Vector3 textsInitialUp_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(textsInitialUp, out float radius); //-> normalizing is actually not necessary here, but is also no problem, since length/magnitude is needed for the radius anyway
+ Vector3 textsInitialDir = Vector3.Cross(textsInitialUp_normalized, Vector3.forward);
+ textsInitialDir = UtilitiesDXXL_Math.ScaleNonZeroVectorIntoRegionOfFloatPrecision(textsInitialDir);
+
+ bool skipDraw = false; //-> The corresponding method in "TextUtilitiesDXXL" has the same parameters and can be used interchangeably, except that it has the additional parameter "skipDraw". This can be set to 'true' if only the 'parsedTextSpecs' should be filled (e.g. as decision base for the final placement of the text via an additinal DrawText-call).
+ UtilitiesDXXL_Text.WriteOnCircle(text, circleCenterPosition, radius, color, size, textsInitialDir, textsInitialUp, textAnchor, autoLineBreakAngleDeg, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects, skipDraw, true, false);
+ }
+
+ public static void WriteOnCircle2D(string text, Vector2 circleCenterPosition, float radius, Color color, float size, Vector2 textsInitialUp, float custom_zPos = float.PositiveInfinity, TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 circleCenterPositionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenterPosition, zPos);
+ Vector3 textsInitialUpV3 = UtilitiesDXXL_DrawBasics2D.Direction_V2toV3(textsInitialUp);
+ textsInitialUpV3 = UtilitiesDXXL_Math.ScaleNonZeroVectorIntoRegionOfFloatPrecision(textsInitialUpV3);
+ Vector3 textsInitialDirV3 = Vector3.Cross(textsInitialUpV3, Vector3.forward);
+
+ bool skipDraw = false; //-> The method in "TextUtilitiesDXXL" has the additional parameter "skipDraw". This can be set to 'true' if only the 'parsedTextSpecs' should be filled (e.g. as decision base for the final placement of the text via an additinal DrawText-call).
+ UtilitiesDXXL_Text.WriteOnCircle(text, circleCenterPositionV3, radius, color, size, textsInitialDirV3, textsInitialUpV3, textAnchor, autoLineBreakAngleDeg, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects, skipDraw, true, false);
+ }
+
+ public static void WriteOnCircle2D(string text, Vector2 circleCenterPosition, float radius, Color color = default(Color), float size = 0.1f, float initialTextDirection_as_zRotationDegCCfromV3Right = 0.0f, float custom_zPos = float.PositiveInfinity, TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ float zPos = UtilitiesDXXL_DrawBasics2D.TryFallbackToDefaultZ(custom_zPos);
+ Vector3 circleCenterPositionV3 = UtilitiesDXXL_DrawBasics2D.Position_V2toV3(circleCenterPosition, zPos);
+ Quaternion rotation = UtilitiesDXXL_DrawBasics2D.QuaternionFromAngle(initialTextDirection_as_zRotationDegCCfromV3Right);
+ Vector3 textsInitialDirV3 = rotation * Vector3.right;
+ Vector3 textsInitialUpV3 = Vector3.Cross(Vector3.forward, textsInitialDirV3);
+
+ bool skipDraw = false; //-> The method in "TextUtilitiesDXXL" has the additional parameter "skipDraw". This can be set to 'true' if only the 'parsedTextSpecs' should be filled (e.g. as decision base for the final placement of the text via an additinal DrawText-call).
+ UtilitiesDXXL_Text.WriteOnCircle(text, circleCenterPositionV3, radius, color, size, textsInitialDirV3, textsInitialUpV3, textAnchor, autoLineBreakAngleDeg, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects, skipDraw, true, true);
+ }
+
+ public static void WriteOnCircle(string text, Vector3 textStartPos, Vector3 circleCenterPosition, Vector3 turnAxis_direction = default(Vector3), Color color = default(Color), float size = 0.1f, TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ UtilitiesDXXL_Text.WriteOnCircle(text, textStartPos, circleCenterPosition, turnAxis_direction, color, size, textAnchor, autoLineBreakAngleDeg, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteOnCircle(string text, Vector3 circleCenterPosition, float radius, Color color = default(Color), float size = 0.1f, Quaternion orientation = default(Quaternion), TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ bool rotationIsValid = UtilitiesDXXL_TextDirAndUpCalculation.ConvertQuaternionToTextDirAndUpVectors(out Vector3 textsInitialDir, out Vector3 textsInitialUp, orientation);
+ bool skipDraw = false; //-> The corresponding method in "TextUtilitiesDXXL" has the same parameters and can be used interchangeably, except that it has the additional parameter "skipDraw". This can be set to 'true' if only the 'parsedTextSpecs' should be filled (e.g. as decision base for the final placement of the text via an additinal DrawText-call).
+ UtilitiesDXXL_Text.WriteOnCircle(text, circleCenterPosition, radius, color, size, textsInitialDir, textsInitialUp, textAnchor, autoLineBreakAngleDeg, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects, skipDraw, false, rotationIsValid);
+ }
+
+ public static void WriteOnCircle(string text, Vector3 circleCenterPosition, float radius, Color color = default(Color), float size = 0.1f, Vector3 textsInitialDir = default(Vector3), Vector3 textsInitialUp = default(Vector3), TextAnchorCircledDXXL textAnchor = TextAnchorCircledDXXL.LowerLeftOfFirstLine, float autoLineBreakAngleDeg = 0.0f, bool autoFlipToPreventMirrorInverted = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ bool skipDraw = false; //-> The corresponding method in "TextUtilitiesDXXL" has the same parameters and can be used interchangeably, except that it has the additional parameter "skipDraw". This can be set to 'true' if only the 'parsedTextSpecs' should be filled (e.g. as decision base for the final placement of the text via an additinal DrawText-call).
+ UtilitiesDXXL_Text.WriteOnCircle(text, circleCenterPosition, radius, color, size, textsInitialDir, textsInitialUp, textAnchor, autoLineBreakAngleDeg, autoFlipToPreventMirrorInverted, durationInSec, hiddenByNearerObjects, skipDraw, false, false);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentFromBoolArray_preAllocated = UtilitiesDXXL_DrawCollections.GetBoolAsStringFromArray;
+ public static void WriteArray(bool[] boolArray, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(boolArray, "boolArray")) { return; }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = true;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(boolArray, boolArray.Length, GetContentFromBoolArray_preAllocated, null, null, null, "bool", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArray2D(bool[] boolArray, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(boolArray, "boolArray")) { return; }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = true;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(boolArray, boolArray.Length, GetContentFromBoolArray_preAllocated, null, null, null, "bool", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArrayScreenspace(bool[] boolArray, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfBool_screenspace_3Dpos.Add(new ArrayOfBool_screenspace_3Dpos(boolArray, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(boolArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, bool[] boolArray, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfBool_screenspace_3Dpos_cam.Add(new ArrayOfBool_screenspace_3Dpos_cam(screenCamera, boolArray, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(screenCamera, boolArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(bool[] boolArray, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfBool_screenspace_2Dpos.Add(new ArrayOfBool_screenspace_2Dpos(boolArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ WriteArrayScreenspace(automaticallyFoundCamera, boolArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, bool[] boolArray, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(boolArray, "boolArray")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfBool_screenspace_2Dpos_cam.Add(new ArrayOfBool_screenspace_2Dpos_cam(screenCamera, boolArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = true;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, boolArray, boolArray.Length, GetContentFromBoolArray_preAllocated, null, null, null, "bool", null, null, null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentFromBoolList_preAllocated = UtilitiesDXXL_DrawCollections.GetBoolAsStringFromList;
+ public static void WriteList(List boolList, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(boolList, "boolList")) { return; }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = true;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(boolList, boolList.Count, GetContentFromBoolList_preAllocated, null, null, null, "bool", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteList2D(List boolList, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(boolList, "boolList")) { return; }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = true;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(boolList, boolList.Count, GetContentFromBoolList_preAllocated, null, null, null, "bool", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteListScreenspace(List boolList, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfBool_screenspace_3Dpos.Add(new ListOfBool_screenspace_3Dpos(boolList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(boolList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List boolList, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfBool_screenspace_3Dpos_cam.Add(new ListOfBool_screenspace_3Dpos_cam(screenCamera, boolList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(screenCamera, boolList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(List boolList, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfBool_screenspace_2Dpos.Add(new ListOfBool_screenspace_2Dpos(boolList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ WriteListScreenspace(automaticallyFoundCamera, boolList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List boolList, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(boolList, "boolList")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfBool_screenspace_2Dpos_cam.Add(new ListOfBool_screenspace_2Dpos_cam(screenCamera, boolList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = true;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, boolList, boolList.Count, GetContentFromBoolList_preAllocated, null, null, null, "bool", null, null, null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentFromIntArray_preAllocated = UtilitiesDXXL_DrawCollections.GetIntAsStringFromArray;
+ public static void WriteArray(int[] intArray, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(intArray, "intArray")) { return; }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(intArray, intArray.Length, GetContentFromIntArray_preAllocated, null, null, null, "int", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArray2D(int[] intArray, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(intArray, "intArray")) { return; }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(intArray, intArray.Length, GetContentFromIntArray_preAllocated, null, null, null, "int", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArrayScreenspace(int[] intArray, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfInt_screenspace_3Dpos.Add(new ArrayOfInt_screenspace_3Dpos(intArray, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(intArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, int[] intArray, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfInt_screenspace_3Dpos_cam.Add(new ArrayOfInt_screenspace_3Dpos_cam(screenCamera, intArray, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(screenCamera, intArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(int[] intArray, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfInt_screenspace_2Dpos.Add(new ArrayOfInt_screenspace_2Dpos(intArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ WriteArrayScreenspace(automaticallyFoundCamera, intArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, int[] intArray, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(intArray, "intArray")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfInt_screenspace_2Dpos_cam.Add(new ArrayOfInt_screenspace_2Dpos_cam(screenCamera, intArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, intArray, intArray.Length, GetContentFromIntArray_preAllocated, null, null, null, "int", null, null, null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentFromIntList_preAllocated = UtilitiesDXXL_DrawCollections.GetIntAsStringFromList;
+ public static void WriteList(List intList, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(intList, "intList")) { return; }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(intList, intList.Count, GetContentFromIntList_preAllocated, null, null, null, "int", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteList2D(List intList, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(intList, "intList")) { return; }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(intList, intList.Count, GetContentFromIntList_preAllocated, null, null, null, "int", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteListScreenspace(List intList, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfInt_screenspace_3Dpos.Add(new ListOfInt_screenspace_3Dpos(intList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(intList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List intList, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfInt_screenspace_3Dpos_cam.Add(new ListOfInt_screenspace_3Dpos_cam(screenCamera, intList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(screenCamera, intList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(List intList, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfInt_screenspace_2Dpos.Add(new ListOfInt_screenspace_2Dpos(intList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ WriteListScreenspace(automaticallyFoundCamera, intList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List intList, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(intList, "intList")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfInt_screenspace_2Dpos_cam.Add(new ListOfInt_screenspace_2Dpos_cam(screenCamera, intList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, intList, intList.Count, GetContentFromIntList_preAllocated, null, null, null, "int", null, null, null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentFromFloatArray_preAllocated = UtilitiesDXXL_DrawCollections.GetFloatAsStringFromArray;
+ public static void WriteArray(float[] floatArray, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(floatArray, "floatArray")) { return; }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(floatArray, floatArray.Length, GetContentFromFloatArray_preAllocated, null, null, null, "float", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArray2D(float[] floatArray, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(floatArray, "floatArray")) { return; }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(floatArray, floatArray.Length, GetContentFromFloatArray_preAllocated, null, null, null, "float", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArrayScreenspace(float[] floatArray, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfFloat_screenspace_3Dpos.Add(new ArrayOfFloat_screenspace_3Dpos(floatArray, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(floatArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, float[] floatArray, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfFloat_screenspace_3Dpos_cam.Add(new ArrayOfFloat_screenspace_3Dpos_cam(screenCamera, floatArray, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(screenCamera, floatArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(float[] floatArray, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfFloat_screenspace_2Dpos.Add(new ArrayOfFloat_screenspace_2Dpos(floatArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ WriteArrayScreenspace(automaticallyFoundCamera, floatArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, float[] floatArray, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(floatArray, "floatArray")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfFloat_screenspace_2Dpos_cam.Add(new ArrayOfFloat_screenspace_2Dpos_cam(screenCamera, floatArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, floatArray, floatArray.Length, GetContentFromFloatArray_preAllocated, null, null, null, "float", null, null, null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentFromFloatList_preAllocated = UtilitiesDXXL_DrawCollections.GetFloatAsStringFromList;
+ public static void WriteList(List floatList, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(floatList, "floatList")) { return; }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(floatList, floatList.Count, GetContentFromFloatList_preAllocated, null, null, null, "float", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteList2D(List floatList, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(floatList, "floatList")) { return; }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(floatList, floatList.Count, GetContentFromFloatList_preAllocated, null, null, null, "float", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteListScreenspace(List floatList, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfFloat_screenspace_3Dpos.Add(new ListOfFloat_screenspace_3Dpos(floatList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(floatList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List floatList, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfFloat_screenspace_3Dpos_cam.Add(new ListOfFloat_screenspace_3Dpos_cam(screenCamera, floatList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(screenCamera, floatList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(List floatList, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfFloat_screenspace_2Dpos.Add(new ListOfFloat_screenspace_2Dpos(floatList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ WriteListScreenspace(automaticallyFoundCamera, floatList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List floatList, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(floatList, "floatList")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfFloat_screenspace_2Dpos_cam.Add(new ListOfFloat_screenspace_2Dpos_cam(screenCamera, floatList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, floatList, floatList.Count, GetContentFromFloatList_preAllocated, null, null, null, "float", null, null, null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentFromStringArray_preAllocated = UtilitiesDXXL_DrawCollections.GetStringFromArray;
+ public static void WriteArray(string[] stringArray, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(stringArray, "stringArray")) { return; }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(stringArray, stringArray.Length, GetContentFromStringArray_preAllocated, null, null, null, "string", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArray2D(string[] stringArray, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(stringArray, "stringArray")) { return; }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(stringArray, stringArray.Length, GetContentFromStringArray_preAllocated, null, null, null, "string", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArrayScreenspace(string[] stringArray, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfString_screenspace_3Dpos.Add(new ArrayOfString_screenspace_3Dpos(stringArray, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(stringArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, string[] stringArray, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfString_screenspace_3Dpos_cam.Add(new ArrayOfString_screenspace_3Dpos_cam(screenCamera, stringArray, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(screenCamera, stringArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(string[] stringArray, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfString_screenspace_2Dpos.Add(new ArrayOfString_screenspace_2Dpos(stringArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ WriteArrayScreenspace(automaticallyFoundCamera, stringArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, string[] stringArray, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(stringArray, "stringArray")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfString_screenspace_2Dpos_cam.Add(new ArrayOfString_screenspace_2Dpos_cam(screenCamera, stringArray, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "Array";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, stringArray, stringArray.Length, GetContentFromStringArray_preAllocated, null, null, null, "string", null, null, null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentFromStringList_preAllocated = UtilitiesDXXL_DrawCollections.GetStringFromList;
+ public static void WriteList(List stringList, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(stringList, "stringList")) { return; }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(stringList, stringList.Count, GetContentFromStringList_preAllocated, null, null, null, "string", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteList2D(List stringList, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(stringList, "stringList")) { return; }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(stringList, stringList.Count, GetContentFromStringList_preAllocated, null, null, null, "string", null, null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteListScreenspace(List stringList, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfString_screenspace_3Dpos.Add(new ListOfString_screenspace_3Dpos(stringList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(stringList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List stringList, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfString_screenspace_3Dpos_cam.Add(new ListOfString_screenspace_3Dpos_cam(screenCamera, stringList, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(screenCamera, stringList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(List stringList, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfString_screenspace_2Dpos.Add(new ListOfString_screenspace_2Dpos(stringList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ WriteListScreenspace(automaticallyFoundCamera, stringList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List stringList, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(stringList, "stringList")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfString_screenspace_2Dpos_cam.Add(new ListOfString_screenspace_2Dpos_cam(screenCamera, stringList, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "List";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, stringList, stringList.Count, GetContentFromStringList_preAllocated, null, null, null, "string", null, null, null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentXFromVector2Array_preAllocated = UtilitiesDXXL_DrawCollections.GetVector2XAsStringFromArray;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentYFromVector2Array_preAllocated = UtilitiesDXXL_DrawCollections.GetVector2YAsStringFromArray;
+ public static void WriteArray(Vector2[] vector2Array, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector2Array, "vector2Array")) { return; }
+
+ string titleFallback = "Array of Vector2";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(vector2Array, vector2Array.Length, GetContentXFromVector2Array_preAllocated, GetContentYFromVector2Array_preAllocated, null, null, "X", "Y", null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArray2D(Vector2[] vector2Array, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector2Array, "vector2Array")) { return; }
+
+ string titleFallback = "Array of Vector2";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(vector2Array, vector2Array.Length, GetContentXFromVector2Array_preAllocated, GetContentYFromVector2Array_preAllocated, null, null, "X", "Y", null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArrayScreenspace(Vector2[] vector2Array, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector2_screenspace_3Dpos.Add(new ArrayOfVector2_screenspace_3Dpos(vector2Array, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(vector2Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, Vector2[] vector2Array, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector2_screenspace_3Dpos_cam.Add(new ArrayOfVector2_screenspace_3Dpos_cam(screenCamera, vector2Array, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(screenCamera, vector2Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Vector2[] vector2Array, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector2_screenspace_2Dpos.Add(new ArrayOfVector2_screenspace_2Dpos(vector2Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ WriteArrayScreenspace(automaticallyFoundCamera, vector2Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, Vector2[] vector2Array, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector2Array, "vector2Array")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector2_screenspace_2Dpos_cam.Add(new ArrayOfVector2_screenspace_2Dpos_cam(screenCamera, vector2Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "Array of Vector2";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, vector2Array, vector2Array.Length, GetContentXFromVector2Array_preAllocated, GetContentYFromVector2Array_preAllocated, null, null, "X", "Y", null, null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentXFromVector2List_preAllocated = UtilitiesDXXL_DrawCollections.GetVector2XAsStringFromList;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentYFromVector2List_preAllocated = UtilitiesDXXL_DrawCollections.GetVector2YAsStringFromList;
+ public static void WriteList(List vector2List, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector2List, "vector2List")) { return; }
+
+ string titleFallback = "List of Vector2";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(vector2List, vector2List.Count, GetContentXFromVector2List_preAllocated, GetContentYFromVector2List_preAllocated, null, null, "X", "Y", null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteList2D(List vector2List, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector2List, "vector2List")) { return; }
+
+ string titleFallback = "List of Vector2";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(vector2List, vector2List.Count, GetContentXFromVector2List_preAllocated, GetContentYFromVector2List_preAllocated, null, null, "X", "Y", null, null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteListScreenspace(List vector2List, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector2_screenspace_3Dpos.Add(new ListOfVector2_screenspace_3Dpos(vector2List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(vector2List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List vector2List, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector2_screenspace_3Dpos_cam.Add(new ListOfVector2_screenspace_3Dpos_cam(screenCamera, vector2List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(screenCamera, vector2List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(List vector2List, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector2_screenspace_2Dpos.Add(new ListOfVector2_screenspace_2Dpos(vector2List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ WriteListScreenspace(automaticallyFoundCamera, vector2List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List vector2List, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector2List, "vector2List")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector2_screenspace_2Dpos_cam.Add(new ListOfVector2_screenspace_2Dpos_cam(screenCamera, vector2List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "List of Vector2";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, vector2List, vector2List.Count, GetContentXFromVector2List_preAllocated, GetContentYFromVector2List_preAllocated, null, null, "X", "Y", null, null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentXFromVector3Array_preAllocated = UtilitiesDXXL_DrawCollections.GetVector3XAsStringFromArray;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentYFromVector3Array_preAllocated = UtilitiesDXXL_DrawCollections.GetVector3YAsStringFromArray;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentZFromVector3Array_preAllocated = UtilitiesDXXL_DrawCollections.GetVector3ZAsStringFromArray;
+ public static void WriteArray(Vector3[] vector3Array, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector3Array, "vector3Array")) { return; }
+
+ string titleFallback = "Array of Vector3";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(vector3Array, vector3Array.Length, GetContentXFromVector3Array_preAllocated, GetContentYFromVector3Array_preAllocated, GetContentZFromVector3Array_preAllocated, null, "X", "Y", "Z", null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArray2D(Vector3[] vector3Array, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector3Array, "vector3Array")) { return; }
+
+ string titleFallback = "Array of Vector3";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(vector3Array, vector3Array.Length, GetContentXFromVector3Array_preAllocated, GetContentYFromVector3Array_preAllocated, GetContentZFromVector3Array_preAllocated, null, "X", "Y", "Z", null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArrayScreenspace(Vector3[] vector3Array, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector3_screenspace_3Dpos.Add(new ArrayOfVector3_screenspace_3Dpos(vector3Array, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(vector3Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, Vector3[] vector3Array, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector3_screenspace_3Dpos_cam.Add(new ArrayOfVector3_screenspace_3Dpos_cam(screenCamera, vector3Array, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(screenCamera, vector3Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Vector3[] vector3Array, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector3_screenspace_2Dpos.Add(new ArrayOfVector3_screenspace_2Dpos(vector3Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ WriteArrayScreenspace(automaticallyFoundCamera, vector3Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, Vector3[] vector3Array, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector3Array, "vector3Array")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector3_screenspace_2Dpos_cam.Add(new ArrayOfVector3_screenspace_2Dpos_cam(screenCamera, vector3Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "Array of Vector3";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, vector3Array, vector3Array.Length, GetContentXFromVector3Array_preAllocated, GetContentYFromVector3Array_preAllocated, GetContentZFromVector3Array_preAllocated, null, "X", "Y", "Z", null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentXFromVector3List_preAllocated = UtilitiesDXXL_DrawCollections.GetVector3XAsStringFromList;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentYFromVector3List_preAllocated = UtilitiesDXXL_DrawCollections.GetVector3YAsStringFromList;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentZFromVector3List_preAllocated = UtilitiesDXXL_DrawCollections.GetVector3ZAsStringFromList;
+ public static void WriteList(List vector3List, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector3List, "vector3List")) { return; }
+
+ string titleFallback = "List of Vector3";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(vector3List, vector3List.Count, GetContentXFromVector3List_preAllocated, GetContentYFromVector3List_preAllocated, GetContentZFromVector3List_preAllocated, null, "X", "Y", "Z", null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteList2D(List vector3List, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector3List, "vector3List")) { return; }
+
+ string titleFallback = "List of Vector3";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(vector3List, vector3List.Count, GetContentXFromVector3List_preAllocated, GetContentYFromVector3List_preAllocated, GetContentZFromVector3List_preAllocated, null, "X", "Y", "Z", null, position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteListScreenspace(List vector3List, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector3_screenspace_3Dpos.Add(new ListOfVector3_screenspace_3Dpos(vector3List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(vector3List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List vector3List, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector3_screenspace_3Dpos_cam.Add(new ListOfVector3_screenspace_3Dpos_cam(screenCamera, vector3List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(screenCamera, vector3List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(List vector3List, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector3_screenspace_2Dpos.Add(new ListOfVector3_screenspace_2Dpos(vector3List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ WriteListScreenspace(automaticallyFoundCamera, vector3List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List vector3List, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector3List, "vector3List")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector3_screenspace_2Dpos_cam.Add(new ListOfVector3_screenspace_2Dpos_cam(screenCamera, vector3List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "List of Vector3";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, vector3List, vector3List.Count, GetContentXFromVector3List_preAllocated, GetContentYFromVector3List_preAllocated, GetContentZFromVector3List_preAllocated, null, "X", "Y", "Z", null, position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentXFromVector4Array_preAllocated = UtilitiesDXXL_DrawCollections.GetVector4XAsStringFromArray;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentYFromVector4Array_preAllocated = UtilitiesDXXL_DrawCollections.GetVector4YAsStringFromArray;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentZFromVector4Array_preAllocated = UtilitiesDXXL_DrawCollections.GetVector4ZAsStringFromArray;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString GetContentWFromVector4Array_preAllocated = UtilitiesDXXL_DrawCollections.GetVector4WAsStringFromArray;
+ public static void WriteArray(Vector4[] vector4Array, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector4Array, "vector4Array")) { return; }
+
+ string titleFallback = "Array of Vector4";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(vector4Array, vector4Array.Length, GetContentXFromVector4Array_preAllocated, GetContentYFromVector4Array_preAllocated, GetContentZFromVector4Array_preAllocated, GetContentWFromVector4Array_preAllocated, "X", "Y", "Z", "W", position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArray2D(Vector4[] vector4Array, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector4Array, "vector4Array")) { return; }
+
+ string titleFallback = "Array of Vector4";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(vector4Array, vector4Array.Length, GetContentXFromVector4Array_preAllocated, GetContentYFromVector4Array_preAllocated, GetContentZFromVector4Array_preAllocated, GetContentWFromVector4Array_preAllocated, "X", "Y", "Z", "W", position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteArrayScreenspace(Vector4[] vector4Array, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector4_screenspace_3Dpos.Add(new ArrayOfVector4_screenspace_3Dpos(vector4Array, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(vector4Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, Vector4[] vector4Array, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector4_screenspace_3Dpos_cam.Add(new ArrayOfVector4_screenspace_3Dpos_cam(screenCamera, vector4Array, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteArrayScreenspace(screenCamera, vector4Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Vector4[] vector4Array, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector4_screenspace_2Dpos.Add(new ArrayOfVector4_screenspace_2Dpos(vector4Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteArrayScreenspace") == false) { return; }
+ WriteArrayScreenspace(automaticallyFoundCamera, vector4Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteArrayScreenspace(Camera screenCamera, Vector4[] vector4Array, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector4Array, "vector4Array")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ArrayOfVector4_screenspace_2Dpos_cam.Add(new ArrayOfVector4_screenspace_2Dpos_cam(screenCamera, vector4Array, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "Array of Vector4";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, vector4Array, vector4Array.Length, GetContentXFromVector4Array_preAllocated, GetContentYFromVector4Array_preAllocated, GetContentZFromVector4Array_preAllocated, GetContentWFromVector4Array_preAllocated, "X", "Y", "Z", "W", position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentXFromVector4List_preAllocated = UtilitiesDXXL_DrawCollections.GetVector4XAsStringFromList;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentYFromVector4List_preAllocated = UtilitiesDXXL_DrawCollections.GetVector4YAsStringFromList;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentZFromVector4List_preAllocated = UtilitiesDXXL_DrawCollections.GetVector4ZAsStringFromList;
+ static UtilitiesDXXL_DrawCollections.FlexibleGetColumnContentAtIndexAsString> GetContentWFromVector4List_preAllocated = UtilitiesDXXL_DrawCollections.GetVector4WAsStringFromList;
+ public static void WriteList(List vector4List, Vector3 position = default(Vector3), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, Quaternion rotation = default(Quaternion), bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector4List, "vector4List")) { return; }
+
+ string titleFallback = "List of Vector4";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in3D(vector4List, vector4List.Count, GetContentXFromVector4List_preAllocated, GetContentYFromVector4List_preAllocated, GetContentZFromVector4List_preAllocated, GetContentWFromVector4List_preAllocated, "X", "Y", "Z", "W", position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, rotation, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteList2D(List vector4List, Vector2 position = default(Vector2), Color color = default(Color), string title = null, float textSize = 0.05f, float forceHeightOfWholeTableBox = 0.0f, float custom_zPos = float.PositiveInfinity, bool position_isTopLeft_notLowLeft = true, float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector4List, "vector4List")) { return; }
+
+ string titleFallback = "List of Vector4";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_in2D(vector4List, vector4List.Count, GetContentXFromVector4List_preAllocated, GetContentYFromVector4List_preAllocated, GetContentZFromVector4List_preAllocated, GetContentWFromVector4List_preAllocated, "X", "Y", "Z", "W", position, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox, textSize, color, custom_zPos, title, titleFallback, collectionRepresentsBools, durationInSec, hiddenByNearerObjects);
+ }
+
+ public static void WriteListScreenspace(List vector4List, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector4_screenspace_3Dpos.Add(new ListOfVector4_screenspace_3Dpos(vector4List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(automaticallyFoundCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(vector4List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List vector4List, Vector3 position_in3DWorldspace, Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector4_screenspace_3Dpos_cam.Add(new ListOfVector4_screenspace_3Dpos_cam(screenCamera, vector4List, position_in3DWorldspace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ Vector2 position_in2DViewportSpace = UtilitiesDXXL_Screenspace.WorldPos_to_ViewportPos0to1(screenCamera, position_in3DWorldspace, false);
+ WriteListScreenspace(screenCamera, vector4List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(List vector4List, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector4_screenspace_2Dpos.Add(new ListOfVector4_screenspace_2Dpos(vector4List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "DrawText.WriteListScreenspace") == false) { return; }
+ WriteListScreenspace(automaticallyFoundCamera, vector4List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec);
+ }
+
+ public static void WriteListScreenspace(Camera screenCamera, List vector4List, Vector2 position_in2DViewportSpace = default(Vector2), Color color = default(Color), string title = null, float textSize_relToViewportHeight = 0.025f, float forceHeightOfWholeTableBox_relToViewportHeight = 0.0f, bool position_isTopLeft_notLowLeft = false, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullSystemObjects(vector4List, "vector4List")) { return; }
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem)
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_ListOfVector4_screenspace_2Dpos_cam.Add(new ListOfVector4_screenspace_2Dpos_cam(screenCamera, vector4List, position_in2DViewportSpace, color, title, textSize_relToViewportHeight, forceHeightOfWholeTableBox_relToViewportHeight, position_isTopLeft_notLowLeft, durationInSec));
+ return;
+ }
+
+ string titleFallback = "List of Vector4";
+ bool collectionRepresentsBools = false;
+ UtilitiesDXXL_DrawCollections.WriteCollection_inScreenspace(screenCamera, vector4List, vector4List.Count, GetContentXFromVector4List_preAllocated, GetContentYFromVector4List_preAllocated, GetContentZFromVector4List_preAllocated, GetContentWFromVector4List_preAllocated, "X", "Y", "Z", "W", position_in2DViewportSpace, position_isTopLeft_notLowLeft, forceHeightOfWholeTableBox_relToViewportHeight, textSize_relToViewportHeight, color, title, titleFallback, collectionRepresentsBools, durationInSec);
+ }
+
+ public static string MarkupBold(string stringToMark)
+ {
+ return UtilitiesDXXL_Text.boldStartMarkupString + stringToMark + UtilitiesDXXL_Text.boldEndMarkupString;
+ }
+
+ public static string MarkupBold(int intToMark)
+ {
+ return UtilitiesDXXL_Text.boldStartMarkupString + intToMark + UtilitiesDXXL_Text.boldEndMarkupString;
+ }
+ public static string MarkupBoldEscape(string stringToMark)
+ {
+ return UtilitiesDXXL_Text.boldEndMarkupString + stringToMark + UtilitiesDXXL_Text.boldStartMarkupString;
+ }
+
+ public static string MarkupBoldEscape(int intToMark)
+ {
+ return UtilitiesDXXL_Text.boldEndMarkupString + intToMark + UtilitiesDXXL_Text.boldStartMarkupString;
+ }
+
+ public static string MarkupItalic(string stringToMark)
+ {
+ return UtilitiesDXXL_Text.italicStartMarkupString + stringToMark + UtilitiesDXXL_Text.italicEndMarkupString;
+ }
+
+ public static string MarkupItalic(int intToMark)
+ {
+ return UtilitiesDXXL_Text.italicStartMarkupString + intToMark + UtilitiesDXXL_Text.italicEndMarkupString;
+ }
+
+ public static string MarkupItalicEscape(string stringToMark)
+ {
+ return UtilitiesDXXL_Text.italicEndMarkupString + stringToMark + UtilitiesDXXL_Text.italicStartMarkupString;
+ }
+
+ public static string MarkupItalicEscape(int intToMark)
+ {
+ return UtilitiesDXXL_Text.italicEndMarkupString + intToMark + UtilitiesDXXL_Text.italicStartMarkupString;
+ }
+
+ public static string MarkupDeleted(string stringToMark)
+ {
+ return UtilitiesDXXL_Text.deletedStartMarkupString + stringToMark + UtilitiesDXXL_Text.deletedEndMarkupString;
+ }
+
+ public static string MarkupDeleted(int intToMark)
+ {
+ return UtilitiesDXXL_Text.deletedStartMarkupString + intToMark + UtilitiesDXXL_Text.deletedEndMarkupString;
+ }
+
+ public static string MarkupDeletedEscape(string stringToMark)
+ {
+ return UtilitiesDXXL_Text.deletedEndMarkupString + stringToMark + UtilitiesDXXL_Text.deletedStartMarkupString;
+ }
+
+ public static string MarkupDeletedEscape(int intToMark)
+ {
+ return UtilitiesDXXL_Text.deletedEndMarkupString + intToMark + UtilitiesDXXL_Text.deletedStartMarkupString;
+ }
+
+ public static string MarkupUnderlined(string stringToMark)
+ {
+ return UtilitiesDXXL_Text.underlinedStartMarkupString + stringToMark + UtilitiesDXXL_Text.underlinedEndMarkupString;
+ }
+
+ public static string MarkupUnderlined(int intToMark)
+ {
+ return UtilitiesDXXL_Text.underlinedStartMarkupString + intToMark + UtilitiesDXXL_Text.underlinedEndMarkupString;
+ }
+
+ public static string MarkupUnderlinedEscape(string stringToMark)
+ {
+ return UtilitiesDXXL_Text.underlinedEndMarkupString + stringToMark + UtilitiesDXXL_Text.underlinedStartMarkupString;
+ }
+
+ public static string MarkupUnderlinedEscape(int intToMark)
+ {
+ return UtilitiesDXXL_Text.underlinedEndMarkupString + intToMark + UtilitiesDXXL_Text.underlinedStartMarkupString;
+ }
+
+ public static string MarkupStrokeWidth(string stringToMark, int strokeWidth_asPPMofSize)
+ {
+ return UtilitiesDXXL_Text.strokeWidthStartMarkupString_preValue + strokeWidth_asPPMofSize + UtilitiesDXXL_Text.valueMarkupString_postValue + stringToMark + UtilitiesDXXL_Text.strokeWidthEndMarkupString;
+ }
+
+ public static string MarkupSize(string stringToMark, float sizeScaleFactor)
+ {
+ int size_asInt = Mathf.RoundToInt(11.0f * sizeScaleFactor);
+ size_asInt = Mathf.Max(1, size_asInt);
+ return MarkupSize(stringToMark, size_asInt);
+ }
+
+ public static string MarkupSize(string stringToMark, int size_relTo_11)
+ {
+ return UtilitiesDXXL_Text.sizeStartMarkupString_preValue + size_relTo_11 + UtilitiesDXXL_Text.valueMarkupString_postValue + stringToMark + UtilitiesDXXL_Text.sizeEndMarkupString;
+ }
+
+ public static string MarkupColor(string stringToMark, Color color)
+ {
+ return " 0)
+ {
+ if (colorAsHexHTMLString[0] != '#')
+ {
+ colorAsHexHTMLString = "#" + colorAsHexHTMLString;
+ }
+ }
+ return UtilitiesDXXL_Text.colorStartMarkupString_preValue + colorAsHexHTMLString + UtilitiesDXXL_Text.valueMarkupString_postValue + stringToMark + UtilitiesDXXL_Text.colorEndMarkupString;
+ }
+
+ public static string MarkupColor(string stringToMark, bool truthValueThatColorShouldIndicate)
+ {
+ if (truthValueThatColorShouldIndicate)
+ {
+ return "" + stringToMark + UtilitiesDXXL_Text.colorEndMarkupString;
+ }
+ else
+ {
+ return "" + stringToMark + UtilitiesDXXL_Text.colorEndMarkupString;
+ }
+ }
+
+ public static string MarkupColorFromGameobjectID(string stringToMark, GameObject colorDefiningGameobject, float forceLuminance = 0.0f)
+ {
+ Color color = SeededColorGenerator.ColorOfGameobjectID(colorDefiningGameobject, forceLuminance);
+ return MarkupColor(stringToMark, color);
+ }
+
+ public static string MarkupColorSeededRandom(string stringToMark, int seed, float alphaOfGeneratedColor = 1.0f, float forceLuminance = 0.0f)
+ {
+ Color color = SeededColorGenerator.GetRandomColorSeeded(seed, alphaOfGeneratedColor, forceLuminance);
+ return MarkupColor(stringToMark, color);
+ }
+
+ public static string MarkupColorRainbow(string stringToMark, int seed, float alphaOfGeneratedColor = 1.0f, int colorsPerSpectrumPass = 8, float forceLuminance = 0.0f)
+ {
+ Color color = SeededColorGenerator.GetRainbowColor(seed, alphaOfGeneratedColor, colorsPerSpectrumPass, forceLuminance);
+ return MarkupColor(stringToMark, color);
+ }
+
+ public static string MarkupColorRainbowAroundRed(string stringToMark, int seed, float alphaOfGeneratedColor = 1.0f, int colorsPerSpectrumPass = 5, bool sawToothTransition = false, float forceLuminance = 0.0f)
+ {
+ Color color = SeededColorGenerator.GetRainbowColorAroundRed(seed, alphaOfGeneratedColor, colorsPerSpectrumPass, sawToothTransition, forceLuminance);
+ return MarkupColor(stringToMark, color);
+ }
+
+ public static string MarkupColorRainbowAroundGreen(string stringToMark, int seed, float alphaOfGeneratedColor = 1.0f, int colorsPerSpectrumPass = 4, bool sawToothTransition = false, float forceLuminance = 0.0f)
+ {
+ Color color = SeededColorGenerator.GetRainbowColorAroundGreen(seed, alphaOfGeneratedColor, colorsPerSpectrumPass, sawToothTransition, forceLuminance);
+ return MarkupColor(stringToMark, color);
+ }
+
+ public static string MarkupColorRainbowAroundBlue(string stringToMark, int seed, float alphaOfGeneratedColor = 1.0f, int colorsPerSpectrumPass = 5, bool sawToothTransition = false, float forceLuminance = 0.0f)
+ {
+ Color color = SeededColorGenerator.GetRainbowColorAroundBlue(seed, alphaOfGeneratedColor, colorsPerSpectrumPass, sawToothTransition, forceLuminance);
+ return MarkupColor(stringToMark, color);
+ }
+
+ public static string MarkupIcon(DrawBasics.IconType icon)
+ {
+ return UtilitiesDXXL_CharsAndIcons.GetIconAsMarkupString(icon);
+ }
+
+ public static string MarkupCustomHeightEmptyLine(float vertSize_relToTextSize)
+ {
+ int sizeScaler = Mathf.RoundToInt(11.0f * vertSize_relToTextSize);
+ return MarkupCustomHeightEmptyLine(sizeScaler);
+ }
+
+ public static string MarkupCustomHeightEmptyLine(int sizeMarkupValue)
+ {
+ return "
";
+ }
+
+ public static string MarkupBoolDisplayer(string boolName, bool boolValueToDisplay, bool saveDrawnLines = false)
+ {
+ if (saveDrawnLines)
+ {
+ if (boolValueToDisplay)
+ {
+ return boolName + ": ";
+ }
+ else
+ {
+ return boolName + ": ";
+ }
+ }
+ else
+ {
+ if (boolValueToDisplay)
+ {
+ return boolName + ": ";
+ }
+ else
+ {
+ return boolName + ": ";
+ }
+ }
+ }
+
+ public static string MarkupBoolDisplayer(bool boolValueToDisplay, bool saveDrawnLines = false)
+ {
+ if (saveDrawnLines)
+ {
+ if (boolValueToDisplay)
+ {
+ return "";
+ }
+ else
+ {
+ return "";
+ }
+ }
+ else
+ {
+ if (boolValueToDisplay)
+ {
+ return "";
+ }
+ else
+ {
+ return "";
+ }
+ }
+ }
+
+ public static string MarkupBoolArrow(bool boolValueToDisplay)
+ {
+ if (boolValueToDisplay)
+ {
+ return ""; //the used color here is the same as "UtilitiesDXXL_Colors.green_boolTrue"
+ }
+ else
+ {
+ return ""; //the used color here is the same as "UtilitiesDXXL_Colors.red_boolFalse"
+ }
+ }
+
+ public static string MarkupLogSymbol(LogType logType)
+ {
+ switch (logType)
+ {
+ case LogType.Log:
+ return "";
+
+ case LogType.Warning:
+ return "";
+
+ case LogType.Error:
+ return "";
+
+ case LogType.Exception:
+ return "";
+
+ case LogType.Assert:
+ return "";
+
+ default:
+ Debug.LogError("logType '" + logType + "' not implemented yet");
+ return "";
+ }
+ }
+
+ public static bool ContainsLineBreak(string textToCheckForLineBreaks)
+ {
+ int i_startOfLineBreakMarkupString = textToCheckForLineBreaks.IndexOf(UtilitiesDXXL_Text.lineBreakMarkupString, 0);
+ if (i_startOfLineBreakMarkupString >= 0)
+ {
+ return true;
+ }
+
+ for (int i_char = 0; i_char < textToCheckForLineBreaks.Length; i_char++)
+ {
+ //unicode 10 = linefeed
+ //unicode 13 = carriagereturn
+ if (10 == (int)textToCheckForLineBreaks[i_char] || 13 == (int)textToCheckForLineBreaks[i_char])
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/DrawText.cs.meta b/Runtime/DrawDebugLibrary/DrawText.cs.meta
new file mode 100644
index 0000000..7f98b35
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/DrawText.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a739add0e49bca943bdb245460ac705b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/README_DXXL_API.md.meta b/Runtime/DrawDebugLibrary/README_DXXL_API.md.meta
new file mode 100644
index 0000000..c84a08e
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/README_DXXL_API.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 692b079a590190240a0661aa88d50021
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/Resources.meta b/Runtime/DrawDebugLibrary/Resources.meta
new file mode 100644
index 0000000..4d050b7
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/Resources.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: fa9a8e77b3508be408716f961c9b8475
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines.shader b/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines.shader
new file mode 100644
index 0000000..33a62c6
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines.shader
@@ -0,0 +1,57 @@
+//Reduced code from "Legacy Shaders/Particles/Alpha Blended Premultiply": Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
+
+Shader "DrawXXL/meshLines" {
+Properties {
+}
+
+Category {
+ Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" }
+ Blend One OneMinusSrcAlpha
+ ColorMask RGB
+ Cull Off
+ Lighting Off
+ZWrite Off
+
+ SubShader {
+ Pass {
+
+ CGPROGRAM
+ #pragma vertex vert
+ #pragma fragment frag
+ #pragma target 2.0
+ #pragma multi_compile_particles
+
+ #include "UnityCG.cginc"
+
+ struct appdata_t {
+ float4 vertex : POSITION;
+ fixed4 color : COLOR;
+ UNITY_VERTEX_INPUT_INSTANCE_ID
+ };
+
+ struct v2f {
+ float4 vertex : SV_POSITION;
+ fixed4 color : COLOR;
+ UNITY_VERTEX_OUTPUT_STEREO
+ };
+
+ v2f vert (appdata_t v)
+ {
+ v2f o;
+ UNITY_SETUP_INSTANCE_ID(v);
+ UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
+ o.vertex = UnityObjectToClipPos(v.vertex);
+ o.color = v.color;
+ return o;
+ }
+
+ fixed4 frag (v2f i) : SV_Target
+ {
+ UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
+ return i.color * i.color.a;
+ }
+ ENDCG
+ }
+ }
+}
+}
diff --git a/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines.shader.meta b/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines.shader.meta
new file mode 100644
index 0000000..cc28f9e
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines.shader.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 04efaffa1a722264287fac6c8fd21f0f
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines_overlay.shader b/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines_overlay.shader
new file mode 100644
index 0000000..307978b
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines_overlay.shader
@@ -0,0 +1,58 @@
+//Reduced code from "Legacy Shaders/Particles/Alpha Blended Premultiply": Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
+
+Shader "DrawXXL/meshLines_overlay" {
+Properties {
+}
+
+Category {
+ Tags { "Queue"="Transparent+1" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" }
+ Blend Off
+ ColorMask RGB
+ Cull Off
+ Lighting Off
+ZWrite Off
+ZTest Off
+
+ SubShader {
+ Pass {
+
+ CGPROGRAM
+ #pragma vertex vert
+ #pragma fragment frag
+ #pragma target 2.0
+ #pragma multi_compile_particles
+
+ #include "UnityCG.cginc"
+
+ struct appdata_t {
+ float4 vertex : POSITION;
+ fixed4 color : COLOR;
+ UNITY_VERTEX_INPUT_INSTANCE_ID
+ };
+
+ struct v2f {
+ float4 vertex : SV_POSITION;
+ fixed4 color : COLOR;
+ UNITY_VERTEX_OUTPUT_STEREO
+ };
+
+ v2f vert (appdata_t v)
+ {
+ v2f o;
+ UNITY_SETUP_INSTANCE_ID(v);
+ UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
+ o.vertex = UnityObjectToClipPos(v.vertex);
+ o.color = v.color;
+ return o;
+ }
+
+ fixed4 frag (v2f i) : SV_Target
+ {
+ UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
+ return i.color * i.color.a;
+ }
+ ENDCG
+ }
+ }
+}
+}
diff --git a/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines_overlay.shader.meta b/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines_overlay.shader.meta
new file mode 100644
index 0000000..d036048
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/Resources/DrawXXL_lines_overlay.shader.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: da4948678567591459a20bd4a74a86c6
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/SeededColorGenerator.cs b/Runtime/DrawDebugLibrary/SeededColorGenerator.cs
new file mode 100644
index 0000000..e9d26c0
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/SeededColorGenerator.cs
@@ -0,0 +1,188 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+
+ public class SeededColorGenerator
+ {
+ public static Color GetRandomColorSeeded(int seed, float alphaOfGeneratedColor = 1.0f, float forceLuminance = 0.0f)
+ {
+ //the color variation decreases when using very high seeds
+ return UtilitiesDXXL_Colors.Get_randomColorSeeded(seed, alphaOfGeneratedColor, forceLuminance);
+ }
+
+ public static Color ColorOfGameobjectID(GameObject colorDefiningGameobject, float forceLuminance = 0.0f)
+ {
+ //the color variation decreases when using very high seeds
+ return GetRandomColorSeeded(colorDefiningGameobject.GetInstanceID(), 1.0f, forceLuminance);
+ }
+
+ public static void DrawCatalogueOfRandomColors(int lowestDrawnSeed, int highestDrawnSeed, float forceLuminance = 0.0f, Vector3 position = default(Vector3), float durationInSec = 0.0f)
+ {
+ //draws a list of the seeded colors together with their corresponding seed number. You can use this to show a list of available seeded colors where you can choose from by filling in the corresponding number into "Get_randomColorSeeded"
+ //note that the color variation decreases when using very high seeds
+ //the number of drawn colors is restricted to 1000 for performance reasons.
+
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+
+ int maxDrawnColors = 1000;
+ int numberOfDrawnColors = highestDrawnSeed - lowestDrawnSeed;
+
+ if (numberOfDrawnColors > maxDrawnColors)
+ {
+ highestDrawnSeed = lowestDrawnSeed + maxDrawnColors;
+ Debug.Log("DrawCatalogueOfRandomSeededColors() is restricted to " + maxDrawnColors + ". Drawing of color catalogue stopped after color " + highestDrawnSeed);
+ }
+
+ float textSize = 0.1f;
+ for (int i = lowestDrawnSeed; i < highestDrawnSeed; i++)
+ {
+ Vector3 currPos = position + new Vector3(0.0f, -textSize * (i - lowestDrawnSeed), 0.0f);
+ Color currColor = GetRandomColorSeeded(i, 1.0f, forceLuminance);
+ UtilitiesDXXL_Text.Write("" + i, currPos, currColor, textSize, Vector3.right, Vector3.up, DrawText.TextAnchorDXXL.LowerLeftOfFirstLine, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, true, durationInSec, false, false, false, true);
+ }
+ }
+
+ public static Color GetRainbowColor(int seed, float alphaOfGeneratedColor = 1.0f, int colorsPerSpectrumPass = 8, float forceLuminance = 0.0f)
+ {
+ //returns a seeded color while the color moves along a rainbow spectrum for subsequent seeds.
+ //"colorsPerSpectrumPass" can be used adjust the colorDiffernce between each step... higher numbers mean less differnce from color to color. Minimum is 2.
+ //higher values of "forceLuminance" lead to less color diversity...
+
+ return UtilitiesDXXL_Colors.GetIteratingRainbowColor(seed, alphaOfGeneratedColor, colorsPerSpectrumPass, 0.0f, 1.0f, true, forceLuminance);
+ }
+
+ public static Color GetRainbowColorAroundRed(int seed, float alphaOfGeneratedColor = 1.0f, int colorsPerSpectrumPass = 5, bool sawToothTransition = false, float forceLuminance = 0.0f)
+ {
+ return UtilitiesDXXL_Colors.GetIteratingRainbowColor(seed, alphaOfGeneratedColor, colorsPerSpectrumPass, -0.14f, 0.1f, sawToothTransition, forceLuminance);
+ }
+
+ public static Color GetRainbowColorAroundGreen(int seed, float alphaOfGeneratedColor = 1.0f, int colorsPerSpectrumPass = 4, bool sawToothTransition = false, float forceLuminance = 0.0f)
+ {
+ return UtilitiesDXXL_Colors.GetIteratingRainbowColor(seed, alphaOfGeneratedColor, colorsPerSpectrumPass, 0.235f, 0.44f, sawToothTransition, forceLuminance);
+ }
+
+ public static Color GetRainbowColorAroundBlue(int seed, float alphaOfGeneratedColor = 1.0f, int colorsPerSpectrumPass = 5, bool sawToothTransition = false, float forceLuminance = 0.0f)
+ {
+ return UtilitiesDXXL_Colors.GetIteratingRainbowColor(seed, alphaOfGeneratedColor, colorsPerSpectrumPass, 0.535f, 0.72f, sawToothTransition, forceLuminance);
+ }
+
+ public static Color GetColorFromHueAndLuminance_tunedTransitionsSpectrum(float hue, float luminance = 0.5f, float alphaOfGeneratedColor = 1.0f)
+ {
+ // is roughly HSL space, with saturation = 1
+
+ int colorsPerSpectrumPass = 1000000;
+ int colorInsideSpectrum = (int)(hue * (float)colorsPerSpectrumPass);
+ return UtilitiesDXXL_Colors.GetIteratingRainbowColor(colorInsideSpectrum, alphaOfGeneratedColor, colorsPerSpectrumPass, 0.0f, 1.0f, true, luminance);
+ }
+
+ static ChartDrawing chartDisplaying_tunedHLColorSpace;
+ public static void DrawWholeHueLuminaceSpectrumOfTunedTransitionColorSpace(Vector3 position = default(Vector3), float width_ofDrawnSpectrum = 1.0f, float height_ofDrawnSpectrum = 1.0f, int drawnHueValues = 400, int drawnLuminanceValuesPerHueValue = 60, float durationInSec = 0.0f)
+ {
+ if (chartDisplaying_tunedHLColorSpace == null)
+ {
+ chartDisplaying_tunedHLColorSpace = new ChartDrawing("Color space with
tuned transitions");
+ }
+
+ chartDisplaying_tunedHLColorSpace.Position_worldspace = position;
+
+
+ width_ofDrawnSpectrum = Mathf.Max(width_ofDrawnSpectrum, 0.01f);
+ height_ofDrawnSpectrum = Mathf.Max(height_ofDrawnSpectrum, 0.01f);
+ chartDisplaying_tunedHLColorSpace.Width_inWorldSpace = width_ofDrawnSpectrum;
+ chartDisplaying_tunedHLColorSpace.Height_inWorldSpace = height_ofDrawnSpectrum;
+ drawnHueValues = Mathf.Clamp(drawnHueValues, 3, 10000);
+ drawnLuminanceValuesPerHueValue = Mathf.Clamp(drawnLuminanceValuesPerHueValue, 3, 10000);
+
+ chartDisplaying_tunedHLColorSpace.xAxis.scaling = ChartAxis.Scaling.fixed_absolute;
+ chartDisplaying_tunedHLColorSpace.xAxis.fixedLowerEndValueOfScale = -0.05f;
+ chartDisplaying_tunedHLColorSpace.xAxis.fixedUpperEndValueOfScale = 1.05f;
+ chartDisplaying_tunedHLColorSpace.xAxis.Name = "Hue";
+ chartDisplaying_tunedHLColorSpace.yAxis.scaling = ChartAxis.Scaling.fixed_absolute;
+ chartDisplaying_tunedHLColorSpace.yAxis.fixedLowerEndValueOfScale = -0.05f;
+ chartDisplaying_tunedHLColorSpace.yAxis.fixedUpperEndValueOfScale = 1.05f;
+ chartDisplaying_tunedHLColorSpace.yAxis.Name = "Luminance";
+
+ chartDisplaying_tunedHLColorSpace.Draw(durationInSec, false);
+
+ int numberOfDrawnHues = drawnHueValues;
+ int numberOfDrawnLuminancesPerHue = drawnLuminanceValuesPerHueValue;
+ float luminanceChangePerLine = 1.0f / (float)numberOfDrawnLuminancesPerHue;
+ float luminanceAtCenterOfLowestLine = 0.5f * luminanceChangePerLine;
+ Vector2 eachLine_inChartspace = Vector2.up * luminanceChangePerLine;
+ for (int i_hue = 0; i_hue <= numberOfDrawnHues; i_hue++)
+ {
+ float hue_0to1 = (float)i_hue / (float)numberOfDrawnHues;
+ for (int i_luminanceShiftedColorInsideHue = 0; i_luminanceShiftedColorInsideHue < numberOfDrawnLuminancesPerHue; i_luminanceShiftedColorInsideHue++)
+ {
+ float luminance_0to1_atLineStart = luminanceChangePerLine * i_luminanceShiftedColorInsideHue;
+ float luminance_0to1_atLineCenter = luminance_0to1_atLineStart + luminanceAtCenterOfLowestLine;
+ Color currColor = GetColorFromHueAndLuminance_tunedTransitionsSpectrum(hue_0to1, luminance_0to1_atLineCenter);
+ Vector2 startPos_inChartspace = new Vector2(hue_0to1, luminance_0to1_atLineStart);
+ Vector3 start = chartDisplaying_tunedHLColorSpace.ChartSpace_to_WorldSpace(startPos_inChartspace);
+ Vector3 end = chartDisplaying_tunedHLColorSpace.ChartSpace_to_WorldSpace(startPos_inChartspace + eachLine_inChartspace);
+ Line_fadeableAnimSpeed.InternalDraw(start, end, currColor, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default(Vector3), false, 0.0f, 0.0f, 0.0f, durationInSec, false, false, false);
+ }
+ }
+ }
+
+ public static Color ForceApproxLuminance(Color colorToForce, float targetLuminance)
+ {
+ if (UtilitiesDXXL_Math.ApproximatelyZero(targetLuminance))
+ {
+ //forcing disabled:
+ return colorToForce;
+ }
+ else
+ {
+ float targetLuminance_0to2 = targetLuminance * 2.0f;
+ float prevLuminance = GetLuminance(colorToForce);
+ prevLuminance = Mathf.Max(prevLuminance, 0.0001f);
+ float changeFactor = targetLuminance_0to2 / prevLuminance;
+
+ Color forcedColor;
+ Vector3 forcedColor_overshooting1 = (new Vector3(colorToForce.r, colorToForce.g, colorToForce.b) * changeFactor);
+ float maxForcedComponent_overshooting1 = UtilitiesDXXL_Math.Max(forcedColor_overshooting1.x, forcedColor_overshooting1.y, forcedColor_overshooting1.z);
+ if (maxForcedComponent_overshooting1 <= 1.0f)
+ {
+ forcedColor = new Color(forcedColor_overshooting1.x, forcedColor_overshooting1.y, forcedColor_overshooting1.z, colorToForce.a);
+ }
+ else
+ {
+ Vector3 colorToForce_liftedZeros = new Vector3(Mathf.Max(colorToForce.r, 0.0001f), Mathf.Max(colorToForce.g, 0.0001f), Mathf.Max(colorToForce.b, 0.0001f));
+ float xFactorForReachingForcedLevelButMax1 = Mathf.Min(1.0f, forcedColor_overshooting1.x) / colorToForce_liftedZeros.x;
+ float yFactorForReachingForcedLevelButMax1 = Mathf.Min(1.0f, forcedColor_overshooting1.y) / colorToForce_liftedZeros.y;
+ float zFactorForReachingForcedLevelButMax1 = Mathf.Min(1.0f, forcedColor_overshooting1.z) / colorToForce_liftedZeros.z;
+ Vector3 factorsForReachingForcedLevelButMax1 = new Vector3(xFactorForReachingForcedLevelButMax1, yFactorForReachingForcedLevelButMax1, zFactorForReachingForcedLevelButMax1);
+ Vector3 portionOver1_of_factors = factorsForReachingForcedLevelButMax1 - Vector3.one;
+ float portionOver1ofFactorForX_shrinked = portionOver1_of_factors.x * (forcedColor_overshooting1.x / maxForcedComponent_overshooting1);
+ float portionOver1ofFactorForY_shrinked = portionOver1_of_factors.y * (forcedColor_overshooting1.y / maxForcedComponent_overshooting1);
+ float portionOver1ofFactorForZ_shrinked = portionOver1_of_factors.z * (forcedColor_overshooting1.z / maxForcedComponent_overshooting1);
+ Vector3 portionOver1ofFactors_shrinked = new Vector3(portionOver1ofFactorForX_shrinked, portionOver1ofFactorForY_shrinked, portionOver1ofFactorForZ_shrinked);
+ Vector3 factorsForOriginalColor_thatShrinkButPreserveDifferences = Vector3.one + portionOver1ofFactors_shrinked;
+ Vector3 forcedColor_cappedToLuminanceOf1 = new Vector3(colorToForce.r * factorsForOriginalColor_thatShrinkButPreserveDifferences.x, colorToForce.g * factorsForOriginalColor_thatShrinkButPreserveDifferences.y, colorToForce.b * factorsForOriginalColor_thatShrinkButPreserveDifferences.z);
+ if (targetLuminance_0to2 <= 1.0f)
+ {
+ forcedColor = new Color(forcedColor_cappedToLuminanceOf1.x, forcedColor_cappedToLuminanceOf1.y, forcedColor_cappedToLuminanceOf1.z, colorToForce.a);
+ }
+ else
+ {
+ Vector3 spanTill1 = new Vector3(1.0f - forcedColor_cappedToLuminanceOf1.x, 1.0f - forcedColor_cappedToLuminanceOf1.y, 1.0f - forcedColor_cappedToLuminanceOf1.z);
+ float spanReduceFactor = 2.0f - targetLuminance_0to2;
+ spanReduceFactor = Mathf.Max(spanReduceFactor, 0.0f);
+ Vector3 spanTill1_reduced = spanTill1 * spanReduceFactor;
+ Vector3 forcedColorCapppedToLum1_thenSqueezedFurtherTo1 = new Vector3(1.0f - spanTill1_reduced.x, 1.0f - spanTill1_reduced.y, 1.0f - spanTill1_reduced.z);
+ forcedColor = new Color(forcedColorCapppedToLum1_thenSqueezedFurtherTo1.x, forcedColorCapppedToLum1_thenSqueezedFurtherTo1.y, forcedColorCapppedToLum1_thenSqueezedFurtherTo1.z, colorToForce.a);
+ }
+ }
+ return forcedColor;
+ }
+ }
+
+ public static float GetLuminance(Color colorForWhichToGetTheLuminance)
+ {
+ return (0.22f * Mathf.Clamp01(colorForWhichToGetTheLuminance.r) + 0.68f * Mathf.Clamp01(colorForWhichToGetTheLuminance.g) + 0.1f * Mathf.Clamp01(colorForWhichToGetTheLuminance.b));
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/SeededColorGenerator.cs.meta b/Runtime/DrawDebugLibrary/SeededColorGenerator.cs.meta
new file mode 100644
index 0000000..7fb91cd
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/SeededColorGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e1659f25ecdfcee49b0e7696c70eb498
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/charts.meta b/Runtime/DrawDebugLibrary/charts.meta
new file mode 100644
index 0000000..4e543e3
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/charts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8e157ccac315d034488be8895c8e3e3a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/charts/line charts.meta b/Runtime/DrawDebugLibrary/charts/line charts.meta
new file mode 100644
index 0000000..ab8f8c8
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/charts/line charts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4c54010832fc72f4b9268b6b98d10778
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/charts/line charts/ChartAxis.cs b/Runtime/DrawDebugLibrary/charts/line charts/ChartAxis.cs
new file mode 100644
index 0000000..402e229
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/charts/line charts/ChartAxis.cs
@@ -0,0 +1,886 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System.Collections.Generic;
+
+ public class ChartAxis
+ {
+ public enum Scaling
+ {
+ dynamic_encapsulateAllValues_includingThoseOutsideOfOtherAxisDisplay,
+ dynamic_encapsulateAllValues_butOnlyThoseInsideOfOtherAxisDisplay,
+ fixed_relativeToHighestValue,
+ fixed_relativeToLowestValue,
+ fixed_relativeToMostCurrentValue,
+ fixed_absolute
+ }
+
+ public enum SourceOfAutomaticValues
+ {
+ fixedStepForEachValueAdding,
+ fixedStep_followingTheManualIncrementFunction,
+ frameCount,
+ fixedTime,
+ fixedUnscaledTime,
+ realtimeSinceStartup,
+ time,
+ timeSinceLevelLoad,
+ unscaledTime,
+ editorTimeSinceStartup
+ }
+
+
+ public float lineWidth_relToChartHeight = 0.0f;
+ ChartDrawing chart_thisAxisIsPartOf;
+ UtilitiesDXXL_Math.Dimension cartesianDimension;
+ public ChartAxis theOtherAxis;
+ private string name = null;
+ public string Name
+ {
+ get { return name; }
+ set
+ {
+ name = value;
+ nameHasBeenManuallySet = true;
+ }
+ }
+ bool nameHasBeenManuallySet = false;
+ public float nameText_scaleFactor = 1.0f;
+ public Scaling scaling = Scaling.dynamic_encapsulateAllValues_butOnlyThoseInsideOfOtherAxisDisplay;
+ public SourceOfAutomaticValues sourceOfAutomaticValues = SourceOfAutomaticValues.fixedStepForEachValueAdding;
+ bool allXValuesCameFromAutomaticSource;//only used for x-axis //ignored for y-axis
+ public float fixedLowerEndValueOfScale = 0.0f;
+ public float fixedUpperEndValueOfScale = 100.0f;
+ public float fixedDisplayedSpan_belowAnchorValue = 500.0f;
+ public float fixedDisplayedSpan_aboveAnchorValue = 100.0f;
+ float fixedLowerEndValueOfScale_duringInspectionComponentPhases;
+ float fixedUpperEndValueOfScale_duringInspectionComponentPhases;
+ public int approxNumberOfGraduationIntervals = 5; //has only effect, when "graduationIntervalSource" is "axisSpanDividedByFixedNumberofIntervals", otherwise ignored. The interval number in the chart may in some cases be some more or less than this number (up to doulbe of this number), so it's just a raw specification
+ public int ApproxNumberOfGraduationIntervals
+ {
+ get { return approxNumberOfGraduationIntervals; }
+ set { approxNumberOfGraduationIntervals = Mathf.Clamp(value, 2, 10000); }
+ }
+
+ public float alphaOfGraduationLinesInsideDataArea = 0.2f; //can be used to switch off or accentuate the graduation lines that extend into the data area of the chart.
+ public float alphaOfGraduationNotation = 1.0f; //can be used to switch off or tone down the numbers notation on the axis graduation marks. default is 1
+ public bool graduationTypesetting_isManually = false; //if you set this to true, then you can use "AngleDeg_ofAxisGraduationNotationText" and "GraduationTextSize_relToAxisLength".
+ float used_angleDeg_ofAxisGraduationNotationText; //only used for xAxis
+ private float angleDeg_ofAxisGraduationNotationText = 0.0f;
+ public float AngleDeg_ofAxisGraduationNotationText
+ {
+ //only used for the x-axis. Ignored for the y-axis
+ //can be used to change the direction of the notation text at the graduation marks on the x axis. Positive angles turn the text counter clockwise, negative angles turn it clockwise. Is constrained between -90 and +90.
+ //has only effect, if "graduationTypesetting_isManually" has been set to "true", otherwise it's ignored
+ get { return angleDeg_ofAxisGraduationNotationText; }
+ set
+ {
+ angleDeg_ofAxisGraduationNotationText = Mathf.Clamp(value, -90.0f, 90.0f);
+ if (graduationTypesetting_isManually == false)
+ {
+ Debug.LogWarning("Setting 'AngleDeg_ofAxisGraduationNotationText' will only have effect if 'graduationTypesetting_isManually' is 'true' (which is not the case at the moment.)");
+ }
+ }
+ }
+ private float graduationTextSize_relToAxisLength = 0.02f;
+ public float GraduationTextSize_relToAxisLength
+ {
+ //has only effect, if "graduationTypesetting_isManually" has been set to "true", otherwise it's ignored
+ get { return graduationTextSize_relToAxisLength; }
+ set
+ {
+ graduationTextSize_relToAxisLength = Mathf.Clamp(value, 0.001f, 0.3f);
+ if (graduationTypesetting_isManually == false)
+ {
+ Debug.LogWarning("Setting 'GraduationTextSize_relToAxisLength' will only have effect if 'graduationTypesetting_isManually' is 'true' (which is not the case at the moment.)");
+ }
+ }
+ }
+
+ private float lengthConversionFactor_fromChartScaling_toWorldScaling;
+ public float LengthConversionFactor_fromChartScaling_toWorldScaling
+ {
+ get { return lengthConversionFactor_fromChartScaling_toWorldScaling; }
+ set { Debug.LogError("Setting 'LengthConversionFactor_fromChartScaling_toWorldScaling' manually is not supported."); }
+ }
+ private float valueMarkingTheLowerAxisEnd_convertedToUnitsOfTheUnwarpedUnscaledWorldSpace;
+ public float ValueMarkingTheLowerAxisEnd_convertedToUnitsOfTheUnwarpedUnscaledWorldSpace
+ {
+ get { return valueMarkingTheLowerAxisEnd_convertedToUnitsOfTheUnwarpedUnscaledWorldSpace; }
+ set { Debug.LogError("Setting 'ValueMarkingTheLowerAxisEnd_convertedToUnitsOfTheUnwarpedUnscaledWorldSpace' manually is not supported."); }
+ }
+
+ Vector3 unrotated_axisVector_normalized_inWorldSpace;
+ private Vector3 axisVector_inWorldSpace;
+ public Vector3 AxisVector_inWorldSpace
+ {
+ get { return axisVector_inWorldSpace; }
+ set
+ {
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ Debug.LogError("Setting 'xAxis.AxisVector_inWorldSpace' manually is not supported. Use 'chartDrawing.Rotation' and 'chartDrawing.Width_inWorldSpace' instead.");
+ }
+ else
+ {
+ Debug.LogError("Setting 'yAxis.AxisVector_inWorldSpace' manually is not supported. Use 'chartDrawing.Rotation' and 'chartDrawing.Height_inWorldSpace' instead.");
+ }
+ }
+ }
+
+ private Vector3 axisVector_normalized_inWorldSpace;
+ public Vector3 AxisVector_normalized_inWorldSpace
+ {
+ get { return axisVector_normalized_inWorldSpace; }
+ set { Debug.LogError("Setting 'chartAxis.AxisVector_normalized_inWorldSpace' manually is not supported. Use 'chartDrawing.Rotation' instead."); }
+ }
+
+ private float valueMarkingLowerEndOfTheAxis;
+ private float valueMarkingUpperEndOfTheAxis;
+ public float ValueMarkingLowerEndOfTheAxis
+ {
+ get { return valueMarkingLowerEndOfTheAxis; }
+ set { Debug.LogError("Setting 'valueMarkingLowerEndOfTheAxis' manually is not supported. You can use 'fixedLowerEndValueOfScale' instead (after setting 'scaling' to 'fixed_absolute')."); }
+ }
+ public float ValueMarkingUpperEndOfTheAxis
+ {
+ get { return valueMarkingUpperEndOfTheAxis; }
+ set { Debug.LogError("Setting 'valueMarkingUpperEndOfTheAxis' manually is not supported. You can use 'fixedUpperEndValueOfScale' instead (after setting 'scaling' to 'fixed_absolute')."); }
+ }
+
+ float lowerEndOfAxisToUpperEnd_inChartUnits;
+
+ private float length_inWorldSpace = 1.0f;
+ public float Length_inWorldSpace
+ {
+ get { return length_inWorldSpace; }
+ set
+ {
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ Debug.LogError("Setting 'xAxis.length_inWorldSpace' manually is not supported. You can use 'chartDrawing.Width_inWorldSpace' instead.");
+ }
+ else
+ {
+ Debug.LogError("Setting 'yAxis.length_inWorldSpace' manually is not supported. You can use 'chartDrawing.Height_inWorldSpace' instead.");
+ }
+ }
+ }
+
+ List posOfGraduationMarks_inChartSpace = new List();
+ List graduationMarksTexts = new List();
+ public bool drawZeroPositionAsDottedLine; //default is true for the yAxis and false for the xAxis
+ PointOfInterest pointOfInterest_displayingTheZeroPositionLine;
+ PointOfInterest pointOfInterest_displayingTheZeroPositionLine_lowAlphaUnderlay;
+
+ public ChartAxis(Vector3 unrotated_axisVector_normalized_inWorldSpace, ChartDrawing chart_thisAxisIsPartOf, UtilitiesDXXL_Math.Dimension cartesianDimension)
+ {
+ this.unrotated_axisVector_normalized_inWorldSpace = unrotated_axisVector_normalized_inWorldSpace;
+ axisVector_inWorldSpace = this.unrotated_axisVector_normalized_inWorldSpace;
+ axisVector_normalized_inWorldSpace = this.unrotated_axisVector_normalized_inWorldSpace;
+ this.chart_thisAxisIsPartOf = chart_thisAxisIsPartOf;
+ this.cartesianDimension = cartesianDimension;
+ if (this.cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ allXValuesCameFromAutomaticSource = true;
+ name = GetAxisNameForAutomaticSources();
+ drawZeroPositionAsDottedLine = false;
+ }
+ else
+ {
+ drawZeroPositionAsDottedLine = true;
+ }
+ CreatePointsOfInterest_thatDisplaysTheZeroPositionAsDottedLine(out pointOfInterest_displayingTheZeroPositionLine, out pointOfInterest_displayingTheZeroPositionLine_lowAlphaUnderlay);
+ chart_thisAxisIsPartOf.AddPointOfInterest(pointOfInterest_displayingTheZeroPositionLine);
+ chart_thisAxisIsPartOf.AddPointOfInterest(pointOfInterest_displayingTheZeroPositionLine_lowAlphaUnderlay);
+ }
+
+ public void Clear()
+ {
+ allXValuesCameFromAutomaticSource = true;
+ }
+
+ public void RecalcScaling()
+ {
+ CalcMinMaxOfAxis();
+ lowerEndOfAxisToUpperEnd_inChartUnits = valueMarkingUpperEndOfTheAxis - valueMarkingLowerEndOfTheAxis;
+ lengthConversionFactor_fromChartScaling_toWorldScaling = length_inWorldSpace / lowerEndOfAxisToUpperEnd_inChartUnits;
+ valueMarkingTheLowerAxisEnd_convertedToUnitsOfTheUnwarpedUnscaledWorldSpace = valueMarkingLowerEndOfTheAxis * lengthConversionFactor_fromChartScaling_toWorldScaling;
+ SetIf_pointOfInterestDisplayingTheZeroPositionLine_isDisplayed();
+ }
+
+ public void Draw(InternalDXXL_Plane chartPlane, float durationInSec, bool hiddenByNearerObjects)
+ {
+ //use chartDrawing.Draw() instead.
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = chart_thisAxisIsPartOf;
+ float fixedConeLength_forBothAxisVectors = Get_fixedConeLength_forBothAxisVectors();
+ float lineWidth_worldSpace = 0.0f;
+ if (UtilitiesDXXL_Math.ApproximatelyZero(lineWidth_relToChartHeight) == false)
+ {
+ lineWidth_worldSpace = lineWidth_relToChartHeight * chart_thisAxisIsPartOf.Height_inWorldSpace;
+ }
+
+ UtilitiesDXXL_DrawBasics.Set_coneLength_interpretation_forStraightVectors_reversible(DrawBasics.LengthInterpretation.absoluteUnits);
+ UtilitiesDXXL_DrawBasics.VectorFrom(chart_thisAxisIsPartOf.Position_worldspace, axisVector_inWorldSpace, chart_thisAxisIsPartOf.color, lineWidth_worldSpace, null, fixedConeLength_forBothAxisVectors, false, true, false, 0.0f, false, durationInSec, hiddenByNearerObjects, chartPlane, false, 0.0f);
+ UtilitiesDXXL_DrawBasics.Reverse_coneLength_interpretation_forStraightVectors();
+
+ if (chart_thisAxisIsPartOf.IsEmptyWithNoLinesToDraw == false)
+ {
+ DrawAxisGraduation(durationInSec, hiddenByNearerObjects);
+ DrawChartBoundaryLine_inTheStyleOfAGraduationLine(durationInSec, hiddenByNearerObjects);
+ }
+ DrawAxisName(durationInSec, hiddenByNearerObjects);
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = null;
+ }
+
+ public float Get_fixedConeLength_forBothAxisVectors()
+ {
+ return (0.05f * Mathf.Max(length_inWorldSpace, theOtherAxis.length_inWorldSpace));
+ }
+
+ void CalcMinMaxOfAxis()
+ {
+ //-> lowestValue is guaranteed lower than highestValue after this function
+ Scaling used_scaling = (chart_thisAxisIsPartOf.chartInspector_component == null) ? scaling : Scaling.fixed_absolute;
+ switch (used_scaling)
+ {
+ case Scaling.dynamic_encapsulateAllValues_includingThoseOutsideOfOtherAxisDisplay:
+ GetAxisEndsIfAllNonHiddenValuesAreEncapsulated(out valueMarkingLowerEndOfTheAxis, out valueMarkingUpperEndOfTheAxis);
+ return;
+ case Scaling.dynamic_encapsulateAllValues_butOnlyThoseInsideOfOtherAxisDisplay:
+ if (theOtherAxis.HasAFixedScalingType())
+ {
+ GetAxisEndsIfAllNonHiddenValuesInsideOtherAxisSpanAreEncapsulated(out valueMarkingLowerEndOfTheAxis, out valueMarkingUpperEndOfTheAxis);
+ }
+ else
+ {
+ GetAxisEndsIfAllNonHiddenValuesAreEncapsulated(out valueMarkingLowerEndOfTheAxis, out valueMarkingUpperEndOfTheAxis);
+ }
+ return;
+ case Scaling.fixed_relativeToHighestValue:
+ float highestValueOfAllLines = GetHighestValueOfAllLines();
+ TryExpandInvalidZeroSpanBesideAnchor();
+ valueMarkingLowerEndOfTheAxis = GetMinValueBesideAnchor(highestValueOfAllLines);
+ valueMarkingUpperEndOfTheAxis = GetMaxValueBesideAnchor(highestValueOfAllLines);
+ return;
+ case Scaling.fixed_relativeToLowestValue:
+ float lowestValueOfAllLines = GetLowestValueOfAllLines();
+ TryExpandInvalidZeroSpanBesideAnchor();
+ valueMarkingLowerEndOfTheAxis = GetMinValueBesideAnchor(lowestValueOfAllLines);
+ valueMarkingUpperEndOfTheAxis = GetMaxValueBesideAnchor(lowestValueOfAllLines);
+ return;
+ case Scaling.fixed_relativeToMostCurrentValue:
+ float mostCurrentValue = GetMostCurrentValueOfAllLines();
+ TryExpandInvalidZeroSpanBesideAnchor();
+ valueMarkingLowerEndOfTheAxis = GetMinValueBesideAnchor(mostCurrentValue);
+ valueMarkingUpperEndOfTheAxis = GetMaxValueBesideAnchor(mostCurrentValue);
+ return;
+ case Scaling.fixed_absolute:
+ float used_fixedLowerEndValueOfScale = (chart_thisAxisIsPartOf.chartInspector_component == null) ? fixedLowerEndValueOfScale : fixedLowerEndValueOfScale_duringInspectionComponentPhases;
+ float used_fixedUpperEndValueOfScale = (chart_thisAxisIsPartOf.chartInspector_component == null) ? fixedUpperEndValueOfScale : fixedUpperEndValueOfScale_duringInspectionComponentPhases;
+ if (UtilitiesDXXL_Math.CheckIf_twoFloatsAreApproximatelyEqual(used_fixedLowerEndValueOfScale, used_fixedUpperEndValueOfScale))
+ {
+ Debug.LogWarning("Chart: Don't set 'fixedLowerEndValueOfScale' and 'fixedUpperEndValueOfScale' to the same value. Both are currently " + used_fixedLowerEndValueOfScale + ". Fallback -> automatic widening.");
+ float paddingAtEachSide = 1.6f;
+ valueMarkingLowerEndOfTheAxis = used_fixedLowerEndValueOfScale - paddingAtEachSide;
+ valueMarkingUpperEndOfTheAxis = used_fixedLowerEndValueOfScale + paddingAtEachSide;
+ }
+ else
+ {
+ if (used_fixedLowerEndValueOfScale < used_fixedUpperEndValueOfScale)
+ {
+ valueMarkingLowerEndOfTheAxis = used_fixedLowerEndValueOfScale;
+ valueMarkingUpperEndOfTheAxis = used_fixedUpperEndValueOfScale;
+ }
+ else
+ {
+ valueMarkingLowerEndOfTheAxis = used_fixedUpperEndValueOfScale;
+ valueMarkingUpperEndOfTheAxis = used_fixedLowerEndValueOfScale;
+ }
+ }
+ return;
+ default:
+ valueMarkingLowerEndOfTheAxis = 0.0f;
+ valueMarkingUpperEndOfTheAxis = 1.0f;
+ Debug.LogError("ScalingType of " + used_scaling + " not implemented.");
+ return;
+ }
+ }
+
+ public bool HasAFixedScalingType()
+ {
+ //-> this function is currently only fit for cases without chart components.
+ //-> cases with chart components always have a fixed scaling.
+
+ switch (scaling)
+ {
+ case Scaling.dynamic_encapsulateAllValues_includingThoseOutsideOfOtherAxisDisplay:
+ return false;
+ case Scaling.dynamic_encapsulateAllValues_butOnlyThoseInsideOfOtherAxisDisplay:
+ return false;
+ case Scaling.fixed_relativeToHighestValue:
+ return true;
+ case Scaling.fixed_relativeToLowestValue:
+ return true;
+ case Scaling.fixed_relativeToMostCurrentValue:
+ return true;
+ case Scaling.fixed_absolute:
+ return true;
+ default:
+ return true;
+ }
+ }
+
+ float GetMostCurrentValueOfAllLines()
+ {
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ return chart_thisAxisIsPartOf.lines.GetMostCurrentXValueOfAllLines();
+ }
+ else
+ {
+ return chart_thisAxisIsPartOf.lines.GetMostCurrentYValueOfAllLines();
+ }
+ }
+
+ float GetLowestValueOfAllLines()
+ {
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ return chart_thisAxisIsPartOf.lines.GetLowestXValueOfAllLines();
+ }
+ else
+ {
+ return chart_thisAxisIsPartOf.lines.GetLowestYValueOfAllLines();
+ }
+ }
+
+ float GetHighestValueOfAllLines()
+ {
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ return chart_thisAxisIsPartOf.lines.GetHighestXValueOfAllLines();
+ }
+ else
+ {
+ return chart_thisAxisIsPartOf.lines.GetHighestYValueOfAllLines();
+ }
+ }
+
+ float GetLowestValueOfAllLines_insideSpanOfOtherAxis()
+ {
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ return chart_thisAxisIsPartOf.lines.GetLowestXValueOfAllLines_insideRestricedYSpan(theOtherAxis.valueMarkingLowerEndOfTheAxis, theOtherAxis.valueMarkingUpperEndOfTheAxis);
+ }
+ else
+ {
+ return chart_thisAxisIsPartOf.lines.GetLowestYValueOfAllLines_insideRestricedXSpan(theOtherAxis.valueMarkingLowerEndOfTheAxis, theOtherAxis.valueMarkingUpperEndOfTheAxis);
+ }
+ }
+
+ float GetHighestValueOfAllLines_insideSpanOfOtherAxis()
+ {
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ return chart_thisAxisIsPartOf.lines.GetHighestXValueOfAllLines_insideRestricedYSpan(theOtherAxis.valueMarkingLowerEndOfTheAxis, theOtherAxis.valueMarkingUpperEndOfTheAxis);
+ }
+ else
+ {
+ return chart_thisAxisIsPartOf.lines.GetHighestYValueOfAllLines_insideRestricedXSpan(theOtherAxis.valueMarkingLowerEndOfTheAxis, theOtherAxis.valueMarkingUpperEndOfTheAxis);
+ }
+ }
+
+ void TryExpandInvalidZeroSpanBesideAnchor()
+ {
+ if (UtilitiesDXXL_Math.ApproximatelyZero(fixedDisplayedSpan_belowAnchorValue))
+ {
+ if (UtilitiesDXXL_Math.ApproximatelyZero(fixedDisplayedSpan_aboveAnchorValue))
+ {
+ Debug.LogWarning("Chart: Don't set 'displayedSpan_belowAnchorValue' and 'displayedSpan_aboveAnchorValue' both to 0. Fallback -> automatic widening.");
+ float fallbackSpanForEachSide = 1.6f;
+ fixedDisplayedSpan_belowAnchorValue = fallbackSpanForEachSide;
+ fixedDisplayedSpan_aboveAnchorValue = fallbackSpanForEachSide;
+ }
+ }
+ }
+
+ float GetMinValueBesideAnchor(float anchorValue)
+ {
+ return (anchorValue - Mathf.Abs(fixedDisplayedSpan_belowAnchorValue));
+ }
+
+ float GetMaxValueBesideAnchor(float anchorValue)
+ {
+ return (anchorValue + Mathf.Abs(fixedDisplayedSpan_aboveAnchorValue));
+ }
+
+ void DrawAxisGraduation(float durationInSec, bool hiddenByNearerObjects)
+ {
+ posOfGraduationMarks_inChartSpace.Clear();
+ float approxGraduationInterval = lowerEndOfAxisToUpperEnd_inChartUnits / (float)approxNumberOfGraduationIntervals;
+ bool calculationOf_orderOfMagnitudeWasSuccesful;
+ float decimalOrderOfMagnitude_markingLowerEndOfGraduationInterval = UtilitiesDXXL_Math.GetDecimalOrderOfMagnitudeAtLowerEnd(approxGraduationInterval, out float inverseOf_decimalOrderOfMagnitude_markingLowerEndOfGraduationInterval, out calculationOf_orderOfMagnitudeWasSuccesful);
+ if (UtilitiesDXXL_Math.ApproximatelyZero(approxGraduationInterval) || (calculationOf_orderOfMagnitudeWasSuccesful == false))
+ {
+ Debug.LogWarning("Chart: Failed to draw graduation marks. Approximate graduation interval: " + approxGraduationInterval);
+ }
+ else
+ {
+ float approxGraduationInterval_withShiftedDecimalSeparatorTillItsInside1toExcl10 = approxGraduationInterval * inverseOf_decimalOrderOfMagnitude_markingLowerEndOfGraduationInterval;
+ float approxGraduationInterval_inside1toExcl10_roundedToInt = Mathf.Floor(approxGraduationInterval_withShiftedDecimalSeparatorTillItsInside1toExcl10);
+ float graduationInterval_inChartSpaceUnits = approxGraduationInterval_inside1toExcl10_roundedToInt * decimalOrderOfMagnitude_markingLowerEndOfGraduationInterval;
+
+ //lowest mark:
+ float lowEndOfAxis_butDecimalSeparatorHasBeenShiftedTheNumberOfTimesThatTheIntervalNeededTillItReached1toExcl10 = valueMarkingLowerEndOfTheAxis * inverseOf_decimalOrderOfMagnitude_markingLowerEndOfGraduationInterval;
+ float lowEndOfAxis_shifted_rounded = Mathf.Floor(lowEndOfAxis_butDecimalSeparatorHasBeenShiftedTheNumberOfTimesThatTheIntervalNeededTillItReached1toExcl10);
+ float graduationAnchorPos_below_lowEndOfAxis = lowEndOfAxis_shifted_rounded * decimalOrderOfMagnitude_markingLowerEndOfGraduationInterval;
+ int maxNumberOfGraduationMarks = approxNumberOfGraduationIntervals * 2 + 5;
+ for (int i = 0; i < maxNumberOfGraduationMarks; i++)
+ {
+ float currGraduationMarkPos = graduationAnchorPos_below_lowEndOfAxis + graduationInterval_inChartSpaceUnits * i;
+ if (currGraduationMarkPos >= valueMarkingLowerEndOfTheAxis && currGraduationMarkPos < valueMarkingUpperEndOfTheAxis)
+ {
+ //fixing values like "0.0999999999" to "0.1":
+ float currGraduationMarkPos_butDecimalSeparatorHasBeenShiftedTheNumberOfTimesThatTheIntervalNeededTillItReached1toExcl10 = currGraduationMarkPos * inverseOf_decimalOrderOfMagnitude_markingLowerEndOfGraduationInterval;
+ float currGraduationMarkPos_shifted_rounded = Mathf.Round(currGraduationMarkPos_butDecimalSeparatorHasBeenShiftedTheNumberOfTimesThatTheIntervalNeededTillItReached1toExcl10);
+ decimal currGraduationMarkPos_rounded = (decimal)currGraduationMarkPos_shifted_rounded * (decimal)decimalOrderOfMagnitude_markingLowerEndOfGraduationInterval;
+ posOfGraduationMarks_inChartSpace.Add((float)currGraduationMarkPos_rounded);
+ }
+
+ if (currGraduationMarkPos >= valueMarkingUpperEndOfTheAxis)
+ {
+ break;
+ }
+ }
+
+ if (posOfGraduationMarks_inChartSpace.Count > 0)
+ {
+ DrawGraduationMarks(graduationInterval_inChartSpaceUnits, durationInSec, hiddenByNearerObjects);
+ }
+ }
+ }
+
+ float maxTextSize_relToGraduationInterval = 0.45f;
+ float graduationTextExtent_perpToAxis;
+ void DrawGraduationMarks(float graduationInterval_inChartSpaceUnits, float durationInSec, bool hiddenByNearerObjects)
+ {
+ float lengthOfFullAlphaGraduationLine = 0.03f * length_inWorldSpace;
+ Color textColor = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(chart_thisAxisIsPartOf.color, alphaOfGraduationNotation);
+ Color color_ofLowAlphaGraduationLine = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(chart_thisAxisIsPartOf.color, alphaOfGraduationLinesInsideDataArea);
+ Quaternion rotation_fromChartRotation_toSkewedText = default;
+ float textSize_worldSpace = 0.0f;
+ bool textIsDrawn = !UtilitiesDXXL_Math.ApproximatelyZero(alphaOfGraduationNotation);
+ float graduationInterval_inWorldSpaceUnits = graduationInterval_inChartSpaceUnits * lengthConversionFactor_fromChartScaling_toWorldScaling;
+ bool textDirIsSkewed_inChartsLocalSpace = false;
+ graduationTextExtent_perpToAxis = 0.0f;
+
+ if (textIsDrawn)
+ {
+ if (graduationTypesetting_isManually)
+ {
+ textSize_worldSpace = graduationTextSize_relToAxisLength * length_inWorldSpace;
+ }
+ else
+ {
+ textSize_worldSpace = 0.02f * length_inWorldSpace;
+ }
+
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.y)
+ {
+ if (graduationTypesetting_isManually == false)
+ {
+ textSize_worldSpace = Mathf.Min(textSize_worldSpace, maxTextSize_relToGraduationInterval * graduationInterval_inWorldSpaceUnits);
+ }
+ }
+
+ int numberOfLetters_ofLongestGraduationText = 0;
+ graduationMarksTexts.Clear();
+ for (int i = 0; i < posOfGraduationMarks_inChartSpace.Count; i++)
+ {
+ graduationMarksTexts.Add("" + posOfGraduationMarks_inChartSpace[i]);
+ numberOfLetters_ofLongestGraduationText = Mathf.Max(numberOfLetters_ofLongestGraduationText, graduationMarksTexts[i].Length);
+ }
+ float length_ofLongestGraduationText_worldSpace_preFinalTextSizeForce = textSize_worldSpace * numberOfLetters_ofLongestGraduationText;
+ graduationTextExtent_perpToAxis = length_ofLongestGraduationText_worldSpace_preFinalTextSizeForce; //used by y-axis. x-axis overwrites below
+
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ if (graduationTypesetting_isManually)
+ {
+ used_angleDeg_ofAxisGraduationNotationText = angleDeg_ofAxisGraduationNotationText;
+ }
+ else
+ {
+ if (length_ofLongestGraduationText_worldSpace_preFinalTextSizeForce < (0.9f * graduationInterval_inWorldSpaceUnits))
+ {
+ used_angleDeg_ofAxisGraduationNotationText = 0.0f;
+ }
+ else
+ {
+ if (posOfGraduationMarks_inChartSpace.Count <= 18)
+ {
+ used_angleDeg_ofAxisGraduationNotationText = -45.0f;
+ textSize_worldSpace = Mathf.Min(textSize_worldSpace, 0.8f * maxTextSize_relToGraduationInterval * graduationInterval_inWorldSpaceUnits);
+ }
+ else
+ {
+ used_angleDeg_ofAxisGraduationNotationText = -90.0f;
+ textSize_worldSpace = Mathf.Min(textSize_worldSpace, maxTextSize_relToGraduationInterval * graduationInterval_inWorldSpaceUnits);
+ }
+ }
+ }
+
+ textDirIsSkewed_inChartsLocalSpace = !UtilitiesDXXL_Math.ApproximatelyZero(used_angleDeg_ofAxisGraduationNotationText);
+ if (textDirIsSkewed_inChartsLocalSpace)
+ {
+ rotation_fromChartRotation_toSkewedText = Quaternion.AngleAxis(used_angleDeg_ofAxisGraduationNotationText, Vector3.forward);
+ float length_ofLongestGraduationText_worldSpace_postFinalTextSizeForce = textSize_worldSpace * numberOfLetters_ofLongestGraduationText;
+ float absSine = Mathf.Sin(Mathf.Deg2Rad * Mathf.Abs(used_angleDeg_ofAxisGraduationNotationText));
+ graduationTextExtent_perpToAxis = textSize_worldSpace + length_ofLongestGraduationText_worldSpace_postFinalTextSizeForce * absSine;
+ }
+ else
+ {
+ graduationTextExtent_perpToAxis = textSize_worldSpace * UtilitiesDXXL_Text.relLineDistance;
+ }
+ }
+ }
+
+ for (int i = 0; i < posOfGraduationMarks_inChartSpace.Count; i++)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ DrawGraduationMark(i, posOfGraduationMarks_inChartSpace[i], textIsDrawn, textSize_worldSpace, lengthOfFullAlphaGraduationLine, color_ofLowAlphaGraduationLine, textColor, textDirIsSkewed_inChartsLocalSpace, rotation_fromChartRotation_toSkewedText, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+
+ void DrawGraduationMark(int i_graduationMark, float graduationMarkPosition_chartSpace, bool textIsDrawn, float textSize_worldSpace, float lengthOfFullAlphaGraduationLine, Color color_ofLowAlphaGraduationLine, Color textColor, bool textDirIsSkewed_inChartsLocalSpace, Quaternion rotation_fromChartRotation_toSkewedText, float durationInSec, bool hiddenByNearerObjects)
+ {
+ Vector2 start_ofFullAlphaGraduationLine_chartSpace;
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ start_ofFullAlphaGraduationLine_chartSpace = new Vector2(graduationMarkPosition_chartSpace, theOtherAxis.ValueMarkingLowerEndOfTheAxis);
+ }
+ else
+ {
+ start_ofFullAlphaGraduationLine_chartSpace = new Vector2(theOtherAxis.ValueMarkingLowerEndOfTheAxis, graduationMarkPosition_chartSpace);
+ }
+
+ Vector3 start_ofFullAlphaGraduationLine_worldSpace = chart_thisAxisIsPartOf.ChartSpace_to_WorldSpace(start_ofFullAlphaGraduationLine_chartSpace);
+ Vector3 end_ofFullAlphaGraduationLine_worldSpace = start_ofFullAlphaGraduationLine_worldSpace - lengthOfFullAlphaGraduationLine * theOtherAxis.AxisVector_normalized_inWorldSpace;
+ Vector3 end_ofLowAlphaGraduationLine_worldSpace = start_ofFullAlphaGraduationLine_worldSpace + theOtherAxis.axisVector_inWorldSpace;
+
+ Line_fadeableAnimSpeed.InternalDraw(start_ofFullAlphaGraduationLine_worldSpace, end_ofFullAlphaGraduationLine_worldSpace, chart_thisAxisIsPartOf.color, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default(Vector3), false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ if (alphaOfGraduationLinesInsideDataArea > 0.0f)
+ {
+ Vector3 start_ofLowAlphaGraduationLine_worldSpace = start_ofFullAlphaGraduationLine_worldSpace;
+ Line_fadeableAnimSpeed.InternalDraw(start_ofLowAlphaGraduationLine_worldSpace, end_ofLowAlphaGraduationLine_worldSpace, color_ofLowAlphaGraduationLine, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default(Vector3), false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ if (textIsDrawn)
+ {
+ DrawTextAtGraduationMark(i_graduationMark, textSize_worldSpace, textColor, textDirIsSkewed_inChartsLocalSpace, end_ofFullAlphaGraduationLine_worldSpace, rotation_fromChartRotation_toSkewedText, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ void DrawTextAtGraduationMark(int i_graduationMark, float textSize_worldSpace, Color textColor, bool textDirIsSkewed_inChartsLocalSpace, Vector3 end_ofFullAlphaGraduationLine_worldSpace, Quaternion rotation_fromChartRotation_toSkewedText, float durationInSec, bool hiddenByNearerObjects)
+ {
+ string notationText = graduationMarksTexts[i_graduationMark];
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ Vector3 textPosition = end_ofFullAlphaGraduationLine_worldSpace;
+ Quaternion textRotation;
+ DrawText.TextAnchorDXXL textAnchor;
+ if (textDirIsSkewed_inChartsLocalSpace)
+ {
+ textRotation = chart_thisAxisIsPartOf.InternalRotation * rotation_fromChartRotation_toSkewedText;
+ if (used_angleDeg_ofAxisGraduationNotationText < 0.0f)
+ {
+ //clockwise rotation:
+ textAnchor = DrawText.TextAnchorDXXL.MiddleLeft;
+ }
+ else
+ {
+ //counter clockwise rotation:
+ textAnchor = DrawText.TextAnchorDXXL.MiddleRight;
+ }
+ }
+ else
+ {
+ textRotation = chart_thisAxisIsPartOf.InternalRotation;
+ textAnchor = DrawText.TextAnchorDXXL.UpperCenter;
+ }
+ UtilitiesDXXL_Text.WriteFramed(notationText, textPosition, textColor, textSize_worldSpace, textRotation, textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, chart_thisAxisIsPartOf.autoFlipAllText_toFitObsererCamera, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ Vector3 textPosition = end_ofFullAlphaGraduationLine_worldSpace - 0.01f * length_inWorldSpace * theOtherAxis.AxisVector_normalized_inWorldSpace;
+ DrawText.TextAnchorDXXL textAnchor = DrawText.TextAnchorDXXL.MiddleRight;
+ UtilitiesDXXL_Text.WriteFramed(notationText, textPosition, textColor, textSize_worldSpace, chart_thisAxisIsPartOf.InternalRotation, textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, chart_thisAxisIsPartOf.autoFlipAllText_toFitObsererCamera, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ void DrawChartBoundaryLine_inTheStyleOfAGraduationLine(float durationInSec, bool hiddenByNearerObjects)
+ {
+ Color color_ofLowAlphaGraduationLine = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(chart_thisAxisIsPartOf.color, alphaOfGraduationLinesInsideDataArea);
+ Vector3 startPos_worldSpace = chart_thisAxisIsPartOf.Position_worldspace + AxisVector_inWorldSpace;
+ Vector3 endPos_worldSpace = startPos_worldSpace + theOtherAxis.AxisVector_inWorldSpace;
+ Line_fadeableAnimSpeed.InternalDraw(startPos_worldSpace, endPos_worldSpace, color_ofLowAlphaGraduationLine, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default(Vector3), false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+
+ void DrawAxisName(float durationInSec, bool hiddenByNearerObjects)
+ {
+ string drawnName = null;
+ if (nameHasBeenManuallySet)
+ {
+ drawnName = name;
+ }
+ else
+ {
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ if (allXValuesCameFromAutomaticSource)
+ {
+ drawnName = GetAxisNameForAutomaticSources();
+ }
+ else
+ {
+ drawnName = "[unknown unit]";
+ }
+ }
+ }
+
+ if (drawnName != null && drawnName != "")
+ {
+ if (UtilitiesDXXL_Math.ApproximatelyZero(nameText_scaleFactor) == false)
+ {
+ Vector3 textPosition_worldSpace;
+ DrawText.TextAnchorDXXL textAnchor;
+ float autoLineBreakWidth = length_inWorldSpace;
+ float textSize = Mathf.Abs(nameText_scaleFactor) * 0.03f * length_inWorldSpace;
+ switch (cartesianDimension)
+ {
+ case UtilitiesDXXL_Math.Dimension.x:
+ textPosition_worldSpace = chart_thisAxisIsPartOf.Position_worldspace + 0.5f * axisVector_inWorldSpace - theOtherAxis.AxisVector_normalized_inWorldSpace * (graduationTextExtent_perpToAxis + 0.05f * length_inWorldSpace);
+ textAnchor = DrawText.TextAnchorDXXL.UpperCenter;
+ UtilitiesDXXL_Text.WriteFramed(drawnName, textPosition_worldSpace, chart_thisAxisIsPartOf.color, textSize, chart_thisAxisIsPartOf.InternalRotation, textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, autoLineBreakWidth, chart_thisAxisIsPartOf.autoFlipAllText_toFitObsererCamera, durationInSec, hiddenByNearerObjects);
+ break;
+ case UtilitiesDXXL_Math.Dimension.y:
+ textPosition_worldSpace = chart_thisAxisIsPartOf.Position_worldspace + 0.5f * axisVector_inWorldSpace - theOtherAxis.AxisVector_normalized_inWorldSpace * (graduationTextExtent_perpToAxis + 0.07f * length_inWorldSpace);
+ textAnchor = DrawText.TextAnchorDXXL.LowerCenter;
+ Quaternion rotationLocalInsideChart = Quaternion.AngleAxis(90.0f, Vector3.forward);
+ Quaternion textRotation = chart_thisAxisIsPartOf.InternalRotation * rotationLocalInsideChart;
+ UtilitiesDXXL_Text.WriteFramed(drawnName, textPosition_worldSpace, chart_thisAxisIsPartOf.color, textSize, textRotation, textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, autoLineBreakWidth, chart_thisAxisIsPartOf.autoFlipAllText_toFitObsererCamera, durationInSec, hiddenByNearerObjects);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+
+ string GetAxisNameForAutomaticSources()
+ {
+ switch (sourceOfAutomaticValues)
+ {
+ case SourceOfAutomaticValues.fixedStepForEachValueAdding:
+ return "data points";
+ case SourceOfAutomaticValues.fixedStep_followingTheManualIncrementFunction:
+ return "manually triggered increments";
+ case SourceOfAutomaticValues.frameCount:
+ return "frame count (Update)";
+ case SourceOfAutomaticValues.fixedTime:
+ return "fixed time [seconds]";
+ case SourceOfAutomaticValues.fixedUnscaledTime:
+ return "fixed unscaled time [seconds]";
+ case SourceOfAutomaticValues.realtimeSinceStartup:
+ return "realtime since startup [seconds]";
+ case SourceOfAutomaticValues.time:
+ return "time [seconds]";
+ case SourceOfAutomaticValues.timeSinceLevelLoad:
+ return "time since level load [seconds]";
+ case SourceOfAutomaticValues.unscaledTime:
+ return "unscaled time [seconds]";
+ case SourceOfAutomaticValues.editorTimeSinceStartup:
+ return "Editor time since startup [seconds]";
+ default:
+ return null;
+ }
+ }
+
+ public void ReportXValueFromNonAutomaticSource()
+ {
+ allXValuesCameFromAutomaticSource = false;
+ }
+
+ public void ChartUpdatesAxisDirectionVectors(Quaternion newChartRotation)
+ {
+ //Don't call this function manually. Use "chartDrawing.Rotation" and "chartDrawing.Width_inWorldSpace" and "chartDrawing.Height_inWorldSpace" instead.
+ axisVector_normalized_inWorldSpace = newChartRotation * unrotated_axisVector_normalized_inWorldSpace;
+ axisVector_inWorldSpace = axisVector_normalized_inWorldSpace * length_inWorldSpace;
+ }
+
+ public void ChartUpdatesAxisLength(float newLength)
+ {
+ //Don't call this function manually. Use "chartDrawing.Width_inWorldSpace" and "chartDrawing.Height_inWorldSpace" instead.
+ axisVector_inWorldSpace = axisVector_normalized_inWorldSpace * newLength;
+ length_inWorldSpace = newLength;
+ }
+
+ public bool IsInsideDisplayedSpan(float valueToCheckIfItIsInsideTheDisplayedSpan)
+ {
+ //same as in "ChartDrawing.ChartSpace_to_WorldSpace"
+ //if you want to check both dimensions at once you can use "chartDrawing.IsInsideDrawnChartArea"
+
+ if (valueToCheckIfItIsInsideTheDisplayedSpan >= valueMarkingLowerEndOfTheAxis)
+ {
+ if (valueToCheckIfItIsInsideTheDisplayedSpan <= valueMarkingUpperEndOfTheAxis)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public bool IsLowerThanDisplayedSpan(float valueToCheckIfItIsLowerThanTheDisplayedSpan)
+ {
+ //same as in "ChartDrawing.ChartSpace_to_WorldSpace"
+ return (valueToCheckIfItIsLowerThanTheDisplayedSpan < valueMarkingLowerEndOfTheAxis);
+ }
+
+ public bool IsHigherThanDisplayedSpan(float valueToCheckIfItIsHigherThanTheDisplayedSpan)
+ {
+ //same as in "ChartDrawing.ChartSpace_to_WorldSpace"
+ return (valueToCheckIfItIsHigherThanTheDisplayedSpan > valueMarkingUpperEndOfTheAxis);
+ }
+
+ static DrawBasics.LineStyle lineStyle_forZeroPositionMarker = DrawBasics.LineStyle.dashed;
+ void CreatePointsOfInterest_thatDisplaysTheZeroPositionAsDottedLine(out PointOfInterest created_pointOfInterest_displayingTheZeroPositionLine, out PointOfInterest created_pointOfInterest_displayingTheZeroPositionLine_lowAlphaUnderlay)
+ {
+ created_pointOfInterest_displayingTheZeroPositionLine = CreatePointOfInterest_thatDisplaysTheZeroPositionAsDottedLine(lineStyle_forZeroPositionMarker, 0.40f);
+ created_pointOfInterest_displayingTheZeroPositionLine_lowAlphaUnderlay = CreatePointOfInterest_thatDisplaysTheZeroPositionAsDottedLine(DrawBasics.LineStyle.solid, 0.15f);
+ }
+
+ PointOfInterest CreatePointOfInterest_thatDisplaysTheZeroPositionAsDottedLine(DrawBasics.LineStyle lineStyle, float alpha)
+ {
+ Color color = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(chart_thisAxisIsPartOf.color, alpha);
+ PointOfInterest created_pointOfInterest = new PointOfInterest(0.0f, 0.0f, color, chart_thisAxisIsPartOf, null, null);
+ created_pointOfInterest.drawTextBoxIfPointIsOutsideOfChartArea = false;
+ created_pointOfInterest.isDeletedOnClear = false;
+ created_pointOfInterest.forceColorOfParent = true;
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ created_pointOfInterest.xValue.lineStyle = lineStyle;
+ created_pointOfInterest.xValue.linestylePatternScaleFactor = 0.75f;
+ created_pointOfInterest.xValue.drawCoordinateAsText = true;
+ created_pointOfInterest.xValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.throughWholeChart_alsoIfOtherDimensionsValueIsOutsideChart;
+
+ created_pointOfInterest.yValue.lineStyle = DrawBasics.LineStyle.invisible;
+ }
+ else
+ {
+ created_pointOfInterest.yValue.lineStyle = lineStyle;
+ created_pointOfInterest.yValue.linestylePatternScaleFactor = 0.75f;
+ created_pointOfInterest.yValue.drawCoordinateAsText = true;
+ created_pointOfInterest.yValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.throughWholeChart_alsoIfOtherDimensionsValueIsOutsideChart;
+
+ created_pointOfInterest.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ }
+ return created_pointOfInterest;
+ }
+
+ void SetIf_pointOfInterestDisplayingTheZeroPositionLine_isDisplayed()
+ {
+ if (cartesianDimension == UtilitiesDXXL_Math.Dimension.x)
+ {
+ if (drawZeroPositionAsDottedLine)
+ {
+ pointOfInterest_displayingTheZeroPositionLine.xValue.lineStyle = lineStyle_forZeroPositionMarker;
+ pointOfInterest_displayingTheZeroPositionLine_lowAlphaUnderlay.xValue.lineStyle = DrawBasics.LineStyle.solid;
+ }
+ else
+ {
+ pointOfInterest_displayingTheZeroPositionLine.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ pointOfInterest_displayingTheZeroPositionLine_lowAlphaUnderlay.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ }
+ }
+ else
+ {
+ if (drawZeroPositionAsDottedLine)
+ {
+ pointOfInterest_displayingTheZeroPositionLine.yValue.lineStyle = lineStyle_forZeroPositionMarker;
+ pointOfInterest_displayingTheZeroPositionLine_lowAlphaUnderlay.yValue.lineStyle = DrawBasics.LineStyle.solid;
+ }
+ else
+ {
+ pointOfInterest_displayingTheZeroPositionLine.yValue.lineStyle = DrawBasics.LineStyle.invisible;
+ pointOfInterest_displayingTheZeroPositionLine_lowAlphaUnderlay.yValue.lineStyle = DrawBasics.LineStyle.invisible;
+ }
+ }
+ }
+
+ public void SetAxisScalingDuringInspectionComponentPhases(float fixedLowerEndValueOfScale, float fixedUpperEndValueOfScale)
+ {
+ if (UtilitiesDXXL_Math.FloatIsValid(fixedLowerEndValueOfScale))
+ {
+ fixedLowerEndValueOfScale_duringInspectionComponentPhases = fixedLowerEndValueOfScale;
+ }
+ else
+ {
+ fixedLowerEndValueOfScale_duringInspectionComponentPhases = -100.0f;
+ }
+
+ if (UtilitiesDXXL_Math.FloatIsValid(fixedUpperEndValueOfScale))
+ {
+ fixedUpperEndValueOfScale_duringInspectionComponentPhases = fixedUpperEndValueOfScale;
+ }
+ else
+ {
+ fixedUpperEndValueOfScale_duringInspectionComponentPhases = 100.0f;
+ }
+
+ RecalcScaling();
+ }
+
+ public void GetAxisEndsIfAllNonHiddenValuesAreEncapsulated(out float lowEnd, out float upperEnd)
+ {
+ float lowestValueOfAllLines = GetLowestValueOfAllLines();
+ float highestValueOfAllLines = GetHighestValueOfAllLines();
+ GetAxisEndsIfAllValuesAreEncapsulated_inclPadding(out lowEnd, out upperEnd, lowestValueOfAllLines, highestValueOfAllLines);
+ }
+
+ public void GetAxisEndsIfAllNonHiddenValuesInsideOtherAxisSpanAreEncapsulated(out float lowEnd, out float upperEnd)
+ {
+ float lowestValueOfAllLines_insideSpanOfOtherAxis = GetLowestValueOfAllLines_insideSpanOfOtherAxis();
+ float highestValueOfAllLines_insideSpanOfOtherAxis = GetHighestValueOfAllLines_insideSpanOfOtherAxis();
+
+ if (float.IsInfinity(lowestValueOfAllLines_insideSpanOfOtherAxis) || float.IsInfinity(highestValueOfAllLines_insideSpanOfOtherAxis))
+ {
+ //-> no value has been found inside the restricted axis span:
+ lowestValueOfAllLines_insideSpanOfOtherAxis = 0.0f;
+ highestValueOfAllLines_insideSpanOfOtherAxis = 0.0f;
+ }
+
+ GetAxisEndsIfAllValuesAreEncapsulated_inclPadding(out lowEnd, out upperEnd, lowestValueOfAllLines_insideSpanOfOtherAxis, highestValueOfAllLines_insideSpanOfOtherAxis);
+ }
+
+ public void GetAxisEndsIfAllValuesAreEncapsulated_inclPadding(out float lowEnd, out float upperEnd, float lowestDisplayedValue, float highestDisplayedValue)
+ {
+ if (UtilitiesDXXL_Math.CheckIf_twoFloatsAreApproximatelyEqual(lowestDisplayedValue, highestDisplayedValue))
+ {
+ float paddingAtEachSide = 1.6f;
+ lowEnd = lowestDisplayedValue - paddingAtEachSide;
+ upperEnd = lowestDisplayedValue + paddingAtEachSide;
+ }
+ else
+ {
+ float span_fromLowestToHighest = highestDisplayedValue - lowestDisplayedValue;
+ float additionalPadding_atEachside = span_fromLowestToHighest * 0.05f;
+ lowEnd = lowestDisplayedValue - additionalPadding_atEachside;
+ upperEnd = highestDisplayedValue + additionalPadding_atEachside;
+ }
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/charts/line charts/ChartAxis.cs.meta b/Runtime/DrawDebugLibrary/charts/line charts/ChartAxis.cs.meta
new file mode 100644
index 0000000..fd1d073
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/charts/line charts/ChartAxis.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c2ce6ec8d412c824d99e259a4e207f39
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/charts/line charts/ChartDrawing.cs b/Runtime/DrawDebugLibrary/charts/line charts/ChartDrawing.cs
new file mode 100644
index 0000000..45241fc
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/charts/line charts/ChartDrawing.cs
@@ -0,0 +1,1247 @@
+namespace DrawXXL
+{
+ using System.Collections.Generic;
+ using UnityEngine;
+
+ public class ChartDrawing
+ {
+ //taking chart data point values from edit mode to play mode #1:
+ //-> Theoretically it is possible by making the chart and all dependent classes serializable
+ //-> Though a test resulted in Unity to endlessly compile and finally crash
+ //-> The reason might be that the serialization system reaches it's limits. There are many lists, and lists of custom classes that again hold lists, and even lists of lists to be serialized, and the contained classes hold references back to the containing classes. Unitys own documentation on the serialization system says: "avoid nested structures and cross references"
+ //-> The mistake during trying this the last time could have been, that the contained sub-classes like "ChartLine" (and many others) hold a reference back to "chart_thisLineIsPartOf". This field has been tried to be serialized with "[SerializeField]". Does this acutually create endless loops, because the lines are (with intermediate steps) also serialized as members inside "ChartDrawing"? Instead "[SerializeReference]" could have been tried, or probalbly even better an approach as "BezierSplineDrawer" uses it (see notes at "BezierSplineDrawer.cs/listOfControlPointTriplets"), though it may be easier there, because a MonoBehaviour is available there.
+
+ //"Taking values from Edit Mode to Play Mode" #2:
+ //-> The static charts in the "DrawCharts" class by default reset when you enter playmode, so the charts start empty without any values. In some cases it may be desired to skip this deletion and instead take data values from Edit Mode to Play Mode. You can do so by disabling Domain Reload (see Unity documentation). Though this works only for static charts (like the premade ones in the "DrawCharts" class). It doesn't work for Transform Charts. And it is not possible the other way round: You cannot take values from Playmode back to Edit Mode.
+ //-> Moreover there is the other case where you want to disable Domain Reload for some other reason but still want a cleared empty chart when you enter Playmode. In such cases you have to manually clear the charts (e.g. in the "Start()" function of a MonoBehaviour) by using the "Clear()" functions of the charts.
+
+ public enum RotationSource
+ {
+ screen,
+ screen_butVerticalInWorldSpace,
+ userDefinedFixedRotation
+ }
+
+ public RotationSource rotationSource = RotationSource.screen;
+
+ public Quaternion fixedRotation = Quaternion.identity;
+ private Quaternion internalRotation = Quaternion.identity; //not documented. Users should use "fixedRotation"
+ public Quaternion InternalRotation
+ {
+ //This is the internally used rotation. "fixedRotation" does nothing but getting filled into this before drawing if "rotationSource=userDefinedFixedRotation"
+ get { return internalRotation; }
+ set
+ {
+ internalRotation = value;
+ chartPlane = new InternalDXXL_Plane(Position_worldspace, internalRotation * Vector3.forward);
+ xAxis.ChartUpdatesAxisDirectionVectors(internalRotation);
+ yAxis.ChartUpdatesAxisDirectionVectors(internalRotation);
+ }
+ }
+
+ private Vector3 position_worldspace = Vector3.zero;
+ public Vector3 Position_worldspace
+ {
+ get
+ {
+ if (internal_indexNumberOfPremadeChart == (-1))
+ {
+ return position_worldspace;
+ }
+ else
+ {
+ return DrawCharts.GetAutoLayoutedPositionOfPremadeLineChart(internal_indexNumberOfPremadeChart);
+ }
+ }
+ set
+ {
+ position_worldspace = value;
+ internal_indexNumberOfPremadeChart = -1; //-> if a user sets the position, then the chart is not affected anymore by the automatic layouting of the premade charts.
+ }
+ }
+
+ static float minChartSize = 0.01f;
+ public float Width_inWorldSpace
+ {
+ get { return xAxis.Length_inWorldSpace; }
+ set { xAxis.ChartUpdatesAxisLength(Mathf.Max(minChartSize, value)); }
+ }
+
+ public float Height_inWorldSpace
+ {
+ get { return yAxis.Length_inWorldSpace; }
+ set { yAxis.ChartUpdatesAxisLength(Mathf.Max(minChartSize, value)); }
+ }
+
+ static Vector2 default_position_inCamViewportspace = new Vector2(0.15f, 0.2f);
+ public Vector2 position_inCamViewportspace = default_position_inCamViewportspace;
+ private float width_relToCamViewport = 0.7f;
+ public float Width_relToCamViewport
+ {
+ get { return width_relToCamViewport; }
+ set { width_relToCamViewport = Mathf.Clamp(value, 0.01f, 10.0f); }
+ }
+
+ private float height_relToCamViewportHeight = 0.6f;
+ public float Height_relToCamViewportHeight
+ {
+ get { return height_relToCamViewportHeight; }
+ set { height_relToCamViewportHeight = Mathf.Clamp(value, 0.01f, 10.0f); }
+ }
+
+ public ChartAxis xAxis;
+ public ChartAxis yAxis;
+ public ChartLines lines;
+ public string name = null;
+ public Color color = DrawBasics.defaultColor;
+ public bool drawValuesOutsideOfChartArea = false;
+
+ public float LuminanceOfLineColors
+ {
+ get { return lines.LuminanceOfLineColors; }
+ set { lines.LuminanceOfLineColors = value; }
+ }
+
+ public ChartLine.LineConnectionsType default_lineConnectionsType = ChartLine.LineConnectionsType.straightFromPointToPoint; //is also set by "Set_lineConnectionsType"(link), but there it gets changed also for existing lines.
+ public ChartLine.DataPointVisualization default_dataPointVisualization = ChartLine.DataPointVisualization.invisible;//is also set by "Set_dataPointVisualization"(link), but there it gets changed also for existing lines.
+ public ChartLine.NamePosition default_lineNamePosition = ChartLine.NamePosition.dynamicallyMoving_atLineEnd_towardsRight;//is also set by "SetLineNamesPositions"(link), but there it gets changed also for existing lines.
+ public float default_lineNameText_sizeScaleFactor = 1.0f;//is also set by "SetLineNamesSize"(link), but there it gets changed also for existing lines.
+ public float default_alpha_ofHighlighterForMostCurrentValue_xDim = 0.3f;//is also set by "Set_alpha_ofHighlighterForMostCurrentValue_xDim"(link), but there it gets changed also for existing lines.
+ public float default_alpha_ofHighlighterForMostCurrentValue_yDim = 0.3f;//is also set by "Set_alpha_ofHighlighterForMostCurrentValue_yDim"(link), but there it gets changed also for existing lines.
+ public bool default_displayDeltaAtHighlighterForMostCurrentValue = true;//is also set by "Set_displayDeltaAtHighlighterForMostCurrentValue"(link), but there it gets changed also for existing lines.
+ public float default_alpha_ofMaxiumumYValueMarker = 0.3f;//is also set by "Set_alpha_ofMaxiumumYValueMarker"(link), but there it gets changed also for existing lines.
+ public float default_alpha_ofMinimumYValueMarker = 0.3f;//is also set by "Set_alpha_ofMinimumYValueMarker"(link), but there it gets changed also for existing lines.
+ public bool default_markAllYMaximumTurningPoints = false;//is also set by "Set_markAllYMaximumTurningPoints"(link), but there it gets changed also for existing lines.
+ public bool default_markAllYMinimumTurningPoints = false;//is also set by "Set_markAllYMinimumTurningPoints"(link), but there it gets changed also for existing lines.
+ public float default_alpha_ofVerticalAreaFillLines = 0.0f;//is also set by "Set_alpha_ofVerticalAreaFillLines"(link), but there it gets changed also for existing lines.
+ public float default_SizeOfPoints_relToChartHeight = 0.02f;//is also set by "Set_SizeOfPoints_relToChartHeight"(link), but there it gets changed also for existing lines.
+ public float default_lineWidth_relToChartHeight = 0.0f;//is also set by "Set_lineWidth_relToChartHeight"(link), but there it gets changed also for existing lines.
+ public float default_pointVisualisationLineWidth_relToChartHeight = 0.0f;//is also set by "Set_pointVisualisationLineWidth_relToChartHeight"(link), but there it gets changed also for existing lines.
+ public bool autoFlipAllText_toFitObsererCamera = true;
+
+ public int internal_indexNumberOfPremadeChart = -1; //-> this is used internally for the automatic layout of the premade chart, whose position hasn't been explicitly set by the user.
+
+#if UNITY_EDITOR
+ bool theMostCurrentChartDrawing_hasBeenMadeInScreenspace = false;
+#endif
+ Camera cameraUsedByMostCurrentScreenspaceDrawing;
+ bool theMostCurrentScreenspaceDrawing_definedChartWidth_relToCamWidth = true;
+ bool theMostCurrentChartDrawing_wasDrawnWithConfigOf_hiddenByNearerObjects = true;
+
+ public DataComponentsThatAreDrawn dataComponentsThatAreDrawn = new DataComponentsThatAreDrawn();
+ public bool displayHighlightingOfMostCurrentValues_forLinesFromLists = false;
+ private bool isEmptyWithNoLinesToDraw;
+ public bool IsEmptyWithNoLinesToDraw
+ {
+ get { return isEmptyWithNoLinesToDraw; }
+ set { Debug.LogError("Setting 'IsEmptyWithNoLinesToDraw' manually is not supported."); }
+ }
+
+ private float scaleFactor_forChartNameTextSize = 1.0f;
+ public float ScaleFactor_forChartNameTextSize
+ {
+ get { return scaleFactor_forChartNameTextSize; }
+ set { scaleFactor_forChartNameTextSize = Mathf.Max(value, 0.02f); }
+ }
+
+ /// other:
+ public InternalDXXL_Plane chartPlane = new InternalDXXL_Plane(Vector3.zero, Vector3.forward);
+ Vector3 posOfOriginOfChartSpace_inWorldSpace;
+ int xPos_currentManualIncrementValue = 0;
+ List pointsOfInterest = new List();
+ PointOfInterest pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheLeftSide;
+ public PointOfInterest pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheRightSide;
+
+ private int maxDisplayedPointOfInterestTextBoxesPerSide = 6;
+ public int MaxDisplayedPointOfInterestTextBoxesPerSide // Some points of interest display a text box with explantion text in the top corners of the chart. In some unforeseen situation, for example if many invalid float values are added as data points, the number of text boxes that notify you of these invalid float values can rapidly grow and as a result slow down the Editor performance. Therefore "MaxDisplayedPointOfInterestTextBoxesPerSide" limits the number of displayed text boxes. If there are more text boxes then one additional text box is displayed which communicates how many text boxes are hidden.
+ {
+ get { return maxDisplayedPointOfInterestTextBoxesPerSide; }
+ set { maxDisplayedPointOfInterestTextBoxesPerSide = Mathf.Max(0, value); }
+ }
+ InternalDXXL_ChartToCSVfileWriter chartToCSVfileWriter;
+ public float overallMinXValue_includingHiddenLines; //not contained in docs //see also "lines.GetLowestXValueOfAllLines()", which is similar, but ignores hidden lines
+ public float overallMaxXValue_includingHiddenLines; //not contained in docs //see also "lines.GetHighestXValueOfAllLines()", which is similar, but ignores hidden lines
+ public float overallMinYValue_includingHiddenLines; //not contained in docs //see also "lines.GetLowestYValueOfAllLines()", which is similar, but ignores hidden lines
+ public float overallMaxYValue_includingHiddenLines; //not contained in docs //see also "lines.GetHighestYValueOfAllLines()", which is similar, but ignores hidden lines
+
+ public bool drawRGBColorUnderlayForColorGraphs = true; //The alpha value may be displayed to high because adjacent color lines overlay each other.
+
+
+ public ChartDrawing(string chartName = null)
+ {
+ name = chartName;
+
+ xAxis = new ChartAxis(Vector3.right, this, UtilitiesDXXL_Math.Dimension.x);
+ yAxis = new ChartAxis(Vector3.up, this, UtilitiesDXXL_Math.Dimension.y);
+ xAxis.theOtherAxis = yAxis;
+ yAxis.theOtherAxis = xAxis;
+ ResetOverallMinMaxValues();
+ lines = new ChartLines(this);
+ Create_pointsOfInterest_thatCommunicateTheHiddenPointsOfInterest();
+ }
+
+ public void Clear()
+ {
+ lines.Clear();
+ xPos_currentManualIncrementValue = 0;
+ xAxis.Clear();
+ yAxis.Clear();
+ ResetOverallMinMaxValues();
+ DeletePointsOfInterestOnClear();
+ }
+
+ public void Draw(float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ //is ignored as long as a chart inspection gameobject (created via "CreateChartInspectionGameobject()") exists, because the chart inspection component will then take care of the chart drawing by itself.
+ if (chartInspector_component == null)
+ {
+ Internal_Draw(durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public void Internal_Draw(float durationInSec = 0.0f, bool hiddenByNearerObjects = true)
+ {
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = this;
+
+ ApplyInternalRotation(); //-> "DXXLWrapperForUntiyDebugDraw.CheckIfDrawingIsCurrentlySkipped" uses the here applied rotation already in it's fallback
+
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ DrawChartName(durationInSec, hiddenByNearerObjects);
+ isEmptyWithNoLinesToDraw = !lines.HasAtLeastOneDrawnLineWithAtLeastOneValidValue();
+ TryDrawFallbackForEmptyChart(durationInSec, hiddenByNearerObjects);
+ RecalcAxisScaling();
+ Vector3 chartAnchorPositionInWorldSpace_shiftedAlongChartsXAxis_toOriginOfChartSpace = Position_worldspace - xAxis.AxisVector_normalized_inWorldSpace * xAxis.ValueMarkingTheLowerAxisEnd_convertedToUnitsOfTheUnwarpedUnscaledWorldSpace;
+ posOfOriginOfChartSpace_inWorldSpace = chartAnchorPositionInWorldSpace_shiftedAlongChartsXAxis_toOriginOfChartSpace - yAxis.AxisVector_normalized_inWorldSpace * yAxis.ValueMarkingTheLowerAxisEnd_convertedToUnitsOfTheUnwarpedUnscaledWorldSpace;
+ xAxis.Draw(chartPlane, durationInSec, hiddenByNearerObjects);
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = this;
+ yAxis.Draw(chartPlane, durationInSec, hiddenByNearerObjects);
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = this;
+ TryDrawRGBColorUnderlay(xAxis.ValueMarkingLowerEndOfTheAxis, xAxis.ValueMarkingUpperEndOfTheAxis, yAxis.ValueMarkingLowerEndOfTheAxis, yAxis.ValueMarkingUpperEndOfTheAxis, durationInSec, hiddenByNearerObjects);
+ lines.Draw(chartPlane, durationInSec, hiddenByNearerObjects);
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = this;
+ DrawPointsOfInterest(durationInSec, hiddenByNearerObjects);
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = null;
+#if UNITY_EDITOR
+ theMostCurrentChartDrawing_hasBeenMadeInScreenspace = false;
+#endif
+ theMostCurrentChartDrawing_wasDrawnWithConfigOf_hiddenByNearerObjects = hiddenByNearerObjects;
+ }
+
+ public void DrawScreenspace(bool chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight = true, float durationInSec = 0.0f)
+ {
+ if (UtilitiesDXXL_Screenspace.GetAutomaticCameraForDrawing(out Camera automaticallyFoundCamera, "ChartDrawing.DrawScreenspace") == false) { return; }
+ DrawScreenspace(automaticallyFoundCamera, chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight, durationInSec);
+ }
+
+ public void DrawScreenspace(Camera targetCamera, bool chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+
+ bool skipScreenspaceSheduling_dueTo_isFirstDrawOfScreenspaceDrawing = Get_skipScreenspaceSheduling_dueTo_isFirstDrawOfScreenspaceDrawing();
+ if (DrawXXL_LinesManager.instance.noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem && (skipScreenspaceSheduling_dueTo_isFirstDrawOfScreenspaceDrawing == false))
+ {
+ DrawXXL_LinesManager.instance.listOfSheduled_DrawScreenspaceChart.Add(new DrawScreenspaceChart(targetCamera, chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight, durationInSec, this));
+ return;
+ }
+
+ if (chartInspector_component == null)
+ {
+ Internal_DrawScreenspace(targetCamera, chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight, durationInSec);
+ }
+ }
+
+ bool Get_skipScreenspaceSheduling_dueTo_isFirstDrawOfScreenspaceDrawing()
+ {
+#if UNITY_EDITOR
+ //This is for this case:
+ //-> After a call to "DrawScreenspace()" "CreateChartInspectionGameobject()" is called, which expects a correctly set "theMostCurrentChartDrawing_hasBeenMadeInScreenspace".
+ //-> The delay from "noteAllScreenspaceDrawsToSheduler_insteadOfImmediatelyDrawingThem" prevents "theMostCurrentChartDrawing_hasBeenMadeInScreenspace" (and other fields) from beeing correctly set for the chartInspectorComponent.
+ //This hack could lead to problems in this case:
+ //-> Multiple charts are drawn to the scene - some in screenspace and some in worldspace.
+ //-> The "theMostCurrentChartDrawing_hasBeenMadeInScreenspace" would toggle to and from all the time.
+ //-> Expected negative side effect: Screenspace charts could ongoingly be drawn with a spacial delay to moving cameras..
+ return (theMostCurrentChartDrawing_hasBeenMadeInScreenspace == false);
+#else
+ return false;
+#endif
+ }
+
+ public void Internal_DrawScreenspace(Camera targetCamera, bool chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight = true, float durationInSec = 0.0f)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return; }
+ if (UtilitiesDXXL_Log.ErrorLogForNullUnityObjects(targetCamera, "targetCamera")) { return; }
+ if (UtilitiesDXXL_Screenspace.CheckIfViewportIsTooSmall(targetCamera)) { return; }
+
+ cameraUsedByMostCurrentScreenspaceDrawing = targetCamera;
+ theMostCurrentScreenspaceDrawing_definedChartWidth_relToCamWidth = chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight;
+
+ Vector3 chartPosition_beforeScreenspaceDrawing = Position_worldspace;
+ Quaternion fixedChartRotation_beforeScreenspaceDrawing = fixedRotation;
+ float chartWidthWorldspace_beforeScreenspaceDrawing = Width_inWorldSpace;
+ float chartHeigthWorldspace_beforeScreenspaceDrawing = Height_inWorldSpace;
+ RotationSource rotationSource_beforeScreenspaceDrawing = rotationSource;
+ autoFlipAllText_toFitObsererCamera = false;
+
+ try
+ {
+ UtilitiesDXXL_ChartDrawing.SetPosRotScaleOfChart_toScreenspace(this, targetCamera, chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight, false);
+ Internal_Draw(durationInSec, false);
+ }
+ catch { }
+
+ Position_worldspace = chartPosition_beforeScreenspaceDrawing;
+ fixedRotation = fixedChartRotation_beforeScreenspaceDrawing;
+ Width_inWorldSpace = chartWidthWorldspace_beforeScreenspaceDrawing;
+ Height_inWorldSpace = chartHeigthWorldspace_beforeScreenspaceDrawing;
+ rotationSource = rotationSource_beforeScreenspaceDrawing;
+ autoFlipAllText_toFitObsererCamera = true;
+#if UNITY_EDITOR
+ theMostCurrentChartDrawing_hasBeenMadeInScreenspace = true;
+#endif
+ }
+
+ public void ApplyInternalRotation()
+ {
+ Vector3 observerCamForward_normalized;
+ Vector3 observerCamUp_normalized;
+ Vector3 observerCamRight_normalized;
+ Vector3 cam_to_lineCenter;
+
+ switch (rotationSource)
+ {
+ case RotationSource.screen:
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out observerCamForward_normalized, out observerCamUp_normalized, out observerCamRight_normalized, out cam_to_lineCenter, Position_worldspace, Vector3.zero, null);
+ InternalRotation = Quaternion.LookRotation(observerCamForward_normalized, observerCamUp_normalized);
+ break;
+ case RotationSource.screen_butVerticalInWorldSpace:
+ UtilitiesDXXL_ObserverCamera.GetObserverCamSpecs(out observerCamForward_normalized, out observerCamUp_normalized, out observerCamRight_normalized, out cam_to_lineCenter, Position_worldspace, Vector3.zero, null);
+ UtilitiesDXXL_LineAmplitudeAndTextDirCalculation.GetUpAndTextDir_withoutCallerSpecifiedPreference_independentFromTooShortLineDir_alignedVertical(out Vector3 chartUp_normalized, out Vector3 chartRight_normalized, observerCamForward_normalized, observerCamUp_normalized, observerCamRight_normalized, cam_to_lineCenter);
+ Vector3 chartForward_normalized = Vector3.Cross(chartRight_normalized, chartUp_normalized);
+ InternalRotation = Quaternion.LookRotation(chartForward_normalized, chartUp_normalized);
+ break;
+ case RotationSource.userDefinedFixedRotation:
+ InternalRotation = fixedRotation;
+ break;
+ default:
+ InternalRotation = fixedRotation;
+ Debug.LogError("rotationSource of '" + rotationSource + "' not implemented.");
+ break;
+ }
+ }
+
+ void RecalcAxisScaling()
+ {
+ //-> this order flipping should only concern cases where one axis has "dynamic_encapsulateAllValues_butOnlyThoseInsideOfOtherAxisDisplay" scaling and the other axis has a fixed scaling type, because "dynamic_encapsulateAllValues_butOnlyThoseInsideOfOtherAxisDisplay" needs the axis ends of the fixed axis and therefore depends on being called afterwards.
+ //-> for other cases it shouldn't make any difference
+
+ if (xAxis.HasAFixedScalingType())
+ {
+ xAxis.RecalcScaling();
+ yAxis.RecalcScaling();
+ }
+ else
+ {
+ yAxis.RecalcScaling();
+ xAxis.RecalcScaling();
+ }
+ }
+
+ public void AddValue(float yValueOfNewDataPoint, string nameOfReceivingLine)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.GetUsermadeLine(nameOfReceivingLine, true).AddValue(yValueOfNewDataPoint);
+ }
+ }
+
+ public void AddValue(float yValueOfNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_float.AddValue(yValueOfNewDataPoint);
+ }
+ }
+
+ public void AddValue(int yValueOfNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_int.AddValue((float)yValueOfNewDataPoint);
+ }
+ }
+
+ public void AddValue(Vector2 yValueOfNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_vector2_x.AddValue(yValueOfNewDataPoint.x);
+ lines.premadeLine_vector2_y.AddValue(yValueOfNewDataPoint.y);
+ }
+ }
+
+ public void AddValue(Vector3 yValueOfNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_vector3_x.AddValue(yValueOfNewDataPoint.x);
+ lines.premadeLine_vector3_y.AddValue(yValueOfNewDataPoint.y);
+ lines.premadeLine_vector3_z.AddValue(yValueOfNewDataPoint.z);
+ }
+ }
+
+ public void AddValue(Vector4 yValueOfNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_vector4_x.AddValue(yValueOfNewDataPoint.x);
+ lines.premadeLine_vector4_y.AddValue(yValueOfNewDataPoint.y);
+ lines.premadeLine_vector4_z.AddValue(yValueOfNewDataPoint.z);
+ lines.premadeLine_vector4_w.AddValue(yValueOfNewDataPoint.w);
+ }
+ }
+
+ public void AddValue(Color yValueOfNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_color_r.AddValue(yValueOfNewDataPoint.r);
+ lines.premadeLine_color_g.AddValue(yValueOfNewDataPoint.g);
+ lines.premadeLine_color_b.AddValue(yValueOfNewDataPoint.b);
+ lines.premadeLine_color_a.AddValue(yValueOfNewDataPoint.a);
+ }
+ }
+
+ public void AddValue(Quaternion yValueOfNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_rotation_eulerX.AddValue(yValueOfNewDataPoint.eulerAngles.x);
+ lines.premadeLine_rotation_eulerY.AddValue(yValueOfNewDataPoint.eulerAngles.y);
+ lines.premadeLine_rotation_eulerZ.AddValue(yValueOfNewDataPoint.eulerAngles.z);
+ }
+ }
+
+ public void AddValue(bool yValueOfNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_bool.AddValue(yValueOfNewDataPoint);
+ }
+ }
+
+ public void AddValue(GameObject yValueOfNewDataPoint)
+ {
+ if (yValueOfNewDataPoint == null)
+ {
+ Debug.LogError("Chart: Cannot add value, because GameObject is null.");
+ return;
+ }
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValue(yValueOfNewDataPoint.transform);
+ }
+ }
+
+ public void AddValue(Transform yValueOfNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValue(yValueOfNewDataPoint);
+ }
+ }
+
+ public void AddXYValue(Vector2 xyValueOfNewDataPoint, string nameOfReceivingLine)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.GetUsermadeLine(nameOfReceivingLine, true).AddXYValue(xyValueOfNewDataPoint);
+ }
+ }
+
+ public void AddXYValue(Vector2 xyValueOfNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_float.AddXYValue(xyValueOfNewDataPoint);
+ }
+ }
+
+ public void AddXYValue(float xValue, float yValue, string nameOfReceivingLine)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.GetUsermadeLine(nameOfReceivingLine, true).AddXYValue(xValue, yValue);
+ }
+ }
+
+ public void AddXYValue(float xValue, float yValue)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_float.AddXYValue(xValue, yValue);
+ }
+ }
+
+ public void AddXYValue(float xValue, int yValue)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_int.AddXYValue(xValue, (float)yValue);
+ }
+ }
+
+ public void AddXYValue(float xValue, bool yValue)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.premadeLine_bool.AddXYValue(xValue, yValue);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(List yValues)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromList_toListWithFloatLines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(float[] yValues)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromArray_toListWithFloatLines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(List yValues)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromList_toListWithIntLines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(int[] yValues)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromArray_toListWithIntLines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(List yValues)
+ {
+ if (yValues == null)
+ {
+ Debug.LogError("Chart: Cannot add values, because list is null.");
+ return;
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromList_toListWithVector2Lines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(Vector2[] yValues)
+ {
+ if (yValues == null)
+ {
+ Debug.LogError("Chart: Cannot add values, because array is null.");
+ return;
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromArray_toListWithVector2Lines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(List yValues)
+ {
+ if (yValues == null)
+ {
+ Debug.LogError("Chart: Cannot add values, because list is null.");
+ return;
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromList_toListWithVector3Lines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(Vector3[] yValues)
+ {
+ if (yValues == null)
+ {
+ Debug.LogError("Chart: Cannot add values, because array is null.");
+ return;
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromArray_toListWithVector3Lines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(List yValues)
+ {
+ if (yValues == null)
+ {
+ Debug.LogError("Chart: Cannot add values, because list is null.");
+ return;
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromList_toListWithQuaternionLines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(Quaternion[] yValues)
+ {
+ if (yValues == null)
+ {
+ Debug.LogError("Chart: Cannot add values, because array is null.");
+ return;
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromArray_toListWithQuaternionLines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(List yValues)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromList_toListWithBoolLines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(bool[] yValues)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromArray_toListWithBoolLines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(List yValues)
+ {
+ if (yValues == null)
+ {
+ Debug.LogError("Chart: Cannot add values, because list is null.");
+ return;
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromList_toListWithGameobjectLines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(GameObject[] yValues)
+ {
+ if (yValues == null)
+ {
+ Debug.LogError("Chart: Cannot add values, because array is null.");
+ return;
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromArray_toListWithGameobjectLines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(List yValues)
+ {
+ if (yValues == null)
+ {
+ Debug.LogError("Chart: Cannot add values, because list is null.");
+ return;
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromList_toListWithTransformLines(yValues);
+ }
+ }
+
+ public void AddValues_eachIndexIsALine(Transform[] yValues)
+ {
+ if (yValues == null)
+ {
+ Debug.LogError("Chart: Cannot add values, because array is null.");
+ return;
+ }
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ lines.AddValuesFromArray_toListWithTransformLines(yValues);
+ }
+ }
+
+ public ChartLine AddLine(string name, Color color = default(Color), bool newLineRepresentsBoolValues = false)
+ {
+ ChartLine newlyCreatedLine = lines.AddLine(name, color);
+ if (newlyCreatedLine != null) { newlyCreatedLine.disableMinMaxYVisualizers_dueTo_lineRepresentsBoolValues = newLineRepresentsBoolValues; }
+ return newlyCreatedLine;
+ }
+
+ public ChartLine GetUsermadeLine(string lineName, bool createLineIfItDoesntExist = false)
+ {
+ return lines.GetUsermadeLine(lineName, createLineIfItDoesntExist);
+ }
+
+ public void IncrementXPos(int steps = 1)
+ {
+ for (int i = 0; i < steps; i++)
+ {
+ xPos_currentManualIncrementValue++;
+ }
+ }
+
+ public int GetManuallyIncrementedXPos()
+ {
+ return xPos_currentManualIncrementValue;
+ }
+
+ void TryDrawRGBColorUnderlay(float valueMarkingLowerEndOf_XAxis, float valueMarkingUpperEndOf_XAxis, float valueMarkingLowerEndOf_YAxis, float valueMarkingUpperEndOf_YAxis, float durationInSec, bool hiddenByNearerObjects)
+ {
+ if (drawRGBColorUnderlayForColorGraphs)
+ {
+ if (lines.premadeLine_color_r.dataPoints.Count != lines.premadeLine_color_g.dataPoints.Count) { ErrorLogForDifferentCountOfRGBAchannels(); return; }
+ if (lines.premadeLine_color_r.dataPoints.Count != lines.premadeLine_color_b.dataPoints.Count) { ErrorLogForDifferentCountOfRGBAchannels(); return; }
+ if (lines.premadeLine_color_r.dataPoints.Count != lines.premadeLine_color_a.dataPoints.Count) { ErrorLogForDifferentCountOfRGBAchannels(); return; }
+
+ for (int i = 0; i < lines.premadeLine_color_r.dataPoints.Count; i++)
+ {
+ bool allFourColorChannelsAreValid = (lines.premadeLine_color_r.dataPoints[i].validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid) && (lines.premadeLine_color_g.dataPoints[i].validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid) && (lines.premadeLine_color_b.dataPoints[i].validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid) && (lines.premadeLine_color_a.dataPoints[i].validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid);
+ if (allFourColorChannelsAreValid)
+ {
+ lines.premadeLine_color_r.dataPoints[i].DetermineIfAndHowPointIsDrawn_forRGBColorUnderlay(valueMarkingLowerEndOf_XAxis, valueMarkingUpperEndOf_XAxis, valueMarkingLowerEndOf_YAxis, valueMarkingUpperEndOf_YAxis);
+ if (lines.premadeLine_color_r.dataPoints[i].isInsideChartsXSpan || drawValuesOutsideOfChartArea)
+ {
+ Color rgbColor = new Color(lines.premadeLine_color_r.dataPoints[i].yValue, lines.premadeLine_color_g.dataPoints[i].yValue, lines.premadeLine_color_b.dataPoints[i].yValue, lines.premadeLine_color_a.dataPoints[i].yValue);
+ Line_fadeableAnimSpeed.InternalDraw(lines.premadeLine_color_r.dataPoints[i].positionInWorldSpace_atYHeightOfLowerEndOf_rgbColorUnderlay, lines.premadeLine_color_r.dataPoints[i].positionInWorldSpace_atYHeightOfUpperEndOf_rgbColorUnderlay, rgbColor, 0.0f, null, DrawBasics.LineStyle.solid, 1.0f, 0.0f, null, default(Vector3), false, 0.0f, 0.0f, 0.0f, durationInSec, hiddenByNearerObjects, false, false);
+ }
+ }
+ }
+ }
+ }
+
+ void ErrorLogForDifferentCountOfRGBAchannels()
+ {
+ Debug.LogError("Chart: Cannot draw rgb color underlay, because the 4 channels have differnet numbers of values. r has " + lines.premadeLine_color_r.dataPoints.Count + ", g has " + lines.premadeLine_color_g.dataPoints.Count + ", b has" + lines.premadeLine_color_b.dataPoints.Count + ", a has " + lines.premadeLine_color_a.dataPoints.Count);
+ }
+
+ public void SetLineNamesPositions(ChartLine.NamePosition newLineNamesPosition)
+ {
+ //overwrites the linePosition for all lines of the chart. If you want to specificy different linename positions for each line you can directly set chartLine.namePosition
+ lines.SetLineNamesPositions(newLineNamesPosition);
+ }
+
+ public void SetLineNamesSize(float newLineNamesSizeScaleFactor)
+ {
+ //overwrites the NameText_sizeScaleFactor for all lines of the chart. If you want to specificy different NameText_sizeScaleFactor for each line you can directly set chartLine.NameText_sizeScaleFactor
+ lines.SetLineNamesSize(newLineNamesSizeScaleFactor);
+ }
+
+ public void Set_lineConnectionsType(ChartLine.LineConnectionsType newLineConnectionsType)
+ {
+ //overwrites the lineConnectionsType for all lines of the chart. If you want to specificy different lineConnectionsTypes for each line you can directly set chartLine.lineConnectionsType
+ lines.Set_lineConnectionsType(newLineConnectionsType);
+ }
+
+ public void Set_dataPointVisualization(ChartLine.DataPointVisualization newDataPointVisualization)
+ {
+ //overwrites the dataPointVisualization for all lines of the chart. If you want to specificy different dataPointVisualization for each line you can directly set chartLine.dataPointVisualization
+ lines.Set_dataPointVisualization(newDataPointVisualization);
+ }
+
+ public void Set_alpha_ofVerticalAreaFillLines(float newAlpha)
+ {
+ //overwrites the alpha_ofVerticalFillAreaLines for all lines of the chart. If you want to specificy different alpha_ofVerticalFillAreaLines for each line you can directly set chartLine.alpha_ofVerticalFillAreaLines
+ lines.Set_alpha_ofVerticalAreaFillLines(newAlpha);
+ }
+
+ public void Set_alpha_ofHighlighterForMostCurrentValue_xDim(float newAlpha)
+ {
+ //overwrites the alpha_ofHighlighterForMostCurrentValue_xDim for all lines of the chart. If you want to specificy different alpha_ofHighlighterForMostCurrentValue_xDim for each line you can directly set chartLine.alpha_ofHighlighterForMostCurrentValue_xDim
+ lines.Set_alpha_ofHighlighterForMostCurrentValue_xDim(newAlpha);
+ }
+
+ public void Set_alpha_ofHighlighterForMostCurrentValue_yDim(float newAlpha)
+ {
+ //overwrites the alpha_ofHighlighterForMostCurrentValue_yDim for all lines of the chart. If you want to specificy different alpha_ofHighlighterForMostCurrentValue_yDim for each line you can directly set chartLine.alpha_ofHighlighterForMostCurrentValue_yDim
+ lines.Set_alpha_ofHighlighterForMostCurrentValue_yDim(newAlpha);
+ }
+
+ public void Set_displayDeltaAtHighlighterForMostCurrentValue(bool doDisplay)
+ {
+ //overwrites the displayDeltaAtHighlighterForMostCurrentValue for all lines of the chart. If you want to specificy different displayDeltaAtHighlighterForMostCurrentValue for each line you can directly set chartLine.displayDeltaAtHighlighterForMostCurrentValue
+ lines.Set_displayDeltaAtHighlighterForMostCurrentValue(doDisplay);
+ }
+
+ public void Set_alpha_ofMaxiumumYValueMarker(float newAlpha)
+ {
+ //overwrites the alpha_ofMaxiumumYValueMarker for all lines of the chart. If you want to specificy different alpha_ofMaxiumumYValueMarker for each line you can directly set chartLine.alpha_ofMaxiumumYValueMarker
+ lines.Set_alpha_ofMaxiumumYValueMarker(newAlpha);
+ }
+
+ public void Set_alpha_ofMinimumYValueMarker(float newAlpha)
+ {
+ //overwrites the alpha_ofMinimumYValueMarker for all lines of the chart. If you want to specificy different alpha_ofMinimumYValueMarker for each line you can directly set chartLine.alpha_ofMinimumYValueMarker
+ lines.Set_alpha_ofMinimumYValueMarker(newAlpha);
+ }
+
+ public void Set_markAllYMaximumTurningPoints(bool markEnabled)
+ {
+ //overwrites the markAllYMaximumTurningPoints for all lines of the chart. If you want to specificy different markAllYMaximumTurningPoints for each line you can directly set chartLine.markAllYMaximumTurningPoints
+ lines.Set_markAllYMaximumTurningPoints(markEnabled);
+ }
+
+ public void Set_markAllYMinimumTurningPoints(bool markEnabled)
+ {
+ //overwrites the markAllYMinimumTurningPoints for all lines of the chart. If you want to specificy different markAllYMinimumTurningPoints for each line you can directly set chartLine.markAllYMinimumTurningPoints
+ lines.Set_markAllYMinimumTurningPoints(markEnabled);
+ }
+
+ public void Set_SizeOfPoints_relToChartHeight(float newRelSize)
+ {
+ //overwrites the SizeOfPoints_relToChartHeight for all lines of the chart. If you want to specificy different SizeOfPoints_relToChartHeight for each line you can directly set chartLine.SizeOfPoints_relToChartHeight
+ lines.Set_SizeOfPoints_relToChartHeight(newRelSize);
+ }
+
+ public void Set_lineWidth_relToChartHeight(float newRelSize)
+ {
+ //overwrites the lineWidth_relToChartHeight for all lines of the chart. If you want to specificy different lineWidth_relToChartHeight for each line you can directly set chartLine.lineWidth_relToChartHeight
+ lines.Set_lineWidth_relToChartHeight(newRelSize);
+ }
+
+ public void Set_pointVisualisationLineWidth_relToChartHeight(float newRelSize)
+ {
+ //overwrites the pointVisualisationLineWidth_relToChartHeight for all lines of the chart. If you want to specificy different pointVisualisationLineWidth_relToChartHeight for each line you can directly set chartLine.pointVisualisationLineWidth_relToChartHeight
+ lines.Set_pointVisualisationLineWidth_relToChartHeight(newRelSize);
+ }
+
+ public void SetAll_dataComponentsThatAreDrawn(DataComponentsThatAreDrawn newConfig)
+ {
+ //easy way of overwriting "dataComponentsThatAreDrawn" from another chart, without fiddling with single bool members.
+ dataComponentsThatAreDrawn.CopyValueFromOtherConfig(newConfig);
+ }
+
+ public Vector3 ChartSpace_to_WorldSpace(Vector2 positionInChartSpace)
+ {
+ //This is dependent on the axis scaling which can change dynamically. Therefore the returned value fits the axis scaling of the last "chartDrawing.Draw()"(<-link)-Call. If ""ChartDrawing.Draw()"(<-link)" hasn't been called at least once this will return faulty values.
+ float xPos_inUnwarpedUnscaledChartSpace = positionInChartSpace.x * xAxis.LengthConversionFactor_fromChartScaling_toWorldScaling;
+ float yPos_inUnwarpedUnscaledChartSpace = positionInChartSpace.y * yAxis.LengthConversionFactor_fromChartScaling_toWorldScaling;
+ return (posOfOriginOfChartSpace_inWorldSpace + xAxis.AxisVector_normalized_inWorldSpace * xPos_inUnwarpedUnscaledChartSpace + yAxis.AxisVector_normalized_inWorldSpace * yPos_inUnwarpedUnscaledChartSpace);
+ }
+
+ public bool IsInsideDrawnChartArea(Vector2 posToCheck_inChartUnits)
+ {
+ //if you want to check only one dimension you can use xAxis/yAxis.IsInsideDisplayedSpan
+ return IsInsideDrawnChartArea(posToCheck_inChartUnits.x, posToCheck_inChartUnits.y);
+ }
+
+ public bool IsInsideDrawnChartArea(float posToCheck_x_inChartUnits, float posToCheck_y_inChartUnits)
+ {
+ //if you want to check only one dimension you can use xAxis/yAxis.IsInsideDisplayedSpan
+ if (xAxis.IsInsideDisplayedSpan(posToCheck_x_inChartUnits))
+ {
+ if (yAxis.IsInsideDisplayedSpan(posToCheck_y_inChartUnits))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ void Create_pointsOfInterest_thatCommunicateTheHiddenPointsOfInterest()
+ {
+ float position_x = 0.0f; //-> is unused
+ float position_y = 0.0f; //-> is unused
+ Color color = default; //-> gets continuously overwritten
+ string textToDisplay = null; //-> gets continuously overwritten
+
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheLeftSide = new PointOfInterest(position_x, position_y, color, this, null, textToDisplay);
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheLeftSide.internal_isPOIthatCommunicatesTheHiddenPOIs = true;
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheLeftSide.isDeletedOnClear = false;
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheLeftSide.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheLeftSide.yValue.lineStyle = DrawBasics.LineStyle.invisible;
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheLeftSide.Internal_Set_isDrawnInNextPass(1); //-> this means: it will ALWAYS be drawn
+
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheRightSide = new PointOfInterest(position_x, position_y, color, this, null, textToDisplay);
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheRightSide.internal_isPOIthatCommunicatesTheHiddenPOIs = true;
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheRightSide.isDeletedOnClear = false;
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheRightSide.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheRightSide.yValue.lineStyle = DrawBasics.LineStyle.invisible;
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheRightSide.Internal_Set_isDrawnInNextPass(1); //-> this means: it will ALWAYS be drawn
+ }
+
+ public void AddPointOfInterest(PointOfInterest newPointOfInterest)
+ {
+ newPointOfInterest.chart_thisPointIsPartOf = this;
+ pointsOfInterest.Add(newPointOfInterest);
+ }
+
+ public PointOfInterest AddPointOfInterest(Vector2 position, string textToDisplay = null, DrawBasics.LineStyle horizLinestyle = DrawBasics.LineStyle.invisible, DrawBasics.LineStyle vertLinestyle = DrawBasics.LineStyle.invisible, float alphaOfColor_relToChartColor = 1.0f, bool getsDeletedOnClear = true)
+ {
+ return AddPointOfInterest(position.x, position.y, textToDisplay, horizLinestyle, vertLinestyle, alphaOfColor_relToChartColor, getsDeletedOnClear);
+ }
+
+ public PointOfInterest AddPointOfInterest(float position_x, float position_y, string textToDisplay = null, DrawBasics.LineStyle horizLinestyle = DrawBasics.LineStyle.invisible, DrawBasics.LineStyle vertLinestyle = DrawBasics.LineStyle.invisible, float alphaOfColor_relToChartColor = 1.0f, bool getsDeletedOnClear = true)
+ {
+ //the function returns the new point of interest, so it can then accessed and be further modified.
+ //if no text is appointed then invisible horizontal und vertical lines will automatically be forced to solid line (otherwise the point would not be visible.)
+
+ if (textToDisplay == null || textToDisplay == "")
+ {
+ if (horizLinestyle == DrawBasics.LineStyle.invisible) { horizLinestyle = DrawBasics.LineStyle.solid; }
+ if (vertLinestyle == DrawBasics.LineStyle.invisible) { vertLinestyle = DrawBasics.LineStyle.solid; }
+ }
+
+ Color colorOfPoint = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, alphaOfColor_relToChartColor);
+ PointOfInterest newPointOfInterest = new PointOfInterest(position_x, position_y, colorOfPoint, this, null, textToDisplay);
+ newPointOfInterest.isDeletedOnClear = getsDeletedOnClear;
+ newPointOfInterest.xValue.lineStyle = vertLinestyle;
+ newPointOfInterest.yValue.lineStyle = horizLinestyle;
+ pointsOfInterest.Add(newPointOfInterest);
+ return newPointOfInterest;
+ }
+
+ void DeletePointsOfInterestOnClear()
+ {
+ for (int i = pointsOfInterest.Count - 1; i >= 0; i--)
+ {
+ if (pointsOfInterest[i].isDeletedOnClear)
+ {
+ pointsOfInterest.RemoveAt(i);
+ }
+ }
+ }
+
+ int stillAvailableTextBoxes_inUpperLeftCorner_duringPreviousDrawRun = 0;
+ void DrawPointsOfInterest(float durationInSec, bool hiddenByNearerObjects)
+ {
+ if (isEmptyWithNoLinesToDraw == false)
+ {
+ float yHeightFacor_forColumnStartPos = 1.05f;
+
+ //Points that are attached to the chart:
+ UtilitiesDXXL_Math.SkewedDirection cornerOfChartWhereTextBoxIsMounted = UtilitiesDXXL_Math.SkewedDirection.upLeft;
+ Vector3 next_lowAnchorPositionOfText_inWorldspace = Position_worldspace + yAxis.AxisVector_inWorldSpace * yHeightFacor_forColumnStartPos + xAxis.AxisVector_inWorldSpace * 0.0f;
+
+ int stillAvailableTextBoxes_inUpperLeftCorner = MaxDisplayedPointOfInterestTextBoxesPerSide;
+ for (int i = pointsOfInterest.Count - 1; i >= 0; i--) //-> counting DOWNWARD means: only the NEWEST textBoxes get drawn
+ {
+ stillAvailableTextBoxes_inUpperLeftCorner = pointsOfInterest[i].Internal_Set_isDrawnInNextPass(stillAvailableTextBoxes_inUpperLeftCorner);
+ }
+
+ if (stillAvailableTextBoxes_inUpperLeftCorner < 0)
+ {
+ //-> draw this "hiddenTextBoxes-communicating-textBox" BEFORE(=BELOW) the other textBoxes, so that it appears as the "oldest" text box: newer text boxes will be drawn higher than this
+ if (stillAvailableTextBoxes_inUpperLeftCorner != stillAvailableTextBoxes_inUpperLeftCorner_duringPreviousDrawRun) //-> saving GC.alloc by only recreating the text when something changes
+ {
+ if (stillAvailableTextBoxes_inUpperLeftCorner == (-1))
+ {
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheLeftSide.text = "...and 1 more hidden older text box.
See also 'ChartDrawing.maxDisplayedPointOfInterestTextBoxesPerSide'.";
+ }
+ else
+ {
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheLeftSide.text = "...and " + (-stillAvailableTextBoxes_inUpperLeftCorner) + " more hidden older text boxes.
See also 'ChartDrawing.maxDisplayedPointOfInterestTextBoxesPerSide'.";
+ }
+ }
+ stillAvailableTextBoxes_inUpperLeftCorner_duringPreviousDrawRun = stillAvailableTextBoxes_inUpperLeftCorner;
+ pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheLeftSide.colorOfPointerTextBox = color;
+ next_lowAnchorPositionOfText_inWorldspace = pointOfInterest_thatCommunicatesTheHiddenPointsOfInterest_onTheLeftSide.TryDraw(next_lowAnchorPositionOfText_inWorldspace, cornerOfChartWhereTextBoxIsMounted, durationInSec, hiddenByNearerObjects);
+ }
+
+ for (int i = 0; i < pointsOfInterest.Count; i++) //-> counting UPWARD for PointOfInterestBoxes on the upperLeftSide produced less pointer crossings in most cases. Though this has the disadvantage, that the "newest/oldest"-ordering is the other way round than the PointOfInterestBoxes on the upperLeftSide.
+ {
+ next_lowAnchorPositionOfText_inWorldspace = pointsOfInterest[i].TryDraw(next_lowAnchorPositionOfText_inWorldspace, cornerOfChartWhereTextBoxIsMounted, durationInSec, hiddenByNearerObjects);
+ }
+
+ //Points that are attached to single lines:
+ lines.DrawPointsOfInterest(yHeightFacor_forColumnStartPos, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public PointOfInterest AddFixedHorizLine(float yPosition, string textLabel = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.dashed, float alphaOfColor_relToParent = 0.75f)
+ {
+ //the function returns the horizontal line as pointOfInterest, so it can then accessed and be further modified.
+ //if you additionally want to display the intersectionPoints of the line with this horizonal line you can use "__" instead.
+
+ Color colorOfLine = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, alphaOfColor_relToParent);
+ PointOfInterest newPointOfInterest = new PointOfInterest(0.0f, yPosition, colorOfLine, this, null, null);
+ newPointOfInterest.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ newPointOfInterest.yValue.lineStyle = style;
+ newPointOfInterest.yValue.labelText = textLabel;
+ newPointOfInterest.yValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.throughWholeChart_alsoIfOtherDimensionsValueIsOutsideChart;
+ newPointOfInterest.isDeletedOnClear = false;
+ pointsOfInterest.Add(newPointOfInterest);
+ return newPointOfInterest;
+ }
+
+ public PointOfInterest AddFixedHorizLine_withPointer(float yPosition, string textInPointerBox, string textAtLine = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float alphaOfLineColor_relToParent = 0.75f)
+ {
+ //the function returns the horizontal line as pointOfInterest , so it can then accessed and be further modified.
+ //if you additionally want to display the intersectionPoints of the line with this horizonal line you can use "AddHorizontalThresholdLine" instead.
+
+ Color colorOfLine = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, alphaOfLineColor_relToParent);
+ PointOfInterest newPointOfInterest = new PointOfInterest(float.NaN, yPosition, colorOfLine, this, null, textInPointerBox);
+ newPointOfInterest.colorOfPointerTextBox = color;
+ newPointOfInterest.drawTextBoxIfPointIsOutsideOfChartArea = true;
+ newPointOfInterest.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ newPointOfInterest.yValue.lineStyle = style;
+ newPointOfInterest.yValue.labelText = textAtLine;
+ newPointOfInterest.yValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.throughWholeChart_alsoIfOtherDimensionsValueIsOutsideChart;
+ newPointOfInterest.isDeletedOnClear = false;
+ newPointOfInterest.forceColorOfParent = false;
+ pointsOfInterest.Add(newPointOfInterest);
+ return newPointOfInterest;
+ }
+
+
+ public PointOfInterest AddFixedVertLine(float xPosition, string textLabel = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.dashed, float alphaOfColor_relToParent = 0.75f)
+ {
+ //the function returns the vertical line as pointOfInterest, so it can then accessed and be further modified.
+ Color colorOfLine = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, alphaOfColor_relToParent);
+ PointOfInterest newPointOfInterest = new PointOfInterest(xPosition, 0.0f, colorOfLine, this, null, null);
+ newPointOfInterest.xValue.lineStyle = style;
+ newPointOfInterest.xValue.labelText = textLabel;
+ newPointOfInterest.xValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.throughWholeChart_alsoIfOtherDimensionsValueIsOutsideChart;
+ newPointOfInterest.yValue.lineStyle = DrawBasics.LineStyle.invisible;
+ newPointOfInterest.isDeletedOnClear = false;
+ pointsOfInterest.Add(newPointOfInterest);
+ return newPointOfInterest;
+ }
+
+ public PointOfInterest AddFixedVertLine_withPointer(float xPosition, string textInPointerBox, string textAtLine = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float alphaOfLineColor_relToParent = 0.75f)
+ {
+ //the function returns the vertical line as pointOfInterest, so it can then accessed and be further modified.
+ Color colorOfLine = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, alphaOfLineColor_relToParent);
+ PointOfInterest newPointOfInterest = new PointOfInterest(xPosition, float.NaN, colorOfLine, this, null, textInPointerBox);
+ newPointOfInterest.colorOfPointerTextBox = color;
+ newPointOfInterest.drawTextBoxIfPointIsOutsideOfChartArea = true;
+ newPointOfInterest.xValue.lineStyle = style;
+ newPointOfInterest.xValue.labelText = textAtLine;
+ newPointOfInterest.xValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.throughWholeChart_alsoIfOtherDimensionsValueIsOutsideChart;
+ newPointOfInterest.yValue.lineStyle = DrawBasics.LineStyle.invisible;
+ newPointOfInterest.isDeletedOnClear = false;
+ newPointOfInterest.forceColorOfParent = false;
+ pointsOfInterest.Add(newPointOfInterest);
+ return newPointOfInterest;
+ }
+
+ public PointOfInterest AddFixedCrossOFHorizAndVertLine(Vector2 position, string textLabel_onHorizLine = null, string textLabel_onVertLine = null, string textLabel_forPointerBox = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float alphaOfColor_relToParent = 0.75f)
+ {
+ //the function returns the line cross as pointOfInterest, so it can then accessed and be further modified.
+ return AddFixedCrossOFHorizAndVertLine(position.x, position.y, textLabel_onHorizLine, textLabel_onVertLine, textLabel_forPointerBox, style, alphaOfColor_relToParent);
+ }
+
+ public PointOfInterest AddFixedCrossOFHorizAndVertLine(float xPosition, float yPosition, string textLabel_onHorizLine = null, string textLabel_onVertLine = null, string textLabel_forPointerBox = null, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, float alphaOfColor_relToParent = 0.75f)
+ {
+ //the function returns the line cross as pointOfInterest, so it can then accessed and be further modified.
+ Color colorOfLine = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(color, alphaOfColor_relToParent);
+ PointOfInterest newPointOfInterest = new PointOfInterest(xPosition, yPosition, colorOfLine, this, null, textLabel_forPointerBox);
+ newPointOfInterest.xValue.lineStyle = style;
+ newPointOfInterest.yValue.lineStyle = style;
+ newPointOfInterest.xValue.labelText = textLabel_onVertLine;
+ newPointOfInterest.yValue.labelText = textLabel_onHorizLine;
+ newPointOfInterest.xValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.throughWholeChart_alsoIfOtherDimensionsValueIsOutsideChart;
+ newPointOfInterest.yValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.throughWholeChart_alsoIfOtherDimensionsValueIsOutsideChart;
+ newPointOfInterest.isDeletedOnClear = false;
+ pointsOfInterest.Add(newPointOfInterest);
+ return newPointOfInterest;
+ }
+
+ public void AddHorizontalThresholdLine(float yPosition, bool lineItselfCountsToLowerArea = false, Color colorOfHorizLine = default(Color))
+ {
+ //if you want to add the threshold to only a single line you can use the "AddHorizontalThresholdLine"-version in "chartline"
+ //If you don't want to see the intersection points and only want to draw a horizontal line that doesn't do anything you can use 'AddFixedHorizLine' instead.
+ //"colorOfHorizLine": supply this if the color should deviate from the charts color
+ //"lineItselfCountsToLowerArea" determines if it counts as an intersection if the line doesn't cross the threshold but runs exactly onto it.
+
+ if (UtilitiesDXXL_Math.FloatIsInvalid(yPosition))
+ {
+ Debug.LogError("Cannot create threshold line at " + yPosition);
+ return;
+ }
+
+ if (UtilitiesDXXL_Colors.IsDefaultColor(colorOfHorizLine))
+ {
+ colorOfHorizLine = UtilitiesDXXL_Colors.GetSimilarColorWithSlightlyOtherBrightnessValue(color);
+ }
+
+ PointOfInterest pointOfInterst_visualizingTheHorizThresholdLine = new PointOfInterest(0.0f, yPosition, colorOfHorizLine, this, null, null);
+ pointOfInterst_visualizingTheHorizThresholdLine.isDeletedOnClear = false;
+ pointOfInterst_visualizingTheHorizThresholdLine.forceColorOfParent = false;
+ pointOfInterst_visualizingTheHorizThresholdLine.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ pointOfInterst_visualizingTheHorizThresholdLine.yValue.lineStyle = DrawBasics.LineStyle.solid;
+ pointOfInterst_visualizingTheHorizThresholdLine.yValue.labelText = "Threshold";
+ pointOfInterst_visualizingTheHorizThresholdLine.yValue.drawCoordinateAsText = true;
+ pointOfInterst_visualizingTheHorizThresholdLine.yValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.throughWholeChart_alsoIfOtherDimensionsValueIsOutsideChart;
+ pointsOfInterest.Add(pointOfInterst_visualizingTheHorizThresholdLine);
+
+ lines.AddHorizontalThresholdToEachLine(yPosition, lineItselfCountsToLowerArea);
+ }
+
+ void DrawChartName(float durationInSec, bool hiddenByNearerObjects)
+ {
+ if (name != null && name != "")
+ {
+ float textSize = xAxis.Length_inWorldSpace * 0.04f * scaleFactor_forChartNameTextSize;
+ Vector3 position = Position_worldspace + 0.5f * xAxis.AxisVector_inWorldSpace + yAxis.AxisVector_normalized_inWorldSpace * (yAxis.Length_inWorldSpace * 1.035f + textSize);
+ float enclosingBox_paddingSize_relToTextSize = 0.5f;
+ float autoLineBreakWidth = 0.65f * xAxis.Length_inWorldSpace;
+ UtilitiesDXXL_Text.WriteFramed(name, position, color, textSize, internalRotation, DrawText.TextAnchorDXXL.LowerCenter, DrawBasics.LineStyle.solid, 0.0f, enclosingBox_paddingSize_relToTextSize, 0.0f, 0.0f, autoLineBreakWidth, autoFlipAllText_toFitObsererCamera, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ void TryDrawFallbackForEmptyChart(float durationInSec, bool hiddenByNearerObjects)
+ {
+ if (isEmptyWithNoLinesToDraw)
+ {
+ string text = " This chart doesn't contain
any data to draw."; //-> the two spaces are intentional
+ float textSize = 1.0f; //->not relevant, because textsize gets forced by "forceTextEnlargementToThisMinWidth" respectively "forceRestrictTextSizeToThisMaxTextWidth"
+ DrawText.TextAnchorDXXL textAnchor = DrawText.TextAnchorDXXL.LowerLeft;
+ float forceTextEnlargementToThisMinWidth = Width_inWorldSpace;
+ float forceRestrictTextSizeToThisMaxTextWidth = forceTextEnlargementToThisMinWidth;
+ UtilitiesDXXL_Text.WriteFramed(text, Position_worldspace, color, textSize, internalRotation, textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, forceTextEnlargementToThisMinWidth, forceRestrictTextSizeToThisMaxTextWidth, 0.0f, autoFlipAllText_toFitObsererCamera, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ public void DrawWarningForMaxLinesPerFrame()
+ {
+ string warningText = "
Max lines exceeded
(see log)";
+ float textSize = 1.0f; //gets forced to fit chart width
+ float forceTextEnlargementToThisMinWidth = Width_inWorldSpace;
+ float forceRestrictTextSizeToThisMaxTextWidth = Width_inWorldSpace;
+ UtilitiesDXXL_Text.WriteFramed(warningText, Position_worldspace, color, textSize, internalRotation, DrawText.TextAnchorDXXL.LowerLeft, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, forceTextEnlargementToThisMinWidth, forceRestrictTextSizeToThisMaxTextWidth, 0.0f, autoFlipAllText_toFitObsererCamera, 0.0f, false);
+ }
+
+ void ResetOverallMinMaxValues()
+ {
+ overallMinXValue_includingHiddenLines = float.NaN;
+ overallMaxXValue_includingHiddenLines = float.NaN;
+ overallMinYValue_includingHiddenLines = float.NaN;
+ overallMaxYValue_includingHiddenLines = float.NaN;
+ }
+#if UNITY_EDITOR
+ GameObject chartInspector_gameObject = null;
+#endif
+ public DrawXXLChartInspector chartInspector_component = null;
+ public void CreateChartInspectionGameobject(bool freezeAxesInMomentOfInspectorCreation = false, bool setSceneViewCamToChart = false, bool setChartGameobjectToTheTopOfTheHierarchy = false, bool autoSelectCreatedChartInInspector = false)
+ {
+#if UNITY_EDITOR
+ if (chartInspector_gameObject == null)
+ {
+ Internal_CreateChartInspectionGameobject(freezeAxesInMomentOfInspectorCreation, setSceneViewCamToChart, autoSelectCreatedChartInInspector, setChartGameobjectToTheTopOfTheHierarchy);
+ }
+ else
+ {
+ if (chartInspector_component == null)
+ {
+ DrawXXLChartInspector[] allChartInspectorComponents_thatAreAttachedToTheGameObject = chartInspector_gameObject.GetComponents();
+ for (int i = 0; i < allChartInspectorComponents_thatAreAttachedToTheGameObject.Length; i++)
+ {
+ if (Application.isPlaying)
+ {
+ UnityEngine.Object.Destroy(allChartInspectorComponents_thatAreAttachedToTheGameObject[i]);
+ }
+ else
+ {
+ UnityEngine.Object.DestroyImmediate(allChartInspectorComponents_thatAreAttachedToTheGameObject[i]);
+ }
+ }
+ Internal_CreateChartInspectionGameobject(freezeAxesInMomentOfInspectorCreation, setSceneViewCamToChart, autoSelectCreatedChartInInspector, setChartGameobjectToTheTopOfTheHierarchy);
+ }
+ else
+ {
+ //Debug.Log("Calling 'CreateChartInspectionGameobject()' has no effect because there is already a chart inspection component.");
+ }
+ }
+#endif
+ }
+
+ void Internal_CreateChartInspectionGameobject(bool freezeAxes, bool setSceneViewCamToChart, bool autoSelectCreatedChartInInspector, bool setChartGameobjectToTheTopOfTheHierarchy)
+ {
+#if UNITY_EDITOR
+ xAxis.SetAxisScalingDuringInspectionComponentPhases(xAxis.ValueMarkingLowerEndOfTheAxis, xAxis.ValueMarkingUpperEndOfTheAxis);
+ yAxis.SetAxisScalingDuringInspectionComponentPhases(yAxis.ValueMarkingLowerEndOfTheAxis, yAxis.ValueMarkingUpperEndOfTheAxis);
+
+ string gameobjectName;
+ if (name == null || name == "")
+ {
+ gameobjectName = "Draw XXL Chart Inspector";
+ }
+ else
+ {
+ gameobjectName = "Chart: " + name + "";
+ }
+
+ if (chartInspector_gameObject == null)
+ {
+ chartInspector_gameObject = new GameObject(gameobjectName);
+ }
+
+ chartInspector_component = chartInspector_gameObject.AddComponent();
+ lines.InitInspectionViaComponent();
+
+ chartInspector_component.hasBeenManuallyCreated = false;
+ chartInspector_component.hasBeenCreatedOutsidePlaymode = !Application.isPlaying;
+ chartInspector_component.theChartIsDrawnInScreenspace = theMostCurrentChartDrawing_hasBeenMadeInScreenspace;
+ chartInspector_component.screenSpaceTargetCamera = cameraUsedByMostCurrentScreenspaceDrawing;
+ chartInspector_component.chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight = theMostCurrentScreenspaceDrawing_definedChartWidth_relToCamWidth;
+ chartInspector_component.nonScreenspaceDrawing_happensWith_drawConfigOf_hiddenByNearerObjects = theMostCurrentChartDrawing_wasDrawnWithConfigOf_hiddenByNearerObjects;
+ chartInspector_component.AssignChart(this);
+ chartInspector_component.curr_luminanceOfLineColors_accordingToSlider = LuminanceOfLineColors;
+ chartInspector_component.prev_luminanceOfLineColors_accordingToSlider = LuminanceOfLineColors;
+ chartInspector_component.prev_luminanceOfLineColors_accordingToChartSetting = LuminanceOfLineColors;
+ chartInspector_component.lineNamePositions = lines.GetAUsedLineNamePosition(false);
+ chartInspector_component.lineNames_sizeScaleFactor = lines.GetAUsedLineNameSizeSclaeFactor(false);
+
+ if (setSceneViewCamToChart && (chartInspector_component.theChartIsDrawnInScreenspace == false)) { chartInspector_component.TrySetSceneViewCamToChart_dueToButtonClick(); }
+ if (autoSelectCreatedChartInInspector) { UnityEditor.Selection.SetActiveObjectWithContext(chartInspector_gameObject, UnityEditor.Selection.activeContext); }
+ if (setChartGameobjectToTheTopOfTheHierarchy) { chartInspector_gameObject.transform.SetAsFirstSibling(); }
+ if (freezeAxes == false) { chartInspector_component.alwaysEncapsulateAllValues = true; }
+#endif
+ }
+
+ public void ExportToCSVfile(string fileName = null)
+ {
+ if (chartToCSVfileWriter == null) { chartToCSVfileWriter = new InternalDXXL_ChartToCSVfileWriter(); }
+ chartToCSVfileWriter.ExportToCSVfile(lines, fileName);
+ }
+
+ public Vector3 GetCenterPos()
+ {
+ //returns the center position of the chart (in worldspace) as opposed to the low left origin which "Position_worldspace" returns.
+ return (Position_worldspace + 0.5f * (xAxis.AxisVector_inWorldSpace + yAxis.AxisVector_inWorldSpace));
+ }
+
+ public float GetDiagonalSize()
+ {
+ return (xAxis.AxisVector_inWorldSpace + yAxis.AxisVector_inWorldSpace).magnitude;
+ }
+
+ public Vector3 Get_unified45degAxis_forHandleSliders_normalized()
+ {
+ return (-(xAxis.AxisVector_normalized_inWorldSpace + yAxis.AxisVector_normalized_inWorldSpace) * UtilitiesDXXL_Math.inverseSqrtOf2_precalced);
+ }
+
+ public float Get_unified45degAxis_length()
+ {
+ return 3.6f * xAxis.Get_fixedConeLength_forBothAxisVectors();
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/charts/line charts/ChartDrawing.cs.meta b/Runtime/DrawDebugLibrary/charts/line charts/ChartDrawing.cs.meta
new file mode 100644
index 0000000..09c9dc4
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/charts/line charts/ChartDrawing.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: afc487da656a5634dac1e97c4355dec4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/charts/line charts/ChartLine.cs b/Runtime/DrawDebugLibrary/charts/line charts/ChartLine.cs
new file mode 100644
index 0000000..f2fcd0d
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/charts/line charts/ChartLine.cs
@@ -0,0 +1,1444 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System.Collections.Generic;
+
+ public class ChartLine
+ {
+ public enum LineConnectionsType { straightFromPointToPoint, horizPlateauTillNextPoint, invisible }
+ public enum DataPointVisualization
+ {
+ invisible,
+ cross,
+ cross45deg,
+ square,
+ squareCrossed,
+ triangle,
+ triangleCrossed,
+ pentagon,
+ pentagonCrossed,
+ circle,
+ circleFilled,
+ star4corners,
+ star4CornersCrossed,
+ star5corners,
+ star5CornersCrossed,
+ heart,
+ customIconSymbol
+ }
+
+ public enum NamePosition
+ {
+ dynamicallyMoving_atLineEnd_towardsRight,
+ dynamicallyMoving_atLineEnd_towardsLeft,
+ dynamic_atLowestLinePos,
+ dynamic_atHighestLinePos,
+ fixedPosAtRight_outsideOfChart,
+ fixedPosAtRight_insideChart,
+ fixedPosAtLeft_insideChart
+ }
+
+ public InternalDXXL_LineSpecsForChartInspector lineSpecsForInspector;
+
+ public LineConnectionsType lineConnectionsType //if you want to set the lineConnectionsType for all lines of the chart at once you can use chartDrawing.SetLineConnectionsType
+ {
+ get { return lineSpecsForInspector.connectionsType; }
+ set { lineSpecsForInspector.connectionsType = value; }
+ }
+
+ public DataPointVisualization dataPointVisualization //if you want to set the dataPointVisualization for all lines of the chart at once you can use chartDrawing.SetDataPointVisualization
+ {
+ get { return lineSpecsForInspector.dataPointVisualization; }
+ set { lineSpecsForInspector.dataPointVisualization = value; }
+ }
+
+ public NamePosition namePosition; //if you want to set the namePosition for all lines of the chart at once you can use chartDrawing.SetLineNamesPosition.
+ private float nameText_sizeScaleFactor; //default is 1
+ public float NameText_sizeScaleFactor
+ {
+ get { return nameText_sizeScaleFactor; }
+ set { nameText_sizeScaleFactor = Mathf.Max(0.01f, value); }
+ }
+
+ public float alpha_ofHighlighterForMostCurrentValue_xDim;//if you want to set the alpha_ofHighlighterForMostCurrentValue_xDim for all lines of the chart at once you can use chartDrawing.Set_alpha_ofHighlighterForMostCurrentValue_xDim. With this you can set the intensity or toggle on and off the vertical line that highlights the x position of the most current value. 0 disables the highlighting. If the value was added using "AddValues_eachIndexIsALine" then the highlighting lines are only displayed if "chart.displayHighlightingOfMostCurrentValues_forLinesFromLists" has to been set to "true".
+ public float alpha_ofHighlighterForMostCurrentValue_yDim;//if you want to set the alpha_ofHighlighterForMostCurrentValue_yDim for all lines of the chart at once you can use chartDrawing.Set_alpha_ofHighlighterForMostCurrentValue_yDim. With this you can set the intensity or toggle on and off the horizontal line that highlights the y position of the most current value. 0 disables the highlighting. If the value was added using "AddValues_eachIndexIsALine" then the highlighting lines are only displayed if "chart.displayHighlightingOfMostCurrentValues_forLinesFromLists" has to been set to "true".
+ public bool displayDeltaAtHighlighterForMostCurrentValue;//if you want to set the displayDeltaAtHighlighterForMostCurrentValue for all lines of the chart at once you can use chartDrawing.Set_displayDeltaAtHighlighterForMostCurrentValue.
+ public float alpha_ofMaxiumumYValueMarker;//if you want to set the alpha_ofMaxiumumYValueMarker for all lines of the chart at once you can use chartDrawing.Set_alpha_ofMaxiumumYValueMarker. 0 means disabled. default is 0,3. Displays only turning points, so it is not displayed when the first or the most current value is the maximum value. If you want to highlight not just the highest, but all upper turning points you can use "markAllYMaximumTurningPoints". Can be easily set for all lines from lists via "chartDrawing.Set_alphaOfMaxiumumYValueMarker_forLinesFromLists"
+ public float alpha_ofMinimumYValueMarker;//if you want to set the alpha_ofMinimumYValueMarker for all lines of the chart at once you can use chartDrawing.Set_alpha_ofMinimumYValueMarker. 0 means disabled. default is 0,3. Displays only turning points, so it is not displayed when the first or the most current value is the maximum value. If you want to highlight not just the lowest, but all lower turning points you can use "markAllYMinimumTurningPoints". Can be easily set for all lines from lists via "chartDrawing.Set_alphaOfMinimumYValueMarker_forLinesFromLists"
+ public bool markAllYMaximumTurningPoints;//if you want to set the markAllYMaximumTurningPoints for all lines of the chart at once you can use chartDrawing.Set_markAllYMaximumTurningPoints. default is false. Displays only turning points, so it is not displayed when the most current value is the maximum value. If you want to highlight only the single highest point of all and not every turning point you can use "alpha_ofMaxiumumYValueMarker". The points are displayed with the alpha specified by "alpha_ofMaximumYValueMarker" and will not be visible if this value is 0. Can be easily set for all lines from lists via "chartDrawing.Set_markAllYMaximumTurningPoints_forLinesFromLists"
+ public bool markAllYMinimumTurningPoints;//if you want to set the markAllYMinimumTurningPoints for all lines of the chart at once you can use chartDrawing.Set_markAllYMinimumTurningPoints. default is false. Displays only turning points, so it is not displayed when the most current value is the maximum value. If you want to highlight only the single lowest point of all and not every turning point you can use "alpha_ofMinimumYValueMarker". The points are displayed with the alpha specified by "alpha_ofMinimumYValueMarker" and will not be visible if this value is 0. Can be easily set for all lines from lists via "chartDrawing.Set_markAllYMinimumTurningPoints_forLinesFromLists"
+ public DrawBasics.IconType customIconAsDatapointVisualization = DrawBasics.IconType.car;
+
+ public bool Hide
+ {
+ get { return lineSpecsForInspector.currentHideLineState; }
+ set { lineSpecsForInspector.currentHideLineState = value; }
+ }
+
+ public Color Color
+ {
+ get { return lineSpecsForInspector.lineColor; }
+ set { lineSpecsForInspector.lineColor = value; }
+ }
+
+ private string name = null;
+ public string Name //you can use rich text markups inside the name string, so the line name display can e.g. be bold, magnified in size or contain icons.
+ {
+ get { return name; }
+ set
+ {
+ name = value;
+ lineSpecsForInspector.linesCompoundName = GetNameCompound(InternalDXXL_LineSpecsForChartInspector.lineCompoundNames_haveSpaces_betweenTheNamePartConnectingMinus);
+ }
+ }
+
+ private string nameExtraInfo = null;
+ public string NameExtraInfo
+ {
+ get { return nameExtraInfo; }
+ set
+ {
+ nameExtraInfo = value;
+ lineSpecsForInspector.linesCompoundName = GetNameCompound(InternalDXXL_LineSpecsForChartInspector.lineCompoundNames_haveSpaces_betweenTheNamePartConnectingMinus);
+ }
+ }
+
+ public float Alpha_ofVerticalAreaFillLines //This specifies weather the area below the line should be colored. It can be used to resemble the look of a area chart or stacked area chart. It has also the advantage that makes it more obvious where in the line the actual data points are located. 1 Means full alpha and the area of latest line overdraws the area of the previous lines, so the overlapping area is filled with the color of the last drawn line. 0 means disabled. For values in between it can be seen if the area of seperate lines overlap, but the color differences are only sufficient for some color combinations. The value doesn't define the absolute alpha but the alpha relative to the alpha of the line color. If you want to set the alpha_ofVerticalFillAreaLines for all lines of the chart at once you can use chartDrawing.SetAlphaOfVerticalFillAreaLines.
+ {
+ get { return lineSpecsForInspector.alpha_ofVertFillLines; }
+ set { lineSpecsForInspector.alpha_ofVertFillLines = value; }
+ }
+
+ public float SizeOfPoints_relToChartHeight
+ {
+ //if you want to set the SizeOfPoints_relToChartHeight for all lines of the chart at once you can use chartDrawing.Set_SizeOfPoints_relToChartHeight
+ get { return lineSpecsForInspector.dataPointVisualization_size; }
+ set
+ {
+ float min = 0.001f;
+ if (value < min)
+ {
+ Debug.LogError("Setting 'SizeOfPoints_relToChartHeight' failed. It should be at least " + min + ". If you want to disable the point visualization then set 'dataPointVisualization' to 'invisible'.");
+ }
+ else
+ {
+ lineSpecsForInspector.dataPointVisualization_size = value;
+ }
+ }
+ }
+
+ public float LineWidth_relToChartHeight //if you want to set the lineWidth_relToChartHeight for all lines of the chart at once you can use chartDrawing.Set_lineWidth_relToChartHeight. default is 0. warning: raising this may consume many linesPerFrame.
+ {
+ get { return lineSpecsForInspector.lineWidth; }
+ set { lineSpecsForInspector.lineWidth = value; }
+ }
+
+ public float pointVisualisationLineWidth_relToChartHeight;//if you want to set the pointVisualisationLineWidth_relToChartHeight for all lines of the chart at once you can use chartDrawing.Set_pointVisualisationLineWidth_relToChartHeight. default is 0. warning: raising this may consume many linesPerFrame. Maybe a 'filled' DataPointVisualization choice already does the job.
+
+ private GameObject gameobject_thatThisLineCurrentlyRepresents = null;
+ public GameObject Gameobject_thatThisLineCurrentlyRepresents
+ {
+ get { return gameobject_thatThisLineCurrentlyRepresents; }
+ set { Debug.LogError("Setting 'Gameobject_thatThisLineCurrentlyRepresents' manually is not supported."); }
+ }
+
+ /// other:
+ public List dataPoints = new List();
+ List pointsOfInterest = new List();
+ List pointsOfInterest_fromIntersectionsWithHorizLines = new List();
+ List horizontalThresholdLines = new List();
+ PointOfInterest pointOfInterest_thatHighlightsTheMostCurrentValue;
+ public InternalDXXL_TurningPointDetector turningPointDetector;
+ public bool disableMinMaxYVisualizers_dueTo_lineRepresentsBoolValues = false; //Disables the display of "maximum y value" and "minimum y value", since for bools such a display doesn't have surplus value but only obscures the actual line.
+ public bool representsValuesFromAddedLists = false;
+ private bool allXValuesCameFromAutomaticSource;
+ public bool AllXValuesCameFromAutomaticSource
+ {
+ get { return allXValuesCameFromAutomaticSource; }
+ set { Debug.LogError("Setting 'AllXValuesCameFromAutomaticSource' manually is not supported."); }
+ }
+
+ private float highestYValue = float.NegativeInfinity;
+ private float lowestYValue = float.PositiveInfinity;
+ private float highestXValue = float.NegativeInfinity;
+ private float lowestXValue = float.PositiveInfinity;
+ public float HighestYValue
+ {
+ get { return highestYValue; }
+ set { Debug.LogError("Setting 'HighestYValue' manually is not supported. Did you mean 'yAxis.fixedUpperEndValueOfScale' instead? (which by the way works only with 'yAxis.scaling = fixed_absolute')"); }
+ }
+ public float LowestYValue
+ {
+ get { return lowestYValue; }
+ set { Debug.LogError("Setting 'LowestYValue' manually is not supported. Did you mean 'yAxis.fixedLowerEndValueOfScale' instead? (which by the way works only with 'yAxis.scaling = fixed_absolute')"); }
+ }
+ public float HighestXValue
+ {
+ get { return highestXValue; }
+ set { Debug.LogError("Setting 'HighestXValue' manually is not supported. Did you mean 'xAxis.fixedUpperEndValueOfScale' instead? (which by the way works only with 'xAxis.scaling = fixed_absolute')"); }
+ }
+ public float LowestXValue
+ {
+ get { return lowestXValue; }
+ set { Debug.LogError("Setting 'LowestXValue' manually is not supported. Did you mean 'xAxis.fixedLowerEndValueOfScale' instead? (which by the way works only with 'xAxis.scaling = fixed_absolute')"); }
+ }
+
+ private bool hasAtLeastOneValuePairOfValidData = false;
+ public bool HasAtLeastOneValuePairOfValidData
+ {
+ get { return hasAtLeastOneValuePairOfValidData; }
+ set { Debug.LogError("Setting 'HasAtLeastOneValuePairOfValidData' manually is not supported."); }
+ }
+
+ private ChartDrawing chart_thisLineIsPartOf;
+ public ChartDrawing Chart_thisLineIsPartOf
+ {
+ get { return chart_thisLineIsPartOf; }
+ set { Debug.LogError("Setting 'Chart_thisLineIsPartOf' manually is not supported."); }
+ }
+
+ UtilitiesDXXL_ChartLine.IsDrawnBecause_theSingleComponentOfMulticomponentData_thisLineRepresents_isEnabledChecker IsDrawnBecause_theSingleComponentOfMulticomponentData_thisLineRepresents_isEnabled = UtilitiesDXXL_ChartLine.DoDrawBecauseLineDoesntRepresentMultiComponentData;
+ float mostCurrentValidYValue = float.NaN;
+ float mostCurrentValidXValue = float.NaN;
+
+ public ChartLine(Color lineColor, ChartDrawing chart_thisLineIsPartOf)
+ {
+ this.chart_thisLineIsPartOf = chart_thisLineIsPartOf;
+
+ lineSpecsForInspector = new InternalDXXL_LineSpecsForChartInspector();
+ lineSpecsForInspector.lineColor = lineColor;
+ lineSpecsForInspector.line_theseSpecsBelongTo = this;
+ lineSpecsForInspector.currentHideLineState = false;
+ lineSpecsForInspector.connectionsType = chart_thisLineIsPartOf.default_lineConnectionsType;
+ lineSpecsForInspector.dataPointVisualization = chart_thisLineIsPartOf.default_dataPointVisualization;
+ lineSpecsForInspector.dataPointVisualization_size = chart_thisLineIsPartOf.default_SizeOfPoints_relToChartHeight;
+ lineSpecsForInspector.alpha_ofVertFillLines = chart_thisLineIsPartOf.default_alpha_ofVerticalAreaFillLines;
+ lineSpecsForInspector.lineWidth = chart_thisLineIsPartOf.default_lineWidth_relToChartHeight;
+
+ namePosition = chart_thisLineIsPartOf.default_lineNamePosition;
+ nameText_sizeScaleFactor = chart_thisLineIsPartOf.default_lineNameText_sizeScaleFactor;
+ alpha_ofHighlighterForMostCurrentValue_xDim = chart_thisLineIsPartOf.default_alpha_ofHighlighterForMostCurrentValue_xDim;
+ alpha_ofHighlighterForMostCurrentValue_yDim = chart_thisLineIsPartOf.default_alpha_ofHighlighterForMostCurrentValue_yDim;
+ displayDeltaAtHighlighterForMostCurrentValue = chart_thisLineIsPartOf.default_displayDeltaAtHighlighterForMostCurrentValue;
+ alpha_ofMaxiumumYValueMarker = chart_thisLineIsPartOf.default_alpha_ofMaxiumumYValueMarker;
+ alpha_ofMinimumYValueMarker = chart_thisLineIsPartOf.default_alpha_ofMinimumYValueMarker;
+ markAllYMaximumTurningPoints = chart_thisLineIsPartOf.default_markAllYMaximumTurningPoints;
+ markAllYMinimumTurningPoints = chart_thisLineIsPartOf.default_markAllYMinimumTurningPoints;
+ pointVisualisationLineWidth_relToChartHeight = chart_thisLineIsPartOf.default_pointVisualisationLineWidth_relToChartHeight;
+
+ allXValuesCameFromAutomaticSource = true;
+ pointOfInterest_thatHighlightsTheMostCurrentValue = CreatePointOfInterestThatHighlightsTheMostCurrentValue();
+ pointOfInterest_thatHighlightsTheMostCurrentValue.xValue.placeTextTowardsOutsideOfChart = true;
+ pointOfInterest_thatHighlightsTheMostCurrentValue.yValue.placeTextTowardsOutsideOfChart = true;
+ AddPointOfInterest(pointOfInterest_thatHighlightsTheMostCurrentValue);
+ turningPointDetector = new InternalDXXL_TurningPointDetector(this);
+ if (chart_thisLineIsPartOf.chartInspector_component != null) { InitInspectionViaComponent(); }
+ }
+
+ public void Clear()
+ {
+ //use ChartDrawing.Clear() instead
+ allXValuesCameFromAutomaticSource = true;
+ hasAtLeastOneValuePairOfValidData = false;
+ dataPoints.Clear();
+ highestYValue = float.NegativeInfinity;
+ lowestYValue = float.PositiveInfinity;
+ highestXValue = float.NegativeInfinity;
+ lowestXValue = float.PositiveInfinity;
+ mostCurrentValidYValue = float.NaN;
+ mostCurrentValidXValue = float.NaN;
+ gameobject_thatThisLineCurrentlyRepresents = null;
+ markNextNewlyCreatedPointWithEmphasizingCircle = false;
+ forceUpcomingNextCreatedConnectionLine_toLowAlpha = false;
+ DeletePointsOfInterestOnClear();
+ }
+
+ public bool Draw(InternalDXXL_Plane chartPlane, int numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn, float valueMarkingLowerEndOf_XAxis, float valueMarkingUpperEndOf_XAxis, float valueMarkingLowerEndOf_YAxis, float valueMarkingUpperEndOf_YAxis, float durationInSec, bool hiddenByNearerObjects)
+ {
+ //use ChartDrawing.Draw() instead
+
+ thePointsOfInterestOfThisLineArePartOfTheChart = false;
+ if (CheckIfLineIsDrawn())
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return (dataPoints.Count > 0); }
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = chart_thisLineIsPartOf;
+ SetIfVisualizationOfSpecialApexPointsIsDisplayed();
+ float absSizeOfPointVisualization_inWorldSpace = Mathf.Abs(chart_thisLineIsPartOf.Height_inWorldSpace * SizeOfPoints_relToChartHeight);
+ bool atLeastOneDatapointIsValid = false;
+ bool atLeastOneDrawnPointHasBeenFound = false;
+ int i_ofTheMostCurrentDrawnPoint = -1;
+ Vector3 mostRecentDrawnDataPoint_worldSpace = chart_thisLineIsPartOf.Position_worldspace;
+ Vector3 highestDrawnPoint_worldSpace = default;
+ Vector3 lowestDrawnPoint_worldSpace = default;
+ float heightOfHighestDrawnPoint_chartSpace = default;
+ float heightOfLowestDrawnPoint_chartSpace = default;
+ float absWidthOfConnectionLines_worldSpace = Get_absWidthOfConnectionLines_worldSpace();
+ float absWidthOfPointVisualisatorLines_worldSpace = Get_absWidthOfPointVisualisatorLines_worldSpace();
+ Vector3 amplitudeDir_forNonZeroWidthLines = Get_amplitudeDir_forNonZeroWidthLines(chartPlane);
+ bool thereHaveBeenValidPointsOutsideTheDrawnChartArea_sinceMostCurrentDrawnPoint = false;
+
+ for (int i = 0; i < dataPoints.Count; i++)
+ {
+ if (DXXLWrapperForUntiysBuildInDrawLines.CheckIfDrawingIsCurrentlySkipped()) { return (dataPoints.Count > 0); }
+ if (dataPoints[i].validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid) { atLeastOneDatapointIsValid = true; }
+
+ dataPoints[i].DetermineIfAndHowPointIsDrawn(valueMarkingLowerEndOf_XAxis, valueMarkingUpperEndOf_XAxis, valueMarkingLowerEndOf_YAxis, valueMarkingUpperEndOf_YAxis, i_ofTheMostCurrentDrawnPoint, thereHaveBeenValidPointsOutsideTheDrawnChartArea_sinceMostCurrentDrawnPoint);
+ if (dataPoints[i].isDrawn)
+ {
+ mostRecentDrawnDataPoint_worldSpace = dataPoints[i].positionInWorldSpace;
+ TryDrawConnectionLineFromPrecedingPoint(i, absWidthOfConnectionLines_worldSpace, amplitudeDir_forNonZeroWidthLines, durationInSec, hiddenByNearerObjects);
+ dataPoints[i].DrawPointVisualization(absSizeOfPointVisualization_inWorldSpace, absWidthOfConnectionLines_worldSpace, absWidthOfPointVisualisatorLines_worldSpace, amplitudeDir_forNonZeroWidthLines, durationInSec, hiddenByNearerObjects);
+ if (atLeastOneDrawnPointHasBeenFound == false)
+ {
+ highestDrawnPoint_worldSpace = dataPoints[i].positionInWorldSpace;
+ lowestDrawnPoint_worldSpace = dataPoints[i].positionInWorldSpace;
+ heightOfHighestDrawnPoint_chartSpace = dataPoints[i].yValue;
+ heightOfLowestDrawnPoint_chartSpace = dataPoints[i].yValue;
+ atLeastOneDrawnPointHasBeenFound = true;
+ }
+ else
+ {
+ if (dataPoints[i].yValue > heightOfHighestDrawnPoint_chartSpace)
+ {
+ highestDrawnPoint_worldSpace = dataPoints[i].positionInWorldSpace;
+ heightOfHighestDrawnPoint_chartSpace = dataPoints[i].yValue;
+ }
+
+ if (dataPoints[i].yValue < heightOfLowestDrawnPoint_chartSpace)
+ {
+ lowestDrawnPoint_worldSpace = dataPoints[i].positionInWorldSpace;
+ heightOfLowestDrawnPoint_chartSpace = dataPoints[i].yValue;
+ }
+ }
+ i_ofTheMostCurrentDrawnPoint = i;
+ thereHaveBeenValidPointsOutsideTheDrawnChartArea_sinceMostCurrentDrawnPoint = false;
+ }
+ else
+ {
+ if (dataPoints[i].validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid) { thereHaveBeenValidPointsOutsideTheDrawnChartArea_sinceMostCurrentDrawnPoint = true; } //-> current datapoint is valid, but not drawn (because it is outide of the drawn area)
+ }
+ }
+
+ bool lineHasAtLeastOneDatapoint_validOrInvalid = dataPoints.Count > 0;
+ thePointsOfInterestOfThisLineArePartOfTheChart = lineHasAtLeastOneDatapoint_validOrInvalid;
+ if (lineHasAtLeastOneDatapoint_validOrInvalid)
+ {
+ DrawNameAsText(!atLeastOneDatapointIsValid, atLeastOneDrawnPointHasBeenFound, numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn, mostRecentDrawnDataPoint_worldSpace, highestDrawnPoint_worldSpace, lowestDrawnPoint_worldSpace, absWidthOfConnectionLines_worldSpace, durationInSec, hiddenByNearerObjects);
+ }
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = null;
+ return lineHasAtLeastOneDatapoint_validOrInvalid;
+ }
+ else
+ {
+ //-> 'dataComponentsThatAreDrawn' or 'hide' has disabled this line from drawing
+ bool lineIsDrawn = false;
+ return lineIsDrawn;
+ }
+ }
+
+ void TryDrawConnectionLineFromPrecedingPoint(int i, float absWidthOfConnectionLines_worldSpace, Vector3 amplitudeDir_forNonZeroWidthLines, float durationInSec, bool hiddenByNearerObjects)
+ {
+ if (dataPoints[i].HasAPrecedingPointFromWhichLineCanBeDrawn())
+ {
+ Vector3 worldPos_ofPrecedingPointFromWhichLineCanBeDrawn = Get_worldPos_ofPrecedingPointFromWhichLineCanBeDrawn(i);
+ float yValue_ofPrecedingPointFromWhichLineCanBeDrawn_inChartSpace = Get_yValue_ofPrecedingPointFromWhichLineCanBeDrawn_inChartSpace(i);
+ bool lineFromPrecedingDrawnPoint_shouldBeLowerAlphaIndicatingAnInvalidPhase = CheckIf_lineFromPrecedingDrawnPoint_shouldBeLowerAlphaIndicatingAnInvalidPhase(i);
+ dataPoints[i].DrawConnectionLineFromPrecedingPoint(worldPos_ofPrecedingPointFromWhichLineCanBeDrawn, yValue_ofPrecedingPointFromWhichLineCanBeDrawn_inChartSpace, lineFromPrecedingDrawnPoint_shouldBeLowerAlphaIndicatingAnInvalidPhase, absWidthOfConnectionLines_worldSpace, amplitudeDir_forNonZeroWidthLines, durationInSec, hiddenByNearerObjects);
+ }
+ }
+ Vector3 Get_worldPos_ofPrecedingPointFromWhichLineCanBeDrawn(int i_ofPointForWhichToCheckThePrecedingDrawnOne)
+ {
+ return dataPoints[dataPoints[i_ofPointForWhichToCheckThePrecedingDrawnOne].i_ofPrecedingPointFromWhichLineCanBeDrawn].positionInWorldSpace;
+ }
+
+ float Get_yValue_ofPrecedingPointFromWhichLineCanBeDrawn_inChartSpace(int i_ofPointForWhichToCheckThePrecedingDrawnOne)
+ {
+ return dataPoints[dataPoints[i_ofPointForWhichToCheckThePrecedingDrawnOne].i_ofPrecedingPointFromWhichLineCanBeDrawn].yValue;
+
+ }
+ bool CheckIf_lineFromPrecedingDrawnPoint_shouldBeLowerAlphaIndicatingAnInvalidPhase(int i_ofPointForWhichToCheckThePrecedingDrawnOne)
+ {
+ if ((dataPoints[i_ofPointForWhichToCheckThePrecedingDrawnOne].i_ofPrecedingPointFromWhichLineCanBeDrawn + 1) == i_ofPointForWhichToCheckThePrecedingDrawnOne)
+ {
+ //the two valid points are direct neighbors:
+ return false;
+ }
+ else
+ {
+ //there is a gap of invalid points between the two valid points:
+ //(this happens because of invalid X slots of the inbetween points, in which case these invalid points are not even drawn as low alpha (despite if they were only invalid in their Y slot))
+ return true;
+ }
+ }
+
+ void DrawNameAsText(bool lineHasDatapointsButNoneOfThemIsValid, bool atLeastOneDrawnPointHasBeenFound, int numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn, Vector3 mostRecentDrawnDataPoint_worldSpace, Vector3 highestDrawnPoint_worldSpace, Vector3 lowestDrawnPoint_worldSpace, float absWidthOfConnectionLines_worldSpace, float durationInSec, bool hiddenByNearerObjects)
+ {
+ if (name == null || name == "")
+ {
+ if (nameExtraInfo != null && nameExtraInfo != "")
+ {
+ name = "[nameless line]";
+ }
+ }
+
+ if (name != null && name != "")
+ {
+ float textSize = 0.04f * chart_thisLineIsPartOf.Height_inWorldSpace * nameText_sizeScaleFactor;
+ Vector3 textPosition;
+ DrawText.TextAnchorDXXL textAnchor;
+ Vector3 extraTextPosition;
+ DrawText.TextAnchorDXXL extraTextAnchor;
+ Vector3 topRightPos_ofChart;
+
+ switch (namePosition)
+ {
+ case NamePosition.dynamicallyMoving_atLineEnd_towardsRight:
+ if (atLeastOneDrawnPointHasBeenFound)
+ {
+ textPosition = mostRecentDrawnDataPoint_worldSpace;
+ textAnchor = DrawText.TextAnchorDXXL.MiddleLeft;
+ DrawMainName(lineHasDatapointsButNoneOfThemIsValid, textPosition, textSize, textAnchor, durationInSec, hiddenByNearerObjects);
+ if (nameExtraInfo != null && nameExtraInfo != "")
+ {
+ extraTextPosition = textPosition + (DrawText.parsedTextSpecs.widthOfLongestLine + 0.16f * DrawText.parsedTextSpecs.sizeOfBiggestCharInFirstLine) * chart_thisLineIsPartOf.xAxis.AxisVector_normalized_inWorldSpace;
+ extraTextAnchor = DrawText.TextAnchorDXXL.UpperLeft;
+ DrawNameExtraInfo(extraTextPosition, extraTextAnchor, durationInSec, hiddenByNearerObjects); //relies on the preceding "DrawMainName" (due to using "DrawText.parsedTextSpecs")
+ }
+ }
+ else
+ {
+ DrawNames_for_fixedPosAtLeft_insideChart(lineHasDatapointsButNoneOfThemIsValid, textSize, numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn, durationInSec, hiddenByNearerObjects);
+ }
+ break;
+ case NamePosition.dynamicallyMoving_atLineEnd_towardsLeft:
+ if (atLeastOneDrawnPointHasBeenFound)
+ {
+ textPosition = mostRecentDrawnDataPoint_worldSpace;
+ textAnchor = DrawText.TextAnchorDXXL.MiddleRight;
+ DrawMainName(lineHasDatapointsButNoneOfThemIsValid, textPosition, textSize, textAnchor, durationInSec, hiddenByNearerObjects);
+ if (nameExtraInfo != null && nameExtraInfo != "")
+ {
+ extraTextPosition = textPosition - (DrawText.parsedTextSpecs.widthOfLongestLine + 0.16f * DrawText.parsedTextSpecs.sizeOfBiggestCharInFirstLine) * chart_thisLineIsPartOf.xAxis.AxisVector_normalized_inWorldSpace;
+ extraTextAnchor = DrawText.TextAnchorDXXL.UpperRight;
+ DrawNameExtraInfo(extraTextPosition, extraTextAnchor, durationInSec, hiddenByNearerObjects); //relies on the preceding "DrawMainName" (due to using "DrawText.parsedTextSpecs")
+ }
+ }
+ else
+ {
+ DrawNames_for_fixedPosAtLeft_insideChart(lineHasDatapointsButNoneOfThemIsValid, textSize, numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn, durationInSec, hiddenByNearerObjects);
+ }
+ break;
+ case NamePosition.dynamic_atLowestLinePos:
+ if (atLeastOneDrawnPointHasBeenFound)
+ {
+ textPosition = lowestDrawnPoint_worldSpace + chart_thisLineIsPartOf.yAxis.AxisVector_normalized_inWorldSpace * 0.5f * textSize - chart_thisLineIsPartOf.yAxis.AxisVector_normalized_inWorldSpace * (0.5f * absWidthOfConnectionLines_worldSpace);
+ textAnchor = DrawText.TextAnchorDXXL.UpperCenter;
+ DrawMainName(lineHasDatapointsButNoneOfThemIsValid, textPosition, textSize, textAnchor, durationInSec, hiddenByNearerObjects);
+ if (nameExtraInfo != null && nameExtraInfo != "")
+ {
+ extraTextPosition = textPosition + (0.5f * DrawText.parsedTextSpecs.widthOfLongestLine + 0.16f * DrawText.parsedTextSpecs.sizeOfBiggestCharInFirstLine) * chart_thisLineIsPartOf.xAxis.AxisVector_normalized_inWorldSpace - DrawText.parsedTextSpecs.sizeOfBiggestCharInFirstLine * UtilitiesDXXL_Text.relLineDistance * chart_thisLineIsPartOf.yAxis.AxisVector_normalized_inWorldSpace;
+ extraTextAnchor = DrawText.TextAnchorDXXL.LowerLeft;
+ DrawNameExtraInfo(extraTextPosition, extraTextAnchor, durationInSec, hiddenByNearerObjects); //relies on the preceding "DrawMainName" (due to using "DrawText.parsedTextSpecs")
+ }
+ }
+ else
+ {
+ DrawNames_for_fixedPosAtLeft_insideChart(lineHasDatapointsButNoneOfThemIsValid, textSize, numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn, durationInSec, hiddenByNearerObjects);
+ }
+ break;
+ case NamePosition.dynamic_atHighestLinePos:
+ if (atLeastOneDrawnPointHasBeenFound)
+ {
+ textPosition = highestDrawnPoint_worldSpace + chart_thisLineIsPartOf.yAxis.AxisVector_normalized_inWorldSpace * (0.5f * absWidthOfConnectionLines_worldSpace);
+ textAnchor = DrawText.TextAnchorDXXL.LowerCenter;
+ DrawMainName(lineHasDatapointsButNoneOfThemIsValid, textPosition, textSize, textAnchor, durationInSec, hiddenByNearerObjects);
+ if (nameExtraInfo != null && nameExtraInfo != "")
+ {
+ extraTextPosition = textPosition + (0.5f * DrawText.parsedTextSpecs.widthOfLongestLine + 0.16f * DrawText.parsedTextSpecs.sizeOfBiggestCharInFirstLine) * chart_thisLineIsPartOf.xAxis.AxisVector_normalized_inWorldSpace;
+ extraTextAnchor = DrawText.TextAnchorDXXL.LowerLeft;
+ DrawNameExtraInfo(extraTextPosition, extraTextAnchor, durationInSec, hiddenByNearerObjects); //relies on the preceding "DrawMainName" (due to using "DrawText.parsedTextSpecs")
+ }
+ }
+ else
+ {
+ DrawNames_for_fixedPosAtLeft_insideChart(lineHasDatapointsButNoneOfThemIsValid, textSize, numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn, durationInSec, hiddenByNearerObjects);
+ }
+ break;
+ case NamePosition.fixedPosAtRight_outsideOfChart:
+ topRightPos_ofChart = chart_thisLineIsPartOf.Position_worldspace + chart_thisLineIsPartOf.xAxis.AxisVector_inWorldSpace + chart_thisLineIsPartOf.yAxis.AxisVector_inWorldSpace;
+ textPosition = topRightPos_ofChart - chart_thisLineIsPartOf.yAxis.AxisVector_normalized_inWorldSpace * 1.75f * textSize * numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn;
+ textAnchor = DrawText.TextAnchorDXXL.MiddleLeft;
+ DrawMainName(lineHasDatapointsButNoneOfThemIsValid, textPosition, textSize, textAnchor, durationInSec, hiddenByNearerObjects);
+ if (nameExtraInfo != null && nameExtraInfo != "")
+ {
+ extraTextPosition = textPosition + (DrawText.parsedTextSpecs.widthOfLongestLine + 0.16f * DrawText.parsedTextSpecs.sizeOfBiggestCharInFirstLine) * chart_thisLineIsPartOf.xAxis.AxisVector_normalized_inWorldSpace;
+ extraTextAnchor = DrawText.TextAnchorDXXL.UpperLeft;
+ DrawNameExtraInfo(extraTextPosition, extraTextAnchor, durationInSec, hiddenByNearerObjects); //relies on the preceding "DrawMainName" (due to using "DrawText.parsedTextSpecs")
+ }
+ break;
+ case NamePosition.fixedPosAtRight_insideChart:
+ topRightPos_ofChart = chart_thisLineIsPartOf.Position_worldspace + chart_thisLineIsPartOf.xAxis.AxisVector_inWorldSpace + chart_thisLineIsPartOf.yAxis.AxisVector_inWorldSpace;
+ textPosition = topRightPos_ofChart - chart_thisLineIsPartOf.yAxis.AxisVector_normalized_inWorldSpace * 1.75f * textSize * numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn;
+ textAnchor = DrawText.TextAnchorDXXL.MiddleRight;
+ DrawMainName(lineHasDatapointsButNoneOfThemIsValid, textPosition, textSize, textAnchor, durationInSec, hiddenByNearerObjects);
+ if (nameExtraInfo != null && nameExtraInfo != "")
+ {
+ extraTextPosition = textPosition - (DrawText.parsedTextSpecs.widthOfLongestLine + 0.16f * DrawText.parsedTextSpecs.sizeOfBiggestCharInFirstLine) * chart_thisLineIsPartOf.xAxis.AxisVector_normalized_inWorldSpace;
+ extraTextAnchor = DrawText.TextAnchorDXXL.UpperRight;
+ DrawNameExtraInfo(extraTextPosition, extraTextAnchor, durationInSec, hiddenByNearerObjects); //relies on the preceding "DrawMainName" (due to using "DrawText.parsedTextSpecs")
+ }
+ break;
+ case NamePosition.fixedPosAtLeft_insideChart:
+ DrawNames_for_fixedPosAtLeft_insideChart(lineHasDatapointsButNoneOfThemIsValid, textSize, numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn, durationInSec, hiddenByNearerObjects);
+ break;
+ default:
+ UtilitiesDXXL_Log.PrintErrorCode("7");
+ textPosition = chart_thisLineIsPartOf.Position_worldspace;
+ textAnchor = DrawText.TextAnchorDXXL.LowerLeft;
+ DrawMainName(lineHasDatapointsButNoneOfThemIsValid, textPosition, textSize, textAnchor, durationInSec, hiddenByNearerObjects);
+ if (nameExtraInfo != null && nameExtraInfo != "")
+ {
+ extraTextPosition = textPosition + (DrawText.parsedTextSpecs.widthOfLongestLine + 0.16f * DrawText.parsedTextSpecs.sizeOfBiggestCharInFirstLine) * chart_thisLineIsPartOf.xAxis.AxisVector_normalized_inWorldSpace;
+ extraTextAnchor = DrawText.TextAnchorDXXL.LowerLeft;
+ DrawNameExtraInfo(extraTextPosition, extraTextAnchor, durationInSec, hiddenByNearerObjects); //relies on the preceding "DrawMainName" (due to using "DrawText.parsedTextSpecs")
+ }
+ break;
+ }
+ }
+ }
+
+ void DrawMainName(bool lineHasDatapointsButNoneOfThemIsValid, Vector3 textPosition, float textSize, DrawText.TextAnchorDXXL textAnchor, float durationInSec, bool hiddenByNearerObjects)
+ {
+ float autoLineBreakWidth = 0.0f;
+ if (lineHasDatapointsButNoneOfThemIsValid)
+ {
+ UtilitiesDXXL_Text.WriteFramed(name + " [ All " + dataPoints.Count + " datapoints of this line are invalid (meaning 'NaN' or 'Infinity')]", textPosition, Color, textSize, chart_thisLineIsPartOf.InternalRotation, textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, autoLineBreakWidth, chart_thisLineIsPartOf.autoFlipAllText_toFitObsererCamera, durationInSec, hiddenByNearerObjects);
+ }
+ else
+ {
+ UtilitiesDXXL_Text.WriteFramed(name, textPosition, Color, textSize, chart_thisLineIsPartOf.InternalRotation, textAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, autoLineBreakWidth, chart_thisLineIsPartOf.autoFlipAllText_toFitObsererCamera, durationInSec, hiddenByNearerObjects);
+ }
+ }
+
+ void DrawNameExtraInfo(Vector3 extraTextPosition, DrawText.TextAnchorDXXL extraTextAnchor, float durationInSec, bool hiddenByNearerObjects)
+ {
+ float extraTextSize = 0.01f * chart_thisLineIsPartOf.Height_inWorldSpace * nameText_sizeScaleFactor;
+ float autoLineBreakWidth_ofExtraText = 0.0f;
+ UtilitiesDXXL_Text.WriteFramed(nameExtraInfo, extraTextPosition, Color, extraTextSize, chart_thisLineIsPartOf.InternalRotation, extraTextAnchor, DrawBasics.LineStyle.invisible, 0.0f, 0.0f, 0.0f, 0.0f, autoLineBreakWidth_ofExtraText, chart_thisLineIsPartOf.autoFlipAllText_toFitObsererCamera, durationInSec, hiddenByNearerObjects);
+ }
+
+ void DrawNames_for_fixedPosAtLeft_insideChart(bool lineHasDatapointsButNoneOfThemIsValid, float textSize, int numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn, float durationInSec, bool hiddenByNearerObjects)
+ {
+ Vector3 topLeftPos_ofChart = chart_thisLineIsPartOf.Position_worldspace + chart_thisLineIsPartOf.yAxis.AxisVector_inWorldSpace;
+ Vector3 textPosition = topLeftPos_ofChart - chart_thisLineIsPartOf.yAxis.AxisVector_normalized_inWorldSpace * 1.75f * textSize * numberOfLinesWithValidDataPointsThatHaveAlreadyBeenDrawn;
+ DrawText.TextAnchorDXXL textAnchor = DrawText.TextAnchorDXXL.MiddleLeft;
+ DrawMainName(lineHasDatapointsButNoneOfThemIsValid, textPosition, textSize, textAnchor, durationInSec, hiddenByNearerObjects);
+ if (nameExtraInfo != null && nameExtraInfo != "")
+ {
+ Vector3 extraTextPosition = textPosition + (DrawText.parsedTextSpecs.widthOfLongestLine + 0.16f * DrawText.parsedTextSpecs.sizeOfBiggestCharInFirstLine) * chart_thisLineIsPartOf.xAxis.AxisVector_normalized_inWorldSpace;
+ DrawText.TextAnchorDXXL extraTextAnchor = DrawText.TextAnchorDXXL.UpperLeft;
+ DrawNameExtraInfo(extraTextPosition, extraTextAnchor, durationInSec, hiddenByNearerObjects); //relies on the preceding "DrawMainName" (due to using "DrawText.parsedTextSpecs")
+ }
+ }
+
+ public void AddValue(float yValue)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ InternalAdd(true, false, GetCurrentAutomaticXValue(), yValue);
+ }
+ }
+
+ public void AddValue(bool yValue)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ float yValue_asFloat = (yValue == true) ? 1.0f : 0.0f;
+ InternalAdd(true, false, GetCurrentAutomaticXValue(), yValue_asFloat);
+ }
+ }
+
+ public void AddXYValue(Vector2 xyValueOfTheNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ InternalAdd(false, false, xyValueOfTheNewDataPoint.x, xyValueOfTheNewDataPoint.y);
+ }
+ }
+
+ public void AddXYValue(float xValue, bool yValue)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ float yValue_asFloat = (yValue == true) ? 1.0f : 0.0f;
+ InternalAdd(false, false, xValue, yValue_asFloat);
+ }
+ }
+
+ public void AddXYValue(float xValue, float yValue)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ InternalAdd(false, false, xValue, yValue);
+ }
+ }
+
+ public void InternalAddPlaceholderDatapointForNonExistingListSlot(float xValue_fromOtherLineInsideListFromWhereThisPlaceholderGetsFilled)
+ {
+ InternalAdd(true, true, xValue_fromOtherLineInsideListFromWhereThisPlaceholderGetsFilled, float.NaN);
+ }
+
+ public void InternalAddFromList(float yValue)
+ {
+ InternalAdd(true, false, GetCurrentAutomaticXValue(), yValue);
+ }
+
+ void InternalAdd(bool xValueIsFromAutomaticSource, bool newDatapoint_isPlaceholderDuringPhasesWhereThisLineOfListDidntExistsDueToListChangedItsCount_existsOnlyToStayInXSyncWithOtherLinesOfList, float xValue, float yValue)
+ {
+ if (xValueIsFromAutomaticSource == false) { chart_thisLineIsPartOf.xAxis.ReportXValueFromNonAutomaticSource(); allXValuesCameFromAutomaticSource = false; }
+ InternalDXXL_DataPointOfChartLine newDataPoint = new InternalDXXL_DataPointOfChartLine();
+ newDataPoint.validState = InternalDXXL_DataPointOfChartLine.GetValidStateOf_datapointToBeCreated(newDatapoint_isPlaceholderDuringPhasesWhereThisLineOfListDidntExistsDueToListChangedItsCount_existsOnlyToStayInXSyncWithOtherLinesOfList, xValue, yValue);
+ bool newPointIsValid = (newDataPoint.validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid);
+ newDataPoint.xValue = xValue;
+ newDataPoint.yValue = yValue;
+ TryAddNotificationPoint_atTransitionFromInvalidPhaseAtLineStartToFirstValidPhase(newPointIsValid, xValue, yValue);
+ TryAddNotificationPoint_atChangeOfInvalidTypeInsideInvalidPhase(newPointIsValid, newDataPoint);
+ if (newPointIsValid) { mostCurrentValidXValue = xValue; mostCurrentValidYValue = yValue; }
+ TryAddNotificationPoint_atTransitionFromValidPhaseToInvalidPhase(newPointIsValid, newDataPoint);
+ newDataPoint.i_ofThisPointInsideContainingLine = dataPoints.Count;
+ newDataPoint.line_thisPointIsPartOf = this;
+ TryMarkPointWithEmphasizingCircle_dueTo_startOrEndOfValidPhase(ref newDataPoint);
+ TryMarkPointWithEmphasizingCircle_dueTo_forcedByUser(ref newDataPoint);
+ CheckIntersectionWithHorizThresholdLines(newDataPoint);
+ if (forceUpcomingNextCreatedConnectionLine_toLowAlpha == true) { newDataPoint.forceConnectionLineToLowAlpha = true; forceUpcomingNextCreatedConnectionLine_toLowAlpha = false; }
+ UpdatePosOfVisualizationOfMostCurrentValue(newDataPoint);
+ dataPoints.Add(newDataPoint);
+ turningPointDetector.AddNewDatapoint(dataPoints.Count - 1);
+ NoteIf_hasAtLeastOneValuePairOfValidData(newPointIsValid);
+ Update_highestYValue(yValue, newPointIsValid);
+ Update_lowestYValue(yValue, newPointIsValid);
+ Update_highestXValue(xValue, newPointIsValid);
+ Update_lowestXValue(xValue, newPointIsValid);
+ }
+
+ void TryAddNotificationPoint_atTransitionFromInvalidPhaseAtLineStartToFirstValidPhase(bool newPointIsValid, float x_ofCurrentlyAddedPoint, float y_ofCurrentlyAddedPoint)
+ {
+ if (newPointIsValid)
+ {
+ if (float.IsNaN(mostCurrentValidYValue))
+ {
+ //-> Currently added point is the first valid point of the line
+ if (dataPoints.Count > 0)
+ {
+ //-> The first valid dataPoint is not the first added point. There are invalid dataPoints with lower point-index:
+ InternalDXXL_DataPointOfChartLine thePrecedingDatapoint_thisIsGuaranteedInvalid = dataPoints[dataPoints.Count - 1];
+ if (thePrecedingDatapoint_thisIsGuaranteedInvalid.validState == InternalDXXL_DataPointOfChartLine.ValidState.isPlaceholderDuringPhasesWhereThisLineOfListDidntExistsDueToListChangedItsCount_existsOnlyToStayInXSyncWithOtherLinesOfList)
+ {
+ AddPointOfInterestWithoutHorizOrVertLine(x_ofCurrentlyAddedPoint, y_ofCurrentlyAddedPoint, " Line '" + name + "':
The index of this line didn't exist in the collection before this point (=> the Length/Count of the collection was raised).");
+ }
+ else
+ {
+ if (dataPoints.Count == 1)
+ {
+ AddPointOfInterestWithoutHorizOrVertLine(x_ofCurrentlyAddedPoint, y_ofCurrentlyAddedPoint, " Line '" + name + "':
The value before this point is invalid:
" + thePrecedingDatapoint_thisIsGuaranteedInvalid.GetInvalidTypeString());
+ }
+ else
+ {
+ AddPointOfInterestWithoutHorizOrVertLine(x_ofCurrentlyAddedPoint, y_ofCurrentlyAddedPoint, " Line '" + name + "':
The values before this point are invalid. The preceding point has:
" + thePrecedingDatapoint_thisIsGuaranteedInvalid.GetInvalidTypeString());
+ }
+ }
+ }
+ }
+ }
+ }
+
+ void TryAddNotificationPoint_atChangeOfInvalidTypeInsideInvalidPhase(bool newPointIsValid, InternalDXXL_DataPointOfChartLine newDataPoint)
+ {
+ if (float.IsNaN(mostCurrentValidYValue) == false) //this ensures also "(dataPoints.Count > 0)"
+ {
+ //->There has already been a valid phase:
+ InternalDXXL_DataPointOfChartLine precedingDatapoint = dataPoints[dataPoints.Count - 1];
+ if (newPointIsValid == false)
+ {
+ if (precedingDatapoint.validState != InternalDXXL_DataPointOfChartLine.ValidState.isValid)
+ {
+ //->Currently added point and preceding point are both invalid:
+ if (precedingDatapoint.validState == InternalDXXL_DataPointOfChartLine.ValidState.isPlaceholderDuringPhasesWhereThisLineOfListDidntExistsDueToListChangedItsCount_existsOnlyToStayInXSyncWithOtherLinesOfList && newDataPoint.validState != InternalDXXL_DataPointOfChartLine.ValidState.isPlaceholderDuringPhasesWhereThisLineOfListDidntExistsDueToListChangedItsCount_existsOnlyToStayInXSyncWithOtherLinesOfList)
+ {
+ AddPointOfInterestWithoutHorizOrVertLine(newDataPoint.xValue, mostCurrentValidYValue, " Line '" + name + "':
The line started again here (=> the Length/Count of the collection was raised), but it starts with this invalid value:
" + newDataPoint.GetInvalidTypeString());
+ }
+
+ if (precedingDatapoint.validState != InternalDXXL_DataPointOfChartLine.ValidState.isPlaceholderDuringPhasesWhereThisLineOfListDidntExistsDueToListChangedItsCount_existsOnlyToStayInXSyncWithOtherLinesOfList && newDataPoint.validState == InternalDXXL_DataPointOfChartLine.ValidState.isPlaceholderDuringPhasesWhereThisLineOfListDidntExistsDueToListChangedItsCount_existsOnlyToStayInXSyncWithOtherLinesOfList)
+ {
+ AddPointOfInterestWithoutHorizOrVertLine(precedingDatapoint.xValue, mostCurrentValidYValue, " Line '" + name + "':
This is the last point of the line before the index of the line doesn't exist in the collection anymore. (=> the Length/Count of the collection was lowered).");
+ }
+ }
+ }
+ }
+ else
+ {
+ //-> There was no valid phase before the currently added invalid point:
+ //No notification is drawn, because
+ //1) There is not yet a yValue availalbe where the pointer could be mounted.
+ //2) "TryAddNotificationPoint_atTransitionFromInvalidPhaseAtLineStartToFirstValidPhase" will supply some information later as soon as the first valid phase starts, which answers at least the question: "Did the line start here (because the collection grew in Length/Count)?" or "Is the previous value NaN or Infinity?"
+ }
+ }
+
+ void TryAddNotificationPoint_atTransitionFromValidPhaseToInvalidPhase(bool newPointIsValid, InternalDXXL_DataPointOfChartLine newDataPoint)
+ {
+ if (newPointIsValid == false)
+ {
+ if (float.IsNaN(mostCurrentValidYValue) == false) //this ensures also "(dataPoints.Count > 0)"
+ {
+ //-> The currently added data point is invalid, but the line already contains a valid point:
+ InternalDXXL_DataPointOfChartLine thePrecedingDatapoint = dataPoints[dataPoints.Count - 1];
+ if (thePrecedingDatapoint.validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid)
+ {
+ InternalDXXL_DataPointOfChartLine thePrecedingDatapoint_thisIsGuaranteedValid = thePrecedingDatapoint;
+ if (newDataPoint.validState == InternalDXXL_DataPointOfChartLine.ValidState.isPlaceholderDuringPhasesWhereThisLineOfListDidntExistsDueToListChangedItsCount_existsOnlyToStayInXSyncWithOtherLinesOfList)
+ {
+ AddPointOfInterestWithoutHorizOrVertLine(thePrecedingDatapoint_thisIsGuaranteedValid.xValue, thePrecedingDatapoint_thisIsGuaranteedValid.yValue, " Line '" + name + "':
The index of this line doesn't exist in the collection anymore after this point. (=> the Length/Count of the collection was lowered).");
+ }
+ else
+ {
+ AddPointOfInterestWithoutHorizOrVertLine(thePrecedingDatapoint_thisIsGuaranteedValid.xValue, thePrecedingDatapoint_thisIsGuaranteedValid.yValue, " Line '" + name + "':
At least one value after this one is invalid. The following value has:
" + newDataPoint.GetInvalidTypeString());
+ }
+ }
+ }
+ }
+ }
+
+ void TryMarkPointWithEmphasizingCircle_dueTo_startOrEndOfValidPhase(ref InternalDXXL_DataPointOfChartLine theNewDataPoint)
+ {
+ if (dataPoints.Count > 0)
+ {
+ InternalDXXL_DataPointOfChartLine thePrecedingDatapoint = dataPoints[dataPoints.Count - 1];
+ if (theNewDataPoint.validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid)
+ {
+ if (thePrecedingDatapoint.validState != InternalDXXL_DataPointOfChartLine.ValidState.isValid)
+ {
+ theNewDataPoint.hasLittleEmphasizingCircleAroundPoint = true;
+ }
+ }
+ else
+ {
+ if (thePrecedingDatapoint.validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid)
+ {
+ thePrecedingDatapoint.hasLittleEmphasizingCircleAroundPoint = true;
+ }
+ }
+ }
+ }
+
+ void TryMarkPointWithEmphasizingCircle_dueTo_forcedByUser(ref InternalDXXL_DataPointOfChartLine theNewDataPoint)
+ {
+ if (markNextNewlyCreatedPointWithEmphasizingCircle)
+ {
+ if (theMarkingOfTheNextNewlyCreatedPointWithEmphasizingCircle_isOnlyDoneIfThisPointIsValid)
+ {
+ if (theNewDataPoint.validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid)
+ {
+ theNewDataPoint.hasLittleEmphasizingCircleAroundPoint = true;
+ }
+ }
+ else
+ {
+ theNewDataPoint.hasLittleEmphasizingCircleAroundPoint = true;
+ }
+ markNextNewlyCreatedPointWithEmphasizingCircle = false;
+ }
+ }
+
+ void NoteIf_hasAtLeastOneValuePairOfValidData(bool newPointIsValid)
+ {
+ if (hasAtLeastOneValuePairOfValidData == false)
+ {
+ if (newPointIsValid)
+ {
+ hasAtLeastOneValuePairOfValidData = true;
+ }
+ }
+ }
+
+ void Update_highestYValue(float new_yValue, bool newPointIsValid)
+ {
+ if (newPointIsValid)
+ {
+ highestYValue = Mathf.Max(highestYValue, new_yValue);
+
+ if (chart_thisLineIsPartOf.overallMaxYValue_includingHiddenLines == float.NaN)
+ {
+ //-> is the first added data point of all lines
+ chart_thisLineIsPartOf.overallMaxYValue_includingHiddenLines = new_yValue;
+ }
+ else
+ {
+ chart_thisLineIsPartOf.overallMaxYValue_includingHiddenLines = Mathf.Max(chart_thisLineIsPartOf.overallMaxYValue_includingHiddenLines, new_yValue);
+ }
+ }
+ }
+
+ void Update_lowestYValue(float new_yValue, bool newPointIsValid)
+ {
+ if (newPointIsValid)
+ {
+ lowestYValue = Mathf.Min(lowestYValue, new_yValue);
+
+ if (chart_thisLineIsPartOf.overallMinYValue_includingHiddenLines == float.NaN)
+ {
+ //-> is the first added data point of all lines
+ chart_thisLineIsPartOf.overallMinYValue_includingHiddenLines = new_yValue;
+ }
+ else
+ {
+ chart_thisLineIsPartOf.overallMinYValue_includingHiddenLines = Mathf.Min(chart_thisLineIsPartOf.overallMinYValue_includingHiddenLines, new_yValue);
+ }
+ }
+ }
+
+ void Update_highestXValue(float new_xValue, bool newPointIsValid)
+ {
+ if (newPointIsValid)
+ {
+ highestXValue = Mathf.Max(highestXValue, new_xValue);
+
+ if (chart_thisLineIsPartOf.overallMaxXValue_includingHiddenLines == float.NaN)
+ {
+ //-> is the first added data point of all lines
+ chart_thisLineIsPartOf.overallMaxXValue_includingHiddenLines = new_xValue;
+ }
+ else
+ {
+ chart_thisLineIsPartOf.overallMaxXValue_includingHiddenLines = Mathf.Max(chart_thisLineIsPartOf.overallMaxXValue_includingHiddenLines, new_xValue);
+ }
+ }
+ }
+
+ void Update_lowestXValue(float new_xValue, bool newPointIsValid)
+ {
+ if (newPointIsValid)
+ {
+ lowestXValue = Mathf.Min(lowestXValue, new_xValue);
+
+ if (chart_thisLineIsPartOf.overallMinXValue_includingHiddenLines == float.NaN)
+ {
+ //-> is the first added data point of all lines
+ chart_thisLineIsPartOf.overallMinXValue_includingHiddenLines = new_xValue;
+ }
+ else
+ {
+ chart_thisLineIsPartOf.overallMinXValue_includingHiddenLines = Mathf.Min(chart_thisLineIsPartOf.overallMinXValue_includingHiddenLines, new_xValue);
+ }
+ }
+ }
+
+ public float GetMostCurrentValidXValue()
+ {
+ if (float.IsNaN(mostCurrentValidXValue))
+ {
+ UtilitiesDXXL_Log.PrintErrorCode("5"); //Why? The calling function already ensured that there is at least one valid data pair...
+ return 0.0f;
+ }
+ else
+ {
+ return mostCurrentValidXValue;
+ }
+ }
+
+ public float GetMostCurrentValidYValue()
+ {
+ if (float.IsNaN(mostCurrentValidYValue))
+ {
+ UtilitiesDXXL_Log.PrintErrorCode("6"); //Why? The calling function already ensured that there is at least one valid data pair...
+ return 0.0f;
+ }
+ else
+ {
+ return mostCurrentValidYValue;
+ }
+ }
+
+ public float GetLowestXValue()
+ {
+ return lowestXValue;
+ }
+
+ public float GetLowestYValue()
+ {
+ return lowestYValue;
+ }
+
+ public float GetHighestXValue()
+ {
+ return highestXValue;
+ }
+
+ public float GetHighestYValue()
+ {
+ return highestYValue;
+ }
+
+ public float GetLowestXValue_insideRestricedYSpan(float minAllowedY, float maxAllowedY)
+ {
+ float lowestXValue = float.PositiveInfinity;
+ for (int i = 0; i < dataPoints.Count; i++)
+ {
+ float yValue_ofCurrentDatapoint = dataPoints[i].yValue;
+ if ((yValue_ofCurrentDatapoint >= minAllowedY) && (yValue_ofCurrentDatapoint <= maxAllowedY))
+ {
+ float xValue_ofCurrentDatapoint = dataPoints[i].xValue;
+ if (xValue_ofCurrentDatapoint < lowestXValue) { lowestXValue = xValue_ofCurrentDatapoint; }
+ }
+ }
+ return lowestXValue;
+ }
+
+ public float GetLowestYValue_insideRestricedXSpan(float minAllowedX, float maxAllowedX)
+ {
+ float lowestYValue = float.PositiveInfinity;
+ for (int i = 0; i < dataPoints.Count; i++)
+ {
+ float xValue_ofCurrentDatapoint = dataPoints[i].xValue;
+ if ((xValue_ofCurrentDatapoint >= minAllowedX) && (xValue_ofCurrentDatapoint <= maxAllowedX))
+ {
+ float yValue_ofCurrentDatapoint = dataPoints[i].yValue;
+ if (yValue_ofCurrentDatapoint < lowestYValue) { lowestYValue = yValue_ofCurrentDatapoint; }
+ }
+ }
+ return lowestYValue;
+ }
+
+ public float GetHighestXValue_insideRestricedYSpan(float minAllowedY, float maxAllowedY)
+ {
+ float highestXValue = float.NegativeInfinity;
+ for (int i = 0; i < dataPoints.Count; i++)
+ {
+ float yValue_ofCurrentDatapoint = dataPoints[i].yValue;
+ if ((yValue_ofCurrentDatapoint >= minAllowedY) && (yValue_ofCurrentDatapoint <= maxAllowedY))
+ {
+ float xValue_ofCurrentDatapoint = dataPoints[i].xValue;
+ if (xValue_ofCurrentDatapoint > highestXValue) { highestXValue = xValue_ofCurrentDatapoint; }
+ }
+ }
+ return highestXValue;
+ }
+
+ public float GetHighestYValue_insideRestricedXSpan(float minAllowedX, float maxAllowedX)
+ {
+ float highestYValue = float.NegativeInfinity;
+ for (int i = 0; i < dataPoints.Count; i++)
+ {
+ float xValue_ofCurrentDatapoint = dataPoints[i].xValue;
+ if ((xValue_ofCurrentDatapoint >= minAllowedX) && (xValue_ofCurrentDatapoint <= maxAllowedX))
+ {
+ float yValue_ofCurrentDatapoint = dataPoints[i].yValue;
+ if (yValue_ofCurrentDatapoint > highestYValue) { highestYValue = yValue_ofCurrentDatapoint; }
+ }
+ }
+ return highestYValue;
+ }
+
+ public float GetCurrentAutomaticXValue()
+ {
+ switch (chart_thisLineIsPartOf.xAxis.sourceOfAutomaticValues)
+ {
+ case ChartAxis.SourceOfAutomaticValues.fixedStepForEachValueAdding:
+ return (float)dataPoints.Count;
+ case ChartAxis.SourceOfAutomaticValues.fixedStep_followingTheManualIncrementFunction:
+ return (float)chart_thisLineIsPartOf.GetManuallyIncrementedXPos();
+ case ChartAxis.SourceOfAutomaticValues.frameCount:
+ return (float)Time.frameCount;
+ case ChartAxis.SourceOfAutomaticValues.fixedTime:
+ return Time.fixedTime;
+ case ChartAxis.SourceOfAutomaticValues.fixedUnscaledTime:
+ return Time.fixedUnscaledTime;
+ case ChartAxis.SourceOfAutomaticValues.realtimeSinceStartup:
+ return Time.realtimeSinceStartup;
+ case ChartAxis.SourceOfAutomaticValues.time:
+ return Time.time;
+ case ChartAxis.SourceOfAutomaticValues.timeSinceLevelLoad:
+ return Time.timeSinceLevelLoad;
+ case ChartAxis.SourceOfAutomaticValues.unscaledTime:
+ return Time.unscaledTime;
+ case ChartAxis.SourceOfAutomaticValues.editorTimeSinceStartup:
+#if UNITY_EDITOR
+ return (float)UnityEditor.EditorApplication.timeSinceStartup;
+#else
+ return Time.realtimeSinceStartup;
+#endif
+ default:
+ Debug.LogError("XValuesSource of " + chart_thisLineIsPartOf.xAxis.sourceOfAutomaticValues + " not implemented.");
+ return 0.0f;
+ }
+ }
+
+ public void Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.IsDrawnBecause_theSingleComponentOfMulticomponentData_thisLineRepresents_isEnabledChecker IsDrawnCheckerFunction_thatRepresentsThe_singleComponentOfMulticomponentData)
+ {
+ IsDrawnBecause_theSingleComponentOfMulticomponentData_thisLineRepresents_isEnabled = IsDrawnCheckerFunction_thatRepresentsThe_singleComponentOfMulticomponentData;
+ }
+
+ public bool CheckIfLineIsDrawn()
+ {
+ return (lineSpecsForInspector.currentHideLineState == false) && CheckIfLineIsDrawn_accordingToTheEnabledStateOfThe_singleComponentOfMulticomponentDataThisLineRepresents();
+ }
+
+ bool CheckIfLineIsDrawn_accordingToTheEnabledStateOfThe_singleComponentOfMulticomponentDataThisLineRepresents()
+ {
+ return IsDrawnBecause_theSingleComponentOfMulticomponentData_thisLineRepresents_isEnabled(chart_thisLineIsPartOf.dataComponentsThatAreDrawn);
+ }
+
+ public bool IsHiddenOrUnhidden_butWithAtLeastOneValidOrInvalidDatapoint(bool includeLinesThatRepresentDisabledMultiComponentTypes = false)
+ {
+ if (includeLinesThatRepresentDisabledMultiComponentTypes || CheckIfLineIsDrawn_accordingToTheEnabledStateOfThe_singleComponentOfMulticomponentDataThisLineRepresents())
+ {
+ if (dataPoints.Count > 0)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public bool IsUnhidden_andWithAtLeastOneValidOrInvalidDatapoint(bool includeLinesThatRepresentDisabledMultiComponentTypes = false)
+ {
+ if (includeLinesThatRepresentDisabledMultiComponentTypes || CheckIfLineIsDrawn_accordingToTheEnabledStateOfThe_singleComponentOfMulticomponentDataThisLineRepresents())
+ {
+ if (dataPoints.Count > 0)
+ {
+ if (lineSpecsForInspector.currentHideLineState == false)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public void AddPointOfInterest(PointOfInterest newPointOfInterest)
+ {
+ newPointOfInterest.chart_thisPointIsPartOf = chart_thisLineIsPartOf;
+ newPointOfInterest.chartLine_thisPointIsPartOf = this;
+ pointsOfInterest.Add(newPointOfInterest);
+ }
+
+ public PointOfInterest AddPointOfInterest(Vector2 position, string textToDisplay = null, DrawBasics.LineStyle horizLinestyle = DrawBasics.LineStyle.invisible, DrawBasics.LineStyle vertLinestyle = DrawBasics.LineStyle.invisible, float alphaOfColor_relToParent = 1.0f, bool getsDeletedOnClear = true)
+ {
+ return AddPointOfInterest(position.x, position.y, textToDisplay, horizLinestyle, vertLinestyle, alphaOfColor_relToParent, getsDeletedOnClear);
+ }
+
+ public PointOfInterest AddPointOfInterest(float position_x, float position_y, string textToDisplay = null, DrawBasics.LineStyle horizLinestyle = DrawBasics.LineStyle.invisible, DrawBasics.LineStyle vertLinestyle = DrawBasics.LineStyle.invisible, float alphaOfColor_relToParent = 1.0f, bool getsDeletedOnClear = true)
+ {
+ //the function returns the new point of interest, so it can then be accessed and be further modified.
+ if (textToDisplay == null || textToDisplay == "")
+ {
+ if (horizLinestyle == DrawBasics.LineStyle.invisible) { horizLinestyle = DrawBasics.LineStyle.solid; }
+ if (vertLinestyle == DrawBasics.LineStyle.invisible) { vertLinestyle = DrawBasics.LineStyle.solid; }
+ }
+
+ Color colorOfPoint = UtilitiesDXXL_Colors.Get_color_butWithAdjustedAlpha(Color, alphaOfColor_relToParent);
+ PointOfInterest newPointOfInterest = new PointOfInterest(position_x, position_y, colorOfPoint, chart_thisLineIsPartOf, this, textToDisplay);
+ newPointOfInterest.isDeletedOnClear = getsDeletedOnClear;
+ newPointOfInterest.xValue.lineStyle = vertLinestyle;
+ newPointOfInterest.yValue.lineStyle = horizLinestyle;
+ pointsOfInterest.Add(newPointOfInterest);
+ return newPointOfInterest;
+ }
+
+ void DeletePointsOfInterestOnClear()
+ {
+ for (int i = pointsOfInterest.Count - 1; i >= 0; i--)
+ {
+ if (pointsOfInterest[i].isDeletedOnClear)
+ {
+ pointsOfInterest.RemoveAt(i);
+ }
+ }
+ turningPointDetector.Clear();
+ }
+
+ bool thePointsOfInterestOfThisLineArePartOfTheChart;
+ public int Internal_Set_isDrawnInNextPass_forAllPointsOfInterest(int stillAvailableTextBoxes_inUpperRightCorner)
+ {
+ //Needs "line.Draw()" called beforehand (which sets "thePointsOfInterestOfThisLineArePartOfTheChart")
+ if (thePointsOfInterestOfThisLineArePartOfTheChart)
+ {
+ for (int i = pointsOfInterest.Count - 1; i >= 0; i--) //-> counting DOWNWARD means: only the NEWEST textBoxes get drawn
+ {
+ stillAvailableTextBoxes_inUpperRightCorner = pointsOfInterest[i].Internal_Set_isDrawnInNextPass(stillAvailableTextBoxes_inUpperRightCorner);
+ }
+ }
+ return stillAvailableTextBoxes_inUpperRightCorner;
+ }
+
+ public Vector3 DrawPointsOfInterest(Vector3 next_lowAnchorPositionOfText_inWorldspace, float durationInSec, bool hiddenByNearerObjects)
+ {
+ //use ChartDrawing.Draw() instead
+
+ //Use ChartDrawing.Draw()(<-link) instead.
+ //Needs "line.Draw()" called beforehand (which sets "thePointsOfInterestOfThisLineArePartOfTheChart")
+ if (thePointsOfInterestOfThisLineArePartOfTheChart)
+ {
+ UpdateColorsOfIntersectionPointMarkers(); //-> cannot be set onSetColor, because Unity serialization doesn't support C# properties
+ UtilitiesDXXL_Math.SkewedDirection cornerOfChartWhereTextBoxIsMounted = UtilitiesDXXL_Math.SkewedDirection.upRight;
+ for (int i = pointsOfInterest.Count - 1; i >= 0; i--) //-> counting DOWNWARDS, because this produces less crossings of the pointerLines in most cases for PointOfInterestBoxes on the upperLeftSide. Though this has the disadvantage, that the "newest/oldest"-ordering is the other way round than the PointOfInterestBoxes on the upperRightSide.
+ {
+ next_lowAnchorPositionOfText_inWorldspace = pointsOfInterest[i].TryDraw(next_lowAnchorPositionOfText_inWorldspace, cornerOfChartWhereTextBoxIsMounted, durationInSec, hiddenByNearerObjects);
+ }
+ }
+ return next_lowAnchorPositionOfText_inWorldspace;
+ }
+
+ void AddPointOfInterestWithoutHorizOrVertLine(float xPos, float yPos, string textToDisplay)
+ {
+ PointOfInterest newPointOfInterest = AddPointOfInterest(xPos, yPos, textToDisplay, DrawBasics.LineStyle.invisible, DrawBasics.LineStyle.invisible, 1.0f, true);
+ newPointOfInterest.drawTextBoxIfPointIsOutsideOfChartArea = true;
+ newPointOfInterest.forceColorOfParent = true;
+ }
+
+
+ public void AddHorizontalThresholdLine(float yPosition, bool lineItselfCountsToLowerArea = false, Color colorOfHorizLine = default(Color), bool hideThresholdLineAndShowOnlyTheIntersectionPointers = false)
+ {
+ //if you want to add the threshold to all lines at once you can use the "AddHorizontalThresholdLine"-version in "chartDrawing"
+ //If you don't want to see the intersection points and only want to draw a horizontal line that doesn't do anything you can use 'chart.AddFixedHorizLine' instead.
+ //"forceColor": if the color should be different from the line color
+ // "lineItselfCountsToLowerArea" determines if it counts as an intersection if the line doesn't cross the threshold but runs exactly onto it.
+
+ if (UtilitiesDXXL_Math.FloatIsInvalid(yPosition))
+ {
+ Debug.LogError("Cannot create threshold line at " + yPosition);
+ return;
+ }
+
+ if (hideThresholdLineAndShowOnlyTheIntersectionPointers == false)
+ {
+ if (UtilitiesDXXL_Colors.IsDefaultColor(colorOfHorizLine))
+ {
+ colorOfHorizLine = UtilitiesDXXL_Colors.GetSimilarColorWithSlightlyOtherBrightnessValue(Color);
+ }
+
+ PointOfInterest pointOfInterst_visualizingTheHorizThresholdLine = new PointOfInterest(0.0f, yPosition, colorOfHorizLine, Chart_thisLineIsPartOf, this, null);
+ pointOfInterst_visualizingTheHorizThresholdLine.isDeletedOnClear = false;
+ pointOfInterst_visualizingTheHorizThresholdLine.forceColorOfParent = false;
+ pointOfInterst_visualizingTheHorizThresholdLine.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ pointOfInterst_visualizingTheHorizThresholdLine.yValue.lineStyle = DrawBasics.LineStyle.solid;
+ pointOfInterst_visualizingTheHorizThresholdLine.yValue.labelText = "Threshold";
+ pointOfInterst_visualizingTheHorizThresholdLine.yValue.drawCoordinateAsText = true;
+ pointOfInterst_visualizingTheHorizThresholdLine.yValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.throughWholeChart_alsoIfOtherDimensionsValueIsOutsideChart;
+ pointsOfInterest.Add(pointOfInterst_visualizingTheHorizThresholdLine);
+ }
+
+ InternalDXXL_HorizontalThresholdLine newHorizThresholdLine = new InternalDXXL_HorizontalThresholdLine(yPosition, this, lineItselfCountsToLowerArea);
+ horizontalThresholdLines.Add(newHorizThresholdLine);
+ }
+
+ void CheckIntersectionWithHorizThresholdLines(InternalDXXL_DataPointOfChartLine theNewDataPoint)
+ {
+ if (dataPoints.Count > 0)
+ {
+ InternalDXXL_DataPointOfChartLine thePrecedingDatapoint = dataPoints[dataPoints.Count - 1];
+ for (int i = 0; i < horizontalThresholdLines.Count; i++)
+ {
+ PointOfInterest createdIntersection = horizontalThresholdLines[i].CheckIntersection(thePrecedingDatapoint, theNewDataPoint);
+ if (createdIntersection != null)
+ {
+ pointsOfInterest.Add(createdIntersection);
+ pointsOfInterest_fromIntersectionsWithHorizLines.Add(createdIntersection);
+ }
+ }
+ }
+ }
+
+ void UpdateColorsOfIntersectionPointMarkers()
+ {
+ if (pointsOfInterest_fromIntersectionsWithHorizLines.Count > 0)
+ {
+ Color colorOfGeneratedIntersectionPoints = UtilitiesDXXL_Colors.GetSimilarColorWithSlightlyOtherBrightnessValue(Color);
+ colorOfGeneratedIntersectionPoints.a = 1.0f;
+ for (int i = 0; i < pointsOfInterest_fromIntersectionsWithHorizLines.Count; i++)
+ {
+ pointsOfInterest_fromIntersectionsWithHorizLines[i].SetWholeColor(colorOfGeneratedIntersectionPoints);
+ }
+ }
+ }
+
+ public void InternalAssignRepresentedGameobject(GameObject newGameobject)
+ {
+ gameobject_thatThisLineCurrentlyRepresents = newGameobject;
+ }
+
+ public void ForceMostCurrentConnectionLine_toLowAlpha()
+ {
+ if (dataPoints.Count > 0)
+ {
+ dataPoints[dataPoints.Count - 1].forceConnectionLineToLowAlpha = true;
+ }
+ }
+
+ bool forceUpcomingNextCreatedConnectionLine_toLowAlpha = false;
+ public void ForceUpcomingNextCreatedConnectionLine_toLowAlpha()
+ {
+ forceUpcomingNextCreatedConnectionLine_toLowAlpha = true;
+ }
+
+ bool markNextNewlyCreatedPointWithEmphasizingCircle = false;
+ bool theMarkingOfTheNextNewlyCreatedPointWithEmphasizingCircle_isOnlyDoneIfThisPointIsValid = true;
+ public void AddEmphasizingCircleToMostCurrentPoint(bool onlyIfPointIsValid = true, bool andMarkNextNewlyCreatedPointAsWell = false)
+ {
+ //if you want to mark only the next data point that gets created you can use "AddEmphasizingCircleToUpcomingNextDatapointThatGetsCreated"
+ AddEmphasizingCircleToAPoint(dataPoints.Count - 1, onlyIfPointIsValid);
+ markNextNewlyCreatedPointWithEmphasizingCircle = andMarkNextNewlyCreatedPointAsWell;
+ theMarkingOfTheNextNewlyCreatedPointWithEmphasizingCircle_isOnlyDoneIfThisPointIsValid = onlyIfPointIsValid;
+ }
+
+ public void AddEmphasizingCircleToUpcomingNextDatapointThatGetsCreated(bool onlyIfPointIsValid = true)
+ {
+ //if you want to mark the most current already existing data point you can use "AddEmphasizingCircleToMostCurrentPoint"
+ markNextNewlyCreatedPointWithEmphasizingCircle = true;
+ theMarkingOfTheNextNewlyCreatedPointWithEmphasizingCircle_isOnlyDoneIfThisPointIsValid = onlyIfPointIsValid;
+ }
+
+ public void AddEmphasizingCircleToAPoint(int i_ofDataPoint, bool onlyIfPointIsValid = true)
+ {
+ if (i_ofDataPoint >= 0)
+ {
+ if (i_ofDataPoint < dataPoints.Count)
+ {
+ if (onlyIfPointIsValid)
+ {
+ if (dataPoints[i_ofDataPoint].validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid)
+ {
+ dataPoints[i_ofDataPoint].hasLittleEmphasizingCircleAroundPoint = true;
+ }
+ }
+ else
+ {
+ dataPoints[i_ofDataPoint].hasLittleEmphasizingCircleAroundPoint = true;
+ }
+ }
+ }
+ }
+
+ void SetIfVisualizationOfSpecialApexPointsIsDisplayed()
+ {
+ SetIfVisualizationOfMostCurrentValueIsDisplayed();
+ turningPointDetector.SetIfVisualizationIsDisplayed();
+ }
+
+ void SetIfVisualizationOfMostCurrentValueIsDisplayed()
+ {
+ if (dataPoints.Count > 0)
+ {
+ if (representsValuesFromAddedLists && (chart_thisLineIsPartOf.displayHighlightingOfMostCurrentValues_forLinesFromLists == false))
+ {
+ pointOfInterest_thatHighlightsTheMostCurrentValue.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ pointOfInterest_thatHighlightsTheMostCurrentValue.yValue.lineStyle = DrawBasics.LineStyle.invisible;
+ return;
+ }
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(alpha_ofHighlighterForMostCurrentValue_xDim))
+ {
+ pointOfInterest_thatHighlightsTheMostCurrentValue.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ }
+ else
+ {
+ pointOfInterest_thatHighlightsTheMostCurrentValue.xValue.lineStyle = DrawBasics.LineStyle.solid;
+ pointOfInterest_thatHighlightsTheMostCurrentValue.xValue.color = new Color(1, 1, 1, alpha_ofHighlighterForMostCurrentValue_xDim); //-> only for setting alpha. The actual color gets forced from lineParent
+ }
+
+ if (UtilitiesDXXL_Math.ApproximatelyZero(alpha_ofHighlighterForMostCurrentValue_yDim))
+ {
+ pointOfInterest_thatHighlightsTheMostCurrentValue.yValue.lineStyle = DrawBasics.LineStyle.invisible;
+ }
+ else
+ {
+ pointOfInterest_thatHighlightsTheMostCurrentValue.yValue.lineStyle = DrawBasics.LineStyle.solid;
+ pointOfInterest_thatHighlightsTheMostCurrentValue.yValue.color = new Color(1, 1, 1, alpha_ofHighlighterForMostCurrentValue_yDim); //-> only for setting alpha. The actual color gets forced from lineParent
+ }
+ if (disableMinMaxYVisualizers_dueTo_lineRepresentsBoolValues) { pointOfInterest_thatHighlightsTheMostCurrentValue.yValue.lineStyle = DrawBasics.LineStyle.invisible; }
+ }
+ else
+ {
+ pointOfInterest_thatHighlightsTheMostCurrentValue.xValue.lineStyle = DrawBasics.LineStyle.invisible;
+ pointOfInterest_thatHighlightsTheMostCurrentValue.yValue.lineStyle = DrawBasics.LineStyle.invisible;
+ }
+ }
+
+ PointOfInterest CreatePointOfInterestThatHighlightsTheMostCurrentValue()
+ {
+ PointOfInterest created_pointOfInterest = new PointOfInterest(0.0f, 0.0f, DrawBasics.defaultColor, chart_thisLineIsPartOf, this, null);
+ created_pointOfInterest.drawTextBoxIfPointIsOutsideOfChartArea = false;
+ created_pointOfInterest.isDeletedOnClear = false;
+ created_pointOfInterest.forceColorOfParent = true;
+
+ created_pointOfInterest.xValue.lineStyle = DrawBasics.LineStyle.solid;
+ created_pointOfInterest.xValue.drawCoordinateAsText = true;
+ created_pointOfInterest.xValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.axisToPoint;
+
+ created_pointOfInterest.yValue.lineStyle = DrawBasics.LineStyle.solid;
+ created_pointOfInterest.yValue.drawCoordinateAsText = false; //-> coordinate is coded into the labelText
+ created_pointOfInterest.yValue.lineExtent = DimensionOf_PointOfInterest.LineExtent.axisToPoint;
+
+ return created_pointOfInterest;
+ }
+
+ void UpdatePosOfVisualizationOfMostCurrentValue(InternalDXXL_DataPointOfChartLine newDataPoint)
+ {
+ if (newDataPoint.validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid)
+ {
+ pointOfInterest_thatHighlightsTheMostCurrentValue.xValue.position = newDataPoint.xValue;
+ pointOfInterest_thatHighlightsTheMostCurrentValue.yValue.position = newDataPoint.yValue;
+
+ string labelText_atHorizLine = null;
+ if (displayDeltaAtHighlighterForMostCurrentValue)
+ {
+ if (dataPoints.Count > 0)
+ {
+ InternalDXXL_DataPointOfChartLine thePrecedingDatapoint = dataPoints[dataPoints.Count - 1];
+ if (thePrecedingDatapoint.validState == InternalDXXL_DataPointOfChartLine.ValidState.isValid)
+ {
+ float deltaSincePrecedingValue = newDataPoint.yValue - thePrecedingDatapoint.yValue;
+ if (UtilitiesDXXL_Math.CheckIf_twoFloatsAreApproximatelyEqual(newDataPoint.yValue, thePrecedingDatapoint.yValue) || UtilitiesDXXL_Math.ApproximatelyZero(deltaSincePrecedingValue))
+ {
+ labelText_atHorizLine = "" + newDataPoint.yValue + " ( +/- 0)";
+ }
+ else
+ {
+ if (deltaSincePrecedingValue > 0.0f)
+ {
+ Color risingValueColor = UtilitiesDXXL_Colors.green_boolTrue;
+ risingValueColor.a = alpha_ofHighlighterForMostCurrentValue_yDim * 2.0f;
+ labelText_atHorizLine = "" + newDataPoint.yValue + " (" + deltaSincePrecedingValue + ")";
+ }
+ else
+ {
+ Color fallingValueColor = UtilitiesDXXL_Colors.red_boolFalse;
+ fallingValueColor.a = alpha_ofHighlighterForMostCurrentValue_yDim * 2.0f;
+ labelText_atHorizLine = "" + newDataPoint.yValue + " (" + deltaSincePrecedingValue + ")";
+ }
+ }
+ }
+ }
+ }
+
+ if (labelText_atHorizLine == null) { labelText_atHorizLine = "" + newDataPoint.yValue; }
+ pointOfInterest_thatHighlightsTheMostCurrentValue.yValue.labelText = labelText_atHorizLine;
+ }
+ }
+
+ float Get_absWidthOfConnectionLines_worldSpace()
+ {
+ if (UtilitiesDXXL_Math.ApproximatelyZero(LineWidth_relToChartHeight))
+ {
+ return 0.0f;
+ }
+ else
+ {
+ return Mathf.Abs(LineWidth_relToChartHeight * Chart_thisLineIsPartOf.Height_inWorldSpace);
+ }
+ }
+
+ float Get_absWidthOfPointVisualisatorLines_worldSpace()
+ {
+ if (UtilitiesDXXL_Math.ApproximatelyZero(pointVisualisationLineWidth_relToChartHeight))
+ {
+ return 0.0f;
+ }
+ else
+ {
+ return Mathf.Abs(pointVisualisationLineWidth_relToChartHeight * Chart_thisLineIsPartOf.Height_inWorldSpace);
+ }
+ }
+
+ Vector3 Get_amplitudeDir_forNonZeroWidthLines(InternalDXXL_Plane chartPlane)
+ {
+ if (UtilitiesDXXL_Math.ApproximatelyZero(LineWidth_relToChartHeight) && UtilitiesDXXL_Math.ApproximatelyZero(pointVisualisationLineWidth_relToChartHeight))
+ {
+ return default(Vector3);
+ }
+ else
+ {
+ if (UtilitiesDXXL_Math.IsQuaternionIdentity(chart_thisLineIsPartOf.InternalRotation))
+ {
+ return default(Vector3);
+ }
+ else
+ {
+ Vector3 aVectorInsideTheChartPlane = chartPlane.Get_projectionOfVectorOntoPlane(UtilitiesDXXL_Math.arbitrarySeldomDir_normalized_precalced);
+ Vector3 aVectorInsideTheChartPlane_normalized = UtilitiesDXXL_Math.GetNormalized_afterScalingIntoRegionOfFloatPrecicion(aVectorInsideTheChartPlane);
+ Vector3 aVectorInsideTheChartPlane_veryLong = aVectorInsideTheChartPlane_normalized * 10000000.0f;
+ //-> Making it very long reduces jitter artifacts, that sometimes occur when drawing nonZeroWidth-Lines:
+ //-> Reproducing unwanted jitter:
+ //---> Turn the chart to non-default-orientation
+ //---> Make the chart size very small.
+ //---> Draw a line that makes a smooth round curve and therefore tangents all possible directions (like a parabola)
+ //---> Raise the lineWidth
+ //---> To emphasize the jitter: Scroll X during ComponentInspectionPhase.
+ //-> The problem may come from: float calculation imprecision during automatic amplitude calculation in "UtilitiesDXXL_LineAmplitudeAndTextDirCalculation"
+ //-> A clean solution would be not to use "arbitrarySeldomDir_normalized_precalced" but calculate "amplitudeDir_forNonZeroWidthLines" per datapoint via cross product, but this can get expensive for many datapoints.
+ return aVectorInsideTheChartPlane_veryLong;
+ }
+ }
+ }
+
+ public void InitInspectionViaComponent()
+ {
+ lineSpecsForInspector.Reconstruct_arrayWithNeighboringDatapointValues();
+ }
+
+ public string GetNameCompound(bool addSpacesBeside_namePartsConnectingMinus)
+ {
+ if (addSpacesBeside_namePartsConnectingMinus)
+ {
+ if (name == null || name == "")
+ {
+ if (nameExtraInfo == null || nameExtraInfo == "")
+ {
+ return "[nameless]";
+ }
+ else
+ {
+ return ("[nameless] - " + nameExtraInfo);
+ }
+ }
+ else
+ {
+ if (nameExtraInfo == null || nameExtraInfo == "")
+ {
+ return name;
+ }
+ else
+ {
+ return (name + " - " + nameExtraInfo);
+ }
+ }
+ }
+ else
+ {
+ if (name == null || name == "")
+ {
+ if (nameExtraInfo == null || nameExtraInfo == "")
+ {
+ return "[nameless]";
+ }
+ else
+ {
+ return ("[nameless]-" + nameExtraInfo);
+ }
+ }
+ else
+ {
+ if (nameExtraInfo == null || nameExtraInfo == "")
+ {
+ return name;
+ }
+ else
+ {
+ return (name + "-" + nameExtraInfo);
+ }
+ }
+ }
+ }
+
+ }
+
+}
diff --git a/Runtime/DrawDebugLibrary/charts/line charts/ChartLine.cs.meta b/Runtime/DrawDebugLibrary/charts/line charts/ChartLine.cs.meta
new file mode 100644
index 0000000..1d0e4b2
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/charts/line charts/ChartLine.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 051a68451ba2f49419c91170b3f49f91
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/DrawDebugLibrary/charts/line charts/ChartLines.cs b/Runtime/DrawDebugLibrary/charts/line charts/ChartLines.cs
new file mode 100644
index 0000000..c2663d3
--- /dev/null
+++ b/Runtime/DrawDebugLibrary/charts/line charts/ChartLines.cs
@@ -0,0 +1,2257 @@
+namespace DrawXXL
+{
+ using UnityEngine;
+ using System.Collections.Generic;
+
+ public class ChartLines
+ {
+ static float default_luminanceOfLineColors = 0.5f;
+ private float luminanceOfLineColors = default_luminanceOfLineColors;
+ public float LuminanceOfLineColors
+ {
+ get { return luminanceOfLineColors; }
+ set
+ {
+ value = Mathf.Clamp01(value);
+ ReassignLuminanceToLinecolors(luminanceOfLineColors, value);
+ luminanceOfLineColors = value;
+ }
+ }
+
+ ChartDrawing chart_theseLinesArePartOf;
+ List horizontalThresholdsInitializer = new List();
+
+ //default colors:
+ static float default_colorHue_of_xDimension = 0.0f;
+ static float default_colorHue_of_yDimension = 0.3333333f;
+ static float default_colorHue_of_zDimension = 0.6666666f;
+ static float default_colorHue_of_wDimension = 0.2f;
+ static float default_colorHue_of_premadeLine_float = 0.14f;
+ static float default_colorHue_of_premadeLine_int = 0.465f;
+ // static float default_colorHue_of_premadeLine_bool = 0.88f;
+ static float default_colorHue_of_premadeLine_bool = 0.05f;
+ //premade lines:
+ List preMadeLines = new List();
+ List userMadeLines = new List();
+ public ChartLine premadeLine_float;
+ public ChartLine premadeLine_int;
+ public ChartLine premadeLine_vector2_x;
+ public ChartLine premadeLine_vector2_y;
+ public ChartLine premadeLine_vector3_x;
+ public ChartLine premadeLine_vector3_y;
+ public ChartLine premadeLine_vector3_z;
+ public ChartLine premadeLine_vector4_x;
+ public ChartLine premadeLine_vector4_y;
+ public ChartLine premadeLine_vector4_z;
+ public ChartLine premadeLine_vector4_w;
+ public ChartLine premadeLine_color_r;
+ public ChartLine premadeLine_color_g;
+ public ChartLine premadeLine_color_b;
+ public ChartLine premadeLine_color_a;
+ public ChartLine premadeLine_rotation_eulerX;
+ public ChartLine premadeLine_rotation_eulerY;
+ public ChartLine premadeLine_rotation_eulerZ;
+ public ChartLine premadeLine_bool;
+ //premade lines for transform:
+ //int i_premadeLine_markingTheFirstOneOfTheTransformLines;
+ //int i_premadeLine_markingTheLastOneOfTheTransformLines;
+ public ChartLine premadeLine_transform_localPosition_x;
+ public ChartLine premadeLine_transform_localPosition_y;
+ public ChartLine premadeLine_transform_localPosition_z;
+ public ChartLine premadeLine_transform_localEulerAngle_x;
+ public ChartLine premadeLine_transform_localEulerAngle_y;
+ public ChartLine premadeLine_transform_localEulerAngle_z;
+ public ChartLine premadeLine_transform_localScale_x;
+ public ChartLine premadeLine_transform_localScale_y;
+ public ChartLine premadeLine_transform_localScale_z;
+ public ChartLine premadeLine_transform_globalPosition_x;
+ public ChartLine premadeLine_transform_globalPosition_y;
+ public ChartLine premadeLine_transform_globalPosition_z;
+ public ChartLine premadeLine_transform_globalEulerAngle_x;
+ public ChartLine premadeLine_transform_globalEulerAngle_y;
+ public ChartLine premadeLine_transform_globalEulerAngle_z;
+ public ChartLine premadeLine_transform_lossyScale_x;
+ public ChartLine premadeLine_transform_lossyScale_y;
+ public ChartLine premadeLine_transform_lossyScale_z;
+ //premade lines for lists:
+ List> listOfPremadeListsOfLines = new List>();
+ List preMadeListOfLines_float;
+ List preMadeListOfLines_int;
+ List preMadeListOfLines_vector2_x;
+ List preMadeListOfLines_vector2_y;
+ List preMadeListOfLines_vector3_x;
+ List preMadeListOfLines_vector3_y;
+ List preMadeListOfLines_vector3_z;
+ List preMadeListOfLines_rotation_eulerX;
+ List preMadeListOfLines_rotation_eulerY;
+ List preMadeListOfLines_rotation_eulerZ;
+ List preMadeListOfLines_bool;
+ List preMadeListOfLines_transforms_localPosition_x;
+ List preMadeListOfLines_transforms_localPosition_y;
+ List preMadeListOfLines_transforms_localPosition_z;
+ List preMadeListOfLines_transforms_localEulerAngle_x;
+ List preMadeListOfLines_transforms_localEulerAngle_y;
+ List preMadeListOfLines_transforms_localEulerAngle_z;
+ List preMadeListOfLines_transforms_localScale_x;
+ List preMadeListOfLines_transforms_localScale_y;
+ List preMadeListOfLines_transforms_localScale_z;
+ List preMadeListOfLines_transforms_globalPosition_x;
+ List preMadeListOfLines_transforms_globalPosition_y;
+ List preMadeListOfLines_transforms_globalPosition_z;
+ List preMadeListOfLines_transforms_globalEulerAngle_x;
+ List preMadeListOfLines_transforms_globalEulerAngle_y;
+ List preMadeListOfLines_transforms_globalEulerAngle_z;
+ List preMadeListOfLines_transforms_lossyScale_x;
+ List preMadeListOfLines_transforms_lossyScale_y;
+ List preMadeListOfLines_transforms_lossyScale_z;
+
+ public ChartLines(ChartDrawing chart_theseLinesArePartOf)
+ {
+ this.chart_theseLinesArePartOf = chart_theseLinesArePartOf;
+
+ premadeLine_float = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_premadeLine_float, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_float.Name = "float";
+ preMadeLines.Add(premadeLine_float);
+
+ premadeLine_int = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_premadeLine_int, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_int.Name = "int";
+ preMadeLines.Add(premadeLine_int);
+
+ premadeLine_vector2_x = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_xDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_vector2_x.Name = "x";
+ premadeLine_vector2_x.NameExtraInfo = "of Vector2";
+ premadeLine_vector2_x.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_vector2_x_isEnabled);
+ preMadeLines.Add(premadeLine_vector2_x);
+
+ premadeLine_vector2_y = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_yDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_vector2_y.Name = "y";
+ premadeLine_vector2_y.NameExtraInfo = "of Vector2";
+ premadeLine_vector2_y.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_vector2_y_isEnabled);
+ preMadeLines.Add(premadeLine_vector2_y);
+
+ premadeLine_vector3_x = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_xDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_vector3_x.Name = "x";
+ premadeLine_vector3_x.NameExtraInfo = "of Vector3";
+ premadeLine_vector3_x.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_vector3_x_isEnabled);
+ preMadeLines.Add(premadeLine_vector3_x);
+
+ premadeLine_vector3_y = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_yDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_vector3_y.Name = "y";
+ premadeLine_vector3_y.NameExtraInfo = "of Vector3";
+ premadeLine_vector3_y.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_vector3_y_isEnabled);
+ preMadeLines.Add(premadeLine_vector3_y);
+
+ premadeLine_vector3_z = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_zDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_vector3_z.Name = "z";
+ premadeLine_vector3_z.NameExtraInfo = "of Vector3";
+ premadeLine_vector3_z.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_vector3_z_isEnabled);
+ preMadeLines.Add(premadeLine_vector3_z);
+
+ premadeLine_vector4_x = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_xDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_vector4_x.Name = "x";
+ premadeLine_vector4_x.NameExtraInfo = "of Vector4";
+ premadeLine_vector4_x.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_vector4_x_isEnabled);
+ preMadeLines.Add(premadeLine_vector4_x);
+
+ premadeLine_vector4_y = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_yDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_vector4_y.Name = "y";
+ premadeLine_vector4_y.NameExtraInfo = "of Vector4";
+ premadeLine_vector4_y.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_vector4_y_isEnabled);
+ preMadeLines.Add(premadeLine_vector4_y);
+
+ premadeLine_vector4_z = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_zDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_vector4_z.Name = "z";
+ premadeLine_vector4_z.NameExtraInfo = "of Vector4";
+ premadeLine_vector4_z.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_vector4_z_isEnabled);
+ preMadeLines.Add(premadeLine_vector4_z);
+
+ premadeLine_vector4_w = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_wDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_vector4_w.Name = "w";
+ premadeLine_vector4_w.NameExtraInfo = "of Vector4";
+ premadeLine_vector4_w.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_vector4_w_isEnabled);
+ preMadeLines.Add(premadeLine_vector4_w);
+
+ premadeLine_color_r = new ChartLine(Color.red, chart_theseLinesArePartOf);
+ premadeLine_color_r.Name = "red";
+ premadeLine_color_r.NameExtraInfo = "color component";
+ premadeLine_color_r.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_color_r_isEnabled);
+ preMadeLines.Add(premadeLine_color_r);
+
+ premadeLine_color_g = new ChartLine(Color.green, chart_theseLinesArePartOf);
+ premadeLine_color_g.Name = "green";
+ premadeLine_color_g.NameExtraInfo = "color component";
+ premadeLine_color_g.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_color_g_isEnabled);
+ preMadeLines.Add(premadeLine_color_g);
+
+ premadeLine_color_b = new ChartLine(Color.blue, chart_theseLinesArePartOf);
+ premadeLine_color_b.Name = "blue";
+ premadeLine_color_b.NameExtraInfo = "color component";
+ premadeLine_color_b.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_color_b_isEnabled);
+ preMadeLines.Add(premadeLine_color_b);
+
+ premadeLine_color_a = new ChartLine(Color.white, chart_theseLinesArePartOf);
+ premadeLine_color_a.Name = "alpha";
+ premadeLine_color_a.NameExtraInfo = "color component";
+ premadeLine_color_a.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_color_a_isEnabled);
+ preMadeLines.Add(premadeLine_color_a);
+
+ premadeLine_rotation_eulerX = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_xDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_rotation_eulerX.Name = "x";
+ premadeLine_rotation_eulerX.NameExtraInfo = "rotation euler [degrees]";
+ premadeLine_rotation_eulerX.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_rotation_eulerX_isEnabled);
+ preMadeLines.Add(premadeLine_rotation_eulerX);
+
+ premadeLine_rotation_eulerY = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_yDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_rotation_eulerY.Name = "y";
+ premadeLine_rotation_eulerY.NameExtraInfo = "rotation euler [degrees]";
+ premadeLine_rotation_eulerY.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_rotation_eulerY_isEnabled);
+ preMadeLines.Add(premadeLine_rotation_eulerY);
+
+ premadeLine_rotation_eulerZ = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_zDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_rotation_eulerZ.Name = "z";
+ premadeLine_rotation_eulerZ.NameExtraInfo = "rotation euler [degrees]";
+ premadeLine_rotation_eulerZ.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_rotation_eulerZ_isEnabled);
+ preMadeLines.Add(premadeLine_rotation_eulerZ);
+
+ premadeLine_bool = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_premadeLine_bool, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_bool.Name = "bool";
+ premadeLine_bool.disableMinMaxYVisualizers_dueTo_lineRepresentsBoolValues = true;
+ preMadeLines.Add(premadeLine_bool);
+
+ //i_premadeLine_markingTheFirstOneOfTheTransformLines = preMadeLines.Count;
+
+ premadeLine_transform_localPosition_x = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_xDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_localPosition_x.Name = "x";
+ premadeLine_transform_localPosition_x.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_localPosition_x_isEnabled);
+ preMadeLines.Add(premadeLine_transform_localPosition_x);
+
+ premadeLine_transform_localPosition_y = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_yDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_localPosition_y.Name = "y";
+ premadeLine_transform_localPosition_y.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_localPosition_y_isEnabled);
+ preMadeLines.Add(premadeLine_transform_localPosition_y);
+
+ premadeLine_transform_localPosition_z = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_zDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_localPosition_z.Name = "z";
+ premadeLine_transform_localPosition_z.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_localPosition_z_isEnabled);
+ preMadeLines.Add(premadeLine_transform_localPosition_z);
+
+ premadeLine_transform_localEulerAngle_x = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_xDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_localEulerAngle_x.Name = "x";
+ premadeLine_transform_localEulerAngle_x.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_localEulerAngle_x_isEnabled);
+ preMadeLines.Add(premadeLine_transform_localEulerAngle_x);
+
+ premadeLine_transform_localEulerAngle_y = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_yDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_localEulerAngle_y.Name = "y";
+ premadeLine_transform_localEulerAngle_y.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_localEulerAngle_y_isEnabled);
+ preMadeLines.Add(premadeLine_transform_localEulerAngle_y);
+
+ premadeLine_transform_localEulerAngle_z = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_zDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_localEulerAngle_z.Name = "z";
+ premadeLine_transform_localEulerAngle_z.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_localEulerAngle_z_isEnabled);
+ preMadeLines.Add(premadeLine_transform_localEulerAngle_z);
+
+ premadeLine_transform_localScale_x = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_xDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_localScale_x.Name = "x";
+ premadeLine_transform_localScale_x.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_localScale_x_isEnabled);
+ preMadeLines.Add(premadeLine_transform_localScale_x);
+
+ premadeLine_transform_localScale_y = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_yDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_localScale_y.Name = "y";
+ premadeLine_transform_localScale_y.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_localScale_y_isEnabled);
+ preMadeLines.Add(premadeLine_transform_localScale_y);
+
+ premadeLine_transform_localScale_z = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_zDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_localScale_z.Name = "z";
+ premadeLine_transform_localScale_z.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_localScale_z_isEnabled);
+ preMadeLines.Add(premadeLine_transform_localScale_z);
+
+ premadeLine_transform_globalPosition_x = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_xDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_globalPosition_x.Name = "x";
+ premadeLine_transform_globalPosition_x.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_globalPosition_x_isEnabled);
+ preMadeLines.Add(premadeLine_transform_globalPosition_x);
+
+ premadeLine_transform_globalPosition_y = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_yDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_globalPosition_y.Name = "y";
+ premadeLine_transform_globalPosition_y.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_globalPosition_y_isEnabled);
+ preMadeLines.Add(premadeLine_transform_globalPosition_y);
+
+ premadeLine_transform_globalPosition_z = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_zDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_globalPosition_z.Name = "z";
+ premadeLine_transform_globalPosition_z.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_globalPosition_z_isEnabled);
+ preMadeLines.Add(premadeLine_transform_globalPosition_z);
+
+ premadeLine_transform_globalEulerAngle_x = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_xDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_globalEulerAngle_x.Name = "x";
+ premadeLine_transform_globalEulerAngle_x.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_globalEulerAngle_x_isEnabled);
+ preMadeLines.Add(premadeLine_transform_globalEulerAngle_x);
+
+ premadeLine_transform_globalEulerAngle_y = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_yDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_globalEulerAngle_y.Name = "y";
+ premadeLine_transform_globalEulerAngle_y.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_globalEulerAngle_y_isEnabled);
+ preMadeLines.Add(premadeLine_transform_globalEulerAngle_y);
+
+ premadeLine_transform_globalEulerAngle_z = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_zDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_globalEulerAngle_z.Name = "z";
+ premadeLine_transform_globalEulerAngle_z.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_globalEulerAngle_z_isEnabled);
+ preMadeLines.Add(premadeLine_transform_globalEulerAngle_z);
+
+ premadeLine_transform_lossyScale_x = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_xDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_lossyScale_x.Name = "x";
+ premadeLine_transform_lossyScale_x.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_lossyScale_x_isEnabled);
+ preMadeLines.Add(premadeLine_transform_lossyScale_x);
+
+ premadeLine_transform_lossyScale_y = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_yDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_lossyScale_y.Name = "y";
+ premadeLine_transform_lossyScale_y.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_lossyScale_y_isEnabled);
+ preMadeLines.Add(premadeLine_transform_lossyScale_y);
+
+ premadeLine_transform_lossyScale_z = new ChartLine(SeededColorGenerator.GetColorFromHueAndLuminance_tunedTransitionsSpectrum(default_colorHue_of_zDimension, default_luminanceOfLineColors), chart_theseLinesArePartOf);
+ premadeLine_transform_lossyScale_z.Name = "z";
+ premadeLine_transform_lossyScale_z.Assign_singleComponentOfMulticomponentData_thisLineRepresents(UtilitiesDXXL_ChartLine.DrawIf_lossyScale_z_isEnabled);
+ preMadeLines.Add(premadeLine_transform_lossyScale_z);
+
+ //i_premadeLine_markingTheLastOneOfTheTransformLines = preMadeLines.Count - 1;
+ }
+
+ public void Clear()
+ {
+ for (int i = 0; i < preMadeLines.Count; i++)
+ {
+ preMadeLines[i].Clear();
+ }
+ for (int i = 0; i < userMadeLines.Count; i++)
+ {
+ userMadeLines[i].Clear();
+ }
+ listOfPremadeListsOfLines = new List>();
+ preMadeListOfLines_float = null;
+ preMadeListOfLines_int = null;
+ preMadeListOfLines_vector2_x = null;
+ preMadeListOfLines_vector2_y = null;
+ preMadeListOfLines_vector3_x = null;
+ preMadeListOfLines_vector3_y = null;
+ preMadeListOfLines_vector3_z = null;
+ preMadeListOfLines_rotation_eulerX = null;
+ preMadeListOfLines_rotation_eulerY = null;
+ preMadeListOfLines_rotation_eulerZ = null;
+ preMadeListOfLines_bool = null;
+ preMadeListOfLines_transforms_localPosition_x = null;
+ preMadeListOfLines_transforms_localPosition_y = null;
+ preMadeListOfLines_transforms_localPosition_z = null;
+ preMadeListOfLines_transforms_localEulerAngle_x = null;
+ preMadeListOfLines_transforms_localEulerAngle_y = null;
+ preMadeListOfLines_transforms_localEulerAngle_z = null;
+ preMadeListOfLines_transforms_localScale_x = null;
+ preMadeListOfLines_transforms_localScale_y = null;
+ preMadeListOfLines_transforms_localScale_z = null;
+ preMadeListOfLines_transforms_globalPosition_x = null;
+ preMadeListOfLines_transforms_globalPosition_y = null;
+ preMadeListOfLines_transforms_globalPosition_z = null;
+ preMadeListOfLines_transforms_globalEulerAngle_x = null;
+ preMadeListOfLines_transforms_globalEulerAngle_y = null;
+ preMadeListOfLines_transforms_globalEulerAngle_z = null;
+ preMadeListOfLines_transforms_lossyScale_x = null;
+ preMadeListOfLines_transforms_lossyScale_y = null;
+ preMadeListOfLines_transforms_lossyScale_z = null;
+ }
+
+ public void Draw(InternalDXXL_Plane chartPlane, float durationInSec, bool hiddenByNearerObjects)
+ {
+ //Use "chartDrawing.Draw" instead
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = chart_theseLinesArePartOf;
+ int numberOfAlreadyDrawnLines = 0;
+ for (int i = 0; i < preMadeLines.Count; i++)
+ {
+ bool lineWasDrawn = preMadeLines[i].Draw(chartPlane, numberOfAlreadyDrawnLines, chart_theseLinesArePartOf.xAxis.ValueMarkingLowerEndOfTheAxis, chart_theseLinesArePartOf.xAxis.ValueMarkingUpperEndOfTheAxis, chart_theseLinesArePartOf.yAxis.ValueMarkingLowerEndOfTheAxis, chart_theseLinesArePartOf.yAxis.ValueMarkingUpperEndOfTheAxis, durationInSec, hiddenByNearerObjects);
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = chart_theseLinesArePartOf;
+ if (lineWasDrawn) { numberOfAlreadyDrawnLines++; }
+ }
+ for (int i = 0; i < userMadeLines.Count; i++)
+ {
+ bool lineWasDrawn = userMadeLines[i].Draw(chartPlane, numberOfAlreadyDrawnLines, chart_theseLinesArePartOf.xAxis.ValueMarkingLowerEndOfTheAxis, chart_theseLinesArePartOf.xAxis.ValueMarkingUpperEndOfTheAxis, chart_theseLinesArePartOf.yAxis.ValueMarkingLowerEndOfTheAxis, chart_theseLinesArePartOf.yAxis.ValueMarkingUpperEndOfTheAxis, durationInSec, hiddenByNearerObjects);
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = chart_theseLinesArePartOf;
+ if (lineWasDrawn) { numberOfAlreadyDrawnLines++; }
+ }
+ for (int i_listOfLines = 0; i_listOfLines < listOfPremadeListsOfLines.Count; i_listOfLines++)
+ {
+ for (int i_lineInsideCurrList = 0; i_lineInsideCurrList < listOfPremadeListsOfLines[i_listOfLines].Count; i_lineInsideCurrList++)
+ {
+ bool lineWasDrawn = listOfPremadeListsOfLines[i_listOfLines][i_lineInsideCurrList].Draw(chartPlane, numberOfAlreadyDrawnLines, chart_theseLinesArePartOf.xAxis.ValueMarkingLowerEndOfTheAxis, chart_theseLinesArePartOf.xAxis.ValueMarkingUpperEndOfTheAxis, chart_theseLinesArePartOf.yAxis.ValueMarkingLowerEndOfTheAxis, chart_theseLinesArePartOf.yAxis.ValueMarkingUpperEndOfTheAxis, durationInSec, hiddenByNearerObjects);
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = chart_theseLinesArePartOf;
+ if (lineWasDrawn) { numberOfAlreadyDrawnLines++; }
+ }
+ }
+ DXXLWrapperForUntiysBuildInDrawLines.currentlyDrawingChart = null;
+ }
+
+ GameObject gameobject_thatDeliveredThePreviousValue;
+ public void AddValue(Transform yValueOfNewDataPoint)
+ {
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ if (yValueOfNewDataPoint == null)
+ {
+ Debug.LogError("Chart: Cannot add value, because Transform is null.");
+ return;
+ }
+
+ bool isFirstValueOfThisGameobject = false;
+ if (gameobject_thatDeliveredThePreviousValue == null)
+ {
+ isFirstValueOfThisGameobject = true;
+ gameobject_thatDeliveredThePreviousValue = yValueOfNewDataPoint.gameObject;
+ }
+ else
+ {
+ if (gameobject_thatDeliveredThePreviousValue != yValueOfNewDataPoint.gameObject)
+ {
+ AddPointOfInterestForChangingValueSourceGameobject(premadeLine_transform_localPosition_x.GetCurrentAutomaticXValue(), gameobject_thatDeliveredThePreviousValue, yValueOfNewDataPoint.gameObject);
+ isFirstValueOfThisGameobject = true;
+ gameobject_thatDeliveredThePreviousValue = yValueOfNewDataPoint.gameObject;
+ }
+ }
+
+ AddValuesToTheTransformLines(yValueOfNewDataPoint, isFirstValueOfThisGameobject);
+ }
+ }
+
+ void AddValuesToTheTransformLines(Transform yValueOfNewDataPoint, bool isFirstValueOfThisGameobject)
+ {
+ //use chartDrawing.AddValue() instead
+ AddValueToATransformLine(premadeLine_transform_localPosition_x, yValueOfNewDataPoint.localPosition.x, isFirstValueOfThisGameobject, "local position", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_localPosition_y, yValueOfNewDataPoint.localPosition.y, isFirstValueOfThisGameobject, "local position", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_localPosition_z, yValueOfNewDataPoint.localPosition.z, isFirstValueOfThisGameobject, "local position", yValueOfNewDataPoint.gameObject);
+
+ AddValueToATransformLine(premadeLine_transform_localEulerAngle_x, yValueOfNewDataPoint.localEulerAngles.x, isFirstValueOfThisGameobject, "local euler angles", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_localEulerAngle_y, yValueOfNewDataPoint.localEulerAngles.y, isFirstValueOfThisGameobject, "local euler angles", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_localEulerAngle_z, yValueOfNewDataPoint.localEulerAngles.z, isFirstValueOfThisGameobject, "local euler angles", yValueOfNewDataPoint.gameObject);
+
+ AddValueToATransformLine(premadeLine_transform_localScale_x, yValueOfNewDataPoint.localScale.x, isFirstValueOfThisGameobject, "local scale", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_localScale_y, yValueOfNewDataPoint.localScale.y, isFirstValueOfThisGameobject, "local scale", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_localScale_z, yValueOfNewDataPoint.localScale.z, isFirstValueOfThisGameobject, "local scale", yValueOfNewDataPoint.gameObject);
+
+ AddValueToATransformLine(premadeLine_transform_globalPosition_x, yValueOfNewDataPoint.position.x, isFirstValueOfThisGameobject, "global position", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_globalPosition_y, yValueOfNewDataPoint.position.y, isFirstValueOfThisGameobject, "global position", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_globalPosition_z, yValueOfNewDataPoint.position.z, isFirstValueOfThisGameobject, "global position", yValueOfNewDataPoint.gameObject);
+
+ AddValueToATransformLine(premadeLine_transform_globalEulerAngle_x, yValueOfNewDataPoint.eulerAngles.x, isFirstValueOfThisGameobject, "global euler angles", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_globalEulerAngle_y, yValueOfNewDataPoint.eulerAngles.y, isFirstValueOfThisGameobject, "global euler angles", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_globalEulerAngle_z, yValueOfNewDataPoint.eulerAngles.z, isFirstValueOfThisGameobject, "global euler angles", yValueOfNewDataPoint.gameObject);
+
+ AddValueToATransformLine(premadeLine_transform_lossyScale_x, yValueOfNewDataPoint.lossyScale.x, isFirstValueOfThisGameobject, "lossy scale", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_lossyScale_y, yValueOfNewDataPoint.lossyScale.y, isFirstValueOfThisGameobject, "lossy scale", yValueOfNewDataPoint.gameObject);
+ AddValueToATransformLine(premadeLine_transform_lossyScale_z, yValueOfNewDataPoint.lossyScale.z, isFirstValueOfThisGameobject, "lossy scale", yValueOfNewDataPoint.gameObject);
+ }
+
+ void AddValueToATransformLine(ChartLine thisLine, float addedYValue, bool isFirstValueOfThisGameobject, string lineNameExtraInfo, GameObject gameobject_thatDeliversTheValue)
+ {
+ thisLine.AddValue(addedYValue);
+ if (isFirstValueOfThisGameobject)
+ {
+ thisLine.NameExtraInfo = lineNameExtraInfo + " (of " + gameobject_thatDeliversTheValue.name + ")";
+ thisLine.InternalAssignRepresentedGameobject(gameobject_thatDeliversTheValue);
+ }
+ }
+
+ public void AddValuesFromList_toListWithFloatLines(List yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines>(ref preMadeListOfLines_float, false, yValues, yValues.Count, UtilitiesDXXL_ChartDrawing.GetYValueFrom_listOfFloats_preAllocated, UtilitiesDXXL_ChartLine.DoDrawBecauseLineDoesntRepresentMultiComponentData, UtilitiesDXXL_Math.DimensionNullable.none, "(float)");
+ }
+ }
+
+ public void AddValuesFromArray_toListWithFloatLines(float[] yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines(ref preMadeListOfLines_float, false, yValues, yValues.Length, UtilitiesDXXL_ChartDrawing.GetYValueFrom_arrayOfFloats_preAllocated, UtilitiesDXXL_ChartLine.DoDrawBecauseLineDoesntRepresentMultiComponentData, UtilitiesDXXL_Math.DimensionNullable.none, "(float)");
+ }
+ }
+
+ public void AddValuesFromList_toListWithIntLines(List yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines>(ref preMadeListOfLines_int, false, yValues, yValues.Count, UtilitiesDXXL_ChartDrawing.GetYValueFrom_listOfInts_preAllocated, UtilitiesDXXL_ChartLine.DoDrawBecauseLineDoesntRepresentMultiComponentData, UtilitiesDXXL_Math.DimensionNullable.none, "(int)");
+ }
+ }
+
+ public void AddValuesFromArray_toListWithIntLines(int[] yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines(ref preMadeListOfLines_int, false, yValues, yValues.Length, UtilitiesDXXL_ChartDrawing.GetYValueFrom_arrayOfInts_preAllocated, UtilitiesDXXL_ChartLine.DoDrawBecauseLineDoesntRepresentMultiComponentData, UtilitiesDXXL_Math.DimensionNullable.none, "(int)");
+ }
+ }
+
+ public void AddValuesFromList_toListWithVector2Lines(List yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines>(ref preMadeListOfLines_vector2_x, false, yValues, yValues.Count, UtilitiesDXXL_ChartDrawing.GetYValueFrom_listOfVector2s_xComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_vector2_x_isEnabled, UtilitiesDXXL_Math.DimensionNullable.x, "of Vector2");
+ AddValueCollectionSlots_toLines>(ref preMadeListOfLines_vector2_y, false, yValues, yValues.Count, UtilitiesDXXL_ChartDrawing.GetYValueFrom_listOfVector2s_yComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_vector2_y_isEnabled, UtilitiesDXXL_Math.DimensionNullable.y, "of Vector2");
+ }
+ }
+
+ public void AddValuesFromArray_toListWithVector2Lines(Vector2[] yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines(ref preMadeListOfLines_vector2_x, false, yValues, yValues.Length, UtilitiesDXXL_ChartDrawing.GetYValueFrom_arrayOfVector2s_xComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_vector2_x_isEnabled, UtilitiesDXXL_Math.DimensionNullable.x, "of Vector2");
+ AddValueCollectionSlots_toLines(ref preMadeListOfLines_vector2_y, false, yValues, yValues.Length, UtilitiesDXXL_ChartDrawing.GetYValueFrom_arrayOfVector2s_yComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_vector2_y_isEnabled, UtilitiesDXXL_Math.DimensionNullable.y, "of Vector2");
+ }
+ }
+
+ public void AddValuesFromList_toListWithVector3Lines(List yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines>(ref preMadeListOfLines_vector3_x, false, yValues, yValues.Count, UtilitiesDXXL_ChartDrawing.GetYValueFrom_listOfVector3s_xComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_vector3_x_isEnabled, UtilitiesDXXL_Math.DimensionNullable.x, "of Vector3");
+ AddValueCollectionSlots_toLines>(ref preMadeListOfLines_vector3_y, false, yValues, yValues.Count, UtilitiesDXXL_ChartDrawing.GetYValueFrom_listOfVector3s_yComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_vector3_y_isEnabled, UtilitiesDXXL_Math.DimensionNullable.y, "of Vector3");
+ AddValueCollectionSlots_toLines>(ref preMadeListOfLines_vector3_z, false, yValues, yValues.Count, UtilitiesDXXL_ChartDrawing.GetYValueFrom_listOfVector3s_zComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_vector3_z_isEnabled, UtilitiesDXXL_Math.DimensionNullable.z, "of Vector3");
+ }
+ }
+
+ public void AddValuesFromArray_toListWithVector3Lines(Vector3[] yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines(ref preMadeListOfLines_vector3_x, false, yValues, yValues.Length, UtilitiesDXXL_ChartDrawing.GetYValueFrom_arrayOfVector3s_xComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_vector3_x_isEnabled, UtilitiesDXXL_Math.DimensionNullable.x, "of Vector3");
+ AddValueCollectionSlots_toLines(ref preMadeListOfLines_vector3_y, false, yValues, yValues.Length, UtilitiesDXXL_ChartDrawing.GetYValueFrom_arrayOfVector3s_yComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_vector3_y_isEnabled, UtilitiesDXXL_Math.DimensionNullable.y, "of Vector3");
+ AddValueCollectionSlots_toLines(ref preMadeListOfLines_vector3_z, false, yValues, yValues.Length, UtilitiesDXXL_ChartDrawing.GetYValueFrom_arrayOfVector3s_zComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_vector3_z_isEnabled, UtilitiesDXXL_Math.DimensionNullable.z, "of Vector3");
+ }
+ }
+
+ public void AddValuesFromList_toListWithQuaternionLines(List yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines>(ref preMadeListOfLines_rotation_eulerX, false, yValues, yValues.Count, UtilitiesDXXL_ChartDrawing.GetYValueFrom_listOfQuaternions_eulerXComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_rotation_eulerX_isEnabled, UtilitiesDXXL_Math.DimensionNullable.x, "(euler angles)");
+ AddValueCollectionSlots_toLines>(ref preMadeListOfLines_rotation_eulerY, false, yValues, yValues.Count, UtilitiesDXXL_ChartDrawing.GetYValueFrom_listOfQuaternions_eulerYComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_rotation_eulerY_isEnabled, UtilitiesDXXL_Math.DimensionNullable.y, "(euler angles)");
+ AddValueCollectionSlots_toLines>(ref preMadeListOfLines_rotation_eulerZ, false, yValues, yValues.Count, UtilitiesDXXL_ChartDrawing.GetYValueFrom_listOfQuaternions_eulerZComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_rotation_eulerZ_isEnabled, UtilitiesDXXL_Math.DimensionNullable.z, "(euler angles)");
+ }
+ }
+
+ public void AddValuesFromArray_toListWithQuaternionLines(Quaternion[] yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines(ref preMadeListOfLines_rotation_eulerX, false, yValues, yValues.Length, UtilitiesDXXL_ChartDrawing.GetYValueFrom_arrayOfQuaternions_eulerXComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_rotation_eulerX_isEnabled, UtilitiesDXXL_Math.DimensionNullable.x, "(euler angles)");
+ AddValueCollectionSlots_toLines(ref preMadeListOfLines_rotation_eulerY, false, yValues, yValues.Length, UtilitiesDXXL_ChartDrawing.GetYValueFrom_arrayOfQuaternions_eulerYComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_rotation_eulerY_isEnabled, UtilitiesDXXL_Math.DimensionNullable.y, "(euler angles)");
+ AddValueCollectionSlots_toLines(ref preMadeListOfLines_rotation_eulerZ, false, yValues, yValues.Length, UtilitiesDXXL_ChartDrawing.GetYValueFrom_arrayOfQuaternions_eulerZComponent_preAllocated, UtilitiesDXXL_ChartLine.DrawIf_rotation_eulerZ_isEnabled, UtilitiesDXXL_Math.DimensionNullable.z, "(euler angles)");
+ }
+ }
+
+ public void AddValuesFromList_toListWithBoolLines(List yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines>(ref preMadeListOfLines_bool, false, yValues, yValues.Count, UtilitiesDXXL_ChartDrawing.GetYValueFrom_listOfBools_preAllocated, UtilitiesDXXL_ChartLine.DoDrawBecauseLineDoesntRepresentMultiComponentData, UtilitiesDXXL_Math.DimensionNullable.none, "(bool)");
+ }
+ }
+
+ public void AddValuesFromArray_toListWithBoolLines(bool[] yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ AddValueCollectionSlots_toLines(ref preMadeListOfLines_bool, false, yValues, yValues.Length, UtilitiesDXXL_ChartDrawing.GetYValueFrom_arrayOfBools_preAllocated, UtilitiesDXXL_ChartLine.DoDrawBecauseLineDoesntRepresentMultiComponentData, UtilitiesDXXL_Math.DimensionNullable.none, "(bool)");
+ }
+ }
+
+ public void AddValuesFromList_toListWithGameobjectLines(List yValues)
+ {
+ //use chartDrawing.AddValues_eachIndexIsALine() instead
+
+ if (DrawBasics.usedUnityLineDrawingMethod != DrawBasics.UsedUnityLineDrawingMethod.disabled) //-> preventing memory leaks in builds if someone forgot to remove is "AddValue()" calls
+ {
+ TrySetPointsOfInterest_forChangingGameobjectsInCollectionSlots(yValues);
+ AddValueCollectionSlots_toLines