I can not seem to get the horizontal scroll bar to appear. My region inside the scroll area should be large enough to make it appear. I have tried setting both values to true to force them both on, but the horizontal one still does not appear. The vertical one appears with or without the booleans to force them.
scrollLocation = GUI.BeginScrollView(new Rect(0, 0, Screen.width * .75f, Screen.height), scrollLocation, new Rect(0, 0, 4000, 4000));
foreach (var n in nodes.Values)
{
if (n.outputsTo == null) continue;
Connection c = (Connection)n.outputsTo;
if (!nodes.ContainsKey(c.outputNode) || !nodes.ContainsKey(c.inputNode)) continue;
Vector2 outputPoint = nodes[c.outputNode].outputPositions[0];
Vector2 inputPoint = nodes[c.inputNode].inputPositions[c.inputIndex];
Handles.color = Color.red;
Handles.DrawLine(outputPoint, inputPoint);
//Handles.DrawBezier(outputPoint, inputPoint, Vector2.up, -Vector2.up, Color.red, null, 3);
}
if (selectedInputNode != -1 && selectedOutputNode == -1)
{
Vector2 inputPoint = nodes[selectedInputNode].inputPositions[selectedInputIndex];
Handles.color = Color.blue;
Handles.DrawLine(GetMousePosition(), inputPoint);
}
else if (selectedInputNode == -1 && selectedOutputNode != -1)
{
Vector2 outputPoint = nodes[selectedOutputNode].outputPositions[selectedOutputIndex];
Handles.color = Color.blue;
Handles.DrawLine(GetMousePosition(), outputPoint);
}
Color originalBackgroundColor = GUI.backgroundColor;
Color originalColor = GUI.color;
foreach (var n in nodes.Values)
{
if (n == selectedNode) continue;
n.Draw();
}
if (selectedNode != null)
{
selectedNode.Draw();
}
GUI.backgroundColor = originalBackgroundColor;
GUI.color = originalColor;
GUI.EndScrollView();