1.3、新建场景(指项目包含的场景内容) ①File-->New Scene(Ctrl + N快捷键) 新建场景; ②File-->Save Scene(Ctrl + S快捷键) 保存场景。 1.4、场景、游戏视图和项目面板 ①Scene 视图: 场景视图, 用于预览当前的场景,进行场景的各种编辑处理操作,是最常用的项目编辑开发视图。 ②Game视图:游戏视图, 用于预...
file.Close();//关闭文件流 } public void LoadGame() { BinaryFormatter bf = new BinaryFormatter(); if (File.Exists(Application.persistentDataPath + "/game_SaveData/inventory.txt"))//若指定文件存在 { FileStream file = File.Open(Application.persistentDataPath + "/game_SaveData/inventory.txt",FileM...
Save save = JsonMapper.ToObject<Save>(jsonStr);//在读取完毕之后就调用JsonMapper中的函数叫读取的字符串转换成对象 SetGame(save);//将获得的对象传入设置游戏的函数 ShowMessage(""); } else { ShowMessage("文件不存在,读档失败!"); } } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13....
5、运行时日志查看器——In-game Debug Console 版本要求:Unity2019.4.26+ Unity商城地址:In-game Debug Console | GUI Tools | Unity Asset Store 功能介绍:这是个运行时查看日志的插件,方便开发者发布后运行有问题,但是编辑器中正常运行对比差异,查看日志用,几乎完美复刻的Unity编辑器的Console查看日志的部分。 ...
各个选项分别为External Script Editor(外部脚本编辑器)、Editor Attaching(编辑器附加操作)、Image application(图像应用程序)、Asset Server diff tool(不同的资源服务器管理工具)、Android SDK Location(Android SDK路径),根据实际情况选择合适工具。 ● 当单击Colors(颜色)选项,会进入颜色编辑界面,如图2-35所示,里面...
on platforms that use the MSVC++ compiler, this option enables link-time code generation. Compiling code using this configuration can take significantly longer than it does using the Release configuration. Unity recommends building the shipping version of your game using the Master configuration if the...
1. File(文件)菜单包含创建、打开游戏工程和场景,以及发布游戏,关闭编辑器等,如图1-19所示。图1-19 File菜单● New Scene(新建场景):创建一个新的游戏场景,快捷键是【Ctrl +N】。● Open Scene(打开场景):打开一个已经保存的场景,快捷键是【Ctrl + O】。
除非在 Game 视图中启用了 VSync 选项,或者将 Application.targetFrameRate 设置为 –1 以外的值,否则 Editor 会尽快更新。 Default 每次勾选时,Editor 最多闲置 4 毫秒。如果一帧用时 5 毫秒或更长时间,则 Editor 完全不会空闲,并且下一帧会自动开始。 No Throttling 每一帧结束时,下一帧立即开始。Editor ...
For Windows DesktopThe standalone (desktop) build is the default when you open Unity. With this build, Unity uses Mono to compile your game assemblies and packages them with the runtime engine. You get an executable file and a folder into which everything is packaged. This build is straight...
Unity has four different methods for referring to a point in a game or on the screen as shown in Figure 6. There’s screen space, which ranges from 0 to the number of pixels and is used typically to get the location on the screen where the user touches or clicks. The viewport space...