Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions org.mixedrealitytoolkit.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

* Updated the minimum editor version to 6000.0.66f2 [PR #1112](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1112)
* Updated code style in `HandsSubsystemDescriptor`, `MRTKSubsystemDescriptor`, `DictationSubsystemDescriptor`, and `XRSubsystemHelpers`. [PR #1109](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1109)
* Updated `ReserializeUtility` to remove unused prefab overrides. [PR #1126](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/1126)

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,32 @@ public static void ReserializeSelection()
{
Object[] selectedAssets = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets);

// Transform asset object to asset paths.
// Transform asset object to asset paths and GameObjects.
List<string> assetsPath = new List<string>();
List<GameObject> assetsGameObjects = new List<GameObject>();
foreach (Object asset in selectedAssets)
{
assetsPath.Add(AssetDatabase.GetAssetPath(asset));
if (asset is GameObject rootGo)
{
Transform[] children = rootGo.GetComponentsInChildren<Transform>(true);
foreach (Transform child in children)
{
if (PrefabUtility.IsAnyPrefabInstanceRoot(child.gameObject))
{
assetsGameObjects.Add(child.gameObject);
}
}
}
}

string[] array = assetsPath.ToArray();
AssetDatabase.ForceReserializeAssets(array);
Debug.Log($"Reserialized {array.Length} assets.");
if (assetsGameObjects.Count > 0)
{
PrefabUtility.RemoveUnusedOverrides(assetsGameObjects.ToArray(), InteractionMode.UserAction);
}
Debug.Log($"Reserialized {array.Length} assets. ({assetsGameObjects.Count} prefab instances had unused overrides removed)");
}

private static string[] GetAssets(string filter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1494106019810454970, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
Expand Down Expand Up @@ -43,10 +44,6 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8829903862454882072, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8829903862454882072, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
propertyPath: m_LocalPosition.x
value: 0
Expand Down Expand Up @@ -103,6 +100,8 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.x
value: 0.00954
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 2981563222846597991, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1969163422732972035, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
Expand All @@ -31,10 +32,6 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8829903862454882072, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8829903862454882072, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
propertyPath: m_LocalPosition.x
value: 0
Expand Down Expand Up @@ -92,4 +89,7 @@ PrefabInstance:
value: -0.00928
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4912994083753280318}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.048, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
Expand All @@ -31,7 +32,6 @@ Transform:
- {fileID: 411343838116714667}
- {fileID: 4907459964619627130}
m_Father: {fileID: 4407735199717223959}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &5313832380967302489
GameObject:
Expand Down Expand Up @@ -59,13 +59,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5313832380967302489}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.02, y: 0.02, z: 0.02}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1268481309119342633}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &3084448489427758450
MeshFilter:
Expand All @@ -92,6 +92,9 @@ MeshRenderer:
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
Expand Down Expand Up @@ -125,9 +128,17 @@ MeshCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5313832380967302489}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 0
serializedVersion: 4
serializedVersion: 5
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
Expand Down Expand Up @@ -157,13 +168,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8012239837945830335}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.0076, y: -0.007, z: 0}
m_LocalScale: {x: 0.006177776, y: 0.006177776, z: 0.006177776}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1268481309119342633}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &2468094668517419922
MeshFilter:
Expand All @@ -190,6 +201,9 @@ MeshRenderer:
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
Expand Down Expand Up @@ -223,9 +237,17 @@ MeshCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8012239837945830335}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 0
serializedVersion: 4
serializedVersion: 5
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
Expand All @@ -234,6 +256,7 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 564332035890725350, guid: 8ace9c04082e8ce4ea440f9bef681ce3, type: 3}
Expand All @@ -244,10 +267,6 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6366612888026126601, guid: 8ace9c04082e8ce4ea440f9bef681ce3, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6366612888026126601, guid: 8ace9c04082e8ce4ea440f9bef681ce3, type: 3}
propertyPath: m_LocalPosition.x
value: 0
Expand Down Expand Up @@ -297,6 +316,12 @@ PrefabInstance:
value: PressableButton_128x32mm_PersonAndText
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 9173695956475796094, guid: 8ace9c04082e8ce4ea440f9bef681ce3, type: 3}
insertIndex: -1
addedObject: {fileID: 1268481309119342633}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8ace9c04082e8ce4ea440f9bef681ce3, type: 3}
--- !u!4 &4407735199717223959 stripped
Transform:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6804149258562065805}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
Expand All @@ -55,6 +54,9 @@ MeshRenderer:
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
Expand Down Expand Up @@ -138,20 +140,23 @@ MonoBehaviour:
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_ActiveFontFeatures: 00000000
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 0
m_isCullingEnabled: 0
Expand All @@ -177,12 +182,9 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8829903862454882072, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8829903862454882072, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
propertyPath: m_LocalPosition.x
value: 0
Expand Down Expand Up @@ -232,6 +234,12 @@ PrefabInstance:
value: 0.0024
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 6746213747597823087, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
insertIndex: -1
addedObject: {fileID: 162236023003044723}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 72dfeb9ecf5ad884b87eff8bc5b49276, type: 3}
--- !u!4 &6804149258562065805 stripped
Transform:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 162236023003044723, guid: 763be22d1f08e6741a7101dacd726814, type: 3}
Expand All @@ -27,10 +28,6 @@ PrefabInstance:
propertyPath: m_Name
value: PressableButton_128x32mm_SubtitleWithSinglelineText
objectReference: {fileID: 0}
- target: {fileID: 8752872172617307898, guid: 763be22d1f08e6741a7101dacd726814, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8752872172617307898, guid: 763be22d1f08e6741a7101dacd726814, type: 3}
propertyPath: m_LocalPosition.x
value: 0
Expand Down Expand Up @@ -72,4 +69,7 @@ PrefabInstance:
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 763be22d1f08e6741a7101dacd726814, type: 3}
Loading