You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
575 B

using UnityEditor;
namespace Pathfinding.Legacy {
[CustomEditor(typeof(LegacyAIPath))]
[CanEditMultipleObjects]
public class LegacyAIPathEditor : BaseAIEditor {
protected override void Inspector () {
base.Inspector();
var gravity = FindProperty("gravity");
if (!gravity.hasMultipleDifferentValues && !float.IsNaN(gravity.vector3Value.x)) {
gravity.vector3Value = new UnityEngine.Vector3(float.NaN, float.NaN, float.NaN);
serializedObject.ApplyModifiedPropertiesWithoutUndo();
}
LegacyEditorHelper.UpgradeDialog(targets, typeof(AIPath));
}
}
}