Вы находитесь на странице: 1из 3

Unity2DExperimentalPreviewR1ReleaseNotes

ReleaseNotes

New
:9Slice
AllowsSpritestobedrawnas9slicedimagewithSpriteRenderer.

New
:SpriteOutlineEditor
AllowusertoadjustspriteoutlineinSpriteEditorWindowtocontroltightmeshgeneration.

New
:Grid
Allowsuserstospecifyalayoutfororganisationofobjectplacement.
Supports3Dcoordinates.
Providesspaceconversionsfromgridcell,localandworld.
Supportedlayouts:
Rectangular
Isometric
Hexagonal
Custom(Notimplementedcurrently)
Adjustcellsizes,gapsandswizzlesbetweencoordinateaxes.

New
:TileMapEditor
ProgrammableTiles
Painttilesonthetilemapandtileswilldecidewhatsprites,orientationandcolour
itneedstobebasedonplacement.
Abletoupdatedataandlogicfortilesandhavepaintedtilemapsrefreshitselfto
usetheupdatedinformation.
ProgrammableBrushes
Paintandupdatetilesbasedonprovidedlogic.
Brushdecideswhichtilesshouldbepaintedontothetargetlocation,adddetailsor
propertiestothetargetlocation.
Note
:TileMapCollider2Disstillunderworksandiscomingsoon!
Asaplaceholder,addingaPolygonCollider2DcomponenttotheTileMap.
GameObjectwillgenerateacolliderfortheTileMap.Thisistemporaryandwillnot
beinthefinalproduction.
New
:SortingGroupComponent
TheSortingGroupisacomponentthatalterstheorderinwhichRenderersarerendered.

New
:SpriteMasking
AllowsSpritestobemaskedinpresenceofmask(s).
Masksshapescanbedrivenbysprites.Morecontrolisavailableusingthealpha
thresholdofthespritedrivingtheshapeofthemask.
TheMaskinteractionforeachspritecanbesettoShowundermaskorShowoutside
mask.Defaultisnointeractionwithanymask.

New
:CapsuleCollider2DComponent

Capsuleshapedcolliderdefinedasanareaanddirection(tocontrolendcaps)

Physics2D.CapsuleCast()
,
Physics2D.CapsuleCastAll()
&
Physics2D.CapsuleCastNonAlloc()

API.

NOTE:ThiscolliderdoesnotstopBox2Dfromproducingcontactsonadjacentboxcollidersthat
willbesolvedbythecollidermergingthatiscurrentlyWIP!

New
:EdgeRadiuspropertyforBoxCollider2D&EdgeCollider2Dcomponents
BoxCollider2D&EdgeCollider2DnowhaveanedgeRadiuspropertyallowingacircular
radiusextendingfromalledgestobeusedforcollisiondetection.Thisresultsin
capsulelikeedgesandroundedvertices/corners.

Improvement
:Rewrittencontacthandlingbackend
DuetothefactthatUnityallowsalotofdynamicchangestohappentobothRigidbody2D
andCollider2D,changeswhichBox2Dwasntdesignedfor,itmakescontacthandlingand
reportingfairlycomplex.
Thebackendcontacthandlingmechanismhasbeencompletelyrewrittentoensurethat
allcontactreportscomingfromBox2Darehandledefficientlyandcorrectlynomatterwhat
frontendchangesUnitymakestoCollider2DorRigidbody2D.
AllCollisionExitandTriggerExitcontactconditionsarenowhandledcorrectlywhen
deleting,repositioningorresizingaCollider2D.

Improvement
:Rigidbody2Dcomponent
New
Rigidbody2D.bodyType
propertyallowingtheselectionofDynamic,Kinematicor
Staticbodytype.(
Rigidbody2D.isKinematic
stillavailablebutwillbedeprecatedlater)
New
Rigidbody2D.simulated
propertyexposedtoinspectorallowingthebody,collider&
jointsimulationtobeturnedonoroffreallyfast.
New
Rigidbody2D.useFullKinematicContacts
propertyallowingkinematicbodiesto
contactotherstatic/kinematicbodies(inadditiontoalreadycontactingdynamicbodies)
returningfullcontactsinOnCollisionXXXcallbacks.
New
Rigidbody2D.material
propertyallowingthebodytosetthephysicsmaterialforall
attachedcollidersthatdonotspecifyaphysicsmaterial.

Improvement
:

PlatformEffector2Dcomponent
Nowhasa
PlatformEffector2D.rotationalOffset
propertyallowinglocaluptochange.

Improvement
:PolygonCollider2D

&

EdgeCollider2DInspectorpointediting
Thecontactsrolloutshowsinrealtime,allcontactsfortheRigidbody2D(allitscolliders)
andCollider2D.
Bothnowallowpaths/pointstobemodifieddirectlyinsidetheinspector.

Improvement
:AllRigidbody2DandCollider2DhaveinspectorInforollout
UsefulInformationshownintheinspectorforallrigidbodiesandcolliders.

Improvement
:AllRigidbody2DandCollider2DhaveinspectorContactsrollout.

New
:2DPhysicsCastingAPI
New
Collider2D.Raycast()
Castarayfromthecolliderposition
New
Collider2D.Cast()
Castthecolliderthroughtheworld
New
Rigidbody2D.OverlapPoint()
Checkifapointoverlapsanyofthecolliders
attachedtothebody
New
Rigidbody2D.Cast()
Castthebody(allitscolliders)throughtheworld
New
Physics2D.OverlapBox()
,
Physics2D.OverlapBoxAll()
&

Physics2D.OverlapBoxNonAlloc()
Boxoverlapsusingpoint,size&angle

New
:2DPhysicsContactsAPI
RewrittencontactsbackendallowsfastqueryingofallcontactseitheronaRigidbody2D
orCollider2DusinganonallocatingAPIashighlightedhere:
https://oc.unity3d.com/index.php/s/ruNynjAFTQ4AYe9
Physics2D/Collider2D/Rigidbody2DGetContacts()methodcanreturnfullContactPoint2D
orjustCollider2D.
Amoreconvenientandfastermethodtofilterresultsisprovidedbythenew
ContactFilter2D.Filteringhappensbeforetheresultsarepassedbackandcanfilteron
contactenabledstate,layermask,min/maxZdepth&collisionnormalrange.
ContactPoint2Dexpandedtoincluderelativevelocityateachcontactpoint,bothnormal
andtangentimpulsesappliedbythesolveraswellasthefullCollider2D/Rigidbody2D
pair.

New
:2DPhysicsGizmoControl
GizmosrolloutinPhysics2Dsettingfullyconfigurablefromscript:
Shouldallcollidersbeshownwithouttheneedtobeselected?
Shouldcollidersleepstatebeshown?
Configurableenabled(awake)/sleepcollidercolors
Shouldcollidercontactsbeshown?
Configurablecollidercontactscaleandcolor
ColliderAABBandcolor