首页 > 解决方案 > 为什么我的标题屏幕上的播放按钮无法启动游戏?

问题描述

我设法打开了我需要查看/玩的演示游戏,但是,标题屏幕似乎没有正确加载。单击“播放”按钮应该允许用户开始游戏,但是当我尝试单击它时,什么也没有发生。

我不确定为什么会发生这种情况,因为我下载了与演示中使用的文件完全相同的文件,并且我还尝试了几次删除/重新下载文件。我还仔细检查了控制台消息,任何脚本都没有任何错误/警告。如果有人想在最后尝试一下,我会附上我看到的截图和游戏文件本身的链接。

此外,如果这有帮助,我正在使用 Unity 版本 2018.3.2f1。

如果您想自己尝试一下,这是该项目的链接(我会发布代码,但我不想在没有明确方向的情况下放置一大块代码;但是,我相信主菜单内容在“Manager.cs”文件中):https ://drive.google.com/file/d/1ekXt948b612dmyT1AZReUOuzh2XbnSDG/view?usp=sharing

如果有帮助,这就是游戏的样子: 在此处输入图像描述

标签: unity3d

解决方案


After reading through the code in the other scripts, I realized that the error was coming from the specific region that was being used as a "hitbox" on the screen for the play button. And because I was setting my aspect ratio differently than what the developer used, the positioning of the "hitbox" did not line up correctly on my screen. So instead, I had to change the aspect ratio to fixed resolution and specific canvas sizes (width and length).


推荐阅读