Unity3新功能及改进列表,质的飞跃,势不可挡!

Unity3正式发布已经过去有一阵子了.引起的学习热浪也非常高.

新功能和改进

一如往前,我们增加了新的功能和优化,详情如下

支持Android:
这个版本已经支持Android系统.
不过请注意,这是一个早期的版本,并不代表Unity Android最终的质量.

标准资源:
标准资源包进行了更专业的切分分类.
新的图像效果:阳光轴线(Sun Shafts) (又叫做神射线(God Rays)); 动态阴影效果(Bloom)和镜头光晕(Lens Flares); 虚光(Vignetting) & 色差现象(Chromatic Aberration); 曲线颜色校正(Curve based Color Correction); 景深(Depth of Field); 对比度增强(Contrast Enhance) (又名锐化蒙版(Unsharp Mask)); 几何轮廓(Geometry Outline); 鱼眼镜头(Fisheye); 水彩效果(Create Shading).
改进粒子效果.
新的可以与图像效果兼容的带有alpha通道的天空盒.
增加有用的编辑器快捷键.
用Character Motor脚本改进第一人称控制器.
新的CharacterMotor脚本用于角色控制器.
适当调整斜坡和步伐防止乱飞.
至此多种跳跃结束后落地的模式.
变速跳跃和其他一些改进.
改进的速度和加速度控制.
可以设定的滑动和垂直弹跳值可以防止爬上异常陡峭的表面.
它能用于第一人称,第三人称,人工智能等等.
编辑器新功能:
Unity专业版有了一个全新的视觉界面,就是黑色配色,你可以在首选项中切换它.
集成了造树工具.文档”http://unity3d.com/support/documentation/Components/class-Tree.html
通过Beast照明系统而集成的烘焙工具,文档”http://unity3d.com/support/documentation/Manual/Lightmapping.html
自动创建光影图UV(网格导入设置)
地形系统使用相同的解决方案,当使用天光的时候会有全新效果.
已经不必再使用”Lightmapped”着色器;照明系统可以处理出可交互的光影图.以及材质与光影图混合的动态阴影效果.
对象选择器.不再是一个简单的下拉菜单,而是一个新的资源窗口,在这里可以预览关于资源的一些样子和信息.
场景视图的改进,文档”http://unity3d.com/support/documentation/Manual/Using%20The%20Scene%20View.html“.
搜索结果会相应的在场景中高亮显示.
可以框选.
可选以顶点为单位对齐.
可以将材质,预设,贴图直接拽入场景视图即时预览.
改进相机调整手柄及增加一个相机预览窗口.
改进光源的调整手柄.
将场景导航控制栏风格更统一了.
新的纹理导入设置对话框,更易用的用户界面及各个平台的独立设置.
新的构建设置窗口以更方便的支持多平台发布.
曲线弹出窗口:
有个 AnimationCurve 类型的脚本变量显示在检视面板上为一个曲线字段(curve field).
点击一个曲线字段会打开一个带有曲线的编辑器窗口,类似于动画曲线编辑器那样的窗口.
可定制的曲线字段同样能用在自定义编辑器窗口.
编辑器现在能检查有新版本时候通知用户.
纹理压缩现在为多线程处理,在多核电脑上导入贴图更快.
资源服务器窗口:
历史记录窗口将显示多行注释,而不是简单的提示说明.
选中历史记录窗口效果更好.
定位键(F键)在历史记录窗口中也有效.
可以记住每个主机的名称和密码.
在不需要合并的条目中禁止冲突合并选择按钮.
改进着色器的错误反馈.在选择的着色器的检视窗口同样显示一个错误和警告的列表.
在曲线弹出窗口和动画视图按下Ctrl键会开启捕捉刀网格功能(Mac系统下是梅花键).Ctrl或梅花键不再用于增加选择键,但是Shift见依旧用在这.
编辑器的控制栏右下角会显示目前错误和警告的总数.
改进视音频的检视面板.
双击 * unitypackage将自动打开Unity并导入.
编辑器API已经扩展:文档”http://unity3d.com/support/documentation/ScriptReference/40_history.html#3.0.0″
新增对象类型的搜索属性.
现在能拖拽一组Object到检视面板添加为数组.
拖拽编辑器窗口时候更好的显示一个缩微图效果.
当进行一个长时间的操作时候会在Unity图标上显示ygie进度提示,Mac图标上,Win7的任务栏上.
Mac系统下增加了多点触摸的支持.捏的手势变大窗口,轻扫手手势切换场景视图中的相机.
可视化模式现在不做alpha测试.Alpha测试实际消耗GPU,所以和真实消耗不相符.
动画窗口可以显示预设好的动画剪辑,只需要点一下预设的根节点对象.
保护Transform的位置,旋转,缩放,防止误操作.
Build Pipeline:可能的时候将从资产文件序列中去除Typetrees,这使文件更小,可以获得更快的加载时间.
在层次视图中双击游戏对象将在场景视图中最大化显示该物体.
退出播放模式后将转到最后一个激活的标签窗口,而不是依旧停留在游戏视图.
层次视图也有了工具条了.
在Player设置中的API兼容设置可以选择mono配置.如果整合第三方遇到兼容问题的时候可以更改这里(Webplayer上还不能用2.0).
Player能设置高分辨率的图标(Windows:256X256和128X128;iOS:114X114).
在项目和场景中搜索的结果将按照字母顺序排列.
检视面板的锁定改成了一个真实的按钮,而不是隐藏在菜单中.
旋转工具现在包含了”Look At Point”属性,党按下Shift+Ctrl或Shift+梅花键的时候启用.
在场景视图中能试听音频.场景视图的搜索可以彻底的过滤音频源.
添加Webplayer构建模板.
现在可以通过命令行来更新资源服务器的具体修改.
新的图形功能:
静态遮挡剔除(Occlusion Culling)现在使用Umbra sPVS.
集合体整合(Geometry Batching):原本只在Unity iPhone1.7上的动态和静态的几何体整合功能现在可用于所有平台.
渲染方式:(可以在Player Settings或者每个相机上进行选择;文档”http://unity3d.com/support/documentation/Manual/RenderingPaths.html“)
递延照明(Deferred Lighting).在递延渲染方案中实时灯光数量就不用小心翼翼的用了.照明的消耗仅在它发生作用的像素范围内.所以你可以在场景中用很多小灯泡.
点亮顶点(Vertex Lit).这将使所有着色器和灯光用固定在每个顶点上照明.这个效率很快;主要是在移动平台或者中低端设备上使用.
快速渲染(Forward)照比Unity2.x进行了较大的更改.见下文图形渲染部分.
表面着色器-一个更简单的着色器编写方法.我们没有写关于它的文档,你要相信我们,它真的很易用!
速度上我们优化了渲染代码,相同的场景设置下,比Unity2.6快了20~50%.
用于iOS和Android的OpenGL ES 2.0,你可以给对象用着色器,后期处理效果等等.
Cg/HLSL着色器和Unity3表面着色器将被编译成GLSL后用到场景中.GLSL将被进一步的优化,因为移动平台的技能还不能很好的优化着色器.
当然,由于移动平台还不是十分强大.在可能的情况下你应该使用OpenGL EL 1.1.
Particle Rotation: Particle.rotation, Particle.angularVelocity and respective properties in ParticleEmitter.
Soft Particles! When you use Deferred Lighting and have Soft Particles on in Quality Settings, particles will fade out close to intersections with the scene. All built-in Particle shaders (except VertexLit) support this.
Shadowing improvements: use native shadow maps on Direct3D (faster, less memory, native filtering); much reduced self-shadowing artifacts; Soft shadows support for Point lights; much less “shadow halos” around objects for directional light soft shadows; optimized shadows for Forward rendering path (shares depth buffer with main rendering); optimized shaders for directional light shadows.
Terrain: Added slider (under Terrain Settings) to control detail object density.
Vertex shaders for Shader Model 3.0 on Direct3D9 and GLSL on OpenGL can read from textures.
Skybox is rendered after opaque geometry. Improves performance if your application is fillrate bound.
Separate Alpha Blending: use Blend ColorSrc ColorDest, AlphaSrc AlphaDest in ShaderLab.
In-editor visualization on which objects would use which rendering paths (green/yellow/red for deferred/forward/vertexlit).
#pragma glsl for compiling Cg/HLSL shaders into GLSL instead of ARB assembly programs on OpenGL.
Compiling shaders to #pragma target 3.0 allows 512 texture indirections on OpenGL (up from 4).
Development standalone players on Windows have Direct3D PIX events; useful if you use PIX, Intel GPA or other graphics performance tools.
Fog just works on Direct3D with Shader Model 3.0 shaders, on OpenGL with GLSL and on OpenGL ES 2.0. Additionally, there’s no need to write #pragma fragmentoption ARB_fog_exp2 in your shaders anymore; just remove that line.
CameraDepthTexture modes can be combined if you want to get both depth & depth+normals textures.
It is possible to forcibly disable Anisotropic filtering on a texture, even when Quality Settings have anisotropic on all textures. Just set anisotropic slider on the texture to zero.
Uniformly scaled objects will no longer be pre-scaled before rendering – instead uniform scale is now natively supported by the renderer.
Cg/HLSL VPOS (pixel position) pixel shader input semantic is supported now.
Terrain: Expose detail resolution per patch; previously was hardcoded to 8.
Terrain: Improved performance of painting textures & detail objects.
Asset Pipeline Improvements:
Upgraded to FBX SDK 2011.2.
Import support for stepped and linear keys for position curves; improved compression and curve fitting for position curves.
Settings for allowed animation compression error in mesh importer.
Implemented support for importing 1 unit in 3dsmax as 1 unit in Unity (the default is 1 cm in 3dsmax as 1 unit in Unity).
Implemented import of tangent space from FBX, .max, .mb and .ma files.
Switched Cinema4D import process to work in background mode.
Support for Cinema4D R11 on Mac OS X.
Support for FBX2010 format when exporting from Cinema4D.
Audio Improvements:
Filter components: Reverb, Echo, Distortion, Chorus, High- and Low-pass. Can be applied to each audio source or globally to the listener.
Reverb Zones: Apply reverb to main audio output, when the listener is within zone(s) defined by a position and min/max radii.
Live output and spectrum data access from each audio source or globally from the listener.
Tracker/Mod file support.
Sample-accurate synching. Sources played in the same frame are always started at the exact same point in time. Sources can be delayed and played in the future on an exact sample accurate boundary with .Play(int64 delay).
Surround sound (7.1, 5.1, 4.0, ProLogic DTS) support.
Attenuation curves for volume, spread, panning and lowpass filter factors.
Doppler factor per audio source.
AudioSource prioritization.
iOS latency settings. Choose between Default, Best Performance, Good Latency and Best Latency.
Asset memory is freed after loading audio data.
Physics Improvements:
Upgraded PhysX to 2.8.3.
Cloth and clothing simulation: use the new InteractiveCloth, SkinnedCloth and ClothRenderer components.
Layer based ignore collisions: use the Physics inspector or Physics.IgnoreCollision().
Continuous collision detection, to make sure that fast moving colliders will not pass through other colliders. See Collider.collisionDetectionMode.
Added Physics.SphereCast() and Physics.CapsuleCast() to implement volume raycasts.
Added Rigidbody.SweepTest() to check if a Rigidbody would collide with anything if moved into a certain direction.
New Scripting Features (documentation):
Mono Develop for script editing and debugging! Documentation.
Upgrade Mono and C# compiler to Mono 2.6.3. This brings C# 3.5, variable type inference, lambda e­xpressions, LINQ and more.
New UnityScript compiler: generics, interfaces, structs, type cast operator, anonymous functions/closures, lambda e­xpressions, function types, type inferred array comprehensions and more.
New Boo compiler.
Mono class libraries derived from Silverlight profile for the web player.
Socket security sandbox implementation. Just like Flash (think crossdomain.xml).
WWW class security sandbox implementation. Just like Flash (think crossdomain.xml).
Per-platform script defines. Use UNITY_EDITOR, UNITY_WEBPLAYER, UNITY_IPHONE etc. Documentation.
Improved UnityScript compilation speed.
New scripting API functions (documentation). Some highlights:
WWW.responseHeaders will contain the response headers received from the HTTP server.
Application.isWebPlayer.
SystemInfo.graphicsPixelFillrate to query GPU pixel fillrate. Returns fillrate for about a thousand GPUs out there.
GL.ClearWithSkybox.
Math functions: MoveTowards to Mathf, Vector2, Vector3, and Vector4; Quaternion.RotateTowards.
Changed Mathf.Approximately to not only be useful for comparing very small numbers.
Stacktraces have been prettified, useless information is better stripped from stack traces.
Other Improvements:
Web Player: Java and ClickOnce based installer on Windows for true one-click installation process.
IME input support (for languages like Japanese, which require multiple keypresses to enter a character) on Windows, and in the editor and standalone on the Mac.
Support for OS font rendering (new “dynamic” font rendering mode), to save space in distribution and texture sizes. Textures are generated dynamically to contain the characters which are needed.
Documentation: scripting examples in UnityScript; C# and Boo. Docs for all platforms merged and platform specific parts toggle-able.
Web Player: UnityObject.js script makes Web Player embedding easier.
iOS: Added cpu-waits-gpu metric in internal profiler; useful for tracking down GPU bound applications.
iOS: Native resolution support for iPhone 4.
iOS: Improved game build sizes.
iOS: Unity Remote 2: It is possible to turn off image syncing between editor and device. Useful for input-critical games.
OS X Web Player: Now supports NPDrawingModelInvalidatingCoreAnimation, as will be required by future versions of Chrome.
Networking: RakNet upgraded to version 3.732
Networking: Connection tester, Network.TestConnection(), now reports your NAT implementation type more accurately.
Networking: Exposed Network.logLevel so you can change the amount of log output at runtime.
Networking: Added network GUID, used for NAT punchthrough.
Bug Reporter: Supports multiple file attachments; trims attached log files if they are too large.
Some Changes We Did
We thought you might want to know about them… Read more in the docs.

Graphics Changes:
Forward rendering path had lots of changes:
Most common case (one directional per-pixel light) is drawn in one pass now! (used to be two passes in 2.x)
Point & Spot light shadows are not supported. Only one Directional light can cast shadows. Use Deferred Lighting path if you need more shadows.
Most “Vertex” lights replaced with Spherical Harmonics lighting.
Forward rendering path is purely shader based now, so it works on OpenGL ES 2.0, Xbox 360, PS3 (i.e. platforms that don’t support fixed function rendering).
Shader & ShaderLab changes:
If you want to write shaders that fully interact with lighting; it’s best to use Surface Shaders.
Unity 2.x per-pixel lit shaders will need to be manually converted to surface shaders or manually fixed.
Shaders are compiled to more targets by default (e.g. OpenGL ES 2.0); you might hit some places where OpenGL ES 2.0 does not like some Cg/HLSL constructs. Either fix the offending places, or exclude shader from OpenGL ES 2.0 via #pragma exclude_renderers gles.
Lots of sanitization to built-in variable names (mostly to accommodate new OpenGL ES 2.0, Xbox 360, PS3 platforms).
Unity 3.0 will automatically upgrade most of 2.x shaders for syntax changes. This actually modifies your shader files (look for “Upgrade NOTE” in your files).
Normal map compression; just mark texture as Normal Map and will be DXT5nm compressed at decent quality. All shaders need to use UnpackNormal(n) instead of n*2-1.
Remove concept of “RECT” textures. All non-power-of-two RenderTextures are addressed with 0..1 UVs now (just like in D3D9 in Unity 2.x).
Parallax shaders get height from a separate texture now.
Self-Illuminated shaders get illumination from a separate texture now.
Terrain lighting modes (Vertex/Lightmap/Pixel) are gone. Terrain is lit just like everything else now.
When rendering with Shader Replacement, no lighting is ever applied. Skybox, GUI, Halos, Projectors are not rendered.
Background shader queue is treated like Geometry now (arbitrary sorting, assumed to be opaque).
OnBecameVisible/OnBecameInvisible have slight behaviour changes. For example, now they are not called each frame on a shadow caster that is not visible itself.
Self-Illuminated materials calculate emissive color as (material color * texture * illumination); previously was (texture * illumination).
Simplified Shadow Bias setting on Lights.
Depth render textures on D3D9 use native depth buffer. Value distribution changed from linear to z-buffer like (just like in OpenGL).
Spot lights attenuate exactly like Point lights now.
Point lights with Cookies actually attenuate now.
OnRenderObject script callback behaviour changed. Now those callbacks are called after everything is rendered; not at points in the middle of rendering.
Changed the way the Camera-DepthTexture and Camera-DepthNormalTexture shaders are loaded so that they can be overridden when needed.
Custom Tree shaders specify their billboard shader via Dependency keyword now (instead of Tag). The billboard shader will be automatically included in the build.
Screen space coordinates should use float4 on all platforms (used to be V2F_SCREEN_TYPE). When sampling a texture with tex2Dproj, use UNITY_PROJ_COORD macro around it.
Added WorldSpaceViewDir() and WorldSpaceLightDir() functions to UnityCG.cginc.
Obscure Graphics Changes That No One Will Probably Notice TM: documentation.
Renamed the 2.x tree shaders and the 3.x Tree Creator shaders; both are put under “Nature” section.
OnPreCull, OnPreRender, OnPostRender and OnWillRenderObject messages are not sent to disabled behaviors.
Old Unity 2.x Lightmapped shaders moved under “Legacy Shaders” submenu.
Terrain: Removed the concept of grayscale lighting from terrains.
Editor Changes:
Unity Editor on Mac OS X requires Intel-based Mac and OS X 10.5 “Leopard” or later.
Removed Soft Vegetation option from Quality Settings UI. It does nothing in built-in shaders now.
Separated preferences for 3.x and 2.x editors.
Removed ancient Dinosaur graphics emulation.
Moved “All compile errors must be fixed” notification to scene view notifications (moved it out of console).
Made the curve editor send a CurveChangeCompleted event when the curve change has been completed.
Create New Project dialog now expects user to select an existing, empty folder on the Mac
Mesh Import option “Split Tangents” is on by default.
Texture Importer:
Bump maps are now referred to as “normal maps” in the editor.
Normal maps are labelled as “NM” in their format.
PVRTC compression level moved to advanced settings.
Generating a Cubemap will make the cubemap be the root asset.
Textures that only use one value across the whole alpha channel and that value is not 1 are marked as needing-alpha-channel.
The command and control key modifiers in the view tool have been switched on OS X. Now command moves and control zooms. Control still moves on Windows.
Physics Changes:
Rigidbody mass is no now longer limited to 10000.
RaycastCollider is now deprecated.
Center of gravity and inertia will now always be automatically recalculated when setting or animating collider properties or positions, unless they had been explicitly set from code before.
Slope limit on character controller now works properly above 45 degrees. When loading old scenes the value will be clamped to 45 degrees to mimic the old behaviour.
JointDrive.maximumForce will now also be taken into consideration when JointDrive.mode is JointDriveMode.Position. You may need to change your joint setups so that they still work.
Unity iOS Changes:
iPhoneStreamingAssets is renamed to StreamingAssets and is now located under the Assets folder (visible from within the Editor).
Target iOS Version field added to player settings. Now deployment target can be specified separately from active SDK version.
“Enable Unity Networking” flag removed from iOS player settings. Now stripping of networking is handled automatically.
Most iPhoneInput members moved to Input class.
Native plugin support added to both Basic and Advanced Unity iOS licenses.
Added support for iPad / iPhone Simulator
Hardware audio decoder is now shared between audio clips.
Other Changes:
Random number generator (Random class) was changed. It is marginally slower, but produces better “randomness”, especially in lower bits. Additionally, integer version is not limited to 15 bits range.
Internal Random number generators (for Particles etc.) are reset after each level load. Now your particles in any level do not depend on what levels were loaded before.
The default runtime font is now Arial 13, as rendered as a dynamic font on Mac OS X and Windows.
Scripting: Renamed WWW.data to WWW.text
Scripting: ScriptableObject derived classes must be instantiated using one of ScriptableObject.CreateInstance overloads.
Scripting: UnityScript strict mode no longer allows arbitrary downcasts from Object (unless #pragma downcast is used).
Input: Keyboard on MacOS X will now reflect the behavior on Windows (two separate KeyDown events for key code and character, KeyUp event only for key code).
Scripting: Removed support for .NET 1.1 profile.
Scripting: Made previously undocumented GUIClip class internal to UnityEditor.
Networking: Connection tester now requires 4 public IP addresses to work.
Here, I Fixed It!
We fixed some things as well…

Editor Fixes:
General: Improved Undo behaviour.
General: Game View Stats window has more accurate frametime & FPS display.
General: Don’t enter Play mode if there are compiler errors.
General: Debug.LogWarning will not pause the game if console has Error Pause selected.
General: You can now search for script derived types in the project window (when Type is selected).
General: Fix newly created materials in project view sometimes having empty names.
General: Reset menu option is now undoable.
General: Fixed importing standard packages into projects with non-Latin characters in path on Windows.
General: Fix occasional exceptions with Undo when asset inspector loses selected assets.
General: Fix editor window sometimes shrinking into the corner when changing layout presets on Mac OS X.
General: Fixed a bug where selecting a scriptable object with a missing script reference would result in null reference exceptions
Crash: Fixed crash when deleting the last item in an array of strings.
Crash: Fix crash on Windows when undocking Game View.
Crash: Fix crash caused by EyeDropper picking color on different monitor.
Crash: Editor is more resilient to missing object references (eg. a Unity iPhone 1.7 upgraded project was crashing the editor on play).
Inspector: “Open Compiled Shader” in Shader Inspector works more predictably and uses text editor chosen in preferences.
Inspector: Fixed display of boolean arrays.
Inspector: Fixed Material/Mesh/Object previews being affected by scene Fog.
Inspector: Fix “Any” Texture properties in Materials using the wrong GUI style.
Inspector: Fixed bug where opening a terrain inspector would dirty the terrain causing it to get saved although nothing had changed.
Asset server: Fix editor hanging on OS X when trying to merge conflicting text assets.
Asset Server: Fix unable to update when parent of file modified on server is locally deleted.
Asset Server: Cleaner Diff output when comparing binary files in Asset Server.
Asset Server: Fixed asset server caching failing in some cases (e.g. when using EditorUtility.CopySerialized).
Importing: Tangents will be properly handled when mesh compression is enabled.
Importing: Fixed direct import from Maya 2011.
Importing: Using TextAsset to store binary data now actually works, as long as your file has the .bytes extension.
Importing: Cylindrical cubemap projection generation now works.
Importing: On rare occasions Unity Editor on Windows was throwing ‘Writing file error’ while reimporting all assets and anti-virus running in the background.
Importing: Fix texture object fields in cubemap inspector losing the thumbnail when reimporting.
Importing: Shader files with uppercase file extensions are properly imported now.
Importing: Reduced memory usage during texture import.
Importing: Better memory handling when importing assets, switching scenes, building player.
Importing: FBX importer gives detailed warnings if it detects problems in the skin of a model.
Importing: Fixed import of user properties from 3D asset files.
Importing: Fixed import of multiple animation takes.
Scene View: The grid is now also shown in Iso mode.
Scene View: Terrain is selectable in Scene View just like any other object!
Animation View: Margins are now fixed instead of a percentage.
Animation View: Improved handling of window resize.
Animation View: Make create key operations work better for steep curves and disallow it for read-only curves.
Animation View: Prevent creating keys outside of permitted horizontal range.
UI: Maximized state of main editor is remembered across sessions on Windows.
UI: Don’t show Project Wizard or Welcome Screen if Reimport All was invoked.
UI: Fix some of context menus not being properly validated (grayed out) on OSX.
UI: EditorWindow.Notification now properly shows white text.
UI: Clamp profiler frame selection dragging correctly.
UI: Fixed animation icons being clipped in the inspector.
UI: Fixed dragging tab on Windows putting window title bar above the screen top.
UI: Show error message if -nographics is used without -batchmode.
UI: In Package Import Dialog selecting checkboxes will now correctly affect child elements.
UI: Fixed Asset Server tooltips in Overview window getting too large and disappearing too soon.
UI: Fixed old regression where pressing F to frame selection frames selected object in last active scene view, if active window doesn’t use frame selection event.
UI: When editor is processing something on Windows, made utility windows not be on top of all application windows in the system.
UI: Fix error messages when trying to move file to the same folder via Project view on Windows Vista or 7.
UI: Fixed icons for sub-assets in search view.
UI: Show proper cursor when trying to drag files out of Unity Editor on Windows.
UI: License Info word wraps properly in About Window.
UI: Fixed the eye dropper color picking tool disabling itself when the mouse is moved too fast.
UI: Fixed editor not finding GUI styles on computers with some of non-English locales.
Rendering Fixes:
Driver workaround: Fixed occasional crash on some Intel graphics cards when shader uses mismatching texture types.
Driver workaround: Disabled anti-aliasing on Macs (pre-Snow Leopard) with GeForce 7300 graphics cards; occasional driver crashes.
Driver workaround: Disabled mip-mapped Render Textures on Macs with Intel GMA 950 cards; occasional driver crashes.
Driver workaround: Fixed garbage on Macs with GeForce 7300 GPUs. Had to disable Deferred Lighting on those cards though.
Particles: Particle color and UV animation will now be based on the lifetime of each individual particle instead of the max energy set in the emitter.
Shadows: Spot light shadows fade out correctly on D3D9.
Shadows: Fixed point light self-shadowing artifacts which were mostly happening on Mac.
Shaders: Using more than 8 textures in a pixel shader works now!
Shaders: Nested block comments (/* foo /*bar*/ */) are supported now.
Shaders: Fixed error messages sometimes being printed when both GLSL and non-GLSL shaders are present in the scene.
Shaders: When there are Direct3D shader assembly errors, print the shader name in the error message.
Shaders: Fixed instruction count reporting for D3D9 assembly shaders.
Crash: Fixed crash if accidentally setting invalid shadow cascade count in Quality Settings.
Crash: Fixed crash when shader has unterminated block comments.
Crash: Fixed crash when shader tries to fallback to itself.
Terrain: Fixed various issues with terrain billboards (non-uniform scale, culling, mismatch between root of the billboard and the mesh etc.).
Terrain: Fixed too aggressive culling of billboarded terrain details.
Terrain: Fixed terrain blocking MouseDown events from scene view gizmos.
Terrain: Made it possible to use trees with only one material.
Terrain: Now actually use the tree cutoff value that is set on the material.
General: Fixed half-texel offset issues with Graphics.Blit on D3D9.
General: Removed rect clamping for camera’s normalized viewport rectangle.
General: Fixed texture binding on iOS/Android; textures won’t become corrupted when loading levels now.
General: Custom Fonts will now be properly displayed by Unity GUI.
General: Fixed AABB calculation for just-unloaded Meshes and skinned meshes with no bones.
Unity iOS Fixes:
Fixed iPad Simulator 3.2 support
Fixed stripping issue which caused crashes when coroutines are used.
Fixed WWW.text and “Fast but no exception” problem.
Fixed a crash when using AnimationCurve property in a script.
Fixed input processing on iPhone 4 with native resolution.
Fixed video player orientation on iOS 4.
Physics Fixes:
Meshes created with Mesh.CombineMeshes will correctly collide when used with MeshColliders.
Make WheelHit report correct sidewaysDir.
Make raycasts work when Time.timescale is zero.
Kinematic or sleeping rigidbodies will now properly update their internal PhysX state when a parent rigidbody gameObject is moved.
Collision events are sent more properly now.
Scripting Fixes:
WWW.text respects content-encoding specified in HTTP response headers.
Debug.Log is now thread safe.
Fixed internal UnityScript compiler error caused by nested arrays.
Fix crash when opening a project where a script throws an exception in a static constructor.
Fixed crash caused by untyped or wrongly typed parameter of message handler.
Fixed crash when DestroyImmediate is called in user code and Unity doesn’t expect the object to be destroyed.
Material.CopyPropertiesFromMaterial() now works as expected.
GameObject.SampleAnimation respects the WrapMode of the clip.
UnityGUI: Fix GUIUtility.RotateAroundPivot and ScaleAroundPivot using screen space pixels instead of clip space pixels.
UnityGUI: Fix ScrollViews not properly ignoring DragPerform/DragUpdated events.
UnityGUI: GUILayout.Toolbar now correctly calculates toolbar size.
Fixed a typo bouncyness in Physics Material, now it’s spelled correctly bounciness.
Fixed a crash when setting negative values for particle minEnergy, maxEnergy through a script.
Issue an error when the script class name and file name do not match (after script has been attached). Similarly issue an error if a class was changed to be abstract or was turned into an interface.
Networking Fixes:
Timestamps are now correct in received NetworkView RPC messages.
Network.useNat has been deprecated. It is now set automatically when you Connect (since you can now only connect with NAT punchthrough using a GUID) and is set in the InitializeServer function call explicitly.
You can now connect using a HostData struct received from the master server (correct method automatically used) and give a connection password when connecting with GUIDs.
Fix server crash when player with network views disconnects.
Fix for problem when using Network.Instantiate after loading a new scene.
Fixed problem with master server not returning local IP addresses when it should (when host/client are on the same router/external IP).
Network.TestConnection() now always returns error status correctly. To restart a test after getting an error it needs to be forced with the appropriate parameter.
Fixed network scope bug which resulted in state sometimes not being synchronized correctly.
Other Fixes:
Fixed saving screenshots to non-ASCII path names.
Web Player: Fixed some memory leaks.
Fixed various corner cases in AnimationEvents logic.
Audio + iOS: Make UnitySetAudioSessionActive(true/false) actually work.
Audio: Fix crash when trying to access AudioListener and it doesn’t exist.
Player: fix some of movies playback crashing web and standalone players.
BugReporter: Escape special characters in bug description.
Web Player: Fixed one frame of garbage showing when going out of fullscreen mode in CoreAnimation plugin on Mac OS X.
Audio: AudioSources with PlayOnAwake checked, now plays in the first frame (and can be accessed correctly from Start() and Update()).
Audio: .time & .timeSamples can now be set before playing AudioSource(s)
Bug Reporter: Do not terminate the if the bug submission fails (Mac).
Fixed WWW.uploadProgress crashing the web player (this property still is not fully implemented though).
UnityGUI: Fix Vertical Margin error for GUILayout groups with multiple elements.
Web Player: Several fixes to make it work better with Google Chrome on Mac OS X.
Known Issues
MonoDevelop: Single-stepping outside the control flow of a script while debugging results in decreased performance until normal execution continues.
A flaw in the way 64 bit Windows OS handle structured exceptions for 32 bit applications can cause crashes in Unity players. The issue may surface, for example, if a player running on a 64 bit Windows causes a NullReferenceException to be thrown, even if the exception is handled. This bug affects all 32 bit applications running on 64 bit Windows, including Microsoft .NET applications.
A hotfix solving the issue is available on support.microsoft.com, but of course this does not help your end user. Your best bet is to keep your players exception-free (which is always a good idea), at least until the fix is distributed to end users via Windows update.
Touch.deltaPosition and Touch.deltaTime can be inaccurate on Android.
Tree Editor Leaves can not be manually rotated.
Debugger: Does not halt on some exceptions thrown from internal Unity engine code.
Build Settings Window may not initially react to mouse clicks. Workaround: move/resize the window.
Generate Lightmap UVs: the results may be different on mac and windows. If you encounter this problem, please report a bug.
Generate Lightmap UVs: performance degradation is expected on highly tessellated mesh. This will be fixed in subsequent releases.
Graphics: Anti-Aliasing does not work with Deferred Lighting.
Memorable Quotes
3AM the night before the beta release:
Joachim: If we do this we should do it right
Nicholas: This is going to be fun. I’ve never written threaded code before…

翻译中,未完成….待续…

原文:http://unity3d.com/unity/whats-new/unity-3
译者:威阿
转载请注明来自1Vr.Cn.

Unity3正式版终于发布!

早晨发现Unity官网论坛更换了样式,换掉了原有Phpbb坛子.

这几天Unity3的内侧版也频繁更新,最近都成一天一个版本了.没想到.今晚正式版发布.首页挺帅的.大气.

也看了新的在线Demo,后台载入,效果,优化等等都很让人欣喜.

新Demo地址:http://unity3d.com/gallery/live-demos/index.html#bootcamp

Unity3下载地址:http://unity3d.com/download

Unity3介绍:http://unity3d.com/unity/whats-new/unity-3

该睡觉了.下载正式版中…

Unity和iOS(解决了!)

五个月前苹果公司发布了iOS4.0的AppStore的新服务条款,可能要禁止第三方类似Unity这种技术的开发软件.

然后我们发表了多次文章,并在经过考虑后,我们甚至想了新的解决办法来永远避免苹果拒审Unity的程序.

苹果公司一直没有拒绝过由Unity创造的游戏提交,其中也有一些非常受欢迎的精品游戏.而且也没有玩家去关注游戏之外的游戏,他们不会想游戏是因为Unity基础版制作的,也不管是不是用工具或者什么中间件制造的.

即使有很多朋友要求我们,我们从来没有因为苹果的新条款而受到投诉.在这样谁也不知道确定结果的日子,我们背负着数以千计的用户的沉重责任.但是在这段日子里,可能有些人认为我们没有足够的主动解决这个问题,我们说声对不起.

其实,我们在最近的几个月一直在与苹果保持着联系,每隔几个星期我们就同他们谈话.而现在苹果终于做了新的调整.

我们认为这是完全正确的做法,只使用Xcode也可能早出很烂的程序,使用Unity工具也能做出令人惊讶的出色程序.一个平台供应商的重点应该重点放在扶持软件开发商,以作最好的和给予乐趣给所有百万用户为主要目的.

苹果一直在加速学习的过程,即使他们已经是最聪明的人,我们知道如何操作世界上最成功的网店是多么的不容易.可在要禁止第三方工具的路上我们一直感到失望,但我们一直乐观的应对.不过,今天,我们尊重苹果的正确决定.

最后,我们Unity公司所有人员祝大家工作越来越好!

译自:http://blogs.unity3d.com/2010/09/10/unity-and-ios/
转载请注明来自1Vr.Cn

苹果声明解除iOS应用开发工具禁令

不知何时我的博客失去了原始目的.不是除了Unity就是Apple.最近不太好.淡定.

北京时间9月10日凌晨消息,据国外媒体报道,苹果发布声明,解除对包括Flash在内的一切开发工具的禁令,供App Store的应用程序开发者自行选择。

  去年春天,Adobe发布开发工具,使工程师们可以利用Flash开发iOS应用。苹果的回应却是封禁不是通过苹果自有工具开发的一切程序。

  苹果及其CEO史蒂夫·乔布斯(Steve Jobs)坚称,此举是为了保护用户,因为利用苹果的工具为iPhone开发的程序能够更好地运行。但这一行为激怒了许多开发者,因为他们的选择余地受到限制,为多种平台开发程序也更为困难。显然,苹果接受了用户的意见。

  苹果声明全文如下:

  苹果应用商店App Store已经改变了移动应用程序的开发和分销方式。它已经成为世界上最大的移动应用平台,应用程序数量超过25万个,下载超过65亿次。开发者们通过销售应用程序,已经获取了10亿美元以上的收益。

  我们一直在努力让App Store变得更好。我们听取开发者的意见,并认真考虑他们的反馈。以此为基础,今天我们要对iOS开发者程序许可证的第3.3.1、3.3.2及3.3.9条款作重要修改,并解除今年早些时候发布的某些禁令。

  我们特此宣布,在开发成果不下载任何代码的前提下,解除有关iOS应用程序开发工具的一切禁令。这将给予开发者所想要的灵活性,同时又保持了我们所需要的安全性。

  此外,我们将首次公开App Store审核方针,以帮助开发者了解我们是如何审核他们提交的应用的。我们希望这一举措能使我们更加透明,并帮助开发者创造出更多的App Store应用程序。

  App Store也许是移动软件历史上最为重要的里程碑。我们将与开发者通力合作,继续通过创新移动应用给用户带来惊喜和欢乐。

Unity3技术之表面着色

谁都知道在Unity中可以编写shader,可是他们很难写,尤其当你需要每个像素的灯光和阴影产生交互.在Unity3中,除了要包含旧的支持,你的shader也必须支持新的递延照明渲染(Deferred Lighting).所以我们决定要让shader更容易写!

一年多以前,我曾认为”着色器马死的快(呵呵,着色器必死,相关的帖子http://aras-p.info/blog/2009/05/05/shaders-must-die/,http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/,http://aras-p.info/blog/2009/05/10/shaders-must-die-part-3/)”.而现在我们正在开发Unity3,我们称之为表面着色(Surface Shaders),因为我觉得”着色器马死的快”做个这个新物种的名称不会得到老板认同.

主题思想就是在90%的情况下我之需要声明表面的特性就可以了.以后就想说:

嘿,反照率来自这个纹理和那个纹理的混合以及法线贴图.使用Blinn-Phong照明模式,别再来烦我了嗷!

像上面说的,我没有理会是否要提前或者延迟渲染,或者如何使用各种灯的类型去处理,或者要设置有多少效果将用灯光来呈现,或者用将有多少会产生实时阴影的部分,等等都不是我感兴趣的!这些肮脏的渲染工作怎么能让程序去做?!得让程序员解脱!

当然这不是一个新概念.大部分图形渲染编辑器都没用像素色(pixel color)去作为最后输出的节点,而是用了他们的一些可以描述他们的表面参数(弥漫,镜面,法线)作为节点,所有的灯光代码也不是针对作色器本身图形.OpenShadingLanguage(http://code.google.com/p/openshadinglanguage/)是和我们想的类似的一个想法,不过因为它是针对电影的脱机渲染,所有它更丰富更复杂.

下面是一个简单的例子,但它很完整,演示了Unity3的漫反射贴图和法线贴图的Shader.

Shader "Example/Diffuse Bump" {
    Properties {
      _MainTex ("Texture", 2D) = "white" {}
      _BumpMap ("Bumpmap", 2D) = "bump" {}
    }
    SubShader {
      Tags { "RenderType" = "Opaque" }
      CGPROGRAM
      #pragma surface surf Lambert
      struct Input {
        float2 uv_MainTex;
        float2 uv_BumpMap;
      };
      sampler2D _MainTex;
      sampler2D _BumpMap;
      void surf (Input IN, inout SurfaceOutput o) {
        o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
        o.Normal = UnpackNormal (tex2D (_BumpMap, IN.uv_BumpMap));
      }
      ENDCG
    }
    Fallback "Diffuse"
  }

将它赋予给漂亮的模型和贴图,它可以产生漂亮的图像!怎能不酷?!

这个是不是真的很有趣,将着色器的复杂语法简单化,后面再为一些老古董机器做一些后备声明.剩下的只有CG语言/HLSL的代码,然后通过自动生成最终代码提高图像效果.

我们来解析一下这段着色器代码:

  • #pragma surface surf Lambert:这是一个表面着色(surf)用的主要函数,和用Lambert照明模式.
  • struct Input:表面作色器输入的数据.这可以有多种定义,用来描述每个顶点和像素的对应关系.上面这段代码里它有两个纹理坐标.
  • surf函数,表面的实际着色代码.需要由SurfaceOutput(预定义结构)写入.它可以写入自定义结构,实际的代码只是写反照率和法线的输出.

什么是生成?

Unity的”表面着色器代码生成器”将利用这个方式产生实际的顶点和像素着色器,并将它编译好给各种目标平台.在Unity3中将默认支持这种着色器:

  • 提前渲染和递延渲染
  • 预计算对象物体有无光照.
  • 平行光,点光源,射灯的cookie阴影有无,实时光影的有无.
  • 对于提前渲染,它会在编译时计算每个顶点的灯的效果反映.
  • 延迟照明将会产生法线贴图,镜面贴图最后通过灯光的反射率和任何其它光照光影的反映.
  • 它可以选择性的生成一个阴影,比如一些复杂的通道贴图产生的阴影.

例如下面的代码通过提供的一个方向灯,4个顶点光源,三个阴影光被编译为一个提前渲染的可选光影的shader.我建议你滚动页面往下看看就好了:

#pragma vertex vert_surf
#pragma fragment frag_surf
#pragma fragmentoption ARB_fog_exp2
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_fwdbase
#include "HLSLSupport.cginc"
#include "UnityCG.cginc"
#include "Lighting.cginc"
#include "AutoLight.cginc"
struct Input {
    float2 uv_MainTex : TEXCOORD0;
};
sampler2D _MainTex;
sampler2D _BumpMap;
void surf (Input IN, inout SurfaceOutput o)
{
    o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
    o.Normal = UnpackNormal (tex2D (_BumpMap, IN.uv_MainTex));
}
struct v2f_surf {
  V2F_POS_FOG;
  float2 hip_pack0 : TEXCOORD0;
  #ifndef LIGHTMAP_OFF
  float2 hip_lmap : TEXCOORD1;
  #else
  float3 lightDir : TEXCOORD1;
  float3 vlight : TEXCOORD2;
  #endif
  LIGHTING_COORDS(3,4)
};
#ifndef LIGHTMAP_OFF
float4 unity_LightmapST;
#endif
float4 _MainTex_ST;
v2f_surf vert_surf (appdata_full v) {
  v2f_surf o;
  PositionFog( v.vertex, o.pos, o.fog );
  o.hip_pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex);
  #ifndef LIGHTMAP_OFF
  o.hip_lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw;
  #endif
  float3 worldN = mul((float3x3)_Object2World, SCALED_NORMAL);
  TANGENT_SPACE_ROTATION;
  #ifdef LIGHTMAP_OFF
  o.lightDir = mul (rotation, ObjSpaceLightDir(v.vertex));
  #endif
  #ifdef LIGHTMAP_OFF
  float3 shlight = ShadeSH9 (float4(worldN,1.0));
  o.vlight = shlight;
  #ifdef VERTEXLIGHT_ON
  float3 worldPos = mul(_Object2World, v.vertex).xyz;
  o.vlight += Shade4PointLights (
    unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0,
    unity_LightColor0, unity_LightColor1, unity_LightColor2, unity_LightColor3,
    unity_4LightAtten0, worldPos, worldN );
  #endif // VERTEXLIGHT_ON
  #endif // LIGHTMAP_OFF
  TRANSFER_VERTEX_TO_FRAGMENT(o);
  return o;
}
#ifndef LIGHTMAP_OFF
sampler2D unity_Lightmap;
#endif
half4 frag_surf (v2f_surf IN) : COLOR {
  Input surfIN;
  surfIN.uv_MainTex = IN.hip_pack0.xy;
  SurfaceOutput o;
  o.Albedo = 0.0;
  o.Emission = 0.0;
  o.Specular = 0.0;
  o.Alpha = 0.0;
  o.Gloss = 0.0;
  surf (surfIN, o);
  half atten = LIGHT_ATTENUATION(IN);
  half4 c;
  #ifdef LIGHTMAP_OFF
  c = LightingLambert (o, IN.lightDir, atten);
  c.rgb += o.Albedo * IN.vlight;
  #else // LIGHTMAP_OFF
  half3 lmFull = DecodeLightmap (tex2D(unity_Lightmap, IN.hip_lmap.xy));
  #ifdef SHADOWS_SCREEN
  c.rgb = o.Albedo * min(lmFull, atten*2);
  #else
  c.rgb = o.Albedo * lmFull;
  #endif
  c.a = o.Alpha;
  #endif // LIGHTMAP_OFF
  return c;
}

在90行的代码中,10行是原始的着色器代码,其余的代码在Unity2的时候几乎都要手写的.别急,这只是写了一点提前渲染的部分!还需要写递延渲染,可选阴影等等灯.

因此,现在应该会比较容易的写着色器(对于我来说至少).Unity的用户也愿意少写代码,少些至少三倍的代码何乐不为?它还会有一些改变以适应Unity下一步新的照明系统.

预定义的输入值

输入结构可以包含纹理坐标和一些预定义的值,例如查看的方向,世界空间的位置,世界空间的反射矢量灯.例如,如果你利用世界空间反射矢量(如自发光),在模型表面做一些CubeMap反射效果(递延渲染的反射将不会计算,因为它不会产生效果,所以也不需要考虑反射向量),

用一个小例子说明做简单的灯光渲染:

#pragma surface surf Lambert
  struct Input {
      float2 uv_MainTex;
      float2 uv_BumpMap;
      float3 viewDir;
  };
  sampler2D _MainTex;
  sampler2D _BumpMap;
  float4 _RimColor;
  float _RimPower;
  void surf (Input IN, inout SurfaceOutput o) {
      o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
      o.Normal = UnpackNormal (tex2D (_BumpMap, IN.uv_BumpMap));
      half rim =
          1.0 - saturate(dot (normalize(IN.viewDir), o.Normal));
      o.Emission = _RimColor.rgb * pow (rim, _RimPower);
  }

顶点修改器

它可以自定义顶点修饰功能,用来修改或者产生每个顶点的数据.像风吹动树的动画,草的摇摆等等.

我最喜欢沿着法线顶点的方向去移动顶点.像打肿了的效果…

自定义光照模型

有一个内置的简单的光照模型,你也可以指定你自己的.A照明模式只不过将常用的光的参数,方向衰减,而没包含一些提前渲染和延迟渲染以及一些不长用到的方法.因此,对于任何奇特的效果你都要通过提供自定义光照模型来完成.

例如wrapped-Lambert光照模式:
  #pragma surface surf WrapLambert
  half4 LightingWrapLambert (SurfaceOutput s, half3 dir, half atten) {
      dir = normalize(dir);
      half NdotL = dot (s.Normal, dir);
      half diff = NdotL * 0.5 + 0.5;
      half4 c;
      c.rgb = s.Albedo * _LightColor0.rgb * (diff * atten * 2);
      c.a = s.Alpha;
      return c;
  }
  struct Input {
      float2 uv_MainTex;
  };
  sampler2D _MainTex;
  void surf (Input IN, inout SurfaceOutput o) {
      o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
  }

幕后

我们使用Ryan Gordon的mojoshder(http://hg.icculus.org/icculus/mojoshader/)中的HLSL解析器来分析原始的表面着色器代码.找出有哪些成员结构,有哪些函数原型等等.在这个阶段做的一些错误检查是为了告诉用户它的面函数原型是错误或者他的结构缺少必要的成员.

为了弄清楚着色器实际的照明关系,我们做了像素着色器的小工具来编译CG语言和使用CG语言的API查询使用了哪些输入输出.这样我们可以算出例如一个法线贴图实际不用递延照明并也节省了一些顶点着色器指令和一个纹理坐标值.

生成的代码最终根据目标平台被编译.Cg为Windows/Mac,XDK HLSL为Xbox 360,PS3 Cg为PS3,和我们自己创造的HLSL2GLSL为iPhone, Android和即将退出的Unity NativeClient(http://blogs.unity3d.com/2010/05/19/google-android-and-the-future-of-games-on-the-web/).

就这样,我们会继续做下去,等到Unity3发布的时候,我希望更多的人会尝试写着色器!

转载请注明来自1Vr.Cn,原文地址:http://blogs.unity3d.com/2010/07/17/unity-3-technology-surface-shaders/

Unity3 beta3试用笔记

昨天Unity发布了Unity3的第三版测试.赶紧更新一用.安装后被首次出现在Unity的黑色界面吓了一跳.玩酷嘛,哈哈.不过虽然是很酷,与新版Maya,Max的黑色界面相似.可是我感觉累眼睛.可能字体太小的缘故.

脚本上上了升级,也进行了一些修改.比如原来的iPhoneTouch命令,现在去掉了iPhone,只剩下Touch,我觉得是因为为了更好的支持Android而进行的如此改进,总不能在Android上也试用iPhoneTouch去点击屏幕吧.嘿嘿.

beta3中造树系统修正了bug,更加易用.可以方便的建立各种造型的树木,且可以像普通游戏物体一样使用,不限于只能用在地形上.beta3为了让树木更加的真实,增加了风系统,原来Unity中也有风力,但是是全局效果的,整个世界中只有一个方向的大风.而现在,你可以让你游戏世界中各种各样的风,甚至造沙尘暴.哈哈.开玩笑.

布料系统很简单,给你需要做成布料的物体添加这个组件既可.弄个拟真的窗帘.弄个桌布,不在话下.

重点来喽,beta3中带来了新版Webplayer插件.最显而易见的改变就是体积改变.不用我多说.看图就知道了.原来Win版插件3M之大,现在500多k的大小,足以在客户面前骄傲的说Unity的插件比Flash小多了!!而且还是3D的播放器啊!

在Unity增加的重量级功能就是Lightmapper,也是很方便的使用.省略了以前在Max中各种复杂的烘培步骤.不过将它用在实际工作中,在Unity中打灯渲染,我还是持观望态度.

Unity另一个我们认为巨大改进就是支持系统字体渲染和输入法的支持,开发网页游戏的中文聊天就不会那么头疼了.可以抛弃掉巨大的字库累赘.不过iPhone版目前还是不支持这个功能.

[/align]

这个材质球目前用起来很不习惯,而且检视面板中没有了贴图预览.估计beta3中不小心遗漏了.这个比较麻烦.

[/align]

今天就说这么多吧,最后附上Build窗口,看看强大的Unity3多平台支持!还有Wii,截图上没体现.

ps:北京下雨了,终于下雨了,闷热的天气终于凉爽了好多.毛毛雨中散步.很好.有个妞子陪伴更爽了.哈哈.

有关Unity和iOS4.0的新说明,以及Unity3支持mod格式

亲爱的Unity用户,我再次感谢你们的耐心.感谢你们的支持!

很多人都对开发移动设备兴趣很大,特别是使用Unity创造iPhone游戏而叫棒!,我们一直密切的关注这iOS 4.0的开发服务条款.虽然我们也相信Unity使用C#和JavaScript会没问题的.有一些没有被苹果公司证实的小道消息.不过,苹果公司今天仍审批Unity开发的游戏,也挑选了一些优秀的Unity游戏做推荐.一直以来我们也投入大的经历和资源在Unity iPhone的开发,其中包括即将到来的Unity3.0的许多新功能.但是由于新的开发服务条款的公布,我们也开始了一项应急方案的工作,以防万一.现在请允许解释一下这应急计划的具体内容,让每个人都知道”B计划”的模样.

你可能知道,Unity大多是通过C++优化和通过Objective-C封装的.游戏逻辑是由开发者用C#和JavaScript写的,这两者都运行在.NET中.这个方案的优点在于,我们能够不用复杂的语言实现我们想要的功能,.NET能快速的开发,且接近于即时的编译,又能在同一时间生成高度优化的代码.并且在iPhone上最终编译成符合旧的iOS服务条款的静态机器码.此外iPhone也很容易利用Objective-C代码去访问API,诸如游戏中心等等,这真的是一个两全其美的事情.

由于Unity支持.NET可能与服务的新条款冲突,我们正在研究一种可以在整个游戏中不创建任何使用.NET代码的解决方案.这种情况下所有的脚本API使用c++来操纵.这当然不理想,像有代码量会加长很多.相比C#和JavaScript,C++无疑复杂的多.

但老实说,这并不太糟糕.Unity仍旧有资源管理,着色语言等一些列工具,当然还有引擎的优化.我们也同样保持了Unity的JavaScript和C#的特点:享受似的开发工作.变量仍旧可以在检视面板中去定义.从本质上讲我们正在创建一个基于C++的.NET编译器,使得我们能纯粹的托管C++在Webplayer和其它平台上.在iOS中C++代码将被苹果的Xcode工具所编译.这确实是非常强大的组合.在Unity的编辑器,你可以快速的高效率的开发,在设备上你又可以拥有纯粹的native C.

但是,事实上,当你做一个简单的游戏逻辑时,C++并不是十分复杂,让我们看几个不同的例子.

这是一个非常简单的JavaScript脚本,用来旋转游戏中的物体.

这是用C++编写相同功能的代码.

正如你可以它们基本相同,并不是差别很大.再举个复杂点的例子
这是在iOS设备上利用重力感应和触摸来控制飞行器飞行和发射导弹的游戏:

下面的同样是由C++来实现相同的功能:

同样,与JavaScript对比,我们没有在C++中写太多的代码,甚至与C#相比,它们的差异更小.

我们将继续关注以Unity开发iPhone,iPod touch和iPad.虽然我们不认为C++是编写游戏代码的最好语言,但是C++在内存占用和设备性能上的巨大优势,这是一个伟大的特点,作为开发者,谁不想更多的减少内存占用和提高游戏的性能能呢.

我们仍然不能相信苹果将迫使选择一个具体的语言去开发.正如我先前所说.苹果公司仍然能通过审批Unity开发的游戏,可你们也应该放心,如果形势有变化,我们也不用太担心,因为我们已经准备了B计划.

原文:http://blogs.unity3d.com/2010/07/02/unity-and-ios-4-0-update-iii/

—————————————————–
在Unity3.0中,我们添加了一个令人振奋的新消息,就是用户能在Unity中能像使用其它资源一样使用*.mod文件中的音乐和声音了.先看看Unity3的视音频功能预览视频吧.http://blogs.unity3d.com/2010/06/25/unity-3-feature-preview-audio/

当我开始测试Unity新的音频功能的时候,对*.mod文件我只有基本没什么想法.也不知道能做些什么.我就问我们的音频程序员Søren,他说这文件格式体积小,音质还好.所以我肯定和他说让他试试.当比较了文件大小和音频质量后,我很惊讶,我认为这更适合在网页游戏中传输使用.

这条博文翻译不下去了,太多专业短语不会翻译.放弃了..反正就是说Unity3中支持*.mod文件了.

ps:翻译注明来处1vr.cn,否则MJJ!!