Skip to content

Commit

Permalink
test OffMeshConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
ikpil committed Dec 3, 2023
1 parent 7db4e3b commit f5477b0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
using UniRecast.Runtime.Toolsets;
using Plugins.UniRecast.Extensions;
using UniRecast.Runtime.Toolsets;
using UnityEditor;

namespace UniRecast.Editor
{
[CustomEditor(typeof(UniRcOffMeshConnectionTool))]
public class UniRcOffMeshConnectionToolEditor : UniRcToolEditor
{
protected override void Layout()
private SerializedProperty _bidir;

private void OnEnable()
{
UniRcGui.Text(this.GetType().Name);
UniRcGui.Separator();
_bidir = serializedObject.FindPropertySafe(nameof(_bidir));
}

protected override void Layout()
{
UniRcGui.RadioButton("One Way", _bidir, 0);
UniRcGui.RadioButton("Bidirectional", _bidir, 1);

serializedObject.ApplyModifiedProperties();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ namespace UniRecast.Runtime.Toolsets
{
public class UniRcOffMeshConnectionTool : MonoBehaviour
{
[SerializeField]
private int bidir;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 55aa5ae8d1264768a046c32e97f86106, type: 3}
m_Name:
m_EditorClassIdentifier:
bidir: 0
--- !u!1 &1922218970
GameObject:
m_ObjectHideFlags: 0
Expand Down

0 comments on commit f5477b0

Please sign in to comment.