Skip to content

Invalid interface method implementations #310

@thegu5

Description

@thegu5

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions