private void Interact() { RaycastHit hit; bool hasHit = Physics.Raycast(GetMouseRay(), out hit); MyObject Yeah; if (hasHit) { if (Yeah = hit.transform.GetComponent <MyObject>()) { Yeah.react(); } } }
public static void ShowExample() { Yeah wnd = GetWindow <Yeah>(); wnd.titleContent = new GUIContent("Yeah"); }