From 32bc44de349b6ca533e605ae24d0fd3c6d99f0c4 Mon Sep 17 00:00:00 2001 From: Falko Galperin Date: Tue, 15 Aug 2023 22:23:50 +0200 Subject: [PATCH 1/5] Move XR Assets from LFS into regular Git repository --- .gitattributes | 1 - Assets/XR/Loaders.meta | 11 +- Assets/XR/Loaders/Open VR Loader.asset | 17 +- Assets/XR/Loaders/Open VR Loader.asset.meta | 11 +- .../Loaders/Open XR Loader No Pre Init.asset | 17 +- .../Open XR Loader No Pre Init.asset.meta | 11 +- Assets/XR/Loaders/Open XR Loader.asset | 17 +- Assets/XR/Loaders/Open XR Loader.asset.meta | 11 +- Assets/XR/Loaders/Windows MR Loader.asset | 17 +- .../XR/Loaders/Windows MR Loader.asset.meta | 11 +- Assets/XR/Settings.meta | 11 +- .../Settings/Open XR Package Settings.asset | 516 +++++++++++++++++- .../Open XR Package Settings.asset.meta | 11 +- .../XR/Settings/OpenXR Editor Settings.asset | 19 +- .../OpenXR Editor Settings.asset.meta | 11 +- .../Windows MR Package Settings.asset | 80 ++- .../Windows MR Package Settings.asset.meta | 11 +- Assets/XR/XRGeneralSettings.asset | 81 ++- Assets/XR/XRGeneralSettings.asset.meta | 11 +- 19 files changed, 820 insertions(+), 55 deletions(-) diff --git a/.gitattributes b/.gitattributes index 603b6f1fd3..05524078e6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -29,4 +29,3 @@ Assets/Plugins/** filter=lfs diff=lfs merge=lfs -text Assets/StreamingAssets/Videos.meta filter=lfs diff=lfs merge=lfs -text Assets/StreamingAssets/Videos/** filter=lfs diff=lfs merge=lfs -text Assets/Trailer/** filter=lfs diff=lfs merge=lfs -text -Assets/XR/** filter=lfs diff=lfs merge=lfs -text diff --git a/Assets/XR/Loaders.meta b/Assets/XR/Loaders.meta index a215a09f91..3d215c964f 100644 --- a/Assets/XR/Loaders.meta +++ b/Assets/XR/Loaders.meta @@ -1,3 +1,8 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:56bb474c0331e0b31a622026b67db4b0eec08d40a596f8836d3a573a852d3048 -size 180 +fileFormatVersion: 2 +guid: 2565203da7d7a2e47853f37eedad0fd4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/XR/Loaders/Open VR Loader.asset b/Assets/XR/Loaders/Open VR Loader.asset index 8b6365150b..00d97f6958 100644 --- a/Assets/XR/Loaders/Open VR Loader.asset +++ b/Assets/XR/Loaders/Open VR Loader.asset @@ -1,3 +1,14 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e01e336f0192621667b4bd80b733e59fa777f0d86b7fb774f4bad53370850d4e -size 417 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5685c6ec3d77efd409c20e6da27a4c72, type: 3} + m_Name: Open VR Loader + m_EditorClassIdentifier: diff --git a/Assets/XR/Loaders/Open VR Loader.asset.meta b/Assets/XR/Loaders/Open VR Loader.asset.meta index 48ad091f06..3ee2265a7e 100644 --- a/Assets/XR/Loaders/Open VR Loader.asset.meta +++ b/Assets/XR/Loaders/Open VR Loader.asset.meta @@ -1,3 +1,8 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ad1f379f41eac08032ff81382daa091c9bdc388271147034eb103de768963b7 -size 197 +fileFormatVersion: 2 +guid: f8570059bacfffb44854e367a5c7599f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/XR/Loaders/Open XR Loader No Pre Init.asset b/Assets/XR/Loaders/Open XR Loader No Pre Init.asset index a0b97c448b..cb4b2ab866 100644 --- a/Assets/XR/Loaders/Open XR Loader No Pre Init.asset +++ b/Assets/XR/Loaders/Open XR Loader No Pre Init.asset @@ -1,3 +1,14 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:24c896d174fe36fe6a013e27fb5b7b3f274a2202e4f9214f4b5f75f0e4fb201d -size 429 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ee62ffd6c7e6f3545899783b1fbdd9d4, type: 3} + m_Name: Open XR Loader No Pre Init + m_EditorClassIdentifier: diff --git a/Assets/XR/Loaders/Open XR Loader No Pre Init.asset.meta b/Assets/XR/Loaders/Open XR Loader No Pre Init.asset.meta index b11146e8cd..d46e0f1382 100644 --- a/Assets/XR/Loaders/Open XR Loader No Pre Init.asset.meta +++ b/Assets/XR/Loaders/Open XR Loader No Pre Init.asset.meta @@ -1,3 +1,8 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5a8b85d43b5d16d3d74ae3e17bb1c29761cfda3006da445ea6437c326b8e71c0 -size 197 +fileFormatVersion: 2 +guid: 8b3e77879d009bc4681aa775f04399fc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/XR/Loaders/Open XR Loader.asset b/Assets/XR/Loaders/Open XR Loader.asset index c89dbe4c0b..15d4498dcd 100644 --- a/Assets/XR/Loaders/Open XR Loader.asset +++ b/Assets/XR/Loaders/Open XR Loader.asset @@ -1,3 +1,14 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7a9e5a4a01a546dd5343c09a2cc30a16720da768ab8f75e58fd7a619423e14f -size 417 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d3552e428dc7646a88de3ed3650f87da, type: 3} + m_Name: Open XR Loader + m_EditorClassIdentifier: diff --git a/Assets/XR/Loaders/Open XR Loader.asset.meta b/Assets/XR/Loaders/Open XR Loader.asset.meta index 1324992f7b..2aec552cd8 100644 --- a/Assets/XR/Loaders/Open XR Loader.asset.meta +++ b/Assets/XR/Loaders/Open XR Loader.asset.meta @@ -1,3 +1,8 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2650c54d077503ccb7b5cc16a9f8055a210e31330b71c12dfcaa187c68f20075 -size 197 +fileFormatVersion: 2 +guid: 52e3c795d65ebf94492ecc68b6423ce3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/XR/Loaders/Windows MR Loader.asset b/Assets/XR/Loaders/Windows MR Loader.asset index d218cf10dc..1bbdfa2363 100644 --- a/Assets/XR/Loaders/Windows MR Loader.asset +++ b/Assets/XR/Loaders/Windows MR Loader.asset @@ -1,3 +1,14 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e37fda8e3855dcddefd6ba88f7cdf56c000141e9d6c2174c1ecea711c629cbd4 -size 420 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a140b66429c96344083035352cb7c898, type: 3} + m_Name: Windows MR Loader + m_EditorClassIdentifier: diff --git a/Assets/XR/Loaders/Windows MR Loader.asset.meta b/Assets/XR/Loaders/Windows MR Loader.asset.meta index 1f62aee6fd..9dae61bae8 100644 --- a/Assets/XR/Loaders/Windows MR Loader.asset.meta +++ b/Assets/XR/Loaders/Windows MR Loader.asset.meta @@ -1,3 +1,8 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5aa0e2a89aa046a4efc65acad40b2c0570828eba4e71d8977db3943fa4f3dd93 -size 197 +fileFormatVersion: 2 +guid: 7749e65984899c4428431cbad728747b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/XR/Settings.meta b/Assets/XR/Settings.meta index 0610e42719..c4d2915c23 100644 --- a/Assets/XR/Settings.meta +++ b/Assets/XR/Settings.meta @@ -1,3 +1,8 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ce8ec123887ed9134155ef2caaa5da519f341b97391cc88582c648b7b5803681 -size 180 +fileFormatVersion: 2 +guid: 2a895aab9226657408957891a19303e3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/XR/Settings/Open XR Package Settings.asset b/Assets/XR/Settings/Open XR Package Settings.asset index be9566bc7d..549943ec4c 100644 --- a/Assets/XR/Settings/Open XR Package Settings.asset +++ b/Assets/XR/Settings/Open XR Package Settings.asset @@ -1,3 +1,513 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb0acc1f18e4648e0703774dba3e5b00a3ed27f7d1bc040a01c615d34c07d3f7 -size 15149 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-9183767700453206409 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9c5b5af5107e35a43818d5411328bfc3, type: 3} + m_Name: DPadInteraction Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: D-Pad Binding + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.dpadinteraction + openxrExtensionStrings: XR_KHR_binding_modification XR_EXT_dpad_binding + company: Unity + priority: 0 + required: 0 + forceThresholdLeft: 0.5 + forceThresholdReleaseLeft: 0.4 + centerRegionLeft: 0.5 + wedgeAngleLeft: 1.5707964 + isStickyLeft: 0 + forceThresholdRight: 0.5 + forceThresholdReleaseRight: 0.4 + centerRegionRight: 0.5 + wedgeAngleRight: 1.5707964 + isStickyRight: 0 + extensionStrings: + - XR_KHR_binding_modification + - XR_EXT_dpad_binding +--- !u!114 &-8762091205766609694 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2a24be4b5ebfe5f4d8ed1de9b25cb7aa, type: 3} + m_Name: HandCommonPosesInteraction Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: + version: + featureIdInternal: + openxrExtensionStrings: + company: + priority: 0 + required: 0 +--- !u!114 &-8496670934490681423 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9c5b5af5107e35a43818d5411328bfc3, type: 3} + m_Name: DPadInteraction Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: + version: + featureIdInternal: + openxrExtensionStrings: + company: + priority: 0 + required: 0 + forceThresholdLeft: 0.5 + forceThresholdReleaseLeft: 0.4 + centerRegionLeft: 0.5 + wedgeAngleLeft: 1.5707964 + isStickyLeft: 0 + forceThresholdRight: 0.5 + forceThresholdReleaseRight: 0.4 + centerRegionRight: 0.5 + wedgeAngleRight: 1.5707964 + isStickyRight: 0 + extensionStrings: + - XR_KHR_binding_modification + - XR_EXT_dpad_binding +--- !u!114 &-7973984030652435389 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: feeef8d85de8db242bdda70cc7ff5acd, type: 3} + m_Name: OculusTouchControllerProfile Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Oculus Touch Controller Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.oculustouch + openxrExtensionStrings: + company: Unity + priority: 0 + required: 0 +--- !u!114 &-6979949788044929919 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f028123e2efe1d443875bc7609b4a98b, type: 3} + m_Name: PalmPoseInteraction Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: + version: + featureIdInternal: + openxrExtensionStrings: + company: + priority: 0 + required: 0 +--- !u!114 &-4823295986947514521 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f928d0d73a35f294fbe357ca17aa3547, type: 3} + m_Name: MicrosoftHandInteraction Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Microsoft Hand Interaction Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.handtracking + openxrExtensionStrings: XR_MSFT_hand_interaction + company: Unity + priority: 0 + required: 0 +--- !u!114 &-3509102339466431376 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2a24be4b5ebfe5f4d8ed1de9b25cb7aa, type: 3} + m_Name: HandCommonPosesInteraction Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Hand Interaction Poses + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.handinteractionposes + openxrExtensionStrings: XR_EXT_hand_interaction + company: Unity + priority: 0 + required: 0 +--- !u!114 &-3033313165767491520 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c4b862ee14fb479fbfe5fffe655d3ed3, type: 3} + m_Name: MetaQuestTouchProControllerProfile Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Meta Quest Touch Pro Controller Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.metaquestpro + openxrExtensionStrings: XR_FB_touch_controller_pro + company: Unity + priority: 0 + required: 0 +--- !u!114 &-768430840992792561 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e5315f812f023cf4ebf26f7e5d2d70f2, type: 3} + m_Name: HPReverbG2ControllerProfile Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: + version: + featureIdInternal: + openxrExtensionStrings: + company: + priority: 0 + required: 0 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9f0ebc320a151d3408ea1e9fce54d40e, type: 3} + m_Name: Open XR Package Settings + m_EditorClassIdentifier: + Keys: 010000000d000000 + Values: + - {fileID: 2489328711382419796} + - {fileID: 9039183329425356766} +--- !u!114 &356982443662187679 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5019471fb2174e5c852ecd4047163007, type: 3} + m_Name: HandInteractionProfile Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Hand Interaction Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.handinteraction + openxrExtensionStrings: XR_EXT_hand_interaction + company: Unity + priority: 0 + required: 0 +--- !u!114 &647264116708350306 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5019471fb2174e5c852ecd4047163007, type: 3} + m_Name: HandInteractionProfile Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: + version: + featureIdInternal: + openxrExtensionStrings: + company: + priority: 0 + required: 0 +--- !u!114 &1053848533076859159 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 274c02963f889a64e90bc2e596e21d13, type: 3} + m_Name: HTCViveControllerProfile Standalone + m_EditorClassIdentifier: + m_enabled: 1 + nameUi: HTC Vive Controller Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.htcvive + openxrExtensionStrings: + company: Unity + priority: 0 + required: 0 +--- !u!114 &1111993605809285735 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e5315f812f023cf4ebf26f7e5d2d70f2, type: 3} + m_Name: HPReverbG2ControllerProfile Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: HP Reverb G2 Controller Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.hpreverb + openxrExtensionStrings: XR_EXT_hp_mixed_reality_controller + company: Unity + priority: 0 + required: 0 +--- !u!114 &2035665097814175999 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 761fdd4502cb7a84e9ec7a2b24f33f37, type: 3} + m_Name: MicrosoftMotionControllerProfile Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Microsoft Motion Controller Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.microsoftmotioncontroller + openxrExtensionStrings: + company: Unity + priority: 0 + required: 0 +--- !u!114 &2350713162985483363 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f028123e2efe1d443875bc7609b4a98b, type: 3} + m_Name: PalmPoseInteraction Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Palm Pose + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.palmpose + openxrExtensionStrings: XR_EXT_palm_pose + company: Unity + priority: 0 + required: 0 +--- !u!114 &2489328711382419796 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b5a1f07dc5afe854f9f12a4194aca3fb, type: 3} + m_Name: Standalone + m_EditorClassIdentifier: + features: + - {fileID: 3659132584355106210} + - {fileID: -9183767700453206409} + - {fileID: 8813224991119622085} + - {fileID: -3509102339466431376} + - {fileID: 356982443662187679} + - {fileID: 1111993605809285735} + - {fileID: 1053848533076859159} + - {fileID: 2722789916443922232} + - {fileID: -3033313165767491520} + - {fileID: -4823295986947514521} + - {fileID: 2035665097814175999} + - {fileID: 5863123478492171226} + - {fileID: -7973984030652435389} + - {fileID: 2350713162985483363} + - {fileID: 8139941772144781997} + - {fileID: 7242976004462796141} + m_renderMode: 0 + m_depthSubmissionMode: 0 +--- !u!114 &2722789916443922232 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0f6bfdbcb316ed242b30a8798c9eb853, type: 3} + m_Name: KHRSimpleControllerProfile Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Khronos Simple Controller Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.khrsimpleprofile + openxrExtensionStrings: + company: Unity + priority: 0 + required: 0 +--- !u!114 &3659132584355106210 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 486b5e28864f9a94b979b9620ce5006d, type: 3} + m_Name: ConformanceAutomationFeature Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Conformance Automation + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.conformance + openxrExtensionStrings: XR_EXT_conformance_automation + company: Unity + priority: 0 + required: 0 +--- !u!114 &5863123478492171226 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7de993716e042c6499d0c18eed3a773c, type: 3} + m_Name: MockRuntime Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Mock Runtime + version: 0.0.2 + featureIdInternal: com.unity.openxr.feature.mockruntime + openxrExtensionStrings: XR_UNITY_null_gfx XR_UNITY_android_present + company: Unity + priority: 0 + required: 0 + ignoreValidationErrors: 0 +--- !u!114 &7242976004462796141 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0d6ccd3d0ef0f1d458e69421dccbdae1, type: 3} + m_Name: ValveIndexControllerProfile Standalone + m_EditorClassIdentifier: + m_enabled: 1 + nameUi: Valve Index Controller Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.valveindex + openxrExtensionStrings: + company: Unity + priority: 0 + required: 0 +--- !u!114 &8139941772144781997 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 056125dd64c0ed540b40a4af74f7b495, type: 3} + m_Name: RuntimeDebuggerOpenXRFeature Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Runtime Debugger + version: 1 + featureIdInternal: com.unity.openxr.features.runtimedebugger + openxrExtensionStrings: + company: Unity + priority: 0 + required: 0 + cacheSize: 1048576 + perThreadCacheSize: 51200 +--- !u!114 &8813224991119622085 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b3cf79659a011bd419c7a2a30eb74e9a, type: 3} + m_Name: EyeGazeInteraction Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Eye Gaze Interaction Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.eyetracking + openxrExtensionStrings: XR_EXT_eye_gaze_interaction + company: Unity + priority: 0 + required: 0 +--- !u!114 &9039183329425356766 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b5a1f07dc5afe854f9f12a4194aca3fb, type: 3} + m_Name: WebGL + m_EditorClassIdentifier: + features: [] + m_renderMode: 1 + m_depthSubmissionMode: 0 diff --git a/Assets/XR/Settings/Open XR Package Settings.asset.meta b/Assets/XR/Settings/Open XR Package Settings.asset.meta index 5688e805f1..dd6567c1f6 100644 --- a/Assets/XR/Settings/Open XR Package Settings.asset.meta +++ b/Assets/XR/Settings/Open XR Package Settings.asset.meta @@ -1,3 +1,8 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7ae5f6b30a5bd3e901f662575e65f3a93ac3c103932dd24987917c7c2cb796ec -size 197 +fileFormatVersion: 2 +guid: 1fc620f3d43365f47a0ae74f688e5a96 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/XR/Settings/OpenXR Editor Settings.asset b/Assets/XR/Settings/OpenXR Editor Settings.asset index 29e3b81887..1cb89fc3b2 100644 --- a/Assets/XR/Settings/OpenXR Editor Settings.asset +++ b/Assets/XR/Settings/OpenXR Editor Settings.asset @@ -1,3 +1,16 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb8817bd819c78f6cf913a769d809edb6ebfc7ab96b1048d5062c2243f81db27 -size 433 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 975057b4fdcfb8142b3080d19a5cc712, type: 3} + m_Name: OpenXR Editor Settings + m_EditorClassIdentifier: + Keys: + Values: [] diff --git a/Assets/XR/Settings/OpenXR Editor Settings.asset.meta b/Assets/XR/Settings/OpenXR Editor Settings.asset.meta index 5ccf027362..9213746c49 100644 --- a/Assets/XR/Settings/OpenXR Editor Settings.asset.meta +++ b/Assets/XR/Settings/OpenXR Editor Settings.asset.meta @@ -1,3 +1,8 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:250efb121d53145272e48e8a672993316e2e87e4926296678d5a156fe9437015 -size 197 +fileFormatVersion: 2 +guid: fdcfb59fa0bd1724db44da74f82daa64 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/XR/Settings/Windows MR Package Settings.asset b/Assets/XR/Settings/Windows MR Package Settings.asset index c45424c3d8..a3e4fd498d 100644 --- a/Assets/XR/Settings/Windows MR Package Settings.asset +++ b/Assets/XR/Settings/Windows MR Package Settings.asset @@ -1,3 +1,77 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0b898a5cff7370622ecb11a8a0480416284037c16fd39ca9817041da5b4c982 -size 2331 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-6612067091399612250 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ed912223f7b3af74d8e196b2a4e662b3, type: 3} + m_Name: + m_EditorClassIdentifier: + DepthBufferFormat: 0 + UseSharedDepthBuffer: 0 +--- !u!114 &-2503038267737012570 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a6c5bd16b42a1542ad52d1d47746bdb, type: 3} + m_Name: + m_EditorClassIdentifier: + UsePrimaryWindowForDisplay: 1 + HolographicRemoting: 0 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e679265d16d650945812b915bb9d5cc3, type: 3} + m_Name: Windows MR Package Settings + m_EditorClassIdentifier: + Keys: 0e00000001000000 + Values: + - {fileID: -6612067091399612250} + - {fileID: 7436819492031564128} + BuildValues: + - {fileID: 5632756285096333741} + - {fileID: -2503038267737012570} +--- !u!114 &5632756285096333741 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a6c5bd16b42a1542ad52d1d47746bdb, type: 3} + m_Name: + m_EditorClassIdentifier: + UsePrimaryWindowForDisplay: 1 + HolographicRemoting: 0 +--- !u!114 &7436819492031564128 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ed912223f7b3af74d8e196b2a4e662b3, type: 3} + m_Name: + m_EditorClassIdentifier: + DepthBufferFormat: 0 + UseSharedDepthBuffer: 0 diff --git a/Assets/XR/Settings/Windows MR Package Settings.asset.meta b/Assets/XR/Settings/Windows MR Package Settings.asset.meta index df8c4cf14c..2be0b66864 100644 --- a/Assets/XR/Settings/Windows MR Package Settings.asset.meta +++ b/Assets/XR/Settings/Windows MR Package Settings.asset.meta @@ -1,3 +1,8 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b4744a8ac48f579446ec97016ff8e8cfd1684b5b8342f96756fec33a4247154b -size 197 +fileFormatVersion: 2 +guid: 6c0adfe4412ec65478203550e4aa7823 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/XR/XRGeneralSettings.asset b/Assets/XR/XRGeneralSettings.asset index a1a68264ad..7c6a2978b4 100644 --- a/Assets/XR/XRGeneralSettings.asset +++ b/Assets/XR/XRGeneralSettings.asset @@ -1,3 +1,78 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e2e7cbbb19f108b8e8d0ab8732fd43f4e768d8f6982ff385c752a5ba3f03ff5 -size 2371 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8326158091748783630 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4c3631f5e58749a59194e0cf6baf6d5, type: 3} + m_Name: Metro Providers + m_EditorClassIdentifier: + m_RequiresSettingsUpdate: 0 + m_AutomaticLoading: 0 + m_AutomaticRunning: 0 + m_Loaders: [] +--- !u!114 &-1029604212742653233 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d236b7d11115f2143951f1e14045df39, type: 3} + m_Name: Metro Settings + m_EditorClassIdentifier: + m_LoaderManagerInstance: {fileID: -8326158091748783630} + m_InitManagerOnStart: 1 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2dc886499c26824283350fa532d087d, type: 3} + m_Name: XRGeneralSettings + m_EditorClassIdentifier: + Keys: 010000000e000000 + Values: + - {fileID: 3133245131686726631} + - {fileID: -1029604212742653233} +--- !u!114 &3133245131686726631 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d236b7d11115f2143951f1e14045df39, type: 3} + m_Name: Standalone Settings + m_EditorClassIdentifier: + m_LoaderManagerInstance: {fileID: 8023386155123856428} + m_InitManagerOnStart: 0 +--- !u!114 &8023386155123856428 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4c3631f5e58749a59194e0cf6baf6d5, type: 3} + m_Name: Standalone Providers + m_EditorClassIdentifier: + m_RequiresSettingsUpdate: 0 + m_AutomaticLoading: 0 + m_AutomaticRunning: 0 + m_Loaders: [] diff --git a/Assets/XR/XRGeneralSettings.asset.meta b/Assets/XR/XRGeneralSettings.asset.meta index 32b97c2973..956482e9a9 100644 --- a/Assets/XR/XRGeneralSettings.asset.meta +++ b/Assets/XR/XRGeneralSettings.asset.meta @@ -1,3 +1,8 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:42fe1bea34ca0b291e7e2f4ae289e0459a82aeceaef9e1004b41e6377185b353 -size 197 +fileFormatVersion: 2 +guid: ab503467b672b944faf19db21f3c55cc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: From 4cbd80b17ccc0a86e1ab4293cf9a4711b1ed86b2 Mon Sep 17 00:00:00 2001 From: Falko Galperin Date: Tue, 15 Aug 2023 22:29:37 +0200 Subject: [PATCH 2/5] Fix minor formatting and code style issues in check_for_bad_patterns.py --- GitScripts/check_for_bad_patterns.py | 64 +++++++++++++++++----------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/GitScripts/check_for_bad_patterns.py b/GitScripts/check_for_bad_patterns.py index 7636bf5d86..83e476ea11 100755 --- a/GitScripts/check_for_bad_patterns.py +++ b/GitScripts/check_for_bad_patterns.py @@ -39,13 +39,13 @@ class BadPattern: """ def __init__( - self, - regex, - message, - extensions=DEFAULT_EXTENSIONS, - suggestion=None, - level=Level.INFO, - see_only=True, + self, + regex, + message, + extensions=DEFAULT_EXTENSIONS, + suggestion=None, + level=Level.INFO, + see_only=True, ): """ Takes a compiled regular expression `regex` that is checked against @@ -67,7 +67,7 @@ def __init__( self.level = level self.see_only = see_only - def applies_to(self, filename: str, line: str = '') -> bool: + def applies_to(self, filename: str, line: str = "") -> bool: """ Returns whether the given pattern applies to the given filename. A pattern applies to a filename if: @@ -76,10 +76,15 @@ def applies_to(self, filename: str, line: str = '') -> bool: * The line matches the regular expression `regex`. """ extension = filename.rsplit(".", 1)[1] if "." in filename else "" - return (not self.see_only or filename.startswith("Assets/SEE/")) \ - and extension in self.extensions and self.regex.match(line) - - def to_json(self, filename: str, line_number: int, suggestion: Optional[str]) -> Dict[str, Union[str, int]]: + return ( + (not self.see_only or filename.startswith("Assets/SEE/")) + and extension in self.extensions + and self.regex.match(line) is not None + ) + + def to_json( + self, filename: str, line_number: int, suggestion: Optional[str] + ) -> Dict[str, Union[str, int]]: """ Turns this bad pattern match into a dictionary representing a GitHub comment. """ @@ -87,7 +92,8 @@ def to_json(self, filename: str, line_number: int, suggestion: Optional[str]) -> if suggestion is not None: body_text += f"\n\n```suggestion\n{suggestion}\n```" if self.regex is not None: - body_text += f"\n> This bad pattern was detected by the following regular expression:\n> ```regex\n> {self.regex.pattern}\n> ```" + body_text += "\n> This bad pattern was detected by the following regular expression:\n" + " > ```regex\n> {self.regex.pattern}\n> ```" return { "path": filename, "line": line_number, @@ -113,27 +119,29 @@ def to_json(self, filename: str, line_number: int, suggestion: Optional[str]) -> level=Level.ERROR, ), BadPattern( - re.compile(r"(^\s*ActionManifestFileRelativeFilePath: StreamingAssets)/SteamVR/actions\.json(\s*)$"), + re.compile( + r"(^\s*ActionManifestFileRelativeFilePath: StreamingAssets)/SteamVR/actions\.json(\s*)$" + ), """Slashes were unnecessarily changed to forward slashes. This happens on Linux systems automatically, but Windows systems will change this back. We should just leave it as a backslash.""", suggestion=r"\1\SteamVR\actions.json\2", extensions=["asset"], level=Level.WARN, - see_only=False + see_only=False, ), BadPattern( re.compile(r"^\s*(\s|Object\.)Destroy\(.*$"), "Make sure to use `Destroyer.Destroy` (`Destroyer` class is in `SEE.Utils`) instead of `Object.Destroy`!", - level=Level.WARN + level=Level.WARN, ), BadPattern( # For trailing whitespace re.compile(r"^(.*\S)?\s+$"), "Trailing whitespace detected! Please remove it.", level=Level.WARN, - suggestion=r"\1" - ) + suggestion=r"\1", + ), ] @@ -174,8 +182,13 @@ def handle_missing_newline(filename: str, linenumber: int, last_line: Optional[s :param last_line: The last line in the file. """ if NO_NEWLINE_BAD_PATTERN.applies_to(filename): - collected_matches.append(NO_NEWLINE_BAD_PATTERN.to_json(filename, linenumber, - f"{last_line[1:] if last_line is not None else ''}\n")) + collected_matches.append( + NO_NEWLINE_BAD_PATTERN.to_json( + filename, + linenumber, + f"{last_line[1:] if last_line is not None else ''}\n", + ) + ) def main(): @@ -187,14 +200,14 @@ def main(): skip_file = False hunk_indicator = re.compile(r"^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@.*$") missing_newline_at_eof = False - while line := diff.readline().rstrip('\n\r'): + while line := diff.readline().rstrip("\n\r"): if line.startswith("+++"): # New file here. if missing_newline_at_eof: handle_missing_newline(filename, diff_line - 1, last_line) missing_newline_at_eof = False filename = line.split("/", 1)[1] - skip_file = filename == 'dev/null' + skip_file = filename == "dev/null" elif skip_file: continue elif line.startswith("@@"): @@ -209,7 +222,8 @@ def main(): warn(f"Invalid unified diff hunk in {filename}: {line}") # Nonetheless, this is not a fatal error, so we can continue. continue - diff_line = int(m.group(1)) # Next line is starting line indicated by this line range + # Next line is starting line indicated by this line range + diff_line = int(m.group(1)) elif line.startswith("+"): # This is an actual added line within the hunk denoted by start_line. assert filename is not None @@ -232,7 +246,9 @@ def main(): missing_newline_at_eof = True elif line != "" and line[0] not in ("-", "d", "i", "n", "o", "r", "B"): # We ignore empty lines, removed lines, and diff metadata lines (starting with "diff" or "index" etc). - warn(f'Unrecognized unified diff line indicator for line "{line}", skipping.') + warn( + f'Unrecognized unified diff line indicator for line "{line}", skipping.' + ) if missing_newline_at_eof: handle_missing_newline(filename, diff_line, last_line) From 42a719244c88ac8aa7af4770fc19ee9272282d1e Mon Sep 17 00:00:00 2001 From: Falko Galperin Date: Tue, 15 Aug 2023 22:51:43 +0200 Subject: [PATCH 3/5] Check if bad pattern applies to filename via regex Previously, we only used file extensions to check whether a given bad pattern applies. --- GitScripts/check_for_bad_patterns.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/GitScripts/check_for_bad_patterns.py b/GitScripts/check_for_bad_patterns.py index 83e476ea11..a84d552e3a 100755 --- a/GitScripts/check_for_bad_patterns.py +++ b/GitScripts/check_for_bad_patterns.py @@ -26,8 +26,8 @@ class Level(str, Enum): ERROR = ":x:" -# Extensions that a pattern will be applied to by default. -DEFAULT_EXTENSIONS = ("cs",) +# Filenames that a pattern will be applied to by default. +DEFAULT_FILENAMES = (r".*\.cs$",) # List of matches to be printed as a JSON array at the end of the script. collected_matches: List[Dict[str, Union[str, int]]] = [] @@ -42,15 +42,15 @@ def __init__( self, regex, message, - extensions=DEFAULT_EXTENSIONS, + filenames=DEFAULT_FILENAMES, suggestion=None, level=Level.INFO, see_only=True, ): """ Takes a compiled regular expression `regex` that is checked against - every line within changed files having an extension contained in - `extensions`, a `message` that shall be displayed to the user in case + every line within changed files having a filename matched by a regex contained in + `filenames`, a `message` that shall be displayed to the user in case a match has been found, a regex substitution `suggestion` for a found bad pattern, and a severity `level`. If `see_only` is set to `True`, the pattern will only be applied to @@ -62,7 +62,7 @@ def __init__( regex = re.compile(r".*") self.regex = regex self.message = message - self.extensions = extensions + self.filenames = [re.compile(x) for x in filenames] self.suggestion = suggestion self.level = level self.see_only = see_only @@ -71,14 +71,13 @@ def applies_to(self, filename: str, line: str = "") -> bool: """ Returns whether the given pattern applies to the given filename. A pattern applies to a filename if: - * The filename has an extension contained in `extensions`. + * The filename matches one of the regexes in `filenames`. * The filename starts with `Assets/SEE/` if `see_only` is set to `True`. * The line matches the regular expression `regex`. """ - extension = filename.rsplit(".", 1)[1] if "." in filename else "" return ( (not self.see_only or filename.startswith("Assets/SEE/")) - and extension in self.extensions + and any(x.match(filename) is not None for x in self.filenames) and self.regex.match(line) is not None ) @@ -126,7 +125,7 @@ def to_json( This happens on Linux systems automatically, but Windows systems will change this back. We should just leave it as a backslash.""", suggestion=r"\1\SteamVR\actions.json\2", - extensions=["asset"], + filenames=[r".*\.asset$"], level=Level.WARN, see_only=False, ), From 6d77a4b91fed4a5f61d021f07f5721e4333abc59 Mon Sep 17 00:00:00 2001 From: Falko Galperin Date: Tue, 15 Aug 2023 23:53:36 +0200 Subject: [PATCH 4/5] Warn via GitHub Actions if OpenXR is enabled --- GitScripts/check_for_bad_patterns.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GitScripts/check_for_bad_patterns.py b/GitScripts/check_for_bad_patterns.py index a84d552e3a..1058893cbd 100755 --- a/GitScripts/check_for_bad_patterns.py +++ b/GitScripts/check_for_bad_patterns.py @@ -141,6 +141,13 @@ def to_json( level=Level.WARN, suggestion=r"\1", ), + BadPattern( + re.compile(r"^\s*m_Loaders:(?! \[\])"), + "You must not enable OpenXR on any PR that is planned to be merged, otherwise Linux builds will break!", + filenames=[r".*\.asset$"], + level=Level.ERROR, + see_only=False, + ), ] From 58e866c196dc20b63f08c3fbc0353111b08e69f7 Mon Sep 17 00:00:00 2001 From: Falko Galperin Date: Wed, 16 Aug 2023 01:13:46 +0200 Subject: [PATCH 5/5] Mark Assets/XR as non-LFS target in GitScripts --- GitScripts/check_for_lfs_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GitScripts/check_for_lfs_files.sh b/GitScripts/check_for_lfs_files.sh index 1bbf51dbc2..79162748eb 100755 --- a/GitScripts/check_for_lfs_files.sh +++ b/GitScripts/check_for_lfs_files.sh @@ -28,7 +28,7 @@ if [ -n "$CI" ]; then # Check for non-SEE Assets. shopt -s extglob - CHANGED_ASSETS=$(git diff --name-only --diff-filter=AM origin/master -- Assets/!(Editor|Native|StreamingAssets|Resources|Scenes|SEE*)/ | git check-attr --stdin filter | grep -v "filter: lfs" || exit 0) + CHANGED_ASSETS=$(git diff --name-only --diff-filter=AM origin/master -- Assets/!(Editor|Native|StreamingAssets|Resources|Scenes|SEE*|XR)/ | git check-attr --stdin filter | grep -v "filter: lfs" || exit 0) shopt -u extglob if [ -n "$CHANGED_ASSETS" ]; then echo ""