public Launch ( MonoBehaviour owner, Pad, pad ) : void | ||
owner | MonoBehaviour | |
pad | Pad, | |
return | void |
static public void Buttons(MonoBehaviour owner, Launchpad launchpad) { if (launchpad == null || launchpad.pads == null) { return; } var buttonOption = GUILayout.Width(64); for (var i = 0; i < launchpad.pads.Length; i++) { var pad = launchpad.pads [i]; var column = i % launchpad.padsPerLine; if (column == 0) { EditorGUILayout.BeginHorizontal(); } if (GUILayout.Button(pad.DisplayName, buttonOption) && EditorApplication.isPlaying) { launchpad.Launch(owner, pad); } if (column == launchpad.padsPerLine - 1 || i == launchpad.pads.Length - 1) { EditorGUILayout.EndHorizontal(); } } }
public static void Buttons(MonoBehaviour owner, Launchpad launchpad) { if (launchpad == null || launchpad.pads == null) return; var buttonOption = GUILayout.Width (64); for (var i = 0; i < launchpad.pads.Length; i++) { var pad = launchpad.pads [i]; var column = i % launchpad.padsPerLine; if (column == 0) EditorGUILayout.BeginHorizontal (); if (GUILayout.Button (pad.DisplayName, buttonOption) && EditorApplication.isPlaying) launchpad.Launch (owner, pad); if (column == launchpad.padsPerLine - 1 || i == launchpad.pads.Length - 1) EditorGUILayout.EndHorizontal (); } }