1.

[MenuItem("Tools/获取场景物体")]
    public static void GetGameOjbect()
    {
        GameObject go = UnityEditor.Selection.gameObjects[0];
        Debug.Log(go.name);
    }

 

相关文章:

  • 2022-12-23
  • 2021-11-29
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
  • 2021-12-10
  • 2021-12-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2022-03-04
  • 2021-12-23
  • 2022-12-23
相关资源
相似解决方案