Version: 2017.3
public static bool Contains (int instanceID);
public static bool Contains (Object obj);

描述

返回某个对象是否包含在当前选择中。

    if (Selection.Contains (gameObject))
        Debug.Log ("I'm selected!");