mirror of
https://github.com/DCFApixels/Unity-DebugX.git
synced 2025-09-18 01:54:37 +08:00
update sample
This commit is contained in:
parent
e470b229bc
commit
48c4753756
@ -2404,6 +2404,7 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 854408294}
|
||||
- {fileID: 618947640}
|
||||
- {fileID: 938543767}
|
||||
- {fileID: 819845932}
|
||||
- {fileID: 734505742}
|
||||
- {fileID: 1548291220}
|
||||
@ -2540,6 +2541,7 @@ MonoBehaviour:
|
||||
- {fileID: 1230489027}
|
||||
- {fileID: 82819859}
|
||||
WarrningPoint: {fileID: 223293504}
|
||||
RotatedTransform: {fileID: 819845932}
|
||||
--- !u!4 &700624119
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3266,6 +3268,84 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1625911623}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &938543766
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 938543767}
|
||||
- component: {fileID: 938543768}
|
||||
m_Layer: 0
|
||||
m_Name: Collider (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &938543767
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 938543766}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: -3.007, z: 0.5}
|
||||
m_LocalScale: {x: 6, y: 0.5000001, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 644929157}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!61 &938543768
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 938543766}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1 &1048642970
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5793,6 +5873,8 @@ MonoBehaviour:
|
||||
- {fileID: 1190527457}
|
||||
- {fileID: 607411204}
|
||||
WarrningPoint: {fileID: 1275004640}
|
||||
RotatedTransform: {fileID: 1102617550}
|
||||
RotationSpeed: 30
|
||||
--- !u!4 &2070085917
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -31,7 +31,7 @@ namespace DCFApixels.DebugXCore.Samples
|
||||
i++; DebugX.Draw(GetColor(Points[i])).BillboardCircle(Points[i].position, Points[i].localScale.x * RADIUS_M);
|
||||
i++; DebugX.Draw(GetColor(Points[i])).WireMesh<SphereMesh>(Points[i].position, Points[i].rotation, Points[i].localScale * RADIUS_M);
|
||||
i++; DebugX.Draw(GetColor(Points[i])).Text(Points[i].position, Points[i].name, DebugXTextSettings.WorldSpaceScale.SetSize(26).SetBackground(TextBackgroundColor));
|
||||
|
||||
|
||||
i++; DebugX.Draw(GetColor(Points[i])).Dot(Points[i].position);
|
||||
i++; DebugX.Draw(GetColor(Points[i])).WireDot(Points[i].position);
|
||||
i++; DebugX.Draw(GetColor(Points[i])).DotQuad(Points[i].position);
|
||||
|
@ -11,6 +11,8 @@ namespace DCFApixels.DebugXCore.Samples
|
||||
public Transform[] Points;
|
||||
public Transform WarrningPoint;
|
||||
|
||||
public Transform RotatedTransform;
|
||||
public float RotationSpeed = 30;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void OnDrawGizmos()
|
||||
@ -56,6 +58,11 @@ namespace DCFApixels.DebugXCore.Samples
|
||||
#else
|
||||
DebugX.Draw(GetColor(WarrningPoint).Inverse()).Text(WarrningPoint.position, "Add \"DEBUGX_ENABLE_PHYSICS2D\" define", DebugXTextSettings.WorldSpaceScale.SetSize(22).SetAnchor(TextAnchor.MiddleCenter));
|
||||
#endif
|
||||
|
||||
if (Application.isPlaying && RotatedTransform)
|
||||
{
|
||||
RotatedTransform.Rotate(new Vector3(0, RotationSpeed * Time.deltaTime, 0));
|
||||
}
|
||||
}
|
||||
private Color GetColor(Transform pos1)
|
||||
{
|
||||
|
@ -11,6 +11,8 @@ namespace DCFApixels.DebugXCore.Samples
|
||||
public Transform[] Points;
|
||||
public Transform WarrningPoint;
|
||||
|
||||
public Transform RotatedTransform;
|
||||
public float RotationSpeed = 30;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void OnDrawGizmos()
|
||||
@ -58,6 +60,11 @@ namespace DCFApixels.DebugXCore.Samples
|
||||
#else
|
||||
DebugX.Draw(GetColor(WarrningPoint).Inverse()).Text(WarrningPoint.position, "Add \"DEBUGX_ENABLE_PHYSICS3D\" define", DebugXTextSettings.WorldSpaceScale.SetSize(22).SetAnchor(TextAnchor.MiddleCenter));
|
||||
#endif
|
||||
|
||||
if (Application.isPlaying && RotatedTransform)
|
||||
{
|
||||
RotatedTransform.Rotate(new Vector3(0, RotationSpeed * Time.deltaTime, 0));
|
||||
}
|
||||
}
|
||||
private Color GetColor(Transform pos1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user