Search Unity

AsyncOperationHandle should implement IEquatable<AsyncOperationHandle> interface.

Discussion in 'Addressables' started by unity_TX6jAMiq4wKzUA, Sep 24, 2021.

  1. unity_TX6jAMiq4wKzUA

    unity_TX6jAMiq4wKzUA

    Joined:
    Apr 1, 2019
    Posts:
    3
    Hi, I'm using Addressables 1.13.1 and planning to update to 1.19.4.
    In that process, I encountered a bug.

    The reason is AsyncOperationHandle didn't removed from a list because AsyncOperationHandle does not implement IEquatable<AsyncOperationHandle> interface.

    I solved it using

    aList.RemoveAll(handle => handle.Equals(aHandleToRemove));

    instead of

    aList.Remove(aHandleToRemove);


    AsyncOperationHandle has Equals() but does not implement IEquatable<AsyncOperationHandle> interface.
    I think, this causes unintended behavior.

    Is it intended implementation?