Unity脚本(学习笔记)

Unity脚本(学习笔记)

  • 数组
  • int[ ] array=new int[5];
  • using System.Collections.Generic;
    List list=new List();
    list.Add( );往lsit添加内容
    list.Sort( );排序
  • for循环
  • foreach(int i in array)
    {

    }
  • 访问游戏对象和组件
    • MonoBehavior类
      Unity脚本(学习笔记)

    • 访问游戏对象

      • ①通过名称来查找:GameObject.Find("…")
      • ②通过标签来查找:GameObject.FindWithTag("…") ;GameObject.FindGameObjectsWithTag("…")
    • 访问组件 P496
      Unity脚本(学习笔记)

相关文章:

  • 2021-08-06
  • 2021-12-05
  • 2021-12-18
  • 2021-12-10
  • 2021-10-19
  • 2021-11-13
  • 2021-11-16
  • 2021-12-08
猜你喜欢
  • 2018-08-09
  • 2021-10-15
  • 2021-11-17
  • 2021-11-17
  • 2021-09-27
  • 2018-12-11
  • 2021-12-18
  • 2022-01-02
相关资源
相似解决方案