Cpp2IL icon indicating copy to clipboard operation
Cpp2IL copied to clipboard

Invalid interface method implementations

Open thegu5 opened this issue 1 year ago • 4 comments

This was already mentioned in #cpp2il-support, I'm making this issue for organization.

example: image image The method in the interface is public, but the method in the implementing class is private, causing the type to be invalid

Method 'OnBeforeSerialize' in type 'UnityEngine.Events.UnityEvent`1' from assembly 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

(this specific example's error is because UnityEvent`1 extends UnityEventBase which implements ISerializationCallbackReceiver, and it doesn't see the method impl in UnityEventBase)

https://github.com/Unity-Technologies/UnityCsReference/blob/c4a2a4d90d91496bf3d4602778223a0e660c2a56/Runtime/Export/UnityEvent/UnityEvent.cs#L743

thegu5 avatar Jul 01 '24 20:07 thegu5