Publish native action bar control levers
This commit is contained in:
parent
adc72e504c
commit
14fa364336
7 changed files with 97 additions and 31 deletions
|
|
@ -17,11 +17,11 @@ $expected = @{
|
|||
"https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.15",
|
||||
"419053ebe2325848051c4f4d8ba352cd4286c424")
|
||||
"org.gamecult.eve.surface" = @(
|
||||
"https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.3",
|
||||
"7647d37445cf39447cb607111e215f627db56c80")
|
||||
"https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.4",
|
||||
"e08fa08335f99e9edddeb706912eecfad07cb281")
|
||||
"org.gamecult.eve.unity-scene" = @(
|
||||
"https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.64",
|
||||
"7647d37445cf39447cb607111e215f627db56c80")
|
||||
"https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.65",
|
||||
"e08fa08335f99e9edddeb706912eecfad07cb281")
|
||||
}
|
||||
|
||||
foreach ($packageName in $expected.Keys) {
|
||||
|
|
@ -56,23 +56,26 @@ foreach ($apiName in $requiredMeshApiNames) {
|
|||
|
||||
$surfacePackage = Get-ChildItem (Join-Path $ProjectPath "Library/PackageCache") -Directory |
|
||||
Where-Object Name -Like "org.gamecult.eve.surface@*" |
|
||||
Where-Object { (Get-Content (Join-Path $_.FullName "package.json") -Raw | ConvertFrom-Json).version -eq "0.2.3" } |
|
||||
Where-Object { (Get-Content (Join-Path $_.FullName "package.json") -Raw | ConvertFrom-Json).version -eq "0.2.4" } |
|
||||
Select-Object -First 1
|
||||
if (-not $surfacePackage) { throw "Resolved Eve surface 0.2.3 package is missing from Library/PackageCache." }
|
||||
if (-not $surfacePackage) { throw "Resolved Eve surface 0.2.4 package is missing from Library/PackageCache." }
|
||||
$inputContractSource = Get-Content (Join-Path $surfacePackage.FullName "Runtime/EveInputCapabilityDocument.cs") -Raw
|
||||
if ($inputContractSource -notmatch "PayloadKeys") {
|
||||
throw "Resolved Eve surface package does not expose vector input payload keys."
|
||||
foreach ($requiredInputContract in @("PayloadKeys", "CurrentValue", "ActionBar", "IconRef")) {
|
||||
if ($inputContractSource -notmatch $requiredInputContract) {
|
||||
throw "Resolved Eve surface package is missing input contract '$requiredInputContract'."
|
||||
}
|
||||
}
|
||||
|
||||
$scenePackage = Get-ChildItem (Join-Path $ProjectPath "Library/PackageCache") -Directory |
|
||||
Where-Object Name -Like "org.gamecult.eve.unity-scene@*" |
|
||||
Where-Object { (Get-Content (Join-Path $_.FullName "package.json") -Raw | ConvertFrom-Json).version -eq "0.3.64" } |
|
||||
Where-Object { (Get-Content (Join-Path $_.FullName "package.json") -Raw | ConvertFrom-Json).version -eq "0.3.65" } |
|
||||
Select-Object -First 1
|
||||
if (-not $scenePackage) { throw "Resolved Eve Unity scene 0.3.64 package is missing from Library/PackageCache." }
|
||||
if (-not $scenePackage) { throw "Resolved Eve Unity scene 0.3.65 package is missing from Library/PackageCache." }
|
||||
$advertisedInputSource = Get-Content (Join-Path $scenePackage.FullName "Runtime/EveUnityAdvertisedInputAction.cs") -Raw
|
||||
$inputDriverSource = Get-Content (Join-Path $scenePackage.FullName "Runtime/EveUnityPlayableWorldInputDriver.cs") -Raw
|
||||
foreach ($requiredInputContract in @("view-direction.v1", "BuildViewDirectionPayload", "SubmitChangedPerformedActions")) {
|
||||
if (($advertisedInputSource + $inputDriverSource) -notmatch [regex]::Escape($requiredInputContract)) {
|
||||
$actionBarSource = Get-Content (Join-Path $scenePackage.FullName "Runtime/EveUnityInputActionBar.cs") -Raw
|
||||
foreach ($requiredInputContract in @("view-direction.v1", "BuildViewDirectionPayload", "SubmitChangedPerformedActions", "scalar.v1", "BuildScalarPayload", "EveUnityInputActionBar")) {
|
||||
if (($advertisedInputSource + $inputDriverSource + $actionBarSource) -notmatch [regex]::Escape($requiredInputContract)) {
|
||||
throw "Resolved Eve Unity scene package is missing generic input lowering '$requiredInputContract'."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue