Skip to content

fix: key typeface caches by EntityId for Unity 6.3 - #96

Open
Rikarin wants to merge 3 commits into
ammariqais:mainfrom
Rikarin:main
Open

fix: key typeface caches by EntityId for Unity 6.3#96
Rikarin wants to merge 3 commits into
ammariqais:mainfrom
Rikarin:main

Conversation

@Rikarin

@Rikarin Rikarin commented Aug 7, 2026

Copy link
Copy Markdown

fix: key typeface caches by EntityId for Unity 6.3
Unity 6.3 (6000.5) marks Object.GetInstanceID() as [Obsolete(error: true)],
so it raises CS0619 rather than a suppressible warning. Switching the call
to GetEntityId() alone is not enough: the implicit EntityId -> int
conversion is obsolete-as-error too, and is slated for removal, so
assigning the result to an int just moves the error.

Rikarin and others added 3 commits August 7, 2026 15:18
Unity 6.3 (6000.5) marks Object.GetInstanceID() as [Obsolete(error: true)],
so it raises CS0619 rather than a suppressible warning. Switching the call
to GetEntityId() alone is not enough: the implicit EntityId -> int
conversion is obsolete-as-error too, and is slated for removal, so
assigning the result to an int just moves the error.

Type the typeface cache keys as EntityId end to end instead. EntityId
implements IEquatable<EntityId> and overrides GetHashCode, so it is a
valid dictionary key, and == / != are defined on it.

Also drops the #pragma warning disable CS0618 added in 53ad54b — it
targeted the wrong diagnostic id and cannot suppress an error anyway.

Verified with 6000.5.7f1's Roslyn against its UnityEngine assemblies:
SkiaSharp.Unity compiles with 0 errors and no new warnings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant