-
Notifications
You must be signed in to change notification settings - Fork 5
Remove UdonToolkit dependency; upgrade CI/CD and VPM environment; add udonsharp-lint CI #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
34
commits into
alpha
Choose a base branch
from
copilot/upgrade-to-latest-environment
base: alpha
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
a3cda17
chore: upgrade to latest environment (SDK 3.10.2, Unity 2022.3, seman…
Copilot 20ca0c5
revert: revert com.unity.textmeshpro version bump due to malware advi…
Copilot 6f7eb63
feat: remove UdonToolkit dependency from all scripts and package.json
Copilot 316b656
Changes before error encountered
Copilot 9c816b7
Address review feedback: fix ATCRadar Update safety, remove dead OnAf…
Copilot e09359d
Apply second review: fix ATCRadar warning, guard empty tuners, add _R…
Copilot a293d5e
Fix Index setter divide-by-zero and bounds, init previousPositions/Ti…
Copilot fc9649f
Guard groundSpeed divide-by-zero; clamp Index against standbyTuners l…
Copilot c73475e
Fix array injection; guard SelectedTuner/StandbyTuner null access in …
Copilot 6e80533
ci: introduce udonsharp-lint via dotnet tool manifest + GitHub Action…
Copilot 63c3223
ci: add permissions block and remove branch exclusion from lint workflow
Copilot 66e121f
migrate virtual-cns to current sdk and address review feedback
esnya 45fd8a2
refactor: replace RadioTuner toolkit inspector
esnya 979c493
refactor: trim toolkit editor coupling
esnya 2b8d010
feat: add custom editors for ATIS and radio slices
esnya 22969df
fix: harden ATIS and radio tuner validation
esnya 567ccfb
fix: improve ATIS misconfiguration recovery
esnya 4dd8d7f
fix: harden ATIS and audio selector state
esnya 65ac3dc
fix: keep ATIS playback alive on empty runway config
esnya 2b991ec
chore: allow release config on main too
esnya 24d5f82
fix: guard ATIS playback against empty clip lists
esnya 9f88cac
ci: add reusable static and UdonSharp checks
esnya 151d61d
fix: skip empty ATIS tokens during encoding
esnya f9f35d6
fix: make static checks validate committed changes
esnya d3b87ce
fix: scope static whitespace checks to head commit
esnya 5dd2f63
fix: limit static whitespace checks to code and config diffs
esnya 1dbb760
fix: harden static checks on CI merge commits
esnya 755905c
fix: scope CI static checks to checked commits
esnya 2be5356
fix: check only changed files in CI static checks
esnya f581a4e
chore: harden checks and follow alpha dependencies
esnya 9358a04
fix: validate static checks against PR range
esnya b1fb181
fix: declare connector sf flight dependency
esnya 8162e05
fix: normalize virtual cns package dependency contracts
esnya c35a100
fix: restore virtual-cns release config and presets
esnya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "version": 1, | ||
| "isRoot": true, | ||
| "tools": { | ||
| "tktco.udonsharplinter": { | ||
| "version": "0.3.1", | ||
| "commands": [ | ||
| "udonsharp-lint" | ||
| ] | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Check | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| static-checks: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "22" | ||
| - uses: reviewdog/action-actionlint@v1 | ||
| with: | ||
| fail_level: error | ||
| - name: Run static checks | ||
| run: bash scripts/run-static-checks.sh | ||
|
|
||
| udonsharp-lint: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: | | ||
| 8.0.x | ||
| 6.0.x | ||
| - name: Restore dotnet tools | ||
| run: dotnet tool restore | ||
| - name: Run UdonSharp Linter | ||
| run: dotnet tool run udonsharp-lint Packages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: UdonSharp Lint | ||
| on: | ||
| push: | ||
| paths: | ||
| - "Packages/**/*.cs" | ||
| - ".config/dotnet-tools.json" | ||
| - ".github/workflows/udonsharp-lint.yml" | ||
| pull_request: | ||
| paths: | ||
| - "Packages/**/*.cs" | ||
| - ".config/dotnet-tools.json" | ||
| - ".github/workflows/udonsharp-lint.yml" | ||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: "6.x" | ||
| - name: Restore dotnet tools | ||
| run: dotnet tool restore | ||
| - name: Run UdonSharp Linter | ||
| run: dotnet tool run udonsharp-lint Packages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,12 @@ | ||
| branches: | ||
| - main | ||
| - master | ||
|
esnya marked this conversation as resolved.
esnya marked this conversation as resolved.
esnya marked this conversation as resolved.
|
||
| - name: alpha | ||
| prerelease: true | ||
|
|
||
| plugins: | ||
| - semantic-release-gitmoji | ||
| - "@semantic-release/npm" | ||
| - - "@semantic-release/npm" | ||
| - npmPublish: false | ||
| - "@semantic-release/github" | ||
| - "@semantic-release/git" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
176 changes: 176 additions & 0 deletions
176
Packages/jp.virtualaviation.virtual-cns/ATIS/Scripts/ATISGeneratorEditor.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,176 @@ | ||
| #if !COMPILER_UDONSHARP && UNITY_EDITOR | ||
| using UdonSharpEditor; | ||
| using UnityEditor; | ||
| using UnityEngine; | ||
|
|
||
| namespace VirtualCNS | ||
| { | ||
| [CustomEditor(typeof(ATISGenerator))] | ||
| public class ATISGeneratorEditor : Editor | ||
| { | ||
| private SerializedProperty template; | ||
| private SerializedProperty windHeadings; | ||
| private SerializedProperty runwayTemplates; | ||
| private SerializedProperty defaultRunwayIndex; | ||
| private SerializedProperty windTemplate; | ||
| private SerializedProperty windWithGustTemplate; | ||
| private SerializedProperty windSource; | ||
| private SerializedProperty windVariableName; | ||
| private SerializedProperty windGustVariableName; | ||
| private SerializedProperty minWind; | ||
| private SerializedProperty digits; | ||
| private SerializedProperty phonetics; | ||
| private SerializedProperty periodInterval; | ||
| private SerializedProperty repeatInterval; | ||
| private SerializedProperty clipWords; | ||
| private SerializedProperty clips; | ||
|
|
||
| private void OnEnable() | ||
| { | ||
| template = serializedObject.FindProperty(nameof(ATISGenerator.template)); | ||
| windHeadings = serializedObject.FindProperty(nameof(ATISGenerator.windHeadings)); | ||
| runwayTemplates = serializedObject.FindProperty(nameof(ATISGenerator.runwayTemplates)); | ||
| defaultRunwayIndex = serializedObject.FindProperty(nameof(ATISGenerator.defaultRunwayIndex)); | ||
| windTemplate = serializedObject.FindProperty(nameof(ATISGenerator.windTemplate)); | ||
| windWithGustTemplate = serializedObject.FindProperty(nameof(ATISGenerator.windWithGustTemplate)); | ||
| windSource = serializedObject.FindProperty(nameof(ATISGenerator.windSource)); | ||
| windVariableName = serializedObject.FindProperty(nameof(ATISGenerator.windVariableName)); | ||
| windGustVariableName = serializedObject.FindProperty(nameof(ATISGenerator.windGustVariableName)); | ||
| minWind = serializedObject.FindProperty(nameof(ATISGenerator.minWind)); | ||
| digits = serializedObject.FindProperty(nameof(ATISGenerator.digits)); | ||
| phonetics = serializedObject.FindProperty(nameof(ATISGenerator.phonetics)); | ||
| periodInterval = serializedObject.FindProperty(nameof(ATISGenerator.periodInterval)); | ||
| repeatInterval = serializedObject.FindProperty(nameof(ATISGenerator.repeatInterval)); | ||
| clipWords = serializedObject.FindProperty(nameof(ATISGenerator.clipWords)); | ||
| clips = serializedObject.FindProperty(nameof(ATISGenerator.clips)); | ||
| } | ||
|
|
||
| public override void OnInspectorGUI() | ||
| { | ||
| UdonSharpGUI.DrawDefaultUdonSharpBehaviourHeader(target); | ||
|
|
||
| serializedObject.Update(); | ||
|
|
||
| EditorGUILayout.PropertyField(template); | ||
| EditorGUILayout.Space(); | ||
|
|
||
| DrawRunwayOperations(); | ||
|
|
||
| EditorGUILayout.Space(); | ||
| EditorGUILayout.LabelField("Wind Source", EditorStyles.boldLabel); | ||
| EditorGUILayout.PropertyField(windSource); | ||
| EditorGUILayout.PropertyField(windVariableName); | ||
| EditorGUILayout.PropertyField(windGustVariableName); | ||
| EditorGUILayout.PropertyField(minWind); | ||
| EditorGUILayout.PropertyField(windTemplate); | ||
| EditorGUILayout.PropertyField(windWithGustTemplate); | ||
|
|
||
| EditorGUILayout.Space(); | ||
| EditorGUILayout.LabelField("Audio Tables", EditorStyles.boldLabel); | ||
| EditorGUILayout.PropertyField(digits, true); | ||
| EditorGUILayout.PropertyField(phonetics, true); | ||
| EditorGUILayout.PropertyField(periodInterval); | ||
| EditorGUILayout.PropertyField(repeatInterval); | ||
|
|
||
| EditorGUILayout.Space(); | ||
| DrawClipTable(); | ||
|
|
||
| serializedObject.ApplyModifiedProperties(); | ||
| } | ||
|
|
||
| private void DrawRunwayOperations() | ||
| { | ||
| EditorGUILayout.LabelField("Runway Operations", EditorStyles.boldLabel); | ||
|
|
||
| var count = DrawCountField("Operation Count", 1, windHeadings, runwayTemplates); | ||
| var effectiveCount = Mathf.Min(windHeadings.arraySize, runwayTemplates.arraySize); | ||
| if (effectiveCount == 0) | ||
| { | ||
| EditorGUILayout.HelpBox("Add at least one runway operation. ATIS generation is blocked until this is fixed.", MessageType.Error); | ||
| defaultRunwayIndex.intValue = 0; | ||
| if (GUILayout.Button("Create Default Runway Operation")) | ||
| { | ||
| ResizeArrays(1, windHeadings, runwayTemplates); | ||
| windHeadings.GetArrayElementAtIndex(0).floatValue = 0.0f; | ||
| runwayTemplates.GetArrayElementAtIndex(0).stringValue = "runway operation unavailable"; | ||
| } | ||
| return; | ||
| } | ||
|
|
||
| if (effectiveCount != count) | ||
| { | ||
| EditorGUILayout.HelpBox("Only the overlapping runway operation entries are active until the backing arrays are normalized.", MessageType.Warning); | ||
| if (GUILayout.Button("Normalize Runway Operation Arrays")) | ||
| { | ||
| ResizeArrays(count, windHeadings, runwayTemplates); | ||
| effectiveCount = count; | ||
| } | ||
| } | ||
|
|
||
| defaultRunwayIndex.intValue = Mathf.Clamp(defaultRunwayIndex.intValue, 0, effectiveCount - 1); | ||
| defaultRunwayIndex.intValue = EditorGUILayout.IntSlider("Default Runway Index", defaultRunwayIndex.intValue, 0, effectiveCount - 1); | ||
|
|
||
| for (var i = 0; i < effectiveCount; i++) | ||
| { | ||
| using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox)) | ||
| { | ||
| EditorGUILayout.LabelField($"Operation {i}", EditorStyles.boldLabel); | ||
| EditorGUILayout.PropertyField(windHeadings.GetArrayElementAtIndex(i), new GUIContent("Wind Heading")); | ||
| EditorGUILayout.PropertyField(runwayTemplates.GetArrayElementAtIndex(i), new GUIContent("Runway Template")); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private void DrawClipTable() | ||
| { | ||
| EditorGUILayout.LabelField("Word Clips", EditorStyles.boldLabel); | ||
|
|
||
| var count = DrawCountField("Clip Count", 0, clipWords, clips); | ||
|
|
||
| for (var i = 0; i < count; i++) | ||
| { | ||
| using (new EditorGUILayout.HorizontalScope()) | ||
| { | ||
| EditorGUILayout.PropertyField(clipWords.GetArrayElementAtIndex(i), GUIContent.none); | ||
| EditorGUILayout.PropertyField(clips.GetArrayElementAtIndex(i), GUIContent.none); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private static int DrawCountField(string label, int minimumSize, params SerializedProperty[] properties) | ||
| { | ||
| var minSize = int.MaxValue; | ||
| var maxSize = 0; | ||
| for (var i = 0; i < properties.Length; i++) | ||
| { | ||
| minSize = Mathf.Min(minSize, properties[i].arraySize); | ||
| maxSize = Mathf.Max(maxSize, properties[i].arraySize); | ||
| } | ||
|
|
||
| if (minSize == int.MaxValue) minSize = 0; | ||
|
|
||
| if (minSize != maxSize) | ||
| { | ||
| EditorGUILayout.HelpBox($"{label} backing arrays are out of sync. Adjust the count to normalize them.", MessageType.Info); | ||
| } | ||
|
|
||
| var requestedSize = Mathf.Max(minimumSize, EditorGUILayout.IntField(label, Mathf.Max(minimumSize, maxSize))); | ||
| if (requestedSize != maxSize) | ||
| { | ||
| ResizeArrays(requestedSize, properties); | ||
| return requestedSize; | ||
| } | ||
|
|
||
| return minSize; | ||
| } | ||
|
|
||
| private static void ResizeArrays(int size, params SerializedProperty[] properties) | ||
| { | ||
| for (var i = 0; i < properties.Length; i++) | ||
| { | ||
| properties[i].arraySize = size; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| #endif |
11 changes: 11 additions & 0 deletions
11
Packages/jp.virtualaviation.virtual-cns/ATIS/Scripts/ATISGeneratorEditor.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.