You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as GridInformationKey used as a Dictionary key, current version will alloc 292B GC when call dict.TryGetValue(). For better performance it should be like below:
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 position.GetHashCode() + name.GetHashCode();
}
}
The text was updated successfully, but these errors were encountered:
as GridInformationKey used as a Dictionary key, current version will alloc 292B GC when call dict.TryGetValue(). For better performance it should be like below:
The text was updated successfully, but these errors were encountered: