Skip to content

Commit 24ffa4f

Browse files
committed
init
1 parent a828e5d commit 24ffa4f

File tree

119 files changed

+16452
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+16452
-2
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ sysinfo.txt
5959
*.apk
6060
*.aab
6161
*.unitypackage
62-
*.unitypackage.meta
6362
*.app
6463

6564
# Crashlytics generated file

DebugX.asmdef

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "DCFApixels.DebugX",
3+
"rootNamespace": "DCFApixels",
4+
"references": [],
5+
"includePlatforms": [],
6+
"excludePlatforms": [],
7+
"allowUnsafeCode": true,
8+
"overrideReferences": false,
9+
"precompiledReferences": [],
10+
"autoReferenced": true,
11+
"defineConstraints": [],
12+
"versionDefines": [],
13+
"noEngineReferences": false
14+
}

DebugX.asmdef.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Settings.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Settings/DebugXSettings.cs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#if UNITY_EDITOR
2+
using UnityEditor;
3+
using UnityEngine;
4+
5+
namespace DCFApixels.DebugXCore.Internal
6+
{
7+
internal class DebugXSettings : EditorWindow
8+
{
9+
[MenuItem("Tools/DebugX/Settings")]
10+
private static void Open()
11+
{
12+
DebugXSettings window = (DebugXSettings)EditorWindow.GetWindow(typeof(DebugXSettings));
13+
window.Show();
14+
}
15+
16+
private void OnGUI()
17+
{
18+
float tmpValue;
19+
20+
DebugX.GlobalTimeScale = EditorGUILayout.FloatField("TimeScale", DebugX.GlobalTimeScale);
21+
EditorGUI.BeginChangeCheck();
22+
tmpValue = EditorGUILayout.Slider(DebugX.GlobalTimeScale, 0, 2);
23+
if (EditorGUI.EndChangeCheck())
24+
{
25+
DebugX.GlobalTimeScale = tmpValue;
26+
}
27+
28+
DebugX.GlobalDotSize = EditorGUILayout.FloatField("DotSize", DebugX.GlobalDotSize);
29+
EditorGUI.BeginChangeCheck();
30+
tmpValue = EditorGUILayout.Slider(DebugX.GlobalDotSize, 0, 2);
31+
if (EditorGUI.EndChangeCheck())
32+
{
33+
DebugX.GlobalDotSize = tmpValue;
34+
}
35+
36+
DebugX.GlobalColor = EditorGUILayout.ColorField("Color", DebugX.GlobalColor);
37+
Color color = DebugX.GlobalColor;
38+
color.a = EditorGUILayout.Slider(DebugX.GlobalColor.a, 0, 1);
39+
DebugX.GlobalColor = color;
40+
41+
if (GUILayout.Button("Reset"))
42+
{
43+
DebugX.ResetGlobals();
44+
}
45+
46+
if (GUILayout.Button("Clear All Gizmos"))
47+
{
48+
DebugX.ClearAllGizmos();
49+
}
50+
}
51+
}
52+
}
53+
#endif

Editor/Settings/DebugXSettings.cs.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 Mikhail
3+
Copyright (c) 2025 DCFApixels
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

LICENSE.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Unity-DebugX
2+
3+
![image](https://github.com/user-attachments/assets/fb3edbce-9164-4ad7-a7a2-85748edf58e0)

README.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime/Consts.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System.Runtime.CompilerServices;
2+
using UnityEngine;
3+
4+
namespace DCFApixels
5+
{
6+
public static partial class DebugX
7+
{
8+
internal const MethodImplOptions LINE = MethodImplOptions.AggressiveInlining;
9+
10+
private const float MinTime = 0f;
11+
private static readonly Color DefaultColor = Color.white;
12+
13+
private const float DOT_SIZE = DOT_RADIUS * 2f;
14+
private const float DOT_RADIUS = 0.05f;
15+
private const float BackfaceAlphaMultiplier = 0.3f;
16+
17+
internal readonly static int ColorPropertyID = Shader.PropertyToID("_Color");
18+
internal readonly static int GlobalDotSizePropertyID = Shader.PropertyToID("_DebugX_GlobalDotSize");
19+
internal readonly static int GlobalColorPropertyID = Shader.PropertyToID("_DebugX_GlobalColor");
20+
21+
private readonly static bool IsSRP;
22+
private readonly static bool IsSupportsComputeShaders = SystemInfo.supportsComputeShaders;
23+
24+
public const float IMMEDIATE_DURATION = -1;
25+
}
26+
27+
public enum DebugXLine
28+
{
29+
Default,
30+
Arrow,
31+
Fade,
32+
}
33+
}

Runtime/Consts.cs.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)