2d-extras icon indicating copy to clipboard operation
2d-extras copied to clipboard

GridInformation.cs error : The name 'HashCode' does not exist in the current context

Open luojingzhao opened this issue 3 years ago • 6 comments

'HashCode' does not exist

internal struct GridInformationKey : IEquatable<GridInformationKey>
{
    public Vector3Int position;
    public String name;

    public bool Equals(GridInformationKey key)
    {
        return position == key.position && name == key.name;
    }

    public override int GetHashCode()
    {
        return HashCode.Combine(position.GetHashCode(), name.GetHashCode());
    }
}

luojingzhao avatar Oct 11 '22 05:10 luojingzhao

tag: 2020.3 last version

luojingzhao avatar Oct 11 '22 05:10 luojingzhao

Unity Version: 2020.3.21f, Api Level: .NET 4.X

luojingzhao avatar Oct 11 '22 05:10 luojingzhao

Will fix, thanks!

ChuanXin-Unity avatar Oct 11 '22 07:10 ChuanXin-Unity

Sorry about this issue, we have updated the branch with a fix!

ChuanXin-Unity avatar Oct 11 '22 08:10 ChuanXin-Unity

image

Sorry, but the issue still persists with an additional error.

Affan07 avatar Oct 22 '22 05:10 Affan07

Hi, which version of Unity are you using? The master branch of this repo is meant for 2021.1 and above. If you are using 2020.3, could you try the 2020.3 branch of this repo?

On Sat, Oct 22, 2022, 14:40 Affan @.***> wrote:

[image: image] https://user-images.githubusercontent.com/6506010/197322443-da77a236-2281-4408-bb04-aa83a3533078.png

Sorry, but the issue still persists with an additional error.

— Reply to this email directly, view it on GitHub https://github.com/Unity-Technologies/2d-extras/issues/350#issuecomment-1287638188, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHA3TEVXKGU257KOLB7WWYLWEN45TANCNFSM6AAAAAARB5NE6Q . You are receiving this because you commented.Message ID: @.***>

ChuanXin-Unity avatar Oct 23 '22 10:10 ChuanXin-Unity