Search Unity

The Hash128.u64_1 seems has a bug~

Discussion in 'Editor & General Support' started by watsonsong, Jun 16, 2019.

  1. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    I recently using the Hash128 and try to use the u64_1 by reflection. But met a bug:
    https://github.com/Unity-Technologi...96/Runtime/Export/Hashing/Hash128.bindings.cs

    Code (CSharp):
    1. internal ulong u64_1
    2.         {
    3.             get
    4.             {
    5.                 fixed(uint* ptr1 = &m_u32_1)
    6.                 return *(ulong*)ptr1;
    7.             }
    8.         }
    I think the m_u32_1 should be m_u32_2.

    BTW, I hope the access to the int element in a Hash128 could be public.