unity3d - Unity 不会执行脚本
问题描述
这是我统一的超级简单脚本:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class script : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
Debug.Log("Something");
}
// Update is called once per frame
void Update()
{
}
}
我将脚本附加到主摄像机:
在我运行统一游戏后,控制台是empty
,这意味着脚本不会运行。
这只是我创建的一个新项目来测试它,因为在我的原始项目中,unity 自发地停止执行脚本。我卸载了旧版本(2019)并安装了新版本(2020)以及 Visual Studio(即使没有必要),但没有任何区别。
解决方案
推荐阅读
- nginx - 防止 NGINX 缓冲包
- python - 如何使用 Selenium(Python)单击表格内的按钮
- angular - 如何使用来自另一个组件的对象设置选择 Angular mat-selection-list
- mysql - SSIS:来源有UNICODE数据;我正在使用 MySQL 64 位 ANSI ODBC 驱动程序
- python-2.7 - Py(os.path):是否有最大值。自动断线/返回之前的字符串大小?
- php - 使用 Angular 发布到 PHP 文件
- java - Primefaces Serenity 主题子菜单在父元素更新后停止运行
- javascript - 按下键时的 HTML 下拉列表列表转到键项
- routing - 将流量从生产服务器路由到蜜罐
- c++ - 请求成员'push_back'向量c ++