Unity3D 网络部分中文翻译- Master Server
- 格式:doc
- 大小:71.50 KB
- 文档页数:7
unity3d软件一级栏翻译主菜单包含的子菜单File【文件】New Scene【新建场景】Open Scene【打开场景】Save Scene 【保存场景】Save Scene as…【场景另存为…】New Project…【新建工程文件】Open Project…【打开工程文件】Save Project 【保存工程文件】Build Settings…【创建设置】(这里可以设置你的游戏将要以何种方式发布,发布的场景文件又包含那些)Build & Run 【创建并运行】(这里以“Build Settings”里设置好的方式,发布并运行游戏)Exit 【退出】Edit【编辑】Undo 【撤销上一步操作】Redo 【恢复被撤销的操作】Cut 【剪切】Copy 【拷贝】Paste 【粘贴】Duplicate 【复制】Delete 【删除】Frame Selected 【在编辑场景中最大化显示被选中的物体】Select All 【全选编辑面板中的所有物体】Preferences…【首选参数设置】Play 【播放】(如果游戏已经开始播放,点此按钮代表停止播放)Pause 【暂停】Step 【逐帧播放游戏】Load selection 【载入所选】(与“Save selection”【存储所选】联合使用,你可以把它理解为一个临时的快捷键,帮你快速的找到特定的以被存储的物体对象。
)Saveselection 【存储所选】(与“Load selection”【载入所选】联合使用,你可以把它理解为一个临时的快捷键,帮你快速的找到特定的以被存储的物体对象。
)Project Settings 【工程文件设置】(包含了该工程项目的“Input”【热键】、“Tags”【标签管理】、“Audio”【音频设置】、“Ti me”【时间设置】、“Player”【播放器设置】、“Physics”【默认仿真物理设置】、“Quality”【播放质量参数设置】、“NetWork”【网络工作参数设置】、“Editor”【编辑器设置】)“Script Execution Order”【脚本编译顺序设置】Render settings 【渲染设置】(默认渲染参数设置,包括环境光,周围的雾化程度,环境颜色1等等一系列参数的设定)Network emulation 【网络仿真】(由于你制作的游戏将会在不同的网络环境中工作,所以需要这个参数来模拟不同的网络工作环境)Graphics emulation 【图形卡仿真】(由于你制作的游戏将会在不同的图形卡环境中工作,所以将需要这个参数来模拟不同硬件条件下的游戏显示质量)Snap settings 【捕捉设置】(和3Ds Max 的“栅格和捕捉设置”类似。
这本书主要对Unity3D的所有菜单与参数进行了翻译并逐个讲解来帮助大家初步的认识Unity3D的每个命令的作用Unity3D下分8个菜单栏(翻译的不一定准)分别是File(文件)Edit(编辑)Assets(资源)GameObject(游戏对象)Component(组件)Terrain(地形)Window(窗口)Help(帮助)File(文件)------New Scene 新建场景Open Scene 打开场景Save Scene 保存场景Save Scene as…场景另存为…New Project…新建工程文件Open Project…打开工程文件Save Project…保存工程文件Build Settings…建造设置(这里指建造游戏)Build & Run 建造并运行(这里指建造游戏) Exit 退出Edit(编辑)------Undo 撤销Redo 重复Cut 剪切Copy 复制Paste 粘贴Duplicate 复制Delete 删除Frame selected 当前镜头移动到所选的物体前Select All 选择全部Preferences 参数选择Play 播放Pause 暂停,中断Step 步骤Load selection 载入所选Save selection 存储所选Project settings 工程设置Render settings 渲染设置Graphics emulation图形仿真Network emulation 网络仿真Snap settings 对齐设置Assets (资源)-----Reimport 重新导入Create 创建Show in Explorer 在资源管理器中显示Open 打开(打开脚本)Import New Asset... 导入新的资源Refresh 刷新Import Package... 导入资源包Export Package... 导出资源包Select Dependencies 选择相关Export ogg file 导出OGG文件Reimport All 重新导入所有Sync VisualStudio Project 同步视觉工作室项目GameObject--------Create Empty 创建一个空的游戏对象(游戏对象) Create Other 创建其他组件Center On Children 子物体归位到父物体中心点Make Parent 创建子父集Clear Parent 取消子父集Apply Changes To Prefab 应用变更为预置Move To View 移动物体到视窗的中心点Align With View 移动物体与视窗对齐Align View to Selected 移动视窗与物体对齐Component(组件)---Mesh 网Particles 粒子Physics 物理Audio 音频Rendering 渲染Miscellaneous 杂项Scripts 脚本Camera-Control 摄像机控制Terrain(地形)-----Create Terrain 创建地形Import Heightmap - Raw... 导入高度图Export Heightmap - Raw... 导出高度图Set Resolution... 设置分辨率Create Lightmap... 创建光影图Mass Place Trees... 批量种植树Flatten Heightmap... 展平高度图Refresh Tree and Detail Prototypes 刷新树及预置细节Window(窗口)------Next Window 下个窗口Previous Window 前窗Layouts 布局Scene 场景窗口Game 游戏窗口Inspector 检视窗口Hierarchy 层次窗口Project 工程窗口Animation 动画窗口 Profiler 探查窗口Asset Server 资源服务器Console 控制台Help(帮助)--------About Unity 关于UnityEnter serial number 输入序列号Unity Manual Unity手册Reference Manual 参考手册Scripting Manual 脚本手册Unity Forum Unity论坛Welcome Screen 欢迎窗口Release Notes 发行说明Report a Problem 问题反馈第一章File(文件)New Scene 新建场景创建一个新的游戏场景Open Scene 打开场景打开一个游戏场景Save Scene 保存场景保存一个游戏场景Save Scene as 场景另存为游戏场景另存为New Project 新建工程文件创建一个新的工程文件Open Project 打开工程文件打开一个工程文件Save Project 保存工程文件保存一个工程文件Build Settings 建造设置导出游戏的设置Build & Run 建造并运行设置并导出游戏Exit退出退出软件这里面我们需要注意的是,创建一个场景与创建一个工程是完全不同的,一个工程文件可以包含多个游戏场景,但场景文件却是唯一的。
Master Server主服务器主服务器是一个积极响应客户端的集中地,他注视着要连接他的用户。
其目的是为了使隐藏的IP地址和端口也能够建立网络连接。
就像防火墙处理和NAT穿透。
每个单独的服务器上运行的游戏提供一个游戏类型到主服务器。
所有相同类型的游戏集中在一起,方便兼容的客户方便的访问他们。
当玩家连接并查看与之配套的游戏类型时,使玩家在服务器上看到有用的信息。
以帮助玩家判断哪个服务器可以连接。
这包括游戏名称,玩家数量,是否有密码等等。
用来传输这些数据的函数是面向服务器端的MasterServer.RegisterHost() 和面向客户端的 MasterServer.RequestHostList() 。
中间还有四段(略)注册一个游戏注册一个游戏之前,比较重要的是正确设置NAT,它取决于主机的网络功能,用eNat的true或false进行定义。
游戏主机需要知道他是否有NAT地址,并且游戏端口是否连接在公共网络。
所以在游戏之前他将表明是否需要NAT支持。
服务器也许会开始于于此类似的代码:function OnGUI() {if (GUILayout.Button ("Start Server")){// Use NAT punchthrough if no public IP presenteNat = !Network.HavePublicAddress();Network.InitializeServer(32, 5555);MasterServer.RegisterHost("MyUniqueGameType", "JohnDoes game", "l33t game for all");}}在这里,我们决定是否需要NAT穿透,机器是否公有IP。
有一个函数Network.TestConnection(),可以告诉我们主机是否可以NAT。
Unity Manual 用户手册•用户指南o Unity基础翻译:U_鹰▪学习界面翻译:U_鹰▪项目浏览器视图翻译:U_鹰▪层级面板视图翻译:U_鹰▪工具栏翻译:U_鹰▪场景视图翻译:U_鹰▪游戏视图翻译:U_鹰▪检视面板翻译:U_鹰▪其他视图翻译:U_鹰▪自定义工作区翻译:第七把剑▪资源工作流程翻译:第七把剑▪创建场景翻译:第七把剑▪编译发布翻译:第七把剑▪教程翻译:U_鹰▪Unity3D快捷键翻译:U_鹰▪首选项翻译:U_鹰o构建场景▪游戏对象翻译:第七把剑▪游戏对象和组件的关系翻译:第七把剑▪使用组件翻译:第七把剑▪组件和脚本之间的关系翻译:第七把剑▪停用游戏对象翻译:feicheng2005▪使用检视面板翻译:第七把剑▪编辑值属性翻译:第七把剑▪预设库翻译:U_鹰▪指定引用翻译:第七把剑▪多重对象编辑翻译:colin3dmax▪检视面板选项翻译:第七把剑▪使用场景视图翻译:第七把剑▪场景视图导航翻译:第七把剑▪定位游戏对象翻译:第七把剑▪视图模式翻译:第七把剑▪Gizmo和图标显示控制翻译:U_鹰▪搜索翻译:第七把剑▪预制翻译:第七把剑▪灯光翻译:第七把剑▪摄像机翻译:第七把剑▪地形引擎指南翻译:第七把剑o资源导入与创建翻译:第七把剑▪基本对象翻译:U_鹰▪导入资源翻译:第七把剑▪模型翻译:用生命舞蹈▪3D格式翻译:用生命舞蹈▪材质与着色器翻译:第七把剑▪二维纹理翻译:第七把剑▪程序材质翻译:U_鹰▪影片纹理翻译:U_鹰▪音频文件翻译:U_鹰▪音轨模块翻译:U_鹰▪使用脚本翻译:colin3dmax▪▪▪事件函数翻译:RICO▪▪▪▪▪资源商店翻译:肥耀▪▪资源商店发布者管理翻译:13y32r▪▪资源服务器(仅团队许可)翻译:colin3dmax▪设置资源服务器(仅团队许可)翻译:青青子矜▪缓存服务器(仅团队许可)▪缓存服务器(仅团队许可)翻译:一米的馒头▪缓存服务器常见问题翻译:13y32r▪场景幕后翻译:colin3dmaxo创建游戏翻译:U_鹰▪运行时实例化预置翻译:U_鹰▪输入翻译:U_鹰▪变换翻译:U_鹰▪物理翻译:U_鹰▪添加随机的游戏元素翻译:一米的馒头▪粒子系统翻译:小yue▪粒子系统曲线编辑器翻译:小yue▪粒子系统中的颜色和渐变翻译:小yue▪渐变编辑器翻译:小yue▪粒子系统检视面板翻译:小yue▪粒子系统模块介绍翻译:小yue▪粒子系统模块翻译:小yue▪粒子效果翻译:小yue▪Mecanim动画系统翻译:FancyBit▪动画和Mecanim术语表翻译:FancyBit▪资源准备和导入翻译:FancyBit▪准备你自己的角色翻译:FancyBit▪导入动画翻译:FancyBit▪分割动画翻译:FancyBit▪▪创建Avatar翻译:FancyBit▪配置Avatar翻译:FancyBit▪肌肉设定翻译:FancyBit▪阿凡达身体遮罩翻译:Karsion▪为类人动画重新定位目标翻译:Karsion▪▪Mecanim中的通用动画翻译:bwhale▪为角色赋予生命翻译:bwhale▪循环动画剪辑翻译:bwhale▪动画组件和动画控制器翻译:bwhale▪动画状态机翻译:bwhale▪动画状态翻译:bwhale▪动画状态转移翻译:bwhale▪动画参数翻译:bwhale▪混合树翻译:bwhale▪一维混合翻译:bwhale▪二维混合翻译:bwhale▪附加混合树选项翻译:bwhale▪Mecanim进阶主题翻译:bwhale▪使用Mecanim的动画曲线(仅限Pro版本)翻译:bwhale▪子状态机翻译:bwhale▪动画层翻译:bwhale▪动画状态机预览(独立和关闭)翻译:bwhale▪目标匹配翻译:bwhale▪根动作-如何工作翻译:bwhale▪教程:为一个人形场景动画编写根动作脚本翻译:bwhale▪Mecanim性能和优化翻译:feicheng2005▪Mecanim问答翻译:feicheng2005▪旧版动画系统翻译:feicheng2005▪动画视图指南翻译:U_鹰▪动画脚本翻译:U_鹰▪导航网格和寻路(仅专业版)翻译:肥耀▪导航网格烘焙翻译:肥耀▪声音翻译:U_鹰▪游戏界面元素翻译:U_鹰▪多人网络翻译:U_鹰Android•Android 开发入门翻译:闲人若林o安装Android SDK翻译:闲人若林o安卓远程工具翻译:闲人若林o故障排除翻译:U_鹰o在Android中报告崩溃BUG翻译:Summer Windso目前在Unity Android 中不支持的特性翻译:Summer Windso对分割应用程序二进制(.OBB)的支持翻译:悄悄o播放器设置翻译:U_鹰o Android脚本翻译:U_鹰▪输入翻译:U_鹰▪手机键盘翻译:雨天▪高级Unity手机脚本翻译:Summer Winds▪使用.NET API 兼容级别翻译:U_鹰o为Android创建插件翻译:雨天o自定义手机启动画面翻译:闲人若林Blackberry 10•ooooooWindows Store•oooooo▪o▪oWindows Phone 8•Windows Phone 8:入门翻译:Cantilenao Windows Phone 8:部署翻译:Cantilenao Windows Phone 8:调试翻译:Cantilenaooo▪▪o Windows Phone 8:常见问题翻译:Cantilenao▪•本地客户端开发入门翻译:peiandsky•Flash开发入门翻译:我是头觅食的野猪o Flash:安装翻译:我是头觅食的野猪o Flash:生成并运行翻译:我是头觅食的野猪o Flash:进行调试翻译:我是头觅食的野猪o Flash:支持和不支持的翻译:我是头觅食的野猪oooooo•常见问题o升级指南翻译:青青子矜o升级指南翻译:U_鹰o升级项目从到翻译:U_鹰▪物理升级细节翻译:U_鹰▪Mono升级细节翻译:U_鹰▪渲染升级细节翻译:U_鹰▪Unity 着色器转换指南翻译:U_鹰o Unity 激活- 概述翻译:U_鹰▪管理你的Unity 许可证翻译:U_鹰▪在线激活Unity 逐步指南翻译:U_鹰▪手工激活逐步指南翻译:U_鹰o游戏代码问题翻译:U_鹰▪如何制作一个简单的第一人称步骤?翻译:U_鹰o图形问题翻译:U_鹰▪如何导入Alpha纹理?翻译:我是头觅食的野猪▪如何使用法线贴图?翻译:我是头觅食的野猪▪如何使用细节纹理?翻译:杨希羚▪如何制作一个Cubemap纹理?翻译:杨希羚▪如何制作天空盒?翻译:我是头觅食的野猪▪如何制作网格粒子发射器?(旧的粒子系统)翻译:我是头觅食的野猪▪如何制作启动屏幕?翻译:杨希羚▪如何制作聚光灯投影遮罩?翻译:杨希羚▪如何修正导入模型的旋转?翻译:我是头觅食的野猪▪如何使用水?翻译:杨希羚o如何导出FBX翻译:我是头觅食的野猪o怎样高效部署资源文件实践指南翻译:一米的馒头o如何从3d应用程序中导入物体?翻译:用生命舞蹈▪从maya导入物体翻译:用生命舞蹈▪从Cinema 4D导入物体翻译:用生命舞蹈▪从3D Studio Max导入物体翻译:用生命舞蹈▪从Cheetah3D导入物体翻译:我是头觅食的野猪▪从Modo导入物体翻译:我是头觅食的野猪▪从Lightwave导入物体翻译:我是头觅食的野猪▪从Blender导入物体翻译:我是头觅食的野猪▪o工作流程问题▪(Mono Develop入门)翻译:肥耀▪怎样在项目间重用资源?翻译:肥耀▪怎样安装和升级标准资源包?翻译:肥耀▪平台间的项目移植翻译:Cantilenao移动开发者清单翻译:悄悄▪系统崩溃翻译:悄悄▪性能分析翻译:悄悄▪优化翻译:悄悄o•高级o向量介绍翻译:冷水泡面▪理解向量运算翻译:冷水泡面▪从一个对象到另一个对象的方向和距离翻译:冷水泡面▪计算法线向量/垂直向量翻译:冷水泡面▪一个向量的大小的数量位于另一个向量方向上翻译:冷水泡面o资源包(仅专业版)翻译:bwhale▪资源包问答翻译:bwhale▪创建资源包翻译:bwhale▪下载资源包翻译:bwhale▪从资源包中加载资源翻译:bwhale▪追踪所下载的资源包翻译:bwhale▪存储加载资源包中的二进制数据翻译:bwhale▪内容保护翻译:bwhale▪管理资源依赖关系翻译:bwhale▪在资源包中包含脚本翻译:bwhaleo图形功能▪高动态范围(HDR)图像翻译:肥耀▪渲染路径翻译:肥耀▪线性光照(仅专业版)翻译:U_鹰▪细节级别(仅专业版)翻译:肥耀▪着色器翻译:肥耀▪着色器:着色器语言&固定功能着色器翻译:风里疯语▪着色器:顶点和片段程序翻译:风里疯语▪在Unity 4使用DirectX 11翻译:U_鹰▪计算着色器翻译:13y32r▪图形仿真翻译:我是头觅食的野猪o资源数据库翻译:肥耀o构建播放器管线翻译:我是头觅食的野猪o分析器(仅专业版)翻译:肥耀▪分析器窗口翻译:肥耀▪CPU使用率区域翻译:Cantilena▪渲染区域翻译:肥耀▪内存区域翻译:Cantilena▪音频区域翻译:Cantilena▪物理学区域翻译:肥耀▪GPU区域翻译:肥耀o光照贴图快速入门翻译:用生命舞蹈▪光照贴图深入学习翻译:用生命舞蹈▪自定义Beast设置翻译:一米的馒头▪光照贴图UV翻译:用生命舞蹈▪灯光探测器翻译:用生命舞蹈o遮挡剔除(仅专业版)翻译:肥耀o摄像机技巧翻译:U_鹰▪了解视锥体翻译:重生の记忆▪从摄像机到给定距离的视锥体的大小翻译:我是头觅食的野猪▪推拉变焦(又称伸缩变焦)翻译:我是头觅食的野猪▪摄像机射线翻译:我是头觅食的野猪▪使用斜视锥体翻译:我是头觅食的野猪▪创建一个大或小尺寸的感觉翻译:我是头觅食的野猪o在运行时加载资源翻译:肥耀o通过脚本修改源资源翻译:肥耀o用程序生成网格几何体翻译:肥耀▪网格剖析翻译:肥耀▪使用Mesh类翻译:肥耀▪示例- 创建一个广告牌平面翻译:肥耀o富文本翻译:无悔o在Unity项目中使用Mono DLL(动态链接库)翻译:X-droido事件函数的执行顺序翻译:X-droido优化手机的实用指南翻译:Cantilena▪优化手机的实用指南- 未来及高端设备翻译:Cantilena▪优化手机的实用指南- 图形方法翻译:Cantilena▪优化手机的实用指南- 脚本和游戏设置方法翻译:萤之助▪优化手机的实用指南- 渲染优化翻译:萤之助▪o Unity XCode项目结构翻译:U_鹰o优化图形性能翻译:肥耀▪描绘调用批处理翻译:Amazonzx▪为优化性能建模角色翻译:肥耀▪渲染数据统计窗口翻译:肥耀o减小文件大小翻译:我是头觅食的野猪o了解自动内存管理翻译:一米的馒头o平台依赖编译翻译:我是头觅食的野猪o泛型函数翻译:肥耀o进行调试翻译:我是头觅食的野猪▪控制台翻译:U_鹰▪调试器翻译:我是头觅食的野猪▪日志文件翻译:肥耀▪访问隐藏文件夹翻译:肥耀o插件- 只用于专业版/移动版功能翻译:太昊|仙境乐网▪为桌面平台创建插件翻译:雨天▪为iOS创建插件翻译:雨天▪为Android创建插件翻译:雨天▪底层本地插件接口翻译:雨天o文本场景文件格式(仅专业版功能)翻译:U_鹰▪格式说明翻译:我是头觅食的野猪▪YAML场景示例翻译:我是头觅食的野猪▪YAML 类ID参考翻译:U_鹰o流媒体资源翻译:我是头觅食的野猪o命令行参数翻译:一米的馒头o启动时运行编辑器脚本代码翻译:U_鹰o网络仿真翻译:肥耀o网络播放器的安全沙箱翻译:我是头觅食的野猪o可用的.NET类库概述o Visual Studio C#集成翻译:我是头觅食的野猪oo使用Unity的外部版本控制系统翻译:我是头觅食的野猪o分析翻译:肥耀o更新检查翻译:肥耀o安装多个Unity版本翻译:青青子矜o故障排除翻译:U_鹰▪编辑器故障排除翻译:IanZhang▪网页播放器故障排除翻译:IanZhangDesktop•阴影翻译:U_鹰o平行光阴影细节翻译:U_鹰o阴影疑难解答翻译:U_鹰o阴影大小计算翻译:U_鹰o Unity的输入法编辑器翻译:U_鹰o为集成显卡优化翻译:U_鹰•网络播放器部署翻译:U_鹰o用HTML代码加载Unity内容翻译:U_鹰o使用精缩的UnityObject2翻译:IanZhango自定义Unity网络播放器加载的屏幕翻译:U_鹰o自定义Unity网络播放器的行为翻译:U_鹰o Unity网络播放器和浏览器通信翻译:U_鹰o使用网络播放器模板翻译:U_鹰o网络播放器流处理翻译:U_鹰o网页播放器版本翻译:人中吕布•在网页播放器使用信任链系统翻译:人中吕布。
MonoBehaviourInherits from Behaviour继承自BehaviourMonoBehaviour is the base class every script derives from.MonoBehaviour是每个脚本的基类.Using Javascript every script automatically derives from MonoBehaviour. When using C# or Boo you have to explicitly derive from MonoBehaviour.每个Javascript脚本自动继承MonoBehaviour.使用C#或Boo时,需要显式继承MonoBehaviour.Note: The checkbox for disabling a MonoBehavior (on the editor) will only prevent Start(), Awake(), Update(), FixedUpdate(), and OnGUI() from executing. If none of these functions are present, the checkbox is not displayed.注意:MonoBehavior对象(编辑器中)的复选框,只有在其有Start(), Awake(), Update(), FixedUpdate(), 和OnGUI()函数时显示,没有这些函数时则隐藏.(另注:译者在PC上Windows平台测试结果与此注释所描述情况不符)See Also: The chapter on scripting in the manual.VariablesuseGUILayout Disabling this lets you skip the GUI layout phase.禁用此项,将会跳过GUILayout部署Functions 函数Invoke Invokes the method methodName in time seconds.根据时间调用指定方法名的方法InvokeRepeating Invokes the method methodName in time seconds.根据时间调用指定方法名的方法CancelInvoke Cancels all Invoke calls on this MonoBehaviour.取消这个MonoBehaviour上的所有调用.IsInvoking Is any invoke on methodName pending?某指定函数是否在等候调用StartCoroutine Starts a coroutine.开始协同程序.StopCoroutine Stops all coroutines named methodName running on this behaviour.停止这个动作中名为methodName的所有协同程序.StopAllCoroutines Stops all coroutines running on this behaviour.停止所有动作的协同程序.Overridable Functions 可重载的函数Update Update is called every frame, if the MonoBehaviour is enabled.当MonoBehaviour启用时,其Update在每一帧被调用LateUpdate LateUpdate is called every frame, if the Behaviour is enabled.当MonoBehaviour启用时,其LateUpdate在每一帧被调用FixedUpdate This function is called every fixed framerate frame, if the MonoBehaviour is enabled.当MonoBehaviour启用时,其FixedUpdate在每一帧被调用Awake Awake is called when the script instance is being loaded.当一个脚本实例被载入时Awake被调用.Start Start is called just before any of the Update methods is called the first time.Start在Update调用前被调用.Reset Reset to default values.重置,恢复到默认值.OnMouseEnter OnMouseEnter is called when the mouse entered the GUIElement or Collider.当鼠标进入到GUIElement(GUI组件)或Collider(碰撞体)中时调用OnMouseEnter.OnMouseOver OnMouseOver is called every frame while the mouse is over the GUIElement or Collider.当鼠标悬浮在GUIElement(GUI组件)或Collider(碰撞体)上时调用OnMouseOver.OnMouseExit OnMouseExit is called when the mouse is not any longer over the GUIElement or Collider.当鼠标移出GUIElement(GUI组件)或Collider(碰撞体)上时调用OnMouseExitOnMouseDown OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collid当用户在GUIElement(GUI组件)或Collider(碰撞体)上点击鼠标时调用OnMouseDownOnMouseUp OnMouseUp is called when the user has released the mouse button.用户释放鼠标键的时候调用这个.OnMouseDrag OnMouseDrag is called when the user has clicked on a GUIElement or Collider and is still holding down thmouse.当用户鼠标拖拽GUIElement(GUI组件)或Collider(碰撞体)时调用OnMouseDragOnTriggerEnter OnTriggerEnter is called when the Collider other enters the trigger.当Collider(碰撞体)进入trigger(触发器)时调用OnTriggerEnter.OnTriggerExit OnTriggerExit is called when the Collider other has stopped touching the trigger.当Collider(碰撞体)移出trigger(触发器)时调用OnTriggerExit.OnTriggerStay OnTriggerStay is called once per frame for every Collider other that is touching the trigger.当Collider(碰撞体)触发trigger(触发器)时在每一帧调用OnTriggerStay.OnCollisionEnter OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider.当此collider/rigidbody触发另一个rigidbody/collider时,OnCollisionEnter将被调用.OnCollisionExit OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider.当此collider/rigidbody停止触发另一个rigidbody/collider时,OnCollisionExit将被调用. OnCollisionStay OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider.当此collider/rigidbody触发另一个rigidbody/collider时,OnCollisionStay将会在每一帧被调用. OnControllerColliderHit OnControllerColliderHit is called when the controller hits a collider while performing a Move.当controller碰撞到collider时OnControllerHit被调用.OnJointBreak Called when a joint attached to the same game object broke.当附在同一对象上的关节被断开时调用.OnParticleCollision OnParticleCollision is called when a particle hits a collider.当粒子碰到collider时被调用.OnBecameVisible OnBecameVisible is called when the renderer became visible by any camera.当renderer(渲染器)在任何相机上可见时调用OnBecameVisible.OnBecameInvisible OnBecameInvisible is called when the renderer is no longer visible by any camera.当renderer(渲染器)在任何相机上都不可见时调用OnBecameInvisible.OnLevelWasLoaded This function is called after a new level was loaded.当一个新关卡被载入时此函数被调用.OnEnable This function is called when the object becomes enabled and active.当对象变为可用或激活状态时此函数被调用.OnDisable This function is called when the behaviour becomes disabled () or inactive.当对象变为不可用或非激活状态时此函数被调用.OnPreCull OnPreCull is called before a camera culls the scene.在相机剪裁场景之前被调用.OnPreRender OnPreRender is called before a camera starts rendering the scene.在相机渲染场景之前被调用.OnPostRender OnPostRender is called after a camera finished rendering the scene.在相机完成场景渲染之后被调用.OnRenderObject OnRenderObject is called after camera has rendered the scene.在相机场景渲染完成后被调用OnWillRenderObject OnWillRenderObject is called once for each camera if the object is visible.如果对象可见每个相机都会调用它.OnGUI OnGUI is called for rendering and handling GUI events.渲染和处理GUI事件时调用.OnRenderImage OnRenderImage is called after all rendering is complete to render image当完成所有渲染后被调用,用来渲染图片后期效果.OnDrawGizmosSelected Implement this OnDrawGizmosSelected if you want to draw gizmos only if the object is selected.如果你想在物体被选中时绘制gizmos,去实现这个函数.OnDrawGizmos Implement this OnDrawGizmos if you want to draw gizmos that are also pickable and always drawn.如果你想绘制可被点选的gizmos,去实现这个.OnApplicationPause Sent to all game objects when the player pauses.当玩家暂停时发送到所有的游戏物体.OnApplicationFocus Sent to all game objects when the player gets or looses focus.当玩家获取或失去焦点时发送给所有游戏物体.OnApplicationQuit Sent to all game objects before the application is quit.在应用退出之前发送给所有的游戏物体.OnPlayerConnected Called on the server whenever a new player has successfully connected.当一个新玩家成功连接时在服务器上被调用.OnServerInitialized Called on the server whenever a Network.InitializeServer was invoked and has completed.当Network.InitializeServer被调用并完成时,在服务器上调用这个函数OnConnectedToServer Called on the client when you have successfully connected to a server当你成功连接到服务器时,在客户端被调用.OnPlayerDisconnected Called on the server whenever a player disconnected from the server.当一个玩家从服务器上断开时在服务器端调用.OnDisconnectedFromServer Called on the client when the connection was lost or you disconnected from the server.当失去连接或从服务器端断开时在客户端调用.OnFailedToConnect Called on the client when a connection attempt fails for some reason.当一个连接因为某些原因失败时在客户端调用.OnFailedToConnectToMasterServer Called on clients or servers when there is a problem connecting to the MasterServer.当连接主服务器出现问题时在客户端或服务器端调用.OnMasterServerEvent Called on clients or servers when reporting events from the MasterServer.当报告事件来自主服务器时在客户端或服务器端调用.OnNetworkInstantiate Called on objects which have been network instantiated with Network.Instantiate当一个物体使用Network.Instantiate进行网络初始化时调用. OnSerializeNetworkView Used to customize synchronization of variables in a script watched by a network view.在一个网络视图脚本中,用于自定义变量同步Class Functions 类函数print Logs message to the Unity Console. This function is identical to Debug.Log.记录消息到Unity控制台.这个函数和Debug.Log作用相同.Inherited members 被继承的成员Inherited Variables 被继承的变量enabled Enabled Behaviours are Updated, disabled Behaviours are not.启用时Behaviours会执行更新,反之不更新.transform The Transform attached to this GameObject (null if there is none attached).附加在本游戏对象上的Transform(没有则为null).rigidbody The Rigidbody attached to this GameObject (null if there is none attached).附加在本游戏对象上的Rigidbody(没有则为null).camera The Camera attached to this GameObject (null if there is none attached).附加在本游戏对象上的Camera(没有则为null).light The Light attached to this GameObject (null if there is none attached).附加在本游戏对象上的Light (没有则为null).animation The Animation attached to this GameObject (null if there is none attached).附加在本游戏对象上的animation (没有则为null).constantForce The ConstantForce attached to this GameObject (null if there is none attached).附加在本游戏对象上的ConstantForce(没有则为null).renderer The Renderer attached to this GameObject (null if there is none attached).附加在本游戏对象上的Renderer(没有则为null).audio The AudioSource attached to this GameObject (null if there is none attached).附加在本游戏对象上的AudioSource(没有则为null).guiText The GUIText attached to this GameObject (null if there is none attached).附加在本游戏对象上的GUIText(没有则为null).networkView The NetworkView attached to this GameObject (Read Only). (null if there is none attached)附加在本游戏对象上的NetworkView(只读)(没有则为null).guiTexture The GUITexture attached to this GameObject (Read Only). (null if there is none attached)附加在本游戏对象上的GUITexture(只读) (没有则为null).collider The Collider attached to this GameObject (null if there is none attached).附加在本游戏对象上的Collider(没有则为null).hingeJoint The HingeJoint attached to this GameObject (null if there is none attached).附加在本游戏对象上的HingeJoint(没有则为null).particleEmitter The ParticleEmitter attached to this GameObject (null if there is none attached).附加在本游戏对象上的ParticleEmitter(没有则为null).gameObject The game object this component is attached to. A component is always attached to a game object.该组件附加的游戏对象.组件总是附加在一个游戏对象上.tag The tag of this game object.该游戏对象的标签.name The name of the object.该游戏对象的名字.hideFlags Should the object be hidden, saved with the scene or modifiable by the user?设置是否隐藏,保存在场景中或被用户修改.Inherited Functions 被继承的函数GetComponent Returns the component of Type type if the game object has one attached, null if it doesn't.返回游戏对象上某类型的组件.没有则返回null.GetComponentInChildren Returns the component of Type type in the GameObject or any of its children using depth first search.返回游戏对象或其子物体上某类型的组件.没有则返回null.搜素时深度优先.GetComponentsInChildren Returns all components of Type type in the GameObject or any of its children.返回游戏对象或其子物体上所有某类型的组件GetComponents Returns all components of Type type in the GameObject.返回游戏对象上某类型的所有组件.CompareTag Is this game object tagged tag?核对游戏对象的标签SendMessageUpwards Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the Behaviour在该游戏对象的所有MonoBehaviour上及其父物体上调用名为methodName的方法,SendMessage Calls the method named methodName on every MonoBehaviour in this game object.在该游戏对象的所有MonoBehaviour上调用名为methodName的方法,BroadcastMessage Calls the method named methodName on every MonoBehaviour in this game object or any of its children.在该游戏对象的所有MonoBehaviour上及其子物体上调用名为methodName的方法,GetInstanceID Returns the instance id of the object.返回该物体的实例ID.Inherited Class Functions 被继承的类函数operator bool Does the object exist?判断物体是否存在.Instantiate Clones the object original and returns the clone.复制一个物体并返回该备份.Destroy Removes a gameobject, component or asset.移除一个物体,组件或资源.DestroyImmediate Destroys the object obj immediately. It is strongly recommended to use Destroy instead.立刻销毁一个物体.建议用Destroy代替之.FindObjectsOfType Returns a list of all active loaded objects of Type type.返回找到的所有指定类型的对象.FindObjectOfType Returns the first active loaded object of Type type.返回找到的指定类型的第一个对象operator ==Compares if two objects refer to the same比较两个物体是否相同.operator !=Compares if two objects refer to a different object比较两个物体是否不同.DontDestroyOnLoad Makes the object target not be destroyed automatically when loading a new scene.确保目标对象在加载新场景时不被自动销毁.eGUILayoutDescriptionDisabling this lets you skip the GUI layout phase.禁用此项,将会跳过GUILayout部署阶段It can only be used if you do not use GUI.Window and GUILayout inside of this OnGUI call.它只用于在假如你不用GUI.Window和GUILayout的时候.MonoBehaviour.Invokefunction Invoke (methodName : string, time : float) : voidDescriptionInvokes the method methodName in time seconds.根据时间调用指定方法名的方法.JavaScript// Launches a projectile in 2 seconds// 2秒后发射炮弹var projectile : Rigidbody;Invoke("LaunchProjectile", 2);function LaunchProjectile () {var instance : Rigidbody = Instantiate(projectile);instance.velocity = Random.insideUnitSphere * 5;}MonoBehaviour.InvokeRepeatingfunction InvokeRepeating (methodName : string, time : float, repeatRate : float) : voidDescriptionInvokes the method methodName in time seconds.根据时间调用指定方法名的方法After the first invocation repeats calling that function every repeatRate seconds. 从第一次调用开始,每隔repeatRate时间调用一次.JavaScript// Starting in 2 seconds.// a projectile will be launched every 0.3 seconds// 2秒后开始// 每0.3秒发射一颗炮弹var projectile : Rigidbody;InvokeRepeating("LaunchProjectile", 2, 0.3);function LaunchProjectile () {var instance : Rigidbody = Instantiate(projectile);instance.velocity = Random.insideUnitSphere * 5;}MonoBehaviour.CancelInvokefunction CancelInvoke () : voidDescriptionCancels all Invoke calls on this MonoBehaviour.取消这个MonoBehaviour上的所有调用.JavaScript// Starting in 2 seconds.// a projectile will be launched every 0.3 seconds// 2秒后开始// 每0.3秒发射一颗炮弹var projectile : Rigidbody;InvokeRepeating("LaunchProjectile", 2, 0.3);// Cancels the repeating invoke call,// when the user pressed the ctrl button// 当用户按下ctrl键取消repeating调用function Update() {if (Input.GetButton ("Fire1"))CancelInvoke();}function LaunchProjectile () {instance = Instantiate(projectile);instance.velocity = Random.insideUnitSphere * 5;}function CancelInvoke (methodName : string) : voidDescriptionCancels all Invoke calls with name methodName on this behaviour.取消所有名为methodName的调用.JavaScript// Starting in 2 seconds.// a projectile will be launched every 0.3 seconds// 2秒后开始// 每0.3秒发射一颗炮弹var projectile : Rigidbody;InvokeRepeating("LaunchProjectile", 2, 0.3);// Cancels the repeating invoke call,// when the user pressed the ctrl button// 当用户按下ctrl键取消repeating调用function Update() {if (Input.GetButton ("Fire1"))CancelInvoke("LaunchProjectile");}function LaunchProjectile () {instance = Instantiate(projectile);instance.velocity = Random.insideUnitSphere * 5;}MonoBehaviour.IsInvokingDescriptionIs any invoke on methodName pending?某指定函数是否在等候调用.JavaScript// Instantiates a project after 2 seconds when Space key was pressed// and it will only call the function after the function has ended its execution // 按下空格键2秒后实例化一个炮弹,在该函数执行完毕之前仅调用此函数var projectile : Rigidbody;function Update() {if(Input.GetKeyDown(KeyCode.Space) && !IsInvoking("LaunchProjectile"))Invoke("LaunchProjectile", 2);}function LaunchProjectile () {var instance : Rigidbody = Instantiate(projectile);instance.velocity = Random.insideUnitSphere * 5;}function IsInvoking () : boolDescriptionIs any invoke pending on this MonoBehaviour?此MonoBehaviour上是否有调用在等候.MonoBehaviour.StartCoroutinefunction StartCoroutine (routine : IEnumerator) : CoroutineDescriptionStarts a coroutine.开始协同程序.The execution of a coroutine can be paused at any point using the yield statement. The yield return value specifies when the coroutine is resumed. Coroutines are excellent when modelling behaviour over several frames. Coroutines have virtually no performance overhead. StartCoroutine function always returns immediately, however you can yield the result. This will wait until the coroutine has finished execution.一个协同程序在执行过程中,可以在任意位置使用yield语句.yield的返回值控制何时恢复协同程序向下执行.协同程序在对象自有帧执行过程中堪称优秀.协同程序在性能上没有更多的开销.StartCoroutine函数是立刻返回的,但是yield可以延迟结果.直到协同程序执行完毕.When using JavaScript it is not necessary to use StartCoroutine, the compiler will do this for you. When writing C# code you must call StartCoroutine.用javascript不需要添加StartCoroutine,编译器将会替你完成.但是在C#下,你必须调用StartCoroutine.JavaScript// In this example we show how to invoke a coroutine and continue executing// the function in parallel.// 此例演示如何调用协同程序和它的执行function Start() {// - After 0 seconds, prints "Starting 0.0"// - After 0 seconds, prints "Before WaitAndPrint Finishes 0.0"// - After 2 seconds, prints "WaitAndPrint 2.0"// 先打印"Starting 0.0"和"Before WaitAndPrint Finishes 0.0"两句,2秒后打印"WaitAndPrint 2.0"print ("Starting " + Time.time);// Start function WaitAndPrint as a coroutine. And continue execution while it is running // this is the same as WaintAndPrint(2.0) as the compiler does it for you automatically // 协同程序WaitAndPrint在Start函数内执行,可以视同于它与Start函数同步执行.StartCoroutine(WaitAndPrint(2.0));print ("Before WaitAndPrint Finishes " + Time.time);}function WaitAndPrint (waitTime : float) {// suspend execution for waitTime seconds// 暂停执行waitTime秒yield WaitForSeconds (waitTime);print ("WaitAndPrint "+ Time.time);}Another Example:JavaScript// In this example we show how to invoke a coroutine and wait until it// is completed// 在这个例子中我们演示如何调用协同程序并直到它执行完成.function Start() {// - After 0 seconds, prints "Starting 0.0"// - After 2 seconds, prints "WaitAndPrint 2.0"// - After 2 seconds, prints "Done 2.0"// 0秒时打印"Starting 0.0",2秒后打印"WaitAndPrint 2.0"和"Done 2.0"print ("Starting " + Time.time);// Start function WaitAndPrint as a coroutine. And wait until it is completed.// the same as yield WaitAndPrint(2.0);// 运行WaitAndPrint直到完成yield StartCoroutine(WaitAndPrint(2.0));print ("Done " + Time.time);}function WaitAndPrint (waitTime : float) {// suspend execution for waitTime seconds// 等待waitTime秒yield WaitForSeconds (waitTime);print ("WaitAndPrint "+ Time.time);}function StartCoroutine (methodName : string, value : object = null) : CoroutineDescriptionStarts a coroutine named methodName.开始一个叫methodName的协同程序.In most cases you want to use the StartCoroutine variation above. However StartCoroutine using a string method name allows you to use StopCoroutine with a specific method name. The downside is that the string version has a higher runtime overhead to start the coroutine and you can pass only one parameter很多情况下,我们会用到StartCoroutine的一个变体.使用有字符串方法名的StartCoroutine允许你用StopCoroutine去停止它.其缺点就是会有较高的性能开销,而且你只能传递一个参数.JavaScript// In this example we show how to invoke a coroutine using a string name and stop it// 这个例子演示如何调用一个使用字符串名称的协同程序并停掉它function Start () {StartCoroutine("DoSomething", 2.0);yield WaitForSeconds(1);StopCoroutine("DoSomething");}function DoSomething (someParameter : float) {while (true) {print("DoSomething Loop");// Yield execution of this coroutine and return to the main loop until next frame// 停止协同程序的执行并返回到主循环直到下一帧.yield;}}MonoBehaviour.StopCoroutinefunction StopCoroutine (methodName : string) : voidDescriptionStops all coroutines named methodName running on this behaviour.停止这个动作中名为methodName的所有协同程序.Please note that only StartCoroutine using a string method name can be stopped using StopCoroutine.请注意只有StartCoroutine使用一个字符串方法名时才能用StopCoroutine停用之.JavaScript// In this example we show how to invoke a coroutine using a string name and stop it// 这个例子演示如何调用一个使用字符串名称的协同程序并停掉它function Start () {StartCoroutine("DoSomething", 2.0);yield WaitForSeconds(1);StopCoroutine("DoSomething");}function DoSomething (someParameter : float) {while (true) {print("DoSomething Loop");// Yield execution of this coroutine and return to the main loop until next frame // 停止协同程序的执行并返回到主循环直到下一帧.yield;}}MonoBehaviour.StopAllCoroutinesfunction StopAllCoroutines () : voidDescriptionStops all coroutines running on this behaviour.停止所有动作的协同程序.JavaScript// Starts the coroutine// 开始协同程序.StartCoroutine ("DoSomething");// Cancels the coroutine immediately afterwards// 随后立即取消之.function DoSomething () {while (true) {yield;}}StopAllCoroutines();MonoBehaviour.Updatefunction Update () : voidDescriptionUpdate is called every frame, if the MonoBehaviour is enabled.当MonoBehaviour启用时,其Update在每一帧被调用Update is the most commonly used function to implement any kind of game behaviour.Update是实现各种游戏行为最常用的函数.JavaScript// Moves the object forward 1 meter a second// 以每秒1米的速度向前移动物体function Update () {transform.Translate(0, 0, Time.deltaTime * 1);}In order to get the elapsed time since last call to Update, use Time.deltaTime. This function is only called if the Behaviour is enabled. Override this function in order to provide your component's functionality.为了获取自最后一次调用Update所用的时间,可以用Time.deltaTime.这个函数只有在Behaviour启用时被调用.实现组件功能时重载这个函数.teUpdatefunction LateUpdate () : voidDescriptionLateUpdate is called every frame, if the Behaviour is enabled.当MonoBehaviour启用时,其LateUpdate在每一帧被调用LateUpdate is called after all Update functions have been called. This is useful to order script execution. For example a follow camera should always be implemented in LateUpdate because it tracks objects that might have moved inside Update.LateUpdate是在所有Update函数调用后被调用.这可用于调整脚本执行顺序.例如:当物体在Update里移动时,跟随物体的相机可以在LateUpdate里实现,JavaScript// Moves the object forward 1 meter a second// 以每秒1米的速度向前移动物体function LateUpdate () {transform.Translate(0, 0, Time.deltaTime * 1);}In order to get the elapsed time since last call to LateUpdate, use Time.deltaTime. This function is only called if the Behaviour is enabled. Override this function in order to provide your component's functionality.为了获取自最后一次调用LateUpdate所用的时间,可以用Time.deltaTime.这个函数只有在Behaviour启用时被调用.实现组件功能时重载这个函数.MonoBehaviour.FixedUpdatefunction FixedUpdate () : voidDescriptionThis function is called every fixed framerate frame, if the MonoBehaviour is enabled.当MonoBehaviour启用时,其FixedUpdate在每一帧被调用.FixedUpdate should be used instead of Update when dealing with Rigidbody. For example when adding a force to a rigidbody, you have to apply the force every fixed frame inside FixedUpdate instead of every frame inside Update.处理Rigidbody时,需要用FixedUpdate代替Update.例如:给刚体加一个作用力时,你必须应用作用力在FixedUpdate里的固定帧,而不是Update中的帧.(两者帧长不同)JavaScript// Apply a upwards force to the rigid body every frame// 每帧应用一个向上的力到刚体上function FixedUpdate () {rigidbody.AddForce (Vector3.up);}In order to get the elapsed time since last call to FixedUpdate, use Time.deltaTime This function is only called if the Behaviour is enabled. Override this function in order to provide your component's functionality.为了获取自最后一次调用FixedUpdate所用的时间,可以用Time.deltaTime.这个函数只有在Behaviour启用时被调用.实现组件功能时重载这个函数.MonoBehaviour.Awakefunction Awake () : voidDescriptionAwake is called when the script instance is being loaded.当一个脚本实例被载入时Awake被调用.Awake is used to initialize any variables or game state before the game starts. Awake is called only once during the lifetime of the script instance. Awake is called after all objects are initialized so you can safely speak to other objects or query them using eg. GameObject.FindWithTag. Each GameObject's Awake is called in a random order between objects. Because of this, you should use Awake to set up references between scripts, and use Start to pass any information back and forth. Awake is always called before any Start functions. This allows you to order initialization of scripts. Awake can not act as a coroutine.Awake用于在游戏开始之前初始化变量或游戏状态.在脚本整个生命周期内它仅被调用一次.Awake在所有对象被初始化之后调用,所以你可以安全的与其他对象对话或用诸如GameObject.FindWithTag这样的函数搜索它们.每个游戏物体上的Awke以随机的顺序被调用.因此,你应该用Awake来设置脚本间的引用,并用Start来传递信息Awake总是在Start之前被调用.它不能用来执行协同程序.Note for C# and Boo users: use Awake instead of the constructor for initialization, as the serialized state of the component is undefined at construction time. Awake is called once, just like the constructor.C#和Boo用户注意:Awake不同于构造函数,物体被构造时并没有定义组件的序列化状态.Awake像构造函数一样只被调用一次.JavaScriptprivate var target : GameObject;function Awake () {target = GameObject.FindWithTag ("Player");}Awake cannot be a co-routine.Awake不能用作协同程序.MonoBehaviour.Startfunction Start () : voidDescriptionStart is called just before any of the Update methods is called the first time.Start仅在Update函数第一次被调用前调用Start is only called once in the lifetime of the behaviour. The difference between Awake and Start is that Start is only called if the script instance is enabled. This allows you to delay any initialization code, until it is really needed. Awake is always called before any Start functions. This allows you to order initialization of scripts.Start在behaviour的生命周期中只被调用一次.它和Awake的不同是Start只在脚本实例被启用时调用.你可以按需调整延迟初始化代码.Awake总是在Start之前执行.这允许你协调初始化顺序.The Start function is called after all Awake functions on all script instances have been called.在所有脚本实例中,Start函数总是在Awake函数之后调用.JavaScript// Initializes the target variable.// target is private and thus not editable in the inspector// 初始化目标变量// 目标是私有的并且不能在检视面板中编辑private var target : GameObject;function Start () {target = GameObject.FindWithTag ("Player");}MonoBehaviour.Resetfunction Reset () : voidDescriptionReset to default values.重置为默认值Reset is called when the user hits the Reset button in the Inspector's context menu or when adding the component the first time. This function is only called in editor mode. Reset is most commonly used to give good default values in the inspector.Reset是在用户点击检视面板的Reset按钮或者首次添加该组件时被调用.此函数只在编辑模式下被调用.Reset最常用于在检视面板中给定一个最常用的默认值.JavaScript// Sets target to a default value.// This could be used in a follow camera.// 设置target为默认值// 这可以用于一个跟踪相机var target : GameObject;function Reset () {// Only set target if it is not assigned yet.// 如果target没有赋值,设置它if (!target)target = GameObject.FindWithTag ("Player");}MonoBehaviour.OnMouseEnterfunction OnMouseEnter () : voidDescriptionOnMouseEnter is called when the mouse entered the GUIElement or Collider.当鼠标进入到GUIElement(GUI组件)或Collider(碰撞体)中时调用OnMouseEnter.JavaScript// Attach this script to a mesh to make// it red when the mouse is over the mesh// 附加这个脚本到网格// 当鼠标经过网格时网格变红色function OnMouseEnter () {renderer.material.color = Color.red;}This function is not called on objects that belong to Ignore Raycast layer.OnMouseEnter can be a co-routine, simply use the yield statement in the function. This event is sent to all scripts attached to the Collider or GUIElement.这个函数不会在属于Ignore Raycast的层上调用.它可以被作为协同程序,在函数体内使用yield语句.这个事件将发送到所有附在Collider或GUIElement的脚本上.IMPORTANT: This function has no effect on iPhone.注意:这个函数在Iphone上无效.MonoBehaviour.OnMouseOverfunction OnMouseOver () : voidDescriptionOnMouseOver is called every frame while the mouse is over the GUIElement or Collider.当鼠标悬浮在GUIElement(GUI组件)或Collider(碰撞体)上时调用OnMouseOver.JavaScript// Fades the red component of the material to zero// while the mouse is over the mesh// 当鼠标在网格上时渐变红色组件为0function OnMouseOver () {renderer.material.color -= Color(0.1, 0, 0) * Time.deltaTime;}This function is not called on objects that belong to Ignore Raycast layer.OnMouseOver can be a co-routine, simply use the yield statement in the function. This event is sent to all scripts attached to the Collider or GUIElement.这个函数不会在属于Ignore Raycast的层上调用.它可以被作为协同程序,在函数体内使用yield语句.这个事件将发送到所有附在Collider或GUIElement的脚本上.IMPORTANT: This function has no effect on iPhone.注意:此函数在iPhone上无效.MonoBehaviour.OnMouseExitfunction OnMouseExit () : voidDescriptionOnMouseExit is called when the mouse is not any longer over the GUIElement or Collider.当鼠标移出GUIElement(GUI组件)或Collider(碰撞体)上时调用OnMouseExit.OnMouseExit balances out OnMouseEnterOnMouseExit与OnMouseEnter相反.JavaScript。
Networking Elements in Unity网络元素在Unity中Unity's native networking supports everything discussed on the previous page. Server creation and client connection, sharing data between connected clients, determining which player controls which objects, and punching through network configuration variations are all supported out of the box. This pagewill walk you through the Unity-specific implementation of these networking practices.Unity的原生网络支持前面页面导论的每一个东西。
服务器的创建和客户端的连接,分享数据在连接的客户端,决定哪一个player控制哪一个物体,并且穿透网络配置变化被支持并且开源。
这一页引导你这些网络行为的Unity的具体的处理。
Creating a Server创建一个服务器Before you can begin playing a networked game, you have to determine the different computers you will be communicating with. To do this, you have to create a server. This can be a machine that is also running the game or it can be a dedicated machine that is not participating in the game. To create the server, you simply call Network.InitializeServer() from a script. When you want to connect to an existing server as a client, you call Network.Connect() instead.在你开始玩一个网络游戏的之前,你必须去决定你将要与哪些不同的计算机进行交流。
Unity Manual 用户手册•User Guide用户指南o Unity Basics Unity基础翻译:U_鹰▪Learning the Interface学习界面翻译:U_鹰▪Project Browser项目浏览器视图翻译:U_鹰▪Hierarchy层级面板视图翻译:U_鹰▪Toolbar工具栏翻译:U_鹰▪Scene View场景视图翻译:U_鹰▪Game View游戏视图翻译:U_鹰▪Inspector检视面板翻译:U_鹰▪Other Views其他视图翻译:U_鹰▪Customizing Your Workspace自定义工作区翻译:第七把剑▪Asset Workflow资源工作流程翻译:第七把剑▪Creating Scenes创建场景翻译:第七把剑▪Publishing Builds编译发布翻译:第七把剑▪Tutorials教程翻译:U_鹰▪Unity Hotkeys Unity3D快捷键翻译:U_鹰▪Preferences首选项翻译:U_鹰o Building Scenes构建场景▪GameObjects游戏对象翻译:第七把剑▪The GameObject-Component Relationship游戏对象和组件的关系翻译:第七把剑▪Using Components使用组件翻译:第七把剑▪The Component-Script Relationship组件和脚本之间的关系翻译:第七把剑▪Deactivating GameObjects停用游戏对象翻译:feicheng2005▪Using the Inspector使用检视面板翻译:第七把剑▪Editing Value Properties编辑值属性翻译:第七把剑▪Preset Libraries预设库翻译:U_鹰▪Assigning References指定引用翻译:第七把剑▪Multi-Object Editing多重对象编辑翻译:colin3dmax▪Inspector Options检视面板选项翻译:第七把剑▪Using the Scene View使用场景视图翻译:第七把剑▪Scene View Navigation场景视图导航翻译:第七把剑▪Positioning GameObjects定位游戏对象翻译:第七把剑▪View Modes视图模式翻译:第七把剑▪Gizmo and Icon Display Controls Gizmo和图标显示控制翻译:U_鹰▪Searching搜索翻译:第七把剑▪Prefabs预制翻译:第七把剑▪Lights灯光翻译:第七把剑▪Cameras摄像机翻译:第七把剑▪Terrain Engine Guide地形引擎指南翻译:第七把剑o Asset Import and Creation资源导入与创建翻译:第七把剑▪Primitive Objects基本对象翻译:U_鹰▪Importing Assets导入资源翻译:第七把剑▪Models模型翻译:用生命舞蹈▪3D formats3D格式翻译:用生命舞蹈▪Materials and Shaders材质与着色器翻译:第七把剑▪Texture 2D二维纹理翻译:第七把剑▪Procedural Materials程序材质翻译:U_鹰▪Movie Texture影片纹理翻译:U_鹰▪Audio Files音频文件翻译:U_鹰▪Tracker Modules音轨模块翻译:U_鹰▪Using Scripts使用脚本翻译:colin3dmax▪Creating and Using Scripts▪Controlling GameObjects Using Components▪Event Functions事件函数翻译:RICO▪Creating and Destroying GameObjects▪Coroutines▪Special Folders and Script Compilation Order▪Namespaces▪Asset Store资源商店翻译:肥耀▪Asset Store Access and Navigation▪Asset Store Publisher Administration资源商店发布者管理翻译:13y32r▪Asset Store FAQ▪Asset Server (Team License Only)资源服务器(仅团队许可)翻译:colin3dmax▪Setting up the Asset Server设置资源服务器(仅团队许可)翻译:青青子矜▪Cache Server (Team License Only)缓存服务器(仅团队许可)▪Cache Server (Team license only)缓存服务器(仅团队许可)翻译:一米的馒头▪Cache Server FAQ缓存服务器常见问题翻译:13y32r ▪Behind the Scenes场景幕后翻译:colin3dmaxo Creating Gameplay创建游戏翻译:U_鹰▪Instantiating Prefabs at runtime运行时实例化预置翻译:U_鹰▪Input输入翻译:U_鹰▪Transforms变换翻译:U_鹰▪Physics物理翻译:U_鹰▪Adding Random Gameplay Elements添加随机的游戏元素翻译:一米的馒头▪Particle Systems粒子系统翻译:小yue▪Particle System Curve Editor粒子系统曲线编辑器翻译:小yue▪Colors and Gradients in the Particle System (Shuriken)粒子系统中的颜色和渐变翻译:小yue▪Gradient Editor渐变编辑器翻译:小yue▪Particle System Inspector粒子系统检视面板翻译:小yue▪Introduction to Particle System Modules (Shuriken)粒子系统模块介绍翻译:小yue▪Particle System Modules (Shuriken)粒子系统模块翻译:小yue▪Particle Effects (Shuriken)粒子效果翻译:小yue▪Mecanim Animation System Mecanim动画系统翻译:FancyBit ▪ A Glossary of Animation and Mecanim terms动画和Mecanim 术语表翻译:FancyBit▪Asset Preparation and Import资源准备和导入翻译:FancyBit ▪Preparing your own character准备你自己的角色翻译:FancyBit▪Importing Animations导入动画翻译:FancyBit▪Splitting Animations分割动画翻译:FancyBit ▪Working with humanoid animations▪Creating the Avatar创建Avatar翻译:FancyBit▪Configuring the Avatar配置Avatar翻译:FancyBit▪Muscle setup肌肉设定翻译:FancyBit▪Avatar Body Mask阿凡达身体遮罩翻译:Karsion▪Retargeting of Humanoid animations为类人动画重新定位目标翻译:Karsion▪Inverse Kinematics (Pro only)▪Generic Animations in Mecanim Mecanim中的通用动画翻译:bwhale▪Bringing Characters to Life为角色赋予生命翻译:bwhale▪Looping animation clips循环动画剪辑翻译:bwhale▪Animator Component and Animator Controller动画组件和动画控制器翻译:bwhale▪Animation State Machines动画状态机翻译:bwhale▪Animation States动画状态翻译:bwhale▪Animation Transitions动画状态转移翻译:bwhale▪Animation Parameters动画参数翻译:bwhale ▪Blend Trees混合树翻译:bwhale▪1D Blending一维混合翻译:bwhale▪2D Blending二维混合翻译:bwhale▪Additional Blend Tree Options附加混合树选项翻译:bwhale▪Mecanim Advanced topics Mecanim进阶主题翻译:bwhale▪Working with Animation Curves in Mecanim(Pro only)使用Mecanim的动画曲线(仅限Pro版本)翻译:bwhale▪Sub-State Machines子状态机翻译:bwhale▪Animation Layers动画层翻译:bwhale▪Animation State Machine Preview (solo andmute)动画状态机预览(独立和关闭)翻译:bwhale▪Target Matching目标匹配翻译:bwhale▪Root Motion - how it works根动作-如何工作翻译:bwhale▪Tutorial: Scripting Root Motion for"in-place" humanoid animations教程:为一个人形场景动画编写根动作脚本翻译:bwhale▪Mecanim Performance and Optimization Mecanim性能和优化翻译:feicheng2005▪Mecanim FAQ Mecanim问答翻译:feicheng2005▪Legacy animation system旧版动画系统翻译:feicheng2005▪Animation View Guide(Legacy)动画视图指南翻译:U_鹰▪Animation Scripting(Legacy)动画脚本翻译:U_鹰▪Navmesh and Pathfinding (Pro only)导航网格和寻路(仅专业版)翻译:肥耀▪Navmesh Baking导航网格烘焙翻译:肥耀▪Sound声音翻译:U_鹰▪Game Interface Elements游戏界面元素翻译:U_鹰▪Networked Multiplayer多人网络翻译:U_鹰Android•Getting Started with Android Development Android 开发入门翻译:闲人若林o A ndroid SDK Setup安装Android SDK翻译:闲人若林o A ndroid Remote安卓远程工具翻译:闲人若林o T rouble Shooting故障排除翻译:U_鹰o R eporting crash bugs under Android在Android中报告崩溃BUG翻译:Summer Windso F eatures currently not supported by Unity Android目前在Unity Android 中不支持的特性翻译:Summer Windso S upport for Split Application Binary (.OBB)对分割应用程序二进制(.OBB)的支持翻译:悄悄o P layer Settings播放器设置翻译:U_鹰o A ndroid Scripting Android脚本翻译:U_鹰▪Input输入翻译:U_鹰▪Mobile Keyboard手机键盘翻译:雨天▪Advanced Unity Mobile Scripting高级Unity手机脚本翻译:SummerWinds▪Using .NET API 2.0 compatibility level使用.NET API 2.0 兼容级别翻译:U_鹰o B uilding Plugins for Android为Android创建插件翻译:雨天o C ustomizing the Splash screen of Your Mobile Application自定义手机启动画面翻译:闲人若林Blackberry 10•Getting Started with Blackberry 10 Developmento S etting up Unity to Build to Your Blackberry10 Deviceo B lackberry10 Detailso P lugins for Blackberry 10o B lackBerry 10 Controllero D ebugging on Blackberry10o B lackberry10 FAQWindows Store•Windows Store: Getting Startedo W indows Store: Deploymento W indows Store: Debuggingo W indows Store: Profilero W indows Store : Command line argumentso W indows Store : Pluginso W indows Store : Project Types▪AppCallbacks classo W indows Store : FAQ▪Windows Store FAQ : WACKo w indowsstore-examplesWindows Phone 8•Windows Phone 8: Getting Started Windows Phone 8:入门翻译:Cantilenao W indows Phone 8: Deployment Windows Phone 8:部署翻译:Cantilenao W indows Phone 8: Debugging Windows Phone 8:调试翻译:Cantilenao W indows Phone 8: Profilero I nteraction between Unity and Windows Phone step by step guideo W indows Phone 8: Plugins▪Windows Phone Plugins step by step guide (using C#)▪Windows Phone Plugins step by step guide (using C++)o W indows Phone 8: FAQ Windows Phone 8:常见问题翻译:Cantilenao W P8 Examples▪Xbox One: Getting Started•Getting Started with Native Client Development本地客户端开发入门翻译:peiandsky •Getting Started with Flash Development Flash开发入门翻译:我是头觅食的野猪o Flash: Setup Flash:安装翻译:我是头觅食的野猪o Flash: Building & Running Flash:生成并运行翻译:我是头觅食的野猪o Flash: Debugging Flash:进行调试翻译:我是头觅食的野猪o Flash: What is and is not supported Flash:支持和不支持的翻译:我是头觅食的野猪o Flash: Embedding Unity Generated Flash Content in Larger Flash Projectso Example: Supplying Data from Flash to Unityo Example: Calling ActionScript Functions from Unityo Example: Browser JavaScript Communicationo Example: Accessing the Stageo Example: Flash Vars•FAQ常见问题o Upgrade Guide from Unity 3.5 to 4.0Unity3.5升级指南翻译:青青子矜o Unity 3.5 upgrade guide Unity3.5升级指南翻译:U_鹰o Upgrading your Unity Projects from 2.x to 3.x升级项目从2.x 到3.x翻译:U_鹰▪Physics upgrade details物理升级细节翻译:U_鹰▪Mono Upgrade Details Mono升级细节翻译:U_鹰▪Rendering upgrade details渲染升级细节翻译:U_鹰▪Unity 3.x Shader Conversion Guide Unity 3.x着色器转换指南翻译:U_鹰o Unity 4.0 Activation - Overview Unity 4.0 激活- 概述翻译:U_鹰▪Managing your Unity 4.x license管理你的Unity 4.x许可证翻译:U_鹰▪Step-by-Step Guide to Online Activation of Unity 4.0在线激活Unity4.0逐步指南翻译:U_鹰▪Step-by-Step Guide to Manual Activation of Unity 4.0手工激活Unity4.0逐步指南翻译:U_鹰o Game Code Questions游戏代码问题翻译:U_鹰▪How to make a simple first person walkthrough如何制作一个简单的第一人称步骤?翻译:U_鹰o Graphics Questions图形问题翻译:U_鹰▪How do I Import Alpha Textures?如何导入Alpha纹理?翻译:我是头觅食的野猪▪How do I Use Normal Maps?如何使用法线贴图?翻译:我是头觅食的野猪▪How do I use Detail Textures?如何使用细节纹理?翻译:杨希羚▪How do I Make a Cubemap Texture?如何制作一个Cubemap纹理?翻译:杨希羚▪How do I Make a Skybox?如何制作天空盒?翻译:我是头觅食的野猪▪How do I make a Mesh Particle Emitter? (Legacy Particle System)如何制作网格粒子发射器?(旧的粒子系统)翻译:我是头觅食的野猪▪How do I make a Splash Screen?如何制作启动屏幕?翻译:杨希羚▪How do I make a Spot Light Cookie?如何制作聚光灯投影遮罩?翻译:杨希羚▪How do I fix the rotation of an imported model?如何修正导入模型的旋转?翻译:我是头觅食的野猪▪How do I use Water?如何使用水?翻译:杨希羚o FBX export guide如何导出FBX翻译:我是头觅食的野猪o Art Asset Best-Practice Guide怎样高效部署资源文件实践指南翻译:一米的馒头o How do I import objects from my 3D app?如何从3d应用程序中导入物体?翻译:用生命舞蹈▪Importing Objects From Maya从maya导入物体翻译:用生命舞蹈▪Importing Objects From Cinema 4D从Cinema 4D导入物体翻译:用生命舞蹈▪Importing Objects From 3D Studio Max从3D Studio Max导入物体翻译:用生命舞蹈▪Importing Objects From Cheetah3D从Cheetah3D导入物体翻译:我是头觅食的野猪▪Importing Objects From Modo从Modo导入物体翻译:我是头觅食的野猪▪Importing Objects From Lightwave从Lightwave导入物体翻译:我是头觅食的野猪▪Importing Objects From Blender从Blender导入物体翻译:我是头觅食的野猪▪Using Blender and Rigifyo Workflow Questions工作流程问题▪Getting started with Mono Develop(Mono Develop入门)翻译:肥耀▪How do I reuse assets between projects?怎样在项目间重用资源?翻译:肥耀▪How do I install or upgrade Standard Assets?怎样安装和升级标准资源包?翻译:肥耀▪Porting a Project Between Platforms平台间的项目移植翻译:Cantilena o Mobile Developer Checklist移动开发者清单翻译:悄悄▪Crashes系统崩溃翻译:悄悄▪Profiling性能分析翻译:悄悄▪Optimizations优化翻译:悄悄o How to deliver an application to the Apple Mac Store.•Advanced高级o Vector Cookbook向量介绍翻译:冷水泡面▪Understanding Vector Arithmetic理解向量运算翻译:冷水泡面▪Direction and Distance from One Object to Another从一个对象到另一个对象的方向和距离翻译:冷水泡面▪Computing a Normal/Perpendicular vector计算法线向量/垂直向量翻译:冷水泡面▪The Amount of One Vector's Magnitude that Lies in Another Vector's Direction一个向量的大小的数量位于另一个向量方向上翻译:冷水泡面o AssetBundles (Pro only)资源包(仅专业版)翻译:bwhale▪AssetBundles FAQ资源包问答翻译:bwhale▪Building AssetBundles创建资源包翻译:bwhale▪Downloading AssetBundles下载资源包翻译:bwhale▪Loading resources from AssetBundles从资源包中加载资源翻译:bwhale▪Keeping track of loaded AssetBundles追踪所下载的资源包翻译:bwhale▪Storing and loading binary data in an AssetBundle存储加载资源包中的二进制数据翻译:bwhale▪Protecting Content内容保护翻译:bwhale▪Managing asset dependencies管理资源依赖关系翻译:bwhale▪Including scripts in AssetBundles在资源包中包含脚本翻译:bwhaleo Graphics Features图形功能▪HDR (High Dynamic Range)高动态范围(HDR)图像翻译:肥耀▪Rendering Paths渲染路径翻译:肥耀▪Linear Lighting (Pro Only)线性光照(仅专业版)翻译:U_鹰▪Level of Detail (Pro Only)细节级别(仅专业版)翻译:肥耀▪Shaders着色器翻译:肥耀▪Shaders: ShaderLab & Fixed Function shaders着色器:着色器语言&固定功能着色器翻译:风里疯语▪Shaders: Vertex and Fragment Programs着色器:顶点和片段程序翻译:风里疯语▪Using DirectX 11 in Unity 4在Unity 4使用DirectX 11翻译:U_鹰▪Compute Shaders计算着色器翻译:13y32r▪Graphics Emulation图形仿真翻译:我是头觅食的野猪o AssetDatabase资源数据库翻译:肥耀o Build Player Pipeline构建播放器管线翻译:我是头觅食的野猪o Profiler (Pro only)分析器(仅专业版)翻译:肥耀▪Profiler window分析器窗口翻译:肥耀▪CPU Usage Area CPU使用率区域翻译:Cantilena▪Rendering Area渲染区域翻译:肥耀▪Memory Area内存区域翻译:Cantilena▪Audio Area音频区域翻译:Cantilena▪ProfilerPhysics物理学区域翻译:肥耀▪GPU Area GPU区域翻译:肥耀o Lightmapping Quickstart光照贴图快速入门翻译:用生命舞蹈▪Lightmapping In-Depth光照贴图深入学习翻译:用生命舞蹈▪Custom Beast Settings自定义Beast设置翻译:一米的馒头▪Lightmapping UVs光照贴图UV翻译:用生命舞蹈▪Light Probes灯光探测器翻译:用生命舞蹈o Occlusion Culling (Pro only)遮挡剔除(仅专业版)翻译:肥耀o Camera Tricks摄像机技巧翻译:U_鹰▪UnderstandingFrustum了解视锥体翻译:重生の记忆▪The Size of the Frustum at a Given Distance from the Camera从摄像机到给定距离的视锥体的大小翻译:我是头觅食的野猪▪Dolly Zoom (AKA the "Trombone" Effect)推拉变焦(又称伸缩变焦)翻译:我是头觅食的野猪▪Rays from the Camera摄像机射线翻译:我是头觅食的野猪▪Using an Oblique Frustum使用斜视锥体翻译:我是头觅食的野猪▪Creating an Impression of Large or Small Size创建一个大或小尺寸的感觉翻译:我是头觅食的野猪o Loading Resources at Runtime在运行时加载资源翻译:肥耀o Modifying Source Assets Through Scripting通过脚本修改源资源翻译:肥耀o Generating Mesh Geometry Procedurally用程序生成网格几何体翻译:肥耀▪Anatomy of a Mesh网格剖析翻译:肥耀▪Using the Mesh Class使用Mesh类翻译:肥耀▪Example - Creating a Billboard Plane示例- 创建一个广告牌平面翻译:肥耀o Rich Text富文本翻译:无悔o Using Mono DLLs in a Unity Project在Unity项目中使用Mono DLL(动态链接库)翻译:X-droido Execution Order of Event Functions事件函数的执行顺序翻译:X-droido Practical Guide to Optimization for Mobiles优化手机的实用指南翻译:Cantilena ▪Practical Guide to Optimization for Mobiles - Future & High End Devices优化手机的实用指南- 未来及高端设备翻译:Cantilena ▪Practical Guide to Optimization for Mobiles - Graphics Methods优化手机的实用指南- 图形方法翻译:Cantilena▪Practical Guide to Optimization for Mobiles - Scripting and Gameplay Methods优化手机的实用指南- 脚本和游戏设置方法翻译:萤之助▪Practical Guide to Optimization for Mobiles - Rendering Optimizations 优化手机的实用指南- 渲染优化翻译:萤之助▪Practical Guide to Optimization for Mobiles - Optimizing Scriptso Structure of an Unity XCode Project Unity XCode项目结构翻译:U_鹰o Optimizing Graphics Performance优化图形性能翻译:肥耀▪Draw Call Batching描绘调用批处理翻译:Amazonzx▪Modeling Characters for Optimal Performance为优化性能建模角色翻译:肥耀▪Rendering Statistics Window渲染数据统计窗口翻译:肥耀o Reducing File Size减小文件大小翻译:我是头觅食的野猪o Understanding Automatic Memory Management了解自动内存管理翻译:一米的馒头o Platform Dependent Compilation平台依赖编译翻译:我是头觅食的野猪o Generic Functions泛型函数翻译:肥耀o Debugging进行调试翻译:我是头觅食的野猪▪Console控制台翻译:U_鹰▪Debugger调试器翻译:我是头觅食的野猪▪Log Files日志文件翻译:肥耀▪Accessing hidden folders访问隐藏文件夹翻译:肥耀o Plugins (Pro/Mobile-Only Feature)插件- 只用于专业版/移动版功能翻译:太昊|仙境乐网▪Building Plugins for Desktop Platforms为桌面平台创建插件翻译:雨天▪Building Plugins for iOS为iOS创建插件翻译:雨天▪Building Plugins for Android为Android创建插件翻译:雨天▪Low-level Native Plugin Interface底层本地插件接口翻译:雨天o Textual Scene File Format (Pro-only Feature)文本场景文件格式(仅专业版功能)翻译:U_鹰▪Description of the Format格式说明翻译:我是头觅食的野猪▪YAMLSceneExample YAML场景示例翻译:我是头觅食的野猪▪YAML Class ID Reference YAML 类ID参考翻译:U_鹰o Streaming Assets流媒体资源翻译:我是头觅食的野猪o Command line arguments命令行参数翻译:一米的馒头o Running Editor Script Code on Launch启动时运行编辑器脚本代码翻译:U_鹰o Network Emulation网络仿真翻译:肥耀o Security Sandbox of the Webplayer网络播放器的安全沙箱翻译:我是头觅食的野猪o Overview of available .NET Class Libraries可用的.NET类库概述o Visual Studio C# Integration Visual Studio C#集成翻译:我是头觅食的野猪o Version control integration (Team license only)o Using External Version Control Systems with Unity使用Unity的外部版本控制系统翻译:我是头觅食的野猪o Analytics分析翻译:肥耀o Check For Updates更新检查翻译:肥耀o Installing Multiple Versions of Unity安装多个Unity版本翻译:青青子矜o Trouble Shooting故障排除翻译:U_鹰▪Troubleshooting Editor编辑器故障排除翻译:IanZhang▪Troubleshooting Webplayer网页播放器故障排除翻译:IanZhang Desktop•Shadows in Unity阴影翻译:U_鹰o D irectional Shadow Details平行光阴影细节翻译:U_鹰o T roubleshooting Shadows阴影疑难解答翻译:U_鹰o S hadow Size Computation阴影大小计算翻译:U_鹰o I ME in Unity Unity的输入法编辑器翻译:U_鹰o O ptimizing for integrated graphics cards为集成显卡优化翻译:U_鹰•Web Player Deployment网络播放器部署翻译:U_鹰o H TML code to load Unity content用HTML代码加载Unity内容翻译:U_鹰o W orking with UnityObject2使用精缩的UnityObject2翻译:IanZhango C ustomizing the Unity Web Player loading screen自定义Unity网络播放器加载的屏幕翻译:U_鹰o C ustomizing the Unity Web Player's Behavior自定义Unity网络播放器的行为翻译:U_鹰o U nity Web Player and browser communication Unity网络播放器和浏览器通信翻译:U_鹰o U sing web player templates使用网络播放器模板翻译:U_鹰o W eb Player Streaming网络播放器流处理翻译:U_鹰o W ebplayer Release Channels网页播放器版本翻译:人中吕布•Using the Chain of Trust system in the Web Player在网页播放器使用信任链系统翻译:人中吕布。
unity3d菜单翻译汉化中文(最全最简单)Edit 编辑frame selected 选取线框select all 选取所有special characters 角色专题load selection 加载选择save selection 保存选择project settings 项目设置render settings 渲染设置graphics emulation 图形模拟network emulation 网络模拟Assets 资产import settings 导入设置reimport 重新导入creater 创建r in finder -r取景open打开import new assets 导入新的资产refresh刷新import package 打包导入export package 打包导出select dependencies 选择附属物export ogg file 导出文件reimport all 重新导入所有Game Obiect 游戏对象Create empty 创建虚拟物体Create other 创建其它Center on children 创建子物体Move to view 移动到视图Align with view 视图对齐Align view to selected 对齐选择Make parent 构成父Clear parent清除父Apply changes to prefab应用变化Component 元素Mesh 网格物体Psrticles 粒子Ellipsoid particle emitter 椭圆发射器Mesh particle emitter 网状发射器Particle animator 粒子动画World particle collider 粒子碰撞Particle renderer 粒子渲染Trail renderer 慢速渲染Physics 物理模拟Rigidbody刚体Character controller角色控制器Box collider盒子Sphere collider球体碰撞Capsule collider胶囊碰撞Mesh colloder网格碰撞Wheel colloder舵轮碰撞Raycast collider CAST碰撞Hinge joint铰链关节Fixed joint固定关节Spring joint反弹关节Character joint角色关节Configurable joint结构关节Constant force恒力Audio音频Rendering渲染Projector投影机Halo光晕Lens flare镜头耀斑GUI texture界面纹理GUI text界面文字Skybox天空GUI layer界面层Flare layer耀斑层Halo layer光晕层Miscellaneous杂项Animation 动画Line renderer线性渲染Network view 网络视图Terrain collider 地形碰撞Scripts脚本Activate trigger激活触点Animation speed动画速度Drag rigidbody拖曳刚体FPFlyerFPSCounter FPS计算器FPSWalkerHeronHeron ColliderLsland waterParrot waypointsPerformance tweak性能调整Seagull海鸥Seagull flight path海鸥飞行路径Seagull sound heat海鸥声热Terrain地形Timed object destructor定时爆破物Underwater effects水下特效Water水Water lightmap fog 水、灯光贴图、雾Water simple简单的水Water wave scroll水波滚动Wave animation水波动画Wave mesh adjustment波网调整Image effects 特效Blur模糊)Blur(island) 模糊(岛)Color correction色彩校正Contrast stretch对比延伸Edge detection边缘检测Glow辉光Glow(island) 辉光(岛)Grayscale灰度Motion blur运动模糊Noise噪点Sepia tone深褐色调Twirl扭曲Vortex涡Camera control相机控制Mouse look 鼠标注视Mouser orbit鼠标轨迹Smooth follow平滑跟随Smooth look at平滑观看Terrain地形Create terrain创建地形Import heightmap raw导入高度图Export heightmap raw导出高度图Set resolution设置分辨率Create lightmap创建lightmapMass place trees生成大片树木Flatten heightmap辗平高度图Refresh tree and detail prototypes刷新树和详细的原型Update tree lightmap color更新树的lightmap Update Tree Color更新树木的颜色Update Tree Color更新树木的颜色Custom 定制Duplicate texture 复制纹理Export to obj 导出OBJWindow窗口Minimize 最小化Layouts 布局Maximize最大化Split horizontal水平切割Split vertical 垂直切割Animation 动画Project项目HierARChy 层级Inspector 监督Scene 场景Game 游戏Console控制器Bring all to front 在最前地形属性InspectorSimple 采样(简单)full 满debug调试tag:untagged 标签layer:default层:默认Raise height提升高度Hold down shift to lower height 按住SF健压平Terrain collider 地形碰撞Material材质Is trigger触发Terrain data地形数据Create Tree Colliders创建树的碰撞Water lightmap fog(script) 水、灯光贴图、雾(脚本)Script脚本Fog density雾的密度Fog color雾色Base color基础色Base mult blur pixels基础模糊像素Blur over drive 模糊驱动器Depth ambient环境深度Terrain size地形大小Terrain collider地形碰撞Texture纹理。
Minimizing Network Bandwidth优化网络带宽It is important to think about what kind of data you are sending across the Network. Ideally, you should be sending the absolute minimum amount of data to make your game work correctly on all clients.考虑关于你通过网络发送的数据种类是非常重要的。
理想上,你应该发送绝对最小量的数据去使你的游戏在所有的客户端正确的工作。
How data is synchronized数据如何同步How you decide to synchronize data affects the bandwidth you use. You have a choice of using either Unreliable or Reliable Delta Compression in each Network View.你决定如何去同步数据影响你使用的带宽。
你可以选择使用Unreliable或Reliable Delta Compression 在每一个Network View。
Unreliable means everything is sent during each iteration of the network update loop. This update loop is executed according to what is set by Network.sendRate, by default 15 times per second. By using Unreliable you ensure frequent updates of information and you don't care if updates are dropped or delayed. Dropped or delayed packets are ignored. For objects which frequently change state this might be the best way of synchronizing.Unreliable意味着每一个东西在每一个网络更新迭代器循环的时候。
Master ServerThe Master Server is a meeting place for games that are actively seeking clients, and player clients who want to connect to them. Its purpose is also to hide IP address and port details and perform technical tasks around setting up network connections which might otherwise not be possible, like firewall handling and NAT punch-through.Master Server 是一个游戏的会议模式,它能积极的搜寻客户端,并且玩家客户端想要连接的客户端。
它的目的同样是隐藏IP地址和端口信息并且执行技术测试围绕设置网络连接,这可能是不可能的,像防火墙控制和网络穿透。
Each individual running game server provide a Game Type to the Master Server. All games with a matching Game Type are gathered together so that compatible clients can easily view them. When a player connects and queries the Master Server for their matching Game Type, useful information on the server is displayed for the player to see. This helps the player decide which server to connect to. This includes the Game Name, player count and whether or not a password is needed. The two functions used to transmit this data are MasterServer.RegisterHost()for the Server, and MasterServer.RequestHostList() for the player client.每一个个人的运行的游戏服务器提供一个游戏模式给Master Server。
所有带一个匹配游戏模式的游戏被聚合到一起,所以兼容的客户端可以简单的浏览他们。
当一个玩家连接和查询Master Server为他们匹配游戏类型,为了让玩家看到有用的信息在服务器上显示。
这样帮助玩家决定连接哪一个服务器。
它包含游戏名称,玩家数和是否需要密码。
用来交换这些数据的这两个方法是服务器端MasterServer.RegisterHost(),和玩家客户端MasterServer.RequestHostList()When calling RegisterHost(), you need to pass three arguments - gameTypeName(which is the previously mentioned Game Type), gameName and comment- for the host being registered. RequestHostList()takes as an argument the gameTypeName of the hosts you are interested in connecting to. All the registered hosts of that type will then be sent to the requesting client. This is an asynchronous operation and the actual host list can be retrieved with PollHostList() which returns the list when it has arrived.我们调用RegisterHost(),你需要去通过三个参数gameTypeName (之前提到的游戏类型),gameName 和comment - 为了注册主机。
RequestHostList()带一个参数,你有兴趣连接的主机的gameTypeName。
所有注册的那种类型的主机将被发送到需要的客户端。
这个一个异步操作并且真实的主机列表可以用PollHostList()重新取回,当他到达的时候它返回这个列表。
The NAT punchthrough portion of the Master Server is actually done by a separate entity called the Facilitator. The central Unity Master Server is also running a Facilitator in addition to being a game lobby so it is OK to think of these functionalities as simply Master Server functionalities in that context.Master Server的NAT穿透部分实际上完成通过一个被称作Facilitator的实体。
除了作为一个游戏大厅之外Master Server主要也是运行一个Facilitator,所以很简单的想想在这样背景下,这些方法作为简单Master Server功能。
The Game Type you set for your game should be unique for your game. This is to prevent clients running a completely different game from seeing your servers and trying to connect to them. So don't use "Game1" or anything generic like that as the gameTypeName. Be specific and unique. If you have different versions of your game out, you could use the comment field to relay that information. That way the client will know if their version is incompatible with some servers in the host list. The comment field can also be used to relay any information you desire. It is a binary data field and can store objects, you just need to cast them properly yourself.你为你的游戏设置的Game Type应该是独一无二的。
这是为了防止客户端运行一个与看到你的服务器并且尝试去连接它们完全不同的游戏.所以不用“Game1”或者一类的作为gameTypeName。
作为特定的和唯一的。
如果你的游戏有不同的版本,你可以用注释字段去转播那些信息。
这样的话客户端将会知道它们的版本是否与在主机列表中的一些服务器不相容。
注释字段也可以用来转播任何你期望的信息。
这是一个2进制数据字段并且可以存储物体,你仅仅需要自己在合适的时候投射它们。
More advanced functionality can be done by using the comment field and customizing the Master Server so that it will use that information itself. For example you could reserve the first 10 bytes of the comment field for a password and then extract the password in the Master Server when it receives the host update. It can compare and reject the host update if appropriate (password check fails). Of course this would require editing of the Master Server source code itself, but this can be downloaded and modified. For more information about this, skip down the page to the Advanced Section.更多的高级的方法可以被完成通过使用注释字段并且自定义Master Server以便于它能自己使用那些信息。
例如你可以预存注释字段的前10个字节为密码,然后当他接收主机更新的时候,在Master Server中提取出密码。
如果有的话(密码检查错误)它可以比较并且拒绝主机更新。
当然这个将需要Master Server自己的源码的编辑,但是这个可以被下载和修改。
对于关于这个的更多的信息,参考Advanced Section。
Registering a game注册一个游戏Before registering a game it is important to set the NAT functionality properly by setting useNat parameter for Network.InitializeServer to true or false depending on the networking capabilities of the host. The user hosting the game should know if he has a NAT address or not and if the game port is connectable on the public internet, so before hosting the game he will indicate if NAT assistance is needed or not.注册一个游戏之前适当通过为设置useNat参数来设置网络穿透参数是十分重要的,设置Network.InitializeServer中的useNat参数成true或者false依赖于主机的网络功能。