This commit is contained in:
2025-09-17 18:56:28 +08:00
commit 54c72710a5
5244 changed files with 5717609 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
using UnityEngine;
namespace DestroyIt
{
public class DrawLine : MonoBehaviour
{
public bool isActive = true;
void OnDrawGizmos()
{
if (isActive)
Gizmos.DrawLine(transform.position, transform.position + transform.forward * 10f);
}
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f5b614943b0745545887eb8b2678f44f
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@@ -0,0 +1,35 @@
using UnityEngine;
/// <summary>
/// Put this script on your _GameManager gameObject to have it draw gizmos for DestroyIt features (like cling points, support
/// points, and structural joints). NOTE: This script is designed to only run in Editor mode, for performance reasons.
/// </summary>
namespace DestroyIt
{
public class EditorGizmos : MonoBehaviour
{
public bool showJointAnchors = true;
#if UNITY_EDITOR
private void OnDrawGizmos()
{
// Checks
if (Application.isPlaying) return;
// JOINT ANCHORS
if (showJointAnchors)
{
Joint[] joints = Object.FindObjectsOfType<Joint>();
if (joints.Length > 0)
{
foreach (Joint jnt in joints)
{
Vector3 pos = jnt.transform.TransformPoint(jnt.anchor);
Gizmos.DrawWireSphere(pos, 0.05f);
}
}
}
}
#endif
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3da395340588a1e4cbbecab69ae47adc
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData: