Skip to content

Commit

Permalink
Fix layout problem when after migrate to TMPro
Browse files Browse the repository at this point in the history
  • Loading branch information
JLChnToZ committed Apr 21, 2024
1 parent 7771243 commit f59dfb1
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void OnProcessScene(Scene scene, BuildReport report) {
continue;
}
using (var so = new SerializedObject(component)) {
var sp = so.FindProperty("m_Text");
var sp = so.FindProperty("m_Text") ?? so.FindProperty("m_text");
if (sp == null) {
Debug.LogWarning($"[VersionDisplay] {versionDisplay.name} does not have a Text component.", versionDisplay);
continue;
Expand Down
34 changes: 27 additions & 7 deletions Packages/idv.jlchntoz.vvmw/Prefabs/I18N/Language Select.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4387744014332955188}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
Expand Down Expand Up @@ -61,6 +61,7 @@ MonoBehaviour:
m_Material: {fileID: 2100000, guid: 605b81398af74b8439a437f68a18a85b, type: 2}
m_Color: {r: 0.0073931217, g: 1, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
Expand Down Expand Up @@ -106,6 +107,7 @@ GameObject:
- component: {fileID: 6694870477497008394}
- component: {fileID: 4607344542332445947}
- component: {fileID: 7134733308030709407}
- component: {fileID: 6637717700851425172}
m_Layer: 0
m_Name: Text
m_TagString: Untagged
Expand All @@ -123,9 +125,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4387744014332955188}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
Expand Down Expand Up @@ -155,24 +157,37 @@ MonoBehaviour:
m_Material: {fileID: 2100000, guid: 605b81398af74b8439a437f68a18a85b, type: 2}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontSize: 22
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: L
--- !u!114 &6637717700851425172
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1012685161481440213}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f6cb7c958edcdc44bc1400622b6cdc7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1267599178809177795
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -203,10 +218,10 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4387744014332955188}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
Expand Down Expand Up @@ -238,6 +253,7 @@ MonoBehaviour:
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &1064459511987831827
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -332,11 +348,11 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 9074914063025034404}
- {fileID: 6694870477497008394}
m_Father: {fileID: 668332538078502311}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
Expand Down Expand Up @@ -366,6 +382,7 @@ MonoBehaviour:
m_Material: {fileID: 2100000, guid: 605b81398af74b8439a437f68a18a85b, type: 2}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
Expand Down Expand Up @@ -394,6 +411,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
Expand Down Expand Up @@ -427,6 +445,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 66509239551014556}
m_TargetAssemblyTypeName: VRC.Udon.UdonBehaviour, VRC.Udon
m_MethodName: SendCustomEvent
m_Mode: 5
m_Arguments:
Expand Down Expand Up @@ -483,3 +502,4 @@ MonoBehaviour:
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
44 changes: 42 additions & 2 deletions Packages/idv.jlchntoz.vvmw/Prefabs/Screen With Overlay.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1993,6 +1993,7 @@ GameObject:
- component: {fileID: 7990677866980655225}
- component: {fileID: 3076768596473184359}
- component: {fileID: 5897058056484269590}
- component: {fileID: 395213938022429537}
m_Layer: 0
m_Name: Delay Text
m_TagString: Untagged
Expand Down Expand Up @@ -2105,7 +2106,8 @@ MonoBehaviour:
AllowCollisionOwnershipTransfer: 0
Reliable: 0
_syncMethod: 0
serializedProgramAsset: {fileID: 0}
serializedProgramAsset: {fileID: 11400000, guid: 375b03ecc69b6e54391225abc067cfe7,
type: 2}
programSource: {fileID: 11400000, guid: afa47a47857e18146a6d82c9ea50c6b0, type: 2}
serializedPublicVariablesBytesString: Ai8AAAAAATIAAABWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgAuAFUAZABvAG4AVgBhAHIAaQBhAGIAbABlAFQAYQBiAGwAZQAsACAAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4AAAAAAAYBAAAAAAAAACcBBAAAAHQAeQBwAGUAAWgAAABTAHkAcwB0AGUAbQAuAEMAbwBsAGwAZQBjAHQAaQBvAG4AcwAuAEcAZQBuAGUAcgBpAGMALgBMAGkAcwB0AGAAMQBbAFsAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4ALgBJAG4AdABlAHIAZgBhAGMAZQBzAC4ASQBVAGQAbwBuAFYAYQByAGkAYQBiAGwAZQAsACAAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4AXQBdACwAIABtAHMAYwBvAHIAbABpAGIAAQEJAAAAVgBhAHIAaQBhAGIAbABlAHMALwEAAAABaAAAAFMAeQBzAHQAZQBtAC4AQwBvAGwAbABlAGMAdABpAG8AbgBzAC4ARwBlAG4AZQByAGkAYwAuAEwAaQBzAHQAYAAxAFsAWwBWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgAuAEkAbgB0AGUAcgBmAGEAYwBlAHMALgBJAFUAZABvAG4AVgBhAHIAaQBhAGIAbABlACwAIABWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgBdAF0ALAAgAG0AcwBjAG8AcgBsAGkAYgABAAAABgEAAAAAAAAAAi8CAAAAAUkAAABWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgAuAFUAZABvAG4AVgBhAHIAaQBhAGIAbABlAGAAMQBbAFsAUwB5AHMAdABlAG0ALgBJAG4AdAAzADIALAAgAG0AcwBjAG8AcgBsAGkAYgBdAF0ALAAgAFYAUgBDAC4AVQBkAG8AbgAuAEMAbwBtAG0AbwBuAAIAAAAGAgAAAAAAAAAnAQQAAAB0AHkAcABlAAEXAAAAUwB5AHMAdABlAG0ALgBTAHQAcgBpAG4AZwAsACAAbQBzAGMAbwByAGwAaQBiACcBCgAAAFMAeQBtAGIAbwBsAE4AYQBtAGUAAR8AAABfAF8AXwBVAGQAbwBuAFMAaABhAHIAcABCAGUAaABhAHYAaQBvAHUAcgBWAGUAcgBzAGkAbwBuAF8AXwBfACcBBAAAAHQAeQBwAGUAARYAAABTAHkAcwB0AGUAbQAuAEkAbgB0ADMAMgAsACAAbQBzAGMAbwByAGwAaQBiABcBBQAAAFYAYQBsAHUAZQACAAAABwUHBQcF
publicVariablesUnityEngineObjects: []
Expand All @@ -2123,6 +2125,18 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
colorIndex: 1
--- !u!114 &395213938022429537
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3609706133764127266}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f6cb7c958edcdc44bc1400622b6cdc7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &3957198161855924167
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -5584,7 +5598,9 @@ MonoBehaviour:
cancelButton: {fileID: 8533432941130906217}
urlInputConfirmButton: {fileID: 2522005100658211503}
selectdPlayerText: {fileID: 1871437365707141800}
selectdPlayerTMPro: {fileID: 0}
queueModeText: {fileID: 4274047030299547134}
queueModeTMPro: {fileID: 0}
otherObjectUnderUrlInput: {fileID: 1832616573580324778}
playbackControlsAnimator: {fileID: 8193631149065468083}
playButton: {fileID: 7796722855169674898}
Expand All @@ -5594,6 +5610,7 @@ MonoBehaviour:
globalReloadButton: {fileID: 0}
playNextButton: {fileID: 6113559061238110570}
enqueueCountText: {fileID: 7243952161894959004}
enqueueCountTMPro: {fileID: 0}
repeatOffButton: {fileID: 9039282186901071159}
repeatOneButton: {fileID: 2709535250364749467}
repeatAllButton: {fileID: 4675328042641458222}
Expand All @@ -5604,6 +5621,9 @@ MonoBehaviour:
statusText: {fileID: 4081750117402772080}
timeText: {fileID: 1831172172697254301}
durationText: {fileID: 5749459164001069690}
statusTMPro: {fileID: 0}
timeTMPro: {fileID: 0}
durationTMPro: {fileID: 0}
timeContainer: {fileID: 0}
volumeSlider: {fileID: 8001222877319417337}
muteButton: {fileID: 2813640105949131958}
Expand All @@ -5615,13 +5635,15 @@ MonoBehaviour:
queueListScrollView: {fileID: 4136825756390268076}
playNextIndicator: {fileID: 0}
selectedPlayListText: {fileID: 573662285814026412}
selectedPlayListTMPro: {fileID: 0}
currentPlayListButton: {fileID: 5065227983473882738}
shiftBack100msButton: {fileID: 2688631826079340242}
shiftBack50msButton: {fileID: 5644903411782385773}
shiftForward50msButton: {fileID: 1844821558039814214}
shiftForward100msButton: {fileID: 5215060939886370506}
shiftResetButton: {fileID: 1953999595961846628}
shiftOffsetText: {fileID: 3235232710273548969}
shiftOffsetTMPro: {fileID: 0}
--- !u!114 &7315061199001338449
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -7027,6 +7049,7 @@ GameObject:
- component: {fileID: 8121825609860789895}
- component: {fileID: 365253990612465607}
- component: {fileID: 3221767355448356205}
- component: {fileID: 5648597407577321542}
m_Layer: 0
m_Name: Next On
m_TagString: Untagged
Expand Down Expand Up @@ -7216,6 +7239,18 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
colorIndex: 0
--- !u!114 &5648597407577321542
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9187551818807828401}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f6cb7c958edcdc44bc1400622b6cdc7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &972765696443435798
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -8281,6 +8316,11 @@ PrefabInstance:
propertyPath: m_Name
value: Language Select
objectReference: {fileID: 0}
- target: {fileID: 1982525966636977268, guid: 13c9f233915c23d4db49ce0029cc0660,
type: 3}
propertyPath: m_PreferredHeight
value: 32
objectReference: {fileID: 0}
- target: {fileID: 4387744014332955188, guid: 13c9f233915c23d4db49ce0029cc0660,
type: 3}
propertyPath: m_AnchorMax.y
Expand Down Expand Up @@ -8410,7 +8450,7 @@ PrefabInstance:
- target: {fileID: 7134733308030709407, guid: 13c9f233915c23d4db49ce0029cc0660,
type: 3}
propertyPath: m_FontData.m_FontSize
value: 24
value: 22
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
Expand Down
24 changes: 21 additions & 3 deletions Packages/idv.jlchntoz.vvmw/Prefabs/UI Elements/Advanced UI.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 1, y: 0.1}
m_AnchoredPosition: {x: 1, y: 0.1000061}
m_SizeDelta: {x: 533.3334, y: 253.33334}
m_Pivot: {x: 0.5, y: 0}
--- !u!223 &1053562278243965998
Expand Down Expand Up @@ -248,7 +248,7 @@ MonoBehaviour:
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 4
m_PresetInfoIsWorld: 1
m_PresetInfoIsWorld: 0
--- !u!114 &1053562278243965984
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2078,6 +2078,7 @@ GameObject:
- component: {fileID: 939229292259332291}
- component: {fileID: 9075793975876140080}
- component: {fileID: 5174766126069487125}
- component: {fileID: 3478665337181529603}
m_Layer: 0
m_Name: Delay Text
m_TagString: Untagged
Expand Down Expand Up @@ -2229,6 +2230,18 @@ MonoBehaviour:
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &3478665337181529603
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7728332040497729829}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f6cb7c958edcdc44bc1400622b6cdc7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &9175429817013599242
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2483,6 +2496,11 @@ PrefabInstance:
propertyPath: m_Name
value: Language Select
objectReference: {fileID: 0}
- target: {fileID: 1982525966636977268, guid: 13c9f233915c23d4db49ce0029cc0660,
type: 3}
propertyPath: m_PreferredHeight
value: 33
objectReference: {fileID: 0}
- target: {fileID: 4387744014332955188, guid: 13c9f233915c23d4db49ce0029cc0660,
type: 3}
propertyPath: m_AnchorMax.y
Expand Down Expand Up @@ -2612,7 +2630,7 @@ PrefabInstance:
- target: {fileID: 7134733308030709407, guid: 13c9f233915c23d4db49ce0029cc0660,
type: 3}
propertyPath: m_FontData.m_FontSize
value: 24
value: 22
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
Expand Down
13 changes: 13 additions & 0 deletions Packages/idv.jlchntoz.vvmw/Prefabs/UI Elements/Playlist UI.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ GameObject:
- component: {fileID: 7022668242633194139}
- component: {fileID: 6795560884419888128}
- component: {fileID: 6690789187256449026}
- component: {fileID: 4755392899832681933}
m_Layer: 0
m_Name: Next On
m_TagString: Untagged
Expand Down Expand Up @@ -516,6 +517,18 @@ MonoBehaviour:
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &4755392899832681933
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3073442267449032038}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f6cb7c958edcdc44bc1400622b6cdc7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &8569333350998481391
GameObject:
m_ObjectHideFlags: 0
Expand Down
6 changes: 6 additions & 0 deletions Packages/idv.jlchntoz.vvmw/Runtime/Common/TMProMigratable.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using UnityEngine;

namespace JLChnToZ.VRC.VVMW {
[TMProMigratable, EditorOnly, AddComponentMenu("Hidden/TMPro Migratable")]
public class TMProMigratable : MonoBehaviour {}
}
11 changes: 11 additions & 0 deletions Packages/idv.jlchntoz.vvmw/Runtime/Common/TMProMigratable.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f59dfb1

Please sign in to comment.