Skip to content

Commit 6e63972

Browse files
authored
CHANGE: Scale Visualizer Sample UI and font size to make it easier to see on mobile (#2051)
* Changed default font and scaled rect UI by 25% * Add touchbar to gamepad visualiser
1 parent b0478f0 commit 6e63972

9 files changed

+480
-411
lines changed

Assets/Samples/Visualizers/GamepadVis.prefab

+191-111
Large diffs are not rendered by default.

Assets/Samples/Visualizers/GamepadVisualizer.unity

+16-87
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ OcclusionCullingSettings:
1313
--- !u!104 &2
1414
RenderSettings:
1515
m_ObjectHideFlags: 0
16-
serializedVersion: 9
16+
serializedVersion: 10
1717
m_Fog: 0
1818
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
1919
m_FogMode: 3
@@ -38,13 +38,12 @@ RenderSettings:
3838
m_ReflectionIntensity: 1
3939
m_CustomReflection: {fileID: 0}
4040
m_Sun: {fileID: 0}
41-
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
4241
m_UseRadianceAmbientProbe: 0
4342
--- !u!157 &3
4443
LightmapSettings:
4544
m_ObjectHideFlags: 0
46-
serializedVersion: 12
47-
m_GIWorkflowMode: 1
45+
serializedVersion: 13
46+
m_BakeOnSceneLoad: 0
4847
m_GISettings:
4948
serializedVersion: 2
5049
m_BounceScale: 1
@@ -67,9 +66,6 @@ LightmapSettings:
6766
m_LightmapParameters: {fileID: 0}
6867
m_LightmapsBakeMode: 1
6968
m_TextureCompression: 1
70-
m_FinalGather: 0
71-
m_FinalGatherFiltering: 1
72-
m_FinalGatherRayCount: 256
7369
m_ReflectionCompression: 2
7470
m_MixedBakeMode: 2
7571
m_BakeBackend: 1
@@ -207,29 +203,22 @@ Transform:
207203
m_PrefabInstance: {fileID: 0}
208204
m_PrefabAsset: {fileID: 0}
209205
m_GameObject: {fileID: 676010914}
206+
serializedVersion: 2
210207
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
211208
m_LocalPosition: {x: 0, y: 1, z: -10}
212209
m_LocalScale: {x: 1, y: 1, z: 1}
213210
m_ConstrainProportionsScale: 0
214211
m_Children: []
215212
m_Father: {fileID: 0}
216-
m_RootOrder: 0
217213
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
218-
--- !u!4 &989925709 stripped
219-
Transform:
220-
m_CorrespondingSourceObject: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
221-
type: 3}
222-
m_PrefabInstance: {fileID: 5430831075364511436}
223-
m_PrefabAsset: {fileID: 0}
224214
--- !u!850595691 &1162315431
225215
LightingSettings:
226216
m_ObjectHideFlags: 0
227217
m_CorrespondingSourceObject: {fileID: 0}
228218
m_PrefabInstance: {fileID: 0}
229219
m_PrefabAsset: {fileID: 0}
230220
m_Name: Settings.lighting
231-
serializedVersion: 6
232-
m_GIWorkflowMode: 1
221+
serializedVersion: 9
233222
m_EnableBakedLightmaps: 1
234223
m_EnableRealtimeLightmaps: 1
235224
m_RealtimeEnvironmentLighting: 1
@@ -239,6 +228,8 @@ LightingSettings:
239228
m_UsingShadowmask: 1
240229
m_BakeBackend: 1
241230
m_LightmapMaxSize: 1024
231+
m_LightmapSizeFixed: 0
232+
m_UseMipmapLimits: 1
242233
m_BakeResolution: 40
243234
m_Padding: 2
244235
m_LightmapCompression: 3
@@ -252,13 +243,11 @@ LightingSettings:
252243
m_FilterMode: 1
253244
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
254245
m_ExportTrainingData: 0
246+
m_EnableWorkerProcessBaking: 1
255247
m_TrainingDataDestination: TrainingData
256248
m_RealtimeResolution: 2
257249
m_ForceWhiteAlbedo: 0
258250
m_ForceUpdates: 0
259-
m_FinalGather: 0
260-
m_FinalGatherRayCount: 256
261-
m_FinalGatherFiltering: 1
262251
m_PVRCulling: 1
263252
m_PVRSampling: 1
264253
m_PVRDirectSampleCount: 32
@@ -282,64 +271,7 @@ LightingSettings:
282271
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
283272
m_PVRFilteringAtrousPositionSigmaIndirect: 2
284273
m_PVRFilteringAtrousPositionSigmaAO: 1
285-
m_PVRTiledBaking: 0
286-
m_NumRaysToShootPerTexel: -1
287-
--- !u!1 &1615874397
288-
GameObject:
289-
m_ObjectHideFlags: 0
290-
m_CorrespondingSourceObject: {fileID: 0}
291-
m_PrefabInstance: {fileID: 0}
292-
m_PrefabAsset: {fileID: 0}
293-
serializedVersion: 6
294-
m_Component:
295-
- component: {fileID: 1615874398}
296-
- component: {fileID: 1615874399}
297-
m_Layer: 0
298-
m_Name: DeviceCurrent
299-
m_TagString: Untagged
300-
m_Icon: {fileID: 0}
301-
m_NavMeshLayer: 0
302-
m_StaticEditorFlags: 0
303-
m_IsActive: 1
304-
--- !u!4 &1615874398
305-
Transform:
306-
m_ObjectHideFlags: 0
307-
m_CorrespondingSourceObject: {fileID: 0}
308-
m_PrefabInstance: {fileID: 0}
309-
m_PrefabAsset: {fileID: 0}
310-
m_GameObject: {fileID: 1615874397}
311-
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
312-
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
313-
m_LocalScale: {x: 1, y: 1, z: 1}
314-
m_ConstrainProportionsScale: 0
315-
m_Children: []
316-
m_Father: {fileID: 989925709}
317-
m_RootOrder: 0
318-
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
319-
--- !u!114 &1615874399
320-
MonoBehaviour:
321-
m_ObjectHideFlags: 0
322-
m_CorrespondingSourceObject: {fileID: 0}
323-
m_PrefabInstance: {fileID: 0}
324-
m_PrefabAsset: {fileID: 0}
325-
m_GameObject: {fileID: 1615874397}
326-
m_Enabled: 1
327-
m_EditorHideFlags: 0
328-
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
329-
m_Name:
330-
m_EditorClassIdentifier:
331-
m_Label: Gamepad.current
332-
m_HistorySamples: 0
333-
m_TimeWindow: 3
334-
m_Rect:
335-
serializedVersion: 2
336-
x: 650
337-
y: 50
338-
width: 200
339-
height: 50
340-
m_Visualization: 8
341-
m_ControlPath: <Gamepad>/buttonEast
342-
m_ControlIndex: 0
274+
m_RespectSceneVisibilityWhenBakingGI: 0
343275
--- !u!1001 &5430831075364511436
344276
PrefabInstance:
345277
m_ObjectHideFlags: 0
@@ -353,11 +285,6 @@ PrefabInstance:
353285
propertyPath: m_Name
354286
value: GamepadVis
355287
objectReference: {fileID: 0}
356-
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
357-
type: 3}
358-
propertyPath: m_RootOrder
359-
value: 1
360-
objectReference: {fileID: 0}
361288
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
362289
type: 3}
363290
propertyPath: m_LocalPosition.x
@@ -410,10 +337,12 @@ PrefabInstance:
410337
objectReference: {fileID: 0}
411338
m_RemovedComponents: []
412339
m_RemovedGameObjects: []
413-
m_AddedGameObjects:
414-
- targetCorrespondingSourceObject: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
415-
type: 3}
416-
insertIndex: -1
417-
addedObject: {fileID: 1615874398}
340+
m_AddedGameObjects: []
418341
m_AddedComponents: []
419342
m_SourcePrefab: {fileID: 100100000, guid: b8429651427a640919754290f3704312, type: 3}
343+
--- !u!1660057539 &9223372036854775807
344+
SceneRoots:
345+
m_ObjectHideFlags: 0
346+
m_Roots:
347+
- {fileID: 676010918}
348+
- {fileID: 5430831075364511436}

Assets/Samples/Visualizers/InputVisualizer.cs

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ protected void OnGUI()
4646
{
4747
s_LabelStyle = new GUIStyle();
4848
s_LabelStyle.normal.textColor = Color.yellow;
49+
s_LabelStyle.fontSize = 20;
4950
}
5051

5152
////FIXME: why does CalcSize not calculate the rect width correctly?

Assets/Samples/Visualizers/MouseVis.prefab

+40-40
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ MonoBehaviour:
4949
m_TimeWindow: 3
5050
m_Rect:
5151
serializedVersion: 2
52-
x: 350
52+
x: 437.5
5353
y: 0
54-
width: 150
55-
height: 150
54+
width: 187.5
55+
height: 187.5
5656
m_Visualization: 1
5757
m_ControlPath: <Mouse>/scroll
5858
m_ControlIndex: 0
@@ -105,10 +105,10 @@ MonoBehaviour:
105105
m_TimeWindow: 3
106106
m_Rect:
107107
serializedVersion: 2
108-
x: 85
109-
y: 175
110-
width: 50
111-
height: 50
108+
x: 106.25
109+
y: 218.75
110+
width: 62.5
111+
height: 62.5
112112
m_Visualization: 1
113113
m_ControlPath: <Mouse>/middleButton
114114
m_ControlIndex: 0
@@ -161,10 +161,10 @@ MonoBehaviour:
161161
m_TimeWindow: 3
162162
m_Rect:
163163
serializedVersion: 2
164-
x: 25
165-
y: 175
166-
width: 50
167-
height: 50
164+
x: 31.25
165+
y: 218.75
166+
width: 62.5
167+
height: 62.5
168168
m_Visualization: 1
169169
m_ControlPath: <Mouse>/leftButton
170170
m_ControlIndex: 0
@@ -217,10 +217,10 @@ MonoBehaviour:
217217
m_TimeWindow: 3
218218
m_Rect:
219219
serializedVersion: 2
220-
x: 20
221-
y: 375
222-
width: 700
223-
height: 70
220+
x: 25
221+
y: 468.75
222+
width: 875
223+
height: 87.5
224224
m_Visualization: 4
225225
m_ControlPath: <Mouse>
226226
m_ControlIndex: 0
@@ -273,10 +273,10 @@ MonoBehaviour:
273273
m_TimeWindow: 3
274274
m_Rect:
275275
serializedVersion: 2
276-
x: 20
277-
y: 460
278-
width: 700
279-
height: 70
276+
x: 25
277+
y: 575
278+
width: 875
279+
height: 87.5
280280
m_Visualization: 6
281281
m_ControlPath: <Mouse>
282282
m_ControlIndex: 0
@@ -331,8 +331,8 @@ MonoBehaviour:
331331
serializedVersion: 2
332332
x: 0
333333
y: 0
334-
width: 150
335-
height: 150
334+
width: 187.5
335+
height: 187.5
336336
m_Visualization: 1
337337
m_ControlPath: <Mouse>/position
338338
m_ControlIndex: 0
@@ -452,10 +452,10 @@ MonoBehaviour:
452452
m_TimeWindow: 3
453453
m_Rect:
454454
serializedVersion: 2
455-
x: 175
455+
x: 218.75
456456
y: 0
457-
width: 150
458-
height: 150
457+
width: 187.5
458+
height: 187.5
459459
m_Visualization: 1
460460
m_ControlPath: <Mouse>/delta
461461
m_ControlIndex: 0
@@ -508,10 +508,10 @@ MonoBehaviour:
508508
m_TimeWindow: 3
509509
m_Rect:
510510
serializedVersion: 2
511-
x: 145
512-
y: 175
513-
width: 50
514-
height: 50
511+
x: 181.25
512+
y: 218.75
513+
width: 62.5
514+
height: 62.5
515515
m_Visualization: 1
516516
m_ControlPath: <Mouse>/rightButton
517517
m_ControlIndex: 0
@@ -564,10 +564,10 @@ MonoBehaviour:
564564
m_TimeWindow: 3
565565
m_Rect:
566566
serializedVersion: 2
567-
x: 20
568-
y: 550
569-
width: 700
570-
height: 70
567+
x: 25
568+
y: 687.5
569+
width: 875
570+
height: 87.5
571571
m_Visualization: 7
572572
m_ControlPath: <Mouse>
573573
m_ControlIndex: 0
@@ -620,10 +620,10 @@ MonoBehaviour:
620620
m_TimeWindow: 3
621621
m_Rect:
622622
serializedVersion: 2
623-
x: 265
624-
y: 175
625-
width: 50
626-
height: 50
623+
x: 331.25
624+
y: 218.75
625+
width: 62.5
626+
height: 62.5
627627
m_Visualization: 1
628628
m_ControlPath: <Mouse>/backButton
629629
m_ControlIndex: 0
@@ -676,10 +676,10 @@ MonoBehaviour:
676676
m_TimeWindow: 3
677677
m_Rect:
678678
serializedVersion: 2
679-
x: 205
680-
y: 175
681-
width: 50
682-
height: 50
679+
x: 256.25
680+
y: 218.75
681+
width: 62.5
682+
height: 62.5
683683
m_Visualization: 1
684684
m_ControlPath: <Mouse>/forwardButton
685685
m_ControlIndex: 0

0 commit comments

Comments
 (0)