Repository navigation
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
Conversation
https://psxsplash.github.io/docs/reference/contributing/ was an invalid link. It was replaced with https://psxsplash.github.io/docs/latest/reference/contributing/
…) and InstanceIDToObject() with the new struct EntityId
…t with the documentation
rixnobis
left a comment
There was a problem hiding this comment.
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?
# Conflicts: # Runtime/TexturePacker.cs
|
I updated my changes. I verified that the game still launches with SplashEdit + PsxSplash 2.4.0. Haven't tested all the features. 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:
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 |
rixnobis
left a comment
There was a problem hiding this comment.
Checked this by compiling the package in batch mode on three arms:
- main on 6000.6.4f1: 4 errors, CS0619 on
GetInstanceID()inPSXObjectExporter.csandTexturePacker.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.
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