Unity 2D Experimental Preview Release 3

New and Improved

Improvement: Grid You can now set the color of the rendered Grid in the Editor



Improvement: Physics 2D Contact Filter 2D Contact Filter 2D is now used in “IsTouching” calls Contact Filter 2D is also now used in most physics queries: Physics2D.GetContacts, Collider2D.GetContacts, Rigidbody2D.GetContacts, Linecast, Raycast, CircleCast, BoxCast, CapsuleCast, Collider2D.Cast, Rigidbody2D.Cast, OverlapPoint, OverlapCircle, OverlapBox, OverlapArea & OverlapCapsule.



Improvement: Sorting Group Sorting Group Editor List to view renderers/sorting groups under selected sorting group Sorting Group is no longer a renderer



Improvement: Tilemap New Palette System Palettes are prefabs of GameObjects with a Grid/Tilemap structure Palettes work exactly as they do in Scene View. Custom tiles on a palette can retrieve data from other components on the Palette prefab Add new palettes with plus button in palette window dropdown or by dragging existing prefabs on top of the window. Share palettes by handing out the Tilemap prefabs Isometric/Hexagonal layouts are rendered correctly in the Palette List of Palette prefabs you have selected to use are stored in Library/TilemapEditorSettings.asset New Brush Selection System Grid Brushes can be used when a Grid Brush script exists in Assets Grid Brush assets can still be used for customised brush behaviour New Focus mode Set focus on selected Tilemap layer or Tilemap as a whole when editing New Inspector for plain old Tile New Render mode for Tilemap Renderer to determine how Tilemap sprites are rendered Chunk - Tilemap sprites are grouped by location and rendered as a whole Individual - Each Tilemap sprite is rendered individually and can interleave with other renderers New functions ResizeBounds Removes all tiles outside of the defined origin and size of the Tilemap CompressBounds Changes origin and size of the Tilemap to ensure all tiles lie within the bounds defined by the origin and size



Improvement: Sprite Atlas Late binding atlas Sprite Atlas can set to not bind as default to the packed Sprites. Sprite will appear as empty mesh with no texture in the scene. User can bind a Sprite Atlas via a callback or direct API. Down-scaled Variant Sprite Atlas can become a variant of another Sprite Atlas by dragging the latter to the “Master Atlas” field in inspector. Variant will down-scale master’s texture with the given multiplier. Inspector New look and new functionality.



Breaking Changes





Tilemap TileMap has been renamed to Tilemap Tilemap namespace has changed from UnityEngine.Tilemap to UnityEngine.Tilemaps GridBrushBase Pick function has been added for Picking behaviour Set functions have been removed, use Pick function instead



Sprite Atlas Due to internal changes, old SpriteAtlas assets might be corrupt or broken. Please create a new one to replace it. SpriteAtlas APIs have moved inside UnityEngine.U2D and UnityEditor.U2D namespaces. GetSprites() will no longer return a new array of Sprites. It now accept a pre-allocated array and fill it up instead.



Bugfixes Tilemap Fixed bug in generation of collision shape for Tilemap Collider 2D when cell size is large than 1. Fixed bug in generation of collision shape for Tilemap Collider 2D where overlaps in sprites creates holes Fixed crash for Tilemap Collider 2D when tile does not have a valid sprite Fixed bug in Transform tool movement when Palette window has a tool selected causing scene view to be unresponsive Add gizmo when Tilemap Collider 2D is selected and not using a Composite Collider 2D Fixed rendering issue for Tilemap Renderer with a hexagonal grid where tiles are not rendered at chunk borders Contact Filter 2D collision normal angle now correctly operates using a 0-360 degree range rather than -180/+180 and compares collision normal angles correctly. PolygonCollider2D/BoxCollider2D shape with large vertex but a small area passes validation. Case 820300. Shape casting against a multi-edge Edge Collider 2D now works correctly in cases of all shapes at any angle or position. (Case 833737). Continuously setting the body-type to the same type should not cause contact recalculations and potential instabilities (Case 835334). Fixed issue when removing Composite Collider 2D doesn’t disconnect attached Collider 2D correctly resulting in them not being recreated correctly (case 826902). Setting enabled state of a Collider2D attached to a Composite Collider 2D no longer produces ‘shape’ assert warnings. Vector2i/3i Fix serialization for Vector2i/3i



2D Experimental Preview Download Assistant

This build is the 2D Experimental Preview 3 build. The version displayed is Unity 5.5.0x3-2D-Build. As we iterate through improvements, changes and fixes, we will release more previews.

Warning!!!

Download the build from here:

Demo Projects