Skip to content

Commit be13f8e

Browse files
update
Adding asmdef define for 6000.3.0a6 or higher and using that within RigidbodyContactEventManager to switch from using otherBodyInstanceID to otherBodyEntityId.
1 parent 8292b0f commit be13f8e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,11 @@ public void Execute(int index)
375375
var result = new JobResultStruct()
376376
{
377377
ThisInstanceID = PairedHeaders[index].bodyInstanceID,
378+
#if CONTACTPAIRHEADER_OTHERBODYENTITYID
379+
OtherInstanceID = PairedHeaders[index].otherBodyEntityId,
380+
#else
378381
OtherInstanceID = PairedHeaders[index].otherBodyInstanceID,
382+
#endif
379383
AverageNormal = averageNormal,
380384
HasCollisionStay = collisionStaycount != 0,
381385
AverageCollisionStayNormal = averageCollisionStay,

com.unity.netcode.gameobjects/Runtime/Unity.Netcode.Runtime.asmdef

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@
7777
"name": "Unity",
7878
"expression": "6000.1.0a1",
7979
"define": "HOSTNAME_RESOLUTION_AVAILABLE"
80-
}
80+
},
81+
{
82+
"name": "Unity",
83+
"expression": "6000.3.0a6",
84+
"define": "CONTACTPAIRHEADER_OTHERBODYENTITYID"
85+
},
8186
],
8287
"noEngineReferences": false
8388
}

0 commit comments

Comments
 (0)