This commit is contained in:
2026-06-11 22:49:50 +07:00
parent 458c338b27
commit e85e66002f
4105 changed files with 1435727 additions and 11 deletions

View File

@@ -0,0 +1,16 @@
using UnityEditor;
namespace Pathfinding {
[CustomEditor(typeof(FunnelModifier))]
[CanEditMultipleObjects]
public class FunnelModifierEditor : EditorBase {
protected override void Inspector () {
Section("Settings for navmeshes");
PropertyField("quality");
PropertyField("splitAtEveryPortal");
Section("Settings for grids");
PropertyField("accountForGridPenalties");
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3e6d301cc4df3beab9b5c57be031e267
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,38 @@
using UnityEditor;
namespace Pathfinding {
[CustomEditor(typeof(RaycastModifier))]
[CanEditMultipleObjects]
public class RaycastModifierEditor : EditorBase {
protected override void Inspector () {
PropertyField("quality");
if (PropertyField("useRaycasting", "Use Physics Raycasting")) {
EditorGUI.indentLevel++;
PropertyField("use2DPhysics");
if (PropertyField("thickRaycast")) {
EditorGUI.indentLevel++;
FloatField("thickRaycastRadius", min: 0f);
EditorGUI.indentLevel--;
}
PropertyField("raycastOffset");
PropertyField("mask", "Layer Mask");
EditorGUI.indentLevel--;
}
PropertyField("useGraphRaycasting");
if (!FindProperty("useGraphRaycasting").boolValue && !FindProperty("useRaycasting").boolValue) {
EditorGUILayout.HelpBox("You should use either raycasting, graph raycasting or both, otherwise this modifier will not do anything", MessageType.Warning);
}
if (FindProperty("useGraphRaycasting").boolValue && !FindProperty("useRaycasting").boolValue) {
AstarPath.FindAstarPath();
if (AstarPath.active != null && AstarPath.active.data.gridGraph != null) {
EditorGUILayout.HelpBox("For grid graphs, when using only graph raycasting the funnel modifier has superceded this modifier. Try using that instead. It's faster and more accurate.", MessageType.Warning);
}
}
}
}
}

View File

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

View File

@@ -0,0 +1,45 @@
using UnityEngine;
using UnityEditor;
namespace Pathfinding {
[CustomEditor(typeof(SimpleSmoothModifier))]
[CanEditMultipleObjects]
public class SmoothModifierEditor : EditorBase {
protected override void Inspector () {
var smoothType = FindProperty("smoothType");
PropertyField("smoothType");
if (!smoothType.hasMultipleDifferentValues) {
switch ((SimpleSmoothModifier.SmoothType)smoothType.enumValueIndex) {
case SimpleSmoothModifier.SmoothType.Simple:
if (PropertyField("uniformLength")) {
FloatField("maxSegmentLength", min: 0.005f);
} else {
IntSlider("subdivisions", 0, 6);
}
PropertyField("iterations");
ClampInt("iterations", 0);
PropertyField("strength");
break;
case SimpleSmoothModifier.SmoothType.OffsetSimple:
PropertyField("iterations");
ClampInt("iterations", 0);
FloatField("offset", min: 0f);
break;
case SimpleSmoothModifier.SmoothType.Bezier:
IntSlider("subdivisions", 0, 6);
PropertyField("bezierTangentLength");
break;
case SimpleSmoothModifier.SmoothType.CurvedNonuniform:
FloatField("maxSegmentLength", min: 0.005f);
PropertyField("factor");
break;
}
}
}
}
}

View File

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