📜  unity deactivate 列表中的脚本 - C# 代码示例

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

代码示例1
public List Scripts = new List();

    void Update()
    {
        foreach (var sc in Scripts)
        {
          //Active Scripts in List
          sc.enabled = true;
          //Deactive Scripts in List
          sc.enabled = false;
        }            
    }