
Unity Muse 内测功能前瞻!能生成原型、创建纹理、写代码、改bug的开发神器
本文将为大家前瞻 Unity Muse 在内测中的三项核心功能:Muse Sprite,Must Texture 和 Muse Chat,探索 Unity Muse 应用人工智能辅助开发的强大潜能。
今年 6 月 27 日,Unity 正式推出两款 AI 产品:Unity Muse 和 Unity Sentis。
Unity Muse 是一款 AI 辅助创作的泛用型平台,可以让电子游戏和数字孪生等实时 3D 应用与体验的创作更快捷。Muse 的终极目标,是让用户能在 Unity 编辑器里借助文字提示或草图等自然输入,轻松实现创意。本文将为大家前瞻 Unity Muse 在内测中的三项核心功能:Muse Sprite,Must Texture 和 Muse Chat,探索 Unity Muse 应用人工智能辅助开发的强大潜能。
Muse Sprite
Muse Sprite 使创作者能够直接在 Unity 编辑器中生成产品级的 Sprite 资源,并将其与他们的作品无缝集成。
Muse Texture
Muse texture 使创作者能够轻松生成支持 PBR 的纹理,并将其无缝引入 Unity 场景。
Muse Chat
Muse 平台的重要功能之一 Muse Chat 已经启动 beta 封测。在 Muse Chat 的帮助下,开发者可以利用 AI 搜索 Unity 文档、培训教程等内容。Muse Chat 还能搜寻可运行的代码示例等相关信息,加快开发与疑难解答。
探索发现
是不是在开启新的项目时,经常感觉无从下手?有了 Muse Chat,开发者能立即拿到所需的资料,快速开启学习之旅。例如:
提示词——“嗨 Muse,给我一套用 Unity 开发 2D 移动端游戏的详细步骤,包括需要的工具和使用方法。”
Prompt – “Hi Muse, Give me detailed steps on how to build a 2D mobile game with Unity, including the tools I need and how to get started.”
回答——“要用 Unity 开发一款 2D 移动端游戏,请遵循以下步骤:
1、安装 Unity:下载并安装最新版 Unity。推荐使用稳定且受长期支持的 2022 LTS 版。
2、配置 2D 移动游戏开发环境:在创建 Unity 项目时,选择 2D 模板来配置 2D 游戏开发环境[1]。
3、了解 Unity 界面和工作流:熟悉 Unity 的界面、菜单选项,怎样使用资产、创建场景和发布版本[2]。
4、导入并整理资产:导入精灵图(Sprites)和音频等 2D 资产到项目的 Assets 文件夹内。Unity 会自动将文件导入并展示在 Project 窗口中[3]。
5、创建 2D 游戏对象:用精灵图构成游戏的 2D 图形。精灵图是 Unity 的标准纹理,可用内置的 Sprite Editor 编辑、由 Sprite Renderer 组件渲染[4]。
6、加入 2D 物品与碰撞检测:用 Unity 2D 物理系统和组件制作逼真、可互动的 2D 游戏[5]。
7、编写游戏机制与行为:用脚本来定义游戏机制和行为。Unity 支持 C# 编程[6]。
8、打包并测试您的游戏:频繁地在目标平台(例如 iOS、Android)上进行测试,保证兼容性和性能[7]。
9、针对移动设备进行优化:为移动设备优化游戏的性能、分辨率和输入处理。
10、发布游戏:完成开发与测试后,将游戏发布到想要的应用商店[8]。
要想获取更多学习资料,可以参考下方资源:
对于具体特性和功能的详情,请以 Unity Documentation 为准。祝您开发顺利!”
Answer –“To build a 2D mobile game with Unity, follow these steps:
- Install Unity: Download and install the latest version of Unity. The 2022 LTS release is recommended for its stability and long-term support.
- Set up Unity for 2D mobile game development: When creating a new Unity project, select the 2D template to set up the project for 2D game development [1].
- Understand the Unity interface and workflow: Familiarize yourself with the Unity interface, menu items, using assets, creating scenes, and publishing builds [2].
- Import and organize assets: Import your 2D assets, such as sprites and sounds, into the project’s Assets folder. Unity will automatically import and display them in the Project window [3].
- Create and manipulate 2D game objects: Use Sprites to represent 2D graphics in your game. Sprites are standard textures that can be edited with the built-in Sprite Editor and rendered using a Sprite Renderer component [4].
- Implement 2D physics and collision detection: Use Unity’s 2D physics system and components to create realistic and interactive 2D games [5].
- Script game mechanics and behaviors: Write scripts to define gameplay mechanics and behaviors for your game. Unity supports scripting using C# [6].
- Build and test your 2D mobile game: Regularly test your game on your target platform (iOS or Android) to ensure compatibility and performance [7].
- Optimize your game for mobile devices: Optimize your game’s performance, resolution, and input handling for mobile devices.
- Publish your game: After completing development and testing, publish your game to the desired app stores [8].
For additional learning resources, consider the following:
-
Unity e-book on 2D game art, animation, and lighting for artists [7].
-
Unity Learn course on Beginning 2D game development [7].
Remember to consult the Unity Documentation for more information on specific features and functionality. Good luck with your 2D mobile game development!”
生成代码
从零开始并非易事,而 Muse Chat 被设计来简化这个流程。Muse Chat beta 用户们说 Muse Chat 在编写测试时能很好地建立有用的代码片段。
您可以在 Muse Chat 里从零生成代码、改写现有代码,或探索新的方法——例如改变人物的跳跃能力,把单次跳跃改成双重跳跃:
提示词——“嗨 Muse,能帮我把跳跃方法从单次跳跃改成双重跳跃吗?。”
Prompt – “Hi Muse, can you help me change the jump method to allow double jumps instead of single jumps?"
回答—— Muse 的回答及生成的实现双重跳跃的代码如下图:
要确定怎样应用新生成的代码,可以继续向 Muse Chat 发问。
提示词——“很棒,谢谢你 Muse。现在能告诉我怎么调整 jumpForce 的值吗?。”
Prompt – “Great, thank you Muse. Now, can you tell me how to adjust the jumpForce value?"
回答——Muse 的回答,指导我们如何调整 jumpForce:
排查问题
碰上一处修复不了的 bug 不仅会消耗大量开发时间,还会消磨开发热情。在工作中加入 Muse Chat,就像有了个排查故障的好队友。
开发过程中您可以直接将代码发给 Muse Chat,询问为什么代码出问题。如果不确定问题在哪,也能向 Muse Chat 直接描述错误,Muse Chat 会扫描文档和其他资料来确定问题所在。
Muse Chat 另一种协助解决错误的方法是复刻出错环境,并快速建立测试。一名开发者说:“我在给一个编辑器域重新加载后出现的 bug 写测试,于是我问‘怎样用脚本强制进行一次域重新加载(Domain Reload)?’”Muse Chat 很快就给出了解答,让项目的测试和调试变得更轻松。
更快找到所需资源
经常听到 Muse Chat 能更快地帮助找到所需的资源和工具的测试反馈。一位开发者说:“它能很好地找到我知道有、但不确定在哪里的 API……帮我省下了在其他地方到处搜索的时间。”
Unity Muse 将持续改进,帮助开发者在编辑器中和 Web 端开展工作。如想了解更多 Unity Muse 相关内容,请前往 Unity AI 产品页面。
更多推荐
所有评论(0)