public override void OnXGUI() { //TODO List component = CreateObjectField(componentName, component) as Component; if (null != component) { componentName = component.GetType().ToString(); if (CreateSpaceButton("Seach All")) { Component[] components = GameObject.FindObjectsOfType(component.GetType()) as Component[]; GameObject[] goArray = ArrayExtension.AllocArrayFormOther <Component, GameObject>(components); for (int pos = 0; pos < components.Length; pos++) { Debug.Log("pos is " + components[pos].name); goArray[pos] = components[pos].gameObject; } Selection.objects = goArray; } } isPreciseSeach = CreateCheckBox("is Precise Seach", isPreciseSeach); BeginHorizontal(); seachEventByName = CreateStringField("Event Name", seachEventByName); if (CreateSpaceButton("Seach Event")) { seachObjects.Clear(); SeachPlaymakerByEventName(); Selection.objects = seachObjects.ToArray(); } EndHorizontal(); BeginHorizontal(); seachActionByName = CreateStringField("Action Name", seachActionByName); if (CreateSpaceButton("Seach Action")) { seachObjects.Clear(); SeachPlaymakerByActionName(); Selection.objects = seachObjects.ToArray(); } EndHorizontal(); }