📜  unity2d 点击游戏对象 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:49.383000             🧑  作者: Mango

代码示例1
// Object must have a collider and this script attached to the object
    private void OnMouseDown()
    {
        Debug.Log("Clicked on object!");
    }