Hey there!
Trying to find information on how to detect if the mouse has clicked in the scene while in editor mode.
Struggling to find information on this, so was hoping someone here could give a pointer in the right direction
For now I have tried this:
[CustomEditor(typeof(GridBuilder))]
public class InspectorGridBuilder : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
GridBuilder gridBuilder = (GridBuilder)target;
if (GUILayout.Button("Build Grid"))
{
gridBuilder.BuildGrid();
}
Repaint();
}
private void OnSceneGUI()
{
Debug.Log("Running");
if (Input.GetMouseButtonDown(0))
{
Debug.Log("Clicked");
}
}
}