Skip to content

Fix to the "Contribution" link in the Readme file, fix for running SplashEdit in Unity 6000.6, Replaced "Installed" with "Ready" in some status labels - #39

Merged
rixnobis merged 5 commits into
psxsplash:mainfrom
Pasquiindustry:main
Oct 3, 2026

Conversation

@Pasquiindustry

Copy link
Copy Markdown
Contributor
  • The Contribution link inside the main Readme.md file was redirecting to a 404
  • In Runtime/TexturePacker.cs and Runtime/PSXObjectExporter.cs, replaced the calls to the deprecated function GetInstanceID() with GetEntityId()
  • In Runtime/TexturePacker.cs and Runtime/PSXObjectExporter.cs, replaced the type of the key some dictionaries that are keeping track of some entities. From (int, PSXBPP) to (EntityId, PSXBPP)
  • In Editor/Timeline/PSXTimelineWindow.cs, replaced the type of first argument of the function OnOpenAsset from int to EntityId
  • In Editor/Timeline/PSXTimelineWindow.cs, replaced the deprecated function InstanceIDToObject to EntityIdToObject
  • In Editor/Core/SplashControlPanel.cs, updated all the strings "Installed" to "Ready", so they're coherent with each other and the documentation

NOTE: This was only tested on Unity 6000.6. According to the Unity documentation, this should make SplashEdit incompatible with Unity 6000.3 and previous versions, since it seems that GetEntityId was introduced in Unity 6000.4

@rixnobis rixnobis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the README link is right (old one 404s, new one resolves) and the badge wording is fine.

The API change can't go in as is: package.json declares "unity": "6000.0", and as you note GetEntityId/EntityIdToObject only exist from 6000.4, so this would break everyone on 6000.0-6000.3 with a compile error. Could you put the new calls behind #if UNITY_6000_4_OR_NEWER with the current int/GetInstanceID path in the #else? That keeps 6000.6 working without dropping older editors. With that it's a yes.

It would also help to know what actually fails on 6000.6: is it the OnOpenAsset(int, int) signature, or only deprecation warnings?

@Pasquiindustry

Copy link
Copy Markdown
Contributor Author

I updated my changes. I verified that the game still launches with SplashEdit + PsxSplash 2.4.0. Haven't tested all the features.
I made my tests in new projects on Unity 6.4 and Unity 6.6

I moved the code from int to EntityId because GetInstanceId and InstanceIDToObject were removed from Unity 6.5. These were already considered deprecated in some older versions

For my edits, I followed the Unity docs and this community post https://discussions.unity.com/t/is-getentityid-gethashcode-a-direct-replacement-for-getinstanceid-if-only-for-the-time-being/1721711/4

In the Unity documentation, is reported that we should avoid to:

  • Casting EntityId to or from an integer type.
  • Assuming any particular bit layout or sign conventions.
  • Using Object.GetHashCode as a substitute for, or to derive, an EntityId.
  • Serializing EntityId with ToString and deserializing with integer parsing.
  • Sorting EntityId values to determine creation order.
  • Manipulating individual bits of the EntityId value.

EntityId is a struct, so it seems mostly a drop-in replacement. Note that EntityId cannot be casted to an int, as reported in the guidelines, that's why I changed the argument type of OnOpenAsset. Technically we can change the name of the parameter too if it's ok

Unfortunately I don't have the entire "map" of the code, so it's better to check these modifications for the features they were implemented.

One script that was difficult to adapt was the updated Editor/PSXTilemapPreview.cs, since the old integer InstanceId was part of the calculations of the hash. I tried to do some changes by trying to keep the checks.

I'm also enclosing the entire functions in #if[...]#endif just to make these edits more readable. Once we know that the upgrade from integer instances to EntityId is correct, we may enclose only the part needed

@rixnobis rixnobis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked this by compiling the package in batch mode on three arms:

  • main on 6000.6.4f1: 4 errors, CS0619 on GetInstanceID() in PSXObjectExporter.cs and TexturePacker.cs.
  • this PR merged into main, 6000.6.4f1: 0 errors.
  • this PR merged into main, 6000.3.12f1: 0 errors, so older editors keep working.

Deleting RFC.md.meta is right too, RFC.md itself was removed in #43. The duplicated ContentHash/MeshFor in the tilemap preview can stay as is.

@rixnobis
rixnobis merged commit 439acf3 into psxsplash:main Oct 3, 2026
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.

2 participants