Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.netcode.gameobjects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
- Fixed issue during client synchronization if 'ValidateSceneBeforeLoading' returned false it would halt the client synchronization process resulting in a client that was approved but not synchronized or fully connected with the server. (#1883)
- Fixed an issue where UNetTransport.StartServer would return success even if the underlying transport failed to start (#854)
- Passing generic types to RPCs no longer causes a native crash (#1901)
- Fixed a compile failure when compiling against com.unity.nuget.mono-cecil >= 1.11.4 (#1920)

## [Unreleased]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,11 @@ private MethodReference GetFastBufferWriterWriteMethod(string name, TypeReferenc
var meetsConstraints = true;
foreach (var constraint in method.GenericParameters[0].Constraints)
{
#if CECIL_CONSTRAINTS_ARE_TYPE_REFERENCES
var resolvedConstraint = constraint.Resolve();
#else
var resolvedConstraint = constraint.ConstraintType.Resolve();
#endif

var resolvedConstraintName = resolvedConstraint.FullNameWithGenericParameters(new[] { method.GenericParameters[0] }, new[] { checkType });
if ((resolvedConstraint.IsInterface && !checkType.HasInterface(resolvedConstraintName)) ||
Expand Down Expand Up @@ -737,7 +741,12 @@ private MethodReference GetFastBufferReaderReadMethod(string name, TypeReference
var meetsConstraints = true;
foreach (var constraint in method.GenericParameters[0].Constraints)
{
#if CECIL_CONSTRAINTS_ARE_TYPE_REFERENCES
var resolvedConstraint = constraint.Resolve();
#else
var resolvedConstraint = constraint.ConstraintType.Resolve();
#endif


var resolvedConstraintName = resolvedConstraint.FullNameWithGenericParameters(new[] { method.GenericParameters[0] }, new[] { checkType });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": true,
"precompiledReferences": [
Expand All @@ -15,5 +16,14 @@
"Mono.Cecil.Pdb.dll",
"Mono.Cecil.Rocks.dll"
],
"autoReferenced": false
}
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": [
{
"name": "com.unity.nuget.mono-cecil",
"expression": "(0,1.11.4)",
"define": "CECIL_CONSTRAINTS_ARE_TYPE_REFERENCES"
}
],
"noEngineReferences": false
}