mirror of
https://github.com/DCFApixels/Unity-DebugX.git
synced 2025-09-19 02:24:36 +08:00
Compare commits
No commits in common. "e470b229bc95be1f4abe7d6b95f1c8b37247862d" and "4b709366d9c57f3d1c5d93b328a2e388061bf7da" have entirely different histories.
e470b229bc
...
4b709366d9
@ -64,15 +64,11 @@ DebugX.Draw(duration, color).*Gizmo Function*(...);
|
|||||||
# Установка
|
# Установка
|
||||||
Семантика версионирования - [Открыть](https://gist.github.com/DCFApixels/e53281d4628b19fe5278f3e77a7da9e8#file-dcfapixels_versioning_ru-md)
|
Семантика версионирования - [Открыть](https://gist.github.com/DCFApixels/e53281d4628b19fe5278f3e77a7da9e8#file-dcfapixels_versioning_ru-md)
|
||||||
### Unity-Package
|
### Unity-Package
|
||||||
Поддерживается установка в виде Unity-модуля, достаточно добавить [в PackageManager](https://docs.unity3d.com/2023.2/Documentation/Manual/upm-ui-giturl.html) этот Git-URL :
|
Поддерживается установка в виде Unity-модуля, достаточно скопировать Git-URL [в PackageManager](https://docs.unity3d.com/2023.2/Documentation/Manual/upm-ui-giturl.html) или в `Packages/manifest.json`. Скопируйте этот Git-URL для установки актуальной рабочей версии:
|
||||||
```
|
```
|
||||||
https://github.com/DCFApixels/Unity-DebugX.git
|
https://github.com/DCFApixels/Unity-DebugX.git
|
||||||
```
|
```
|
||||||
Или скопировать в `Packages/manifest.json` эту строчку:
|
### 作为源代码
|
||||||
```
|
|
||||||
"com.dcfa_pixels.debugx": "https://github.com/DCFApixels/Unity-DebugX.git"
|
|
||||||
```
|
|
||||||
### В виде исходников
|
|
||||||
Пакет так же может быть напрямую скопирован в папку проекта.
|
Пакет так же может быть напрямую скопирован в папку проекта.
|
||||||
|
|
||||||
</br>
|
</br>
|
||||||
|
@ -63,15 +63,10 @@ DebugX.Draw(duration, color).*Gizmo Function*(...);
|
|||||||
# Installation
|
# Installation
|
||||||
Versioning semantics - [Открыть](https://gist.github.com/DCFApixels/e53281d4628b19fe5278f3e77a7da9e8#file-dcfapixels_versioning_ru-md)
|
Versioning semantics - [Открыть](https://gist.github.com/DCFApixels/e53281d4628b19fe5278f3e77a7da9e8#file-dcfapixels_versioning_ru-md)
|
||||||
### Unity-Package
|
### Unity-Package
|
||||||
Supports installation as a Unity module. Copy the Git-URL [into PackageManager](https://docs.unity3d.com/2023.2/Documentation/Manual/upm-ui-giturl.html):
|
Supports installation as a Unity module. Copy the Git-URL [into PackageManager](https://docs.unity3d.com/2023.2/Documentation/Manual/upm-ui-giturl.html) or into `Packages/manifest.json`. Copy this Git-URL to install the latest working version:
|
||||||
```
|
```
|
||||||
https://github.com/DCFApixels/Unity-DebugX.git
|
https://github.com/DCFApixels/Unity-DebugX.git
|
||||||
```
|
```
|
||||||
Alternatively, copy this line into `Packages/manifest.json`:
|
|
||||||
```
|
|
||||||
"com.dcfa_pixels.debugx": "https://github.com/DCFApixels/Unity-DebugX.git"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Source Code
|
### Source Code
|
||||||
The Package can also be directly copied into the project folder.
|
The Package can also be directly copied into the project folder.
|
||||||
|
|
||||||
|
@ -622,7 +622,7 @@ MonoBehaviour:
|
|||||||
m_ColorSpace: -1
|
m_ColorSpace: -1
|
||||||
m_NumColorKeys: 3
|
m_NumColorKeys: 3
|
||||||
m_NumAlphaKeys: 2
|
m_NumAlphaKeys: 2
|
||||||
GradientMultiplier: 3
|
GradientMultiplier: 2
|
||||||
Points:
|
Points:
|
||||||
- {fileID: 1728437382}
|
- {fileID: 1728437382}
|
||||||
- {fileID: 54381892}
|
- {fileID: 54381892}
|
||||||
@ -875,37 +875,6 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 2137543453}
|
m_Father: {fileID: 2137543453}
|
||||||
m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0}
|
||||||
--- !u!1 &223293503
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 223293504}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Warrning
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &223293504
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 223293503}
|
|
||||||
serializedVersion: 2
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -1.82}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 241950277}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!1 &227658960
|
--- !u!1 &227658960
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1006,7 +975,6 @@ Transform:
|
|||||||
- {fileID: 629058557}
|
- {fileID: 629058557}
|
||||||
- {fileID: 1190527457}
|
- {fileID: 1190527457}
|
||||||
- {fileID: 607411204}
|
- {fileID: 607411204}
|
||||||
- {fileID: 1275004640}
|
|
||||||
m_Father: {fileID: 2070085917}
|
m_Father: {fileID: 2070085917}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &239565651
|
--- !u!1 &239565651
|
||||||
@ -1128,7 +1096,6 @@ Transform:
|
|||||||
- {fileID: 1968074010}
|
- {fileID: 1968074010}
|
||||||
- {fileID: 1230489027}
|
- {fileID: 1230489027}
|
||||||
- {fileID: 82819859}
|
- {fileID: 82819859}
|
||||||
- {fileID: 223293504}
|
|
||||||
m_Father: {fileID: 700624119}
|
m_Father: {fileID: 700624119}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &290054995
|
--- !u!1 &290054995
|
||||||
@ -1654,7 +1621,7 @@ MonoBehaviour:
|
|||||||
m_ColorSpace: -1
|
m_ColorSpace: -1
|
||||||
m_NumColorKeys: 3
|
m_NumColorKeys: 3
|
||||||
m_NumAlphaKeys: 2
|
m_NumAlphaKeys: 2
|
||||||
GradientMultiplier: 1.5
|
GradientMultiplier: 2
|
||||||
WidthMultiplier: 1
|
WidthMultiplier: 1
|
||||||
StartLines:
|
StartLines:
|
||||||
- {fileID: 1105319542}
|
- {fileID: 1105319542}
|
||||||
@ -2539,7 +2506,6 @@ MonoBehaviour:
|
|||||||
- {fileID: 1968074010}
|
- {fileID: 1968074010}
|
||||||
- {fileID: 1230489027}
|
- {fileID: 1230489027}
|
||||||
- {fileID: 82819859}
|
- {fileID: 82819859}
|
||||||
WarrningPoint: {fileID: 223293504}
|
|
||||||
--- !u!4 &700624119
|
--- !u!4 &700624119
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -3684,37 +3650,6 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 162132448}
|
m_Father: {fileID: 162132448}
|
||||||
m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0}
|
||||||
--- !u!1 &1275004639
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1275004640}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Warrning
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &1275004640
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1275004639}
|
|
||||||
serializedVersion: 2
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0.58000004, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 234433271}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!1 &1302158462
|
--- !u!1 &1302158462
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -5579,7 +5514,7 @@ MonoBehaviour:
|
|||||||
m_ColorSpace: -1
|
m_ColorSpace: -1
|
||||||
m_NumColorKeys: 3
|
m_NumColorKeys: 3
|
||||||
m_NumAlphaKeys: 2
|
m_NumAlphaKeys: 2
|
||||||
GradientMultiplier: 3
|
GradientMultiplier: 2
|
||||||
Points:
|
Points:
|
||||||
- {fileID: 1170244042}
|
- {fileID: 1170244042}
|
||||||
- {fileID: 151432312}
|
- {fileID: 151432312}
|
||||||
@ -5792,7 +5727,6 @@ MonoBehaviour:
|
|||||||
- {fileID: 629058557}
|
- {fileID: 629058557}
|
||||||
- {fileID: 1190527457}
|
- {fileID: 1190527457}
|
||||||
- {fileID: 607411204}
|
- {fileID: 607411204}
|
||||||
WarrningPoint: {fileID: 1275004640}
|
|
||||||
--- !u!4 &2070085917
|
--- !u!4 &2070085917
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
using DCFApixels.DebugXCore.Samples.Internal;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace DCFApixels.DebugXCore.Samples
|
namespace DCFApixels.DebugXCore.Samples
|
||||||
@ -40,7 +39,12 @@ namespace DCFApixels.DebugXCore.Samples
|
|||||||
}
|
}
|
||||||
private Color GetColor(Transform pos1, Transform pos2)
|
private Color GetColor(Transform pos1, Transform pos2)
|
||||||
{
|
{
|
||||||
return Gradient.Evaluate(pos1, pos2, GradientMultiplier);
|
Vector3 pos = (pos1.localPosition + pos2.localPosition) * 0.5f;
|
||||||
|
pos /= GradientMultiplier == 0 ? 1 : GradientMultiplier;
|
||||||
|
pos += Vector3.one * 0.5f;
|
||||||
|
float t = pos.x + pos.y + pos.z;
|
||||||
|
t /= 3f;
|
||||||
|
return Gradient.Evaluate(Mathf.Clamp01(t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
using DCFApixels.DebugXCore.Samples.Internal;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace DCFApixels.DebugXCore.Samples
|
namespace DCFApixels.DebugXCore.Samples
|
||||||
@ -43,7 +42,12 @@ namespace DCFApixels.DebugXCore.Samples
|
|||||||
}
|
}
|
||||||
private Color GetColor(Transform pos1)
|
private Color GetColor(Transform pos1)
|
||||||
{
|
{
|
||||||
return Gradient.Evaluate(pos1, GradientMultiplier);
|
Vector3 pos = pos1.localPosition;
|
||||||
|
pos /= GradientMultiplier == 0 ? 1 : GradientMultiplier;
|
||||||
|
pos += Vector3.one * 0.5f;
|
||||||
|
float t = pos.x + pos.y + pos.z;
|
||||||
|
t /= 3f;
|
||||||
|
return Gradient.Evaluate(Mathf.Clamp01(t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,3 @@
|
|||||||
using DCFApixels.DebugXCore.Samples.Internal;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace DCFApixels.DebugXCore.Samples
|
namespace DCFApixels.DebugXCore.Samples
|
||||||
@ -44,7 +43,12 @@ namespace DCFApixels.DebugXCore.Samples
|
|||||||
}
|
}
|
||||||
private Color GetColor(Transform pos1)
|
private Color GetColor(Transform pos1)
|
||||||
{
|
{
|
||||||
return Gradient.Evaluate(pos1, GradientMultiplier);
|
Vector3 pos = pos1.localPosition;
|
||||||
|
pos /= GradientMultiplier == 0 ? 1 : GradientMultiplier;
|
||||||
|
pos += Vector3.one * 0.5f;
|
||||||
|
float t = pos.x + pos.y + pos.z;
|
||||||
|
t /= 3f;
|
||||||
|
return Gradient.Evaluate(Mathf.Clamp01(t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
using DCFApixels.DebugXCore.Samples.Internal;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace DCFApixels.DebugXCore.Samples
|
namespace DCFApixels.DebugXCore.Samples
|
||||||
@ -45,7 +44,12 @@ namespace DCFApixels.DebugXCore.Samples
|
|||||||
}
|
}
|
||||||
private Color GetColor(Transform pos1)
|
private Color GetColor(Transform pos1)
|
||||||
{
|
{
|
||||||
return Gradient.Evaluate(pos1, GradientMultiplier);
|
Vector3 pos = pos1.localPosition;
|
||||||
|
pos /= GradientMultiplier == 0 ? 1 : GradientMultiplier;
|
||||||
|
pos += Vector3.one * 0.5f;
|
||||||
|
float t = pos.x + pos.y + pos.z;
|
||||||
|
t /= 3f;
|
||||||
|
return Gradient.Evaluate(Mathf.Clamp01(t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
using DCFApixels.DebugXCore.Samples.Internal;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace DCFApixels.DebugXCore.Samples
|
namespace DCFApixels.DebugXCore.Samples
|
||||||
@ -9,8 +8,6 @@ namespace DCFApixels.DebugXCore.Samples
|
|||||||
public Gradient Gradient;
|
public Gradient Gradient;
|
||||||
public float GradientMultiplier = 5;
|
public float GradientMultiplier = 5;
|
||||||
public Transform[] Points;
|
public Transform[] Points;
|
||||||
public Transform WarrningPoint;
|
|
||||||
|
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
private void OnDrawGizmos()
|
private void OnDrawGizmos()
|
||||||
@ -53,13 +50,18 @@ namespace DCFApixels.DebugXCore.Samples
|
|||||||
ray = new Ray(point.position, point.forward);
|
ray = new Ray(point.position, point.forward);
|
||||||
hit = Physics2D.CapsuleCast(ray.origin, point.localScale, CapsuleDirection2D.Vertical, point.eulerAngles.z, ray.direction, float.PositiveInfinity, int.MaxValue);
|
hit = Physics2D.CapsuleCast(ray.origin, point.localScale, CapsuleDirection2D.Vertical, point.eulerAngles.z, ray.direction, float.PositiveInfinity, int.MaxValue);
|
||||||
DebugX.Draw(GetColor(point)).CapsuleCast2D(ray, point.eulerAngles.z, point.localScale, CapsuleDirection2D.Vertical, hit);
|
DebugX.Draw(GetColor(point)).CapsuleCast2D(ray, point.eulerAngles.z, point.localScale, CapsuleDirection2D.Vertical, hit);
|
||||||
#else
|
|
||||||
DebugX.Draw(GetColor(WarrningPoint).Inverse()).Text(WarrningPoint.position, "Add \"DEBUGX_ENABLE_PHYSICS2D\" define", DebugXTextSettings.WorldSpaceScale.SetSize(22).SetAnchor(TextAnchor.MiddleCenter));
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
private Color GetColor(Transform pos1)
|
private Color GetColor(Transform pos1)
|
||||||
{
|
{
|
||||||
return Gradient.Evaluate(pos1, GradientMultiplier);
|
Vector3 pos = pos1.localPosition;
|
||||||
|
pos /= GradientMultiplier == 0 ? 1 : GradientMultiplier;
|
||||||
|
pos += Vector3.one * 0.5f;
|
||||||
|
//float t = pos.x + pos.y + pos.z;
|
||||||
|
//t /= 3f;
|
||||||
|
float t = pos.x + pos.z;
|
||||||
|
t /= 2f;
|
||||||
|
return Gradient.Evaluate(Mathf.Clamp01(t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
using DCFApixels.DebugXCore.Samples.Internal;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace DCFApixels.DebugXCore.Samples
|
namespace DCFApixels.DebugXCore.Samples
|
||||||
@ -9,7 +8,7 @@ namespace DCFApixels.DebugXCore.Samples
|
|||||||
public Gradient Gradient;
|
public Gradient Gradient;
|
||||||
public float GradientMultiplier = 5;
|
public float GradientMultiplier = 5;
|
||||||
public Transform[] Points;
|
public Transform[] Points;
|
||||||
public Transform WarrningPoint;
|
|
||||||
|
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
@ -55,13 +54,16 @@ namespace DCFApixels.DebugXCore.Samples
|
|||||||
Vector3 point2 = ray.origin + point.up * point.localScale.y * RADIUS_M * -0.5f;
|
Vector3 point2 = ray.origin + point.up * point.localScale.y * RADIUS_M * -0.5f;
|
||||||
Physics.CapsuleCast(point1, point2, point.localScale.x * RADIUS_M, ray.direction, out hit, float.PositiveInfinity, int.MaxValue, QueryTriggerInteraction.UseGlobal);
|
Physics.CapsuleCast(point1, point2, point.localScale.x * RADIUS_M, ray.direction, out hit, float.PositiveInfinity, int.MaxValue, QueryTriggerInteraction.UseGlobal);
|
||||||
DebugX.Draw(GetColor(point)).CapsuleCast(point1, point2, ray.direction, point.localScale.x * RADIUS_M, hit);
|
DebugX.Draw(GetColor(point)).CapsuleCast(point1, point2, ray.direction, point.localScale.x * RADIUS_M, hit);
|
||||||
#else
|
|
||||||
DebugX.Draw(GetColor(WarrningPoint).Inverse()).Text(WarrningPoint.position, "Add \"DEBUGX_ENABLE_PHYSICS3D\" define", DebugXTextSettings.WorldSpaceScale.SetSize(22).SetAnchor(TextAnchor.MiddleCenter));
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
private Color GetColor(Transform pos1)
|
private Color GetColor(Transform pos1)
|
||||||
{
|
{
|
||||||
return Gradient.Evaluate(pos1, GradientMultiplier);
|
Vector3 pos = pos1.localPosition;
|
||||||
|
pos /= GradientMultiplier == 0 ? 1 : GradientMultiplier;
|
||||||
|
pos += Vector3.one * 0.5f;
|
||||||
|
float t = pos.x + pos.y + pos.z;
|
||||||
|
t /= 3f;
|
||||||
|
return Gradient.Evaluate(Mathf.Clamp01(t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace DCFApixels.DebugXCore.Samples.Internal
|
|
||||||
{
|
|
||||||
internal static class Utils
|
|
||||||
{
|
|
||||||
public static Color Evaluate(this Gradient gradient, Transform transform, float m)
|
|
||||||
{
|
|
||||||
Vector3 pos = transform.localPosition;
|
|
||||||
pos /= m == 0 ? 1 : m;
|
|
||||||
pos += Vector3.one * 0.5f;
|
|
||||||
float t = pos.x + pos.z;
|
|
||||||
t /= 2f;
|
|
||||||
return gradient.Evaluate(Mathf.Clamp01(t));
|
|
||||||
}
|
|
||||||
public static Color Evaluate(this Gradient gradient, Transform transform0, Transform transform1, float m)
|
|
||||||
{
|
|
||||||
Vector3 pos = (transform0.localPosition + transform1.localPosition) * 0.5f;
|
|
||||||
pos /= m == 0 ? 1 : m;
|
|
||||||
pos += Vector3.one * 0.5f;
|
|
||||||
float t = pos.x + pos.z;
|
|
||||||
t /= 3f;
|
|
||||||
return gradient.Evaluate(Mathf.Clamp01(t));
|
|
||||||
}
|
|
||||||
public static Color Inverse(this Color c)
|
|
||||||
{
|
|
||||||
var a = c.a;
|
|
||||||
c = Color.white - c;
|
|
||||||
c.a = a;
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 646aedc98b9a6f3458a27f6d43e85990
|
|
@ -8,7 +8,7 @@
|
|||||||
"displayName": "DebugX",
|
"displayName": "DebugX",
|
||||||
"description": "",
|
"description": "",
|
||||||
"unity": "2021.3",
|
"unity": "2021.3",
|
||||||
"version": "0.8.12",
|
"version": "0.8.11",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/DCFApixels/DebugX.git"
|
"url": "https://github.com/DCFApixels/DebugX.git"
|
||||||
|
Loading…
Reference in New Issue
Block a user