Skip to content

fix(pitaya-sharp): filter per-arch native libs in Unity <6000 builds#80

Open
tiagomartines11 wants to merge 1 commit into
masterfrom
fix/2021-vs-6000
Open

fix(pitaya-sharp): filter per-arch native libs in Unity <6000 builds#80
tiagomartines11 wants to merge 1 commit into
masterfrom
fix/2021-vs-6000

Conversation

@tiagomartines11

Copy link
Copy Markdown
Member

On Unity 2021/2022 the PluginImporter serializedVersion 3 layout used since 1.0.11 doesn't filter the per-arch natives correctly. Unity sees duplicate libpitaya_cpp.{so,dylib} filenames in the Linux64/OSXUniversal slots, silently excludes them all, and the player crashes at runtime with DllNotFoundException.

Adds a build-output post-process (gated on !UNITY_6000_0_OR_NEWER) that filters the per-arch natives in the player's plugins directory after every build, keeping only the variant that matches the active build target — replacing wrong-arch variants and creating the file when Unity dropped them all. Source assets and .meta files are never touched. Unity 6 keeps using the authored .meta files.

Bumps version to 1.2.1-rc.1.

On Unity 2021/2022 the PluginImporter serializedVersion 3 layout used
since 1.0.11 doesn't filter the per-arch natives correctly. Unity sees
duplicate libpitaya_cpp.{so,dylib} filenames in the Linux64/OSXUniversal
slots, silently excludes them all, and the player crashes at runtime
with DllNotFoundException.

Adds a build-output post-process (gated on !UNITY_6000_0_OR_NEWER) that
filters the per-arch natives in the player's plugins directory after
every build, keeping only the variant that matches the active build
target — replacing wrong-arch variants and creating the file when Unity
dropped them all. Source assets and .meta files are never touched.
Unity 6 keeps using the authored .meta files.

Bumps version to 1.2.1-rc.1.

Co-Authored-By: Claude Opus 4.7 (1M context) <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