22 lines
555 B
C#
22 lines
555 B
C#
using UnityEngine;
|
|
using UnityEditor;
|
|
using UnityEditor.SceneManagement;
|
|
using System.Linq;
|
|
|
|
namespace NBF
|
|
{
|
|
[CustomEditor(typeof(SimpleRopeInteraction))]
|
|
public class SimpleRopeInteractionEditor : Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
DrawDefaultInspector();
|
|
|
|
if (GUILayout.Button("Find ropes in current scene"))
|
|
{
|
|
((SimpleRopeInteraction)target).ropes = StageUtility.GetMainStageHandle().FindComponentsOfType<Rope>().ToList();
|
|
}
|
|
}
|
|
}
|
|
}
|