From b43cf4904f855e3d1b6da8a949326aa031bc5219 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 22 Jul 2026 05:07:32 +0100 Subject: [PATCH] Fix CultMath Unity plugin references --- scripts/build-unity-package.ps1 | 20 ++++++++++++++---- unity/org.gamecult.cultmath/LICENSE.md.meta | 2 ++ unity/org.gamecult.cultmath/README.md | 4 ++-- unity/org.gamecult.cultmath/README.md.meta | 2 ++ .../Runtime/CultMath.asmdef | 16 -------------- .../Runtime/CultMath.asmdef.meta | 7 ------ .../Runtime/Plugins/CultMath.dll | Bin 44544 -> 44544 bytes .../Runtime/Plugins/CultMath.dll.meta | 2 +- .../Runtime/Plugins/CultMath.pdb | Bin 23424 -> 23420 bytes .../THIRD-PARTY-NOTICES.md.meta | 2 ++ unity/org.gamecult.cultmath/package.json.meta | 2 ++ 11 files changed, 27 insertions(+), 30 deletions(-) create mode 100644 unity/org.gamecult.cultmath/LICENSE.md.meta create mode 100644 unity/org.gamecult.cultmath/README.md.meta delete mode 100644 unity/org.gamecult.cultmath/Runtime/CultMath.asmdef delete mode 100644 unity/org.gamecult.cultmath/Runtime/CultMath.asmdef.meta create mode 100644 unity/org.gamecult.cultmath/THIRD-PARTY-NOTICES.md.meta create mode 100644 unity/org.gamecult.cultmath/package.json.meta diff --git a/scripts/build-unity-package.ps1 b/scripts/build-unity-package.ps1 index 329cedb..f5fcacc 100644 --- a/scripts/build-unity-package.ps1 +++ b/scripts/build-unity-package.ps1 @@ -41,11 +41,13 @@ foreach ($path in @($freshAssembly, $freshSymbols)) { $requiredTemplateFiles = @( "LICENSE.md", + "LICENSE.md.meta", "README.md", + "README.md.meta", "THIRD-PARTY-NOTICES.md", + "THIRD-PARTY-NOTICES.md.meta", "package.json", - "Runtime\CultMath.asmdef", - "Runtime\CultMath.asmdef.meta", + "package.json.meta", "Runtime\Plugins\CultMath.dll", "Runtime\Plugins\CultMath.dll.meta", "Runtime\Plugins\CultMath.pdb", @@ -72,6 +74,14 @@ if ($missingAssetMetas.Count -ne 0 -or $missingDirectoryMetas.Count -ne 0) { } $manifest = Get-Content -LiteralPath (Join-Path $templateRoot "package.json") -Raw | ConvertFrom-Json +$pluginMeta = Get-Content -LiteralPath ($trackedAssembly + ".meta") -Raw +if ($pluginMeta -notmatch '(?m)^\s*isExplicitlyReferenced:\s*0\s*$') { + throw "CultMath.dll must be auto-referenced; explicit-only plugins do not reach dependent Unity asmdefs" +} +$facadeDefinitions = @(Get-ChildItem -LiteralPath $templateRoot -Recurse -File -Filter "*.asmdef") +if ($facadeDefinitions.Count -ne 0) { + throw "CultMath's precompiled DLL is the Unity assembly authority; empty asmdef facades are forbidden" +} $expectedFileVersion = "$($manifest.version).0" $trackedFileVersion = [Diagnostics.FileVersionInfo]::GetVersionInfo($trackedAssembly).FileVersion $freshFileVersion = [Diagnostics.FileVersionInfo]::GetVersionInfo($freshAssembly).FileVersion @@ -97,11 +107,13 @@ Copy-Item -Path (Join-Path $templateRoot "*") -Destination $outputRoot -Recurse $stagedAssemblies = @(Get-ChildItem -LiteralPath (Join-Path $outputRoot "Runtime\Plugins") -Filter "*.dll") $stagedSources = @(Get-ChildItem -LiteralPath $outputRoot -Recurse -File -Filter "*.cs") -if ($stagedAssemblies.Count -ne 1 -or $stagedAssemblies[0].Name -ne "CultMath.dll" -or $stagedSources.Count -ne 0) { - throw "CultMath package must contain one owned DLL and no C# source files" +$stagedFacades = @(Get-ChildItem -LiteralPath $outputRoot -Recurse -File -Filter "*.asmdef") +if ($stagedAssemblies.Count -ne 1 -or $stagedAssemblies[0].Name -ne "CultMath.dll" -or $stagedSources.Count -ne 0 -or $stagedFacades.Count -ne 0) { + throw "CultMath package must contain one owned auto-referenced DLL, no C# source files, and no asmdef facade" } Write-Host "CultMath Unity package: $outputRoot" Write-Host "Package: $($manifest.name)@$($manifest.version)" Write-Host "Managed assemblies: $($stagedAssemblies.Count)" Write-Host "C# source files: $($stagedSources.Count)" +Write-Host "Asmdef facades: $($stagedFacades.Count)" diff --git a/unity/org.gamecult.cultmath/LICENSE.md.meta b/unity/org.gamecult.cultmath/LICENSE.md.meta new file mode 100644 index 0000000..c234cd2 --- /dev/null +++ b/unity/org.gamecult.cultmath/LICENSE.md.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 7172bce28532878409e57f5fbbb12719 \ No newline at end of file diff --git a/unity/org.gamecult.cultmath/README.md b/unity/org.gamecult.cultmath/README.md index 1802ae9..223e16c 100644 --- a/unity/org.gamecult.cultmath/README.md +++ b/unity/org.gamecult.cultmath/README.md @@ -6,8 +6,8 @@ precompiled `CultMath.dll`, portable symbols, and the numeric Unity does not compile CultMath's repository source tree. That source uses the current C# language and remains owned by the normal .NET project. The package -facade references only the tracked precompiled assembly, so consumers do not -need `csc.rsp` language overrides. +imports only the tracked auto-referenced precompiled assembly, so consumers do +not need `csc.rsp` language overrides or an asmdef propagation shim. Build and inspect the package from the repository root: diff --git a/unity/org.gamecult.cultmath/README.md.meta b/unity/org.gamecult.cultmath/README.md.meta new file mode 100644 index 0000000..0ea270c --- /dev/null +++ b/unity/org.gamecult.cultmath/README.md.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: b7429934026d747489a3876fd15576e5 \ No newline at end of file diff --git a/unity/org.gamecult.cultmath/Runtime/CultMath.asmdef b/unity/org.gamecult.cultmath/Runtime/CultMath.asmdef deleted file mode 100644 index 72c968e..0000000 --- a/unity/org.gamecult.cultmath/Runtime/CultMath.asmdef +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "CultMath", - "rootNamespace": "CultMath", - "references": [], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": true, - "overrideReferences": true, - "precompiledReferences": [ - "CultMath.dll" - ], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], - "noEngineReferences": true -} diff --git a/unity/org.gamecult.cultmath/Runtime/CultMath.asmdef.meta b/unity/org.gamecult.cultmath/Runtime/CultMath.asmdef.meta deleted file mode 100644 index 0ec09c2..0000000 --- a/unity/org.gamecult.cultmath/Runtime/CultMath.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4b5c49d478124399a5310d7a9d8ed166 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.dll b/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.dll index 8cdb6700145956da7fb303fc1d9b0a39f19c91a4..91b51d8d33ed8fcbc53a66b07131e2442f17c464 100644 GIT binary patch delta 237 zcmZp;!_;txX+j6fe6!yD8+&SI3Md?&m2hM4B;O@kA8G1bU4B{@0G&^*Z;h*FX)EmP7`4b2lL=PZ4|A~n_c#^iuy0Rl^PQ$L;D z?&myz@rr5F%r?HBykVKI0#xv`JX8>X6bNim|0qwnx&Ye z87HQunweUfB&C_An423Un;07#8>E>gSsEJ|8CzH;PtIBTfaR_B{x6dQmIVlCu1PV9 zi%@ZzAR}tDy=kS#VxcJanfKBdd7u~~MxH;ca+gC&CngDHa< zLkfclLmGoILn1>e5SjtSEP*0PKrvIGoH-C0FeC#-jKR~ZW6WR#gvLNqEE$qF JZ(r@n1OOHGN4Wq1 diff --git a/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.dll.meta b/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.dll.meta index d9935b3..917e384 100644 --- a/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.dll.meta +++ b/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.dll.meta @@ -8,7 +8,7 @@ PluginImporter: defineConstraints: [] isPreloaded: 0 isOverridable: 0 - isExplicitlyReferenced: 1 + isExplicitlyReferenced: 0 validateReferences: 1 platformData: - first: diff --git a/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.pdb b/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.pdb index ed00f36e044b3063d654af2d537f4821c4c253f6..711cf76c53ef3d56a5f07fa25acb9c8532c93e3d 100644 GIT bin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mode 100644 index 0000000..a53f08d --- /dev/null +++ b/unity/org.gamecult.cultmath/THIRD-PARTY-NOTICES.md.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 0c88669e4d1db604588be2a726b7d231 \ No newline at end of file diff --git a/unity/org.gamecult.cultmath/package.json.meta b/unity/org.gamecult.cultmath/package.json.meta new file mode 100644 index 0000000..337ba71 --- /dev/null +++ b/unity/org.gamecult.cultmath/package.json.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 33d8d4af49bf0f946ad00a375f26b1d1 \ No newline at end of file