Get
Returns this world in a form that can be written through.
Read time 4 minutesLast updated 14 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
Get(PhysicsWorld)
Returns this world in a form that can be written through.
public static PhysicsWorld Get(this PhysicsWorld physicsWorld)
Parameters
The world to return.
Returns
Type | Description |
|---|---|
| PhysicsWorld | The same world. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use world.Get().gravity = gravity in place of world.gravity = gravity.
Get(PhysicsBody)
Returns this body in a form that can be written through.
public static PhysicsBody Get(this PhysicsBody physicsBody)
Parameters
The body to return.
Returns
Type | Description |
|---|---|
| PhysicsBody | The same body. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use body.Get().linearVelocity = velocity in place of body.linearVelocity = velocity.
Get(PhysicsShape)
Returns this shape in a form that can be written through.
public static PhysicsShape Get(this PhysicsShape physicsShape)
Parameters
The shape to return.
Returns
Type | Description |
|---|---|
| PhysicsShape | The same shape. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use shape.Get().property = value in place of shape.property = value.
Get(PhysicsComposer)
Returns this composer in a form that can be written through.
public static PhysicsComposer Get(this PhysicsComposer physicsComposer)
Parameters
The composer to return.
Returns
Type | Description |
|---|---|
| PhysicsComposer | The same composer. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use composer.Get().useDelaunay = useDelaunay in place of composer.useDelaunay = useDelaunay.
Get(PhysicsChain)
Returns this chain in a form that can be written through.
public static PhysicsChain Get(this PhysicsChain physicsChain)
Parameters
The chain to return.
Returns
Type | Description |
|---|---|
| PhysicsChain | The same chain. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use chain.Get().friction = friction in place of chain.friction = friction.
Get(PhysicsJoint)
Returns this joint in a form that can be written through.
public static PhysicsJoint Get(this PhysicsJoint physicsJoint)
Parameters
The joint to return.
Returns
Type | Description |
|---|---|
| PhysicsJoint | The same joint. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use joint.Get().property = value in place of joint.property = value.
Get(PhysicsDistanceJoint)
Returns this distance joint in a form that can be written through.
public static PhysicsDistanceJoint Get(this PhysicsDistanceJoint physicsDistanceJoint)
Parameters
The distance joint to return.
Returns
Type | Description |
|---|---|
| PhysicsDistanceJoint | The same distance joint. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use joint.Get().property = value in place of joint.property = value.
Get(PhysicsFixedJoint)
Returns this fixed joint in a form that can be written through.
public static PhysicsFixedJoint Get(this PhysicsFixedJoint physicsFixedJoint)
Parameters
The fixed joint to return.
Returns
Type | Description |
|---|---|
| PhysicsFixedJoint | The same fixed joint. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use joint.Get().property = value in place of joint.property = value.
Get(PhysicsHingeJoint)
Returns this hinge joint in a form that can be written through.
public static PhysicsHingeJoint Get(this PhysicsHingeJoint physicsHingeJoint)
Parameters
The hinge joint to return.
Returns
Type | Description |
|---|---|
| PhysicsHingeJoint | The same hinge joint. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use joint.Get().property = value in place of joint.property = value.
Get(PhysicsIgnoreJoint)
Returns this ignore joint in a form that can be written through.
public static PhysicsIgnoreJoint Get(this PhysicsIgnoreJoint physicsIgnoreJoint)
Parameters
The ignore joint to return.
Returns
Type | Description |
|---|---|
| PhysicsIgnoreJoint | The same ignore joint. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use joint.Get().property = value in place of joint.property = value.
Get(PhysicsRelativeJoint)
Returns this relative joint in a form that can be written through.
public static PhysicsRelativeJoint Get(this PhysicsRelativeJoint physicsRelativeJoint)
Parameters
The relative joint to return.
Returns
Type | Description |
|---|---|
| PhysicsRelativeJoint | The same relative joint. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use joint.Get().property = value in place of joint.property = value.
Get(PhysicsSliderJoint)
Returns this slider joint in a form that can be written through.
public static PhysicsSliderJoint Get(this PhysicsSliderJoint physicsSliderJoint)
Parameters
The slider joint to return.
Returns
Type | Description |
|---|---|
| PhysicsSliderJoint | The same slider joint. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use joint.Get().property = value in place of joint.property = value.
Get(PhysicsWheelJoint)
Returns this wheel joint in a form that can be written through.
public static PhysicsWheelJoint Get(this PhysicsWheelJoint physicsWheelJoint)
Parameters
The wheel joint to return.
Returns
Type | Description |
|---|---|
| PhysicsWheelJoint | The same wheel joint. |
Remarks
See PhysicsHandleExtensions for why this is needed. Use joint.Get().property = value in place of joint.property = value.