Skip to content

Commit 8c1d6bb

Browse files
AMollisdavid-c-klineKline, Dave (David Kline)keveleigh
authored
Update SliderSounds to use one AudioSource instead of two (#495) (#507)
* unify slider audio sources, cache and restore the pitch shift value * update package versionsto match slidersounds and prefab updates * reserialize packages-lock with 2021.3.21f1 * remodify/serialize prefabs with 2021.3.21f1 * Update org.mixedrealitytoolkit.uxcore/Slider/SliderSounds.cs * pr feedback: code improvements --------- Signed-off-by: David Kline <[email protected]> Co-authored-by: David Kline <[email protected]> Co-authored-by: Kline, Dave (David Kline) <[email protected]> Co-authored-by: Kurtis <[email protected]>
1 parent 62dca36 commit 8c1d6bb

File tree

6 files changed

+237
-51
lines changed

6 files changed

+237
-51
lines changed

UnityProjects/MRTKDevTemplate/Packages/packages-lock.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384
"source": "local",
385385
"dependencies": {
386386
"com.microsoft.mrtk.graphicstools.unity": "0.5.12",
387-
"org.mixedrealitytoolkit.uxcore": "3.0.0",
387+
"org.mixedrealitytoolkit.uxcore": "3.1.0",
388388
"org.mixedrealitytoolkit.spatialmanipulation": "3.0.0",
389389
"org.mixedrealitytoolkit.standardassets": "3.0.0",
390390
"com.unity.xr.interaction.toolkit": "2.3.0"
@@ -395,7 +395,7 @@
395395
"depth": 0,
396396
"source": "local",
397397
"dependencies": {
398-
"org.mixedrealitytoolkit.uxcore": "3.0.0",
398+
"org.mixedrealitytoolkit.uxcore": "3.1.0",
399399
"org.mixedrealitytoolkit.spatialmanipulation": "3.0.0",
400400
"org.mixedrealitytoolkit.standardassets": "3.0.0"
401401
}

org.mixedrealitytoolkit.uxcomponents.noncanvas/Slider/NonCanvasSliderBase.prefab

Lines changed: 101 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ Transform:
154154
m_PrefabAsset: {fileID: 0}
155155
m_GameObject: {fileID: 2624031095332604921}
156156
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
157-
m_LocalPosition: {x: 0, y: 0, z: 0.000000012922101}
158-
m_LocalScale: {x: 0.099999905, y: 0.002, z: 1}
157+
m_LocalPosition: {x: -9.313226e-10, y: 0, z: 0}
158+
m_LocalScale: {x: 0.1, y: 0.002, z: 1}
159159
m_ConstrainProportionsScale: 0
160160
m_Children:
161161
- {fileID: 7661392059221250966}
@@ -300,7 +300,7 @@ Transform:
300300
m_PrefabAsset: {fileID: 0}
301301
m_GameObject: {fileID: 4713996577027406645}
302302
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
303-
m_LocalPosition: {x: 0, y: 0, z: 0.000000012922101}
303+
m_LocalPosition: {x: -9.313226e-10, y: 0, z: 0}
304304
m_LocalScale: {x: 0.004, y: 0.011999998, z: 0.062525995}
305305
m_ConstrainProportionsScale: 0
306306
m_Children:
@@ -334,6 +334,7 @@ GameObject:
334334
- component: {fileID: 7429095020531837141}
335335
- component: {fileID: 4552659453827628730}
336336
- component: {fileID: 5234196699703300340}
337+
- component: {fileID: 3522167078609283624}
337338
m_Layer: 0
338339
m_Name: NonCanvasSliderBase
339340
m_TagString: Untagged
@@ -610,6 +611,7 @@ MonoBehaviour:
610611
startPitch: 0.75
611612
endPitch: 1.25
612613
minSecondsBetweenTicks: 0.01
614+
audioSource: {fileID: 3522167078609283624}
613615
--- !u!114 &5234196699703300340
614616
MonoBehaviour:
615617
m_ObjectHideFlags: 0
@@ -653,6 +655,102 @@ MonoBehaviour:
653655
m_TargetGraphic: {fileID: 0}
654656
movableAxes: 0
655657
onMoveDelta: 0.01
658+
--- !u!82 &3522167078609283624
659+
AudioSource:
660+
m_ObjectHideFlags: 0
661+
m_CorrespondingSourceObject: {fileID: 0}
662+
m_PrefabInstance: {fileID: 0}
663+
m_PrefabAsset: {fileID: 0}
664+
m_GameObject: {fileID: 7429095020531837142}
665+
m_Enabled: 1
666+
serializedVersion: 4
667+
OutputAudioMixerGroup: {fileID: 0}
668+
m_audioClip: {fileID: 0}
669+
m_PlayOnAwake: 1
670+
m_Volume: 1
671+
m_Pitch: 1
672+
Loop: 0
673+
Mute: 0
674+
Spatialize: 0
675+
SpatializePostEffects: 0
676+
Priority: 128
677+
DopplerLevel: 1
678+
MinDistance: 1
679+
MaxDistance: 500
680+
Pan2D: 0
681+
rolloffMode: 0
682+
BypassEffects: 0
683+
BypassListenerEffects: 0
684+
BypassReverbZones: 0
685+
rolloffCustomCurve:
686+
serializedVersion: 2
687+
m_Curve:
688+
- serializedVersion: 3
689+
time: 0
690+
value: 1
691+
inSlope: 0
692+
outSlope: 0
693+
tangentMode: 0
694+
weightedMode: 0
695+
inWeight: 0.33333334
696+
outWeight: 0.33333334
697+
- serializedVersion: 3
698+
time: 1
699+
value: 0
700+
inSlope: 0
701+
outSlope: 0
702+
tangentMode: 0
703+
weightedMode: 0
704+
inWeight: 0.33333334
705+
outWeight: 0.33333334
706+
m_PreInfinity: 2
707+
m_PostInfinity: 2
708+
m_RotationOrder: 4
709+
panLevelCustomCurve:
710+
serializedVersion: 2
711+
m_Curve:
712+
- serializedVersion: 3
713+
time: 0
714+
value: 0
715+
inSlope: 0
716+
outSlope: 0
717+
tangentMode: 0
718+
weightedMode: 0
719+
inWeight: 0.33333334
720+
outWeight: 0.33333334
721+
m_PreInfinity: 2
722+
m_PostInfinity: 2
723+
m_RotationOrder: 4
724+
spreadCustomCurve:
725+
serializedVersion: 2
726+
m_Curve:
727+
- serializedVersion: 3
728+
time: 0
729+
value: 0
730+
inSlope: 0
731+
outSlope: 0
732+
tangentMode: 0
733+
weightedMode: 0
734+
inWeight: 0.33333334
735+
outWeight: 0.33333334
736+
m_PreInfinity: 2
737+
m_PostInfinity: 2
738+
m_RotationOrder: 4
739+
reverbZoneMixCustomCurve:
740+
serializedVersion: 2
741+
m_Curve:
742+
- serializedVersion: 3
743+
time: 0
744+
value: 1
745+
inSlope: 0
746+
outSlope: 0
747+
tangentMode: 0
748+
weightedMode: 0
749+
inWeight: 0.33333334
750+
outWeight: 0.33333334
751+
m_PreInfinity: 2
752+
m_PostInfinity: 2
753+
m_RotationOrder: 4
656754
--- !u!1001 &4326098741687517490
657755
PrefabInstance:
658756
m_ObjectHideFlags: 0

org.mixedrealitytoolkit.uxcomponents.noncanvas/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "org.mixedrealitytoolkit.uxcomponents.noncanvas",
3-
"version": "3.0.0-development",
3+
"version": "3.1.0-development",
44
"description": "MRTK non-Canvas UX component library, for building 3D UX without Canvas layout. For most production-grade UI, we recommend the dynamic hybrid Canvas-based UX systems, located in org.mixedrealitytoolkit.uxcomponents. However, in some circumstances, static/non-Canvas UI may offer improved performance and batching, and may be desirable in resource-constrained scenarios.",
55
"displayName": "MRTK UX Components (Non-Canvas)",
66
"msftFeatureCategory": "MRTK3",
@@ -15,7 +15,7 @@
1515
},
1616
"unity": "2021.3",
1717
"dependencies": {
18-
"org.mixedrealitytoolkit.uxcore": "3.0.0",
18+
"org.mixedrealitytoolkit.uxcore": "3.1.0",
1919
"org.mixedrealitytoolkit.spatialmanipulation": "3.0.0",
2020
"org.mixedrealitytoolkit.standardassets": "3.0.0"
2121
},

org.mixedrealitytoolkit.uxcomponents/Slider/CanvasSlider.prefab

Lines changed: 103 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ MonoBehaviour:
102102
_Iridescent_Map_: {fileID: 0}
103103
_Frequency_: 1.89
104104
_Vertical_Offset_: 0
105+
_Orthographic_Distance_: 400
105106
_Gradient_Disabled_: 0
106107
_Gradient_Color_: {r: 1, g: 1, b: 1, a: 1}
107108
_Top_Left_: {r: 0.90588236, g: 0.64705884, b: 0.9254902, a: 1}
@@ -118,6 +119,8 @@ MonoBehaviour:
118119
_GridScale: 0.02
119120
_SrcBlend: 1
120121
_DstBlend: 0
122+
_SrcBlendAlpha: 1
123+
_DstBlendAlpha: 1
121124
_StencilReference: 0
122125
_StencilComparison: 0
123126
_StencilOperation: 0
@@ -238,7 +241,7 @@ RectTransform:
238241
m_PrefabAsset: {fileID: 0}
239242
m_GameObject: {fileID: 5677198132670553563}
240243
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
241-
m_LocalPosition: {x: 0, y: 0, z: 0.0000166893}
244+
m_LocalPosition: {x: 0, y: 0, z: 0}
242245
m_LocalScale: {x: 1, y: 1, z: 1}
243246
m_ConstrainProportionsScale: 0
244247
m_Children:
@@ -248,7 +251,7 @@ RectTransform:
248251
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
249252
m_AnchorMin: {x: 0.5, y: 0.5}
250253
m_AnchorMax: {x: 0.5, y: 0.5}
251-
m_AnchoredPosition: {x: 0, y: 0}
254+
m_AnchoredPosition: {x: -0.000017166138, y: -0.000002861023}
252255
m_SizeDelta: {x: 6, y: 6}
253256
m_Pivot: {x: 0.5, y: 0.5}
254257
--- !u!65 &1197545758422362387
@@ -331,6 +334,7 @@ GameObject:
331334
- component: {fileID: 1304092318350955345}
332335
- component: {fileID: 4480812510405459949}
333336
- component: {fileID: 5856489340448090782}
337+
- component: {fileID: 7149116039216951488}
334338
m_Layer: 5
335339
m_Name: CanvasSlider
336340
m_TagString: Untagged
@@ -615,6 +619,7 @@ MonoBehaviour:
615619
startPitch: 0.75
616620
endPitch: 1.25
617621
minSecondsBetweenTicks: 0.01
622+
audioSource: {fileID: 7149116039216951488}
618623
--- !u!95 &1304092318350955345
619624
Animator:
620625
serializedVersion: 5
@@ -738,6 +743,102 @@ MonoBehaviour:
738743
m_TargetGraphic: {fileID: 0}
739744
movableAxes: 1
740745
onMoveDelta: 0.01
746+
--- !u!82 &7149116039216951488
747+
AudioSource:
748+
m_ObjectHideFlags: 0
749+
m_CorrespondingSourceObject: {fileID: 0}
750+
m_PrefabInstance: {fileID: 0}
751+
m_PrefabAsset: {fileID: 0}
752+
m_GameObject: {fileID: 5677198132984834579}
753+
m_Enabled: 1
754+
serializedVersion: 4
755+
OutputAudioMixerGroup: {fileID: 0}
756+
m_audioClip: {fileID: 0}
757+
m_PlayOnAwake: 1
758+
m_Volume: 1
759+
m_Pitch: 1
760+
Loop: 0
761+
Mute: 0
762+
Spatialize: 0
763+
SpatializePostEffects: 0
764+
Priority: 128
765+
DopplerLevel: 1
766+
MinDistance: 1
767+
MaxDistance: 500
768+
Pan2D: 0
769+
rolloffMode: 0
770+
BypassEffects: 0
771+
BypassListenerEffects: 0
772+
BypassReverbZones: 0
773+
rolloffCustomCurve:
774+
serializedVersion: 2
775+
m_Curve:
776+
- serializedVersion: 3
777+
time: 0
778+
value: 1
779+
inSlope: 0
780+
outSlope: 0
781+
tangentMode: 0
782+
weightedMode: 0
783+
inWeight: 0.33333334
784+
outWeight: 0.33333334
785+
- serializedVersion: 3
786+
time: 1
787+
value: 0
788+
inSlope: 0
789+
outSlope: 0
790+
tangentMode: 0
791+
weightedMode: 0
792+
inWeight: 0.33333334
793+
outWeight: 0.33333334
794+
m_PreInfinity: 2
795+
m_PostInfinity: 2
796+
m_RotationOrder: 4
797+
panLevelCustomCurve:
798+
serializedVersion: 2
799+
m_Curve:
800+
- serializedVersion: 3
801+
time: 0
802+
value: 0
803+
inSlope: 0
804+
outSlope: 0
805+
tangentMode: 0
806+
weightedMode: 0
807+
inWeight: 0.33333334
808+
outWeight: 0.33333334
809+
m_PreInfinity: 2
810+
m_PostInfinity: 2
811+
m_RotationOrder: 4
812+
spreadCustomCurve:
813+
serializedVersion: 2
814+
m_Curve:
815+
- serializedVersion: 3
816+
time: 0
817+
value: 0
818+
inSlope: 0
819+
outSlope: 0
820+
tangentMode: 0
821+
weightedMode: 0
822+
inWeight: 0.33333334
823+
outWeight: 0.33333334
824+
m_PreInfinity: 2
825+
m_PostInfinity: 2
826+
m_RotationOrder: 4
827+
reverbZoneMixCustomCurve:
828+
serializedVersion: 2
829+
m_Curve:
830+
- serializedVersion: 3
831+
time: 0
832+
value: 1
833+
inSlope: 0
834+
outSlope: 0
835+
tangentMode: 0
836+
weightedMode: 0
837+
inWeight: 0.33333334
838+
outWeight: 0.33333334
839+
m_PreInfinity: 2
840+
m_PostInfinity: 2
841+
m_RotationOrder: 4
741842
--- !u!1 &5677198133136054595
742843
GameObject:
743844
m_ObjectHideFlags: 0

org.mixedrealitytoolkit.uxcomponents/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "org.mixedrealitytoolkit.uxcomponents",
3-
"version": "3.0.0-development",
3+
"version": "3.1.0-development",
44
"description": "MRTK UX component library, leveraging RectTransform/Canvas for dynamic layout and presentation. Contains prefabs, visuals, pre-made controls, and everything to get started building 3D user interfaces for mixed reality.",
55
"displayName": "MRTK UX Components",
66
"msftFeatureCategory": "MRTK3",
@@ -16,7 +16,7 @@
1616
"unity": "2021.3",
1717
"dependencies": {
1818
"com.microsoft.mrtk.graphicstools.unity": "0.5.12",
19-
"org.mixedrealitytoolkit.uxcore": "3.0.0",
19+
"org.mixedrealitytoolkit.uxcore": "3.1.0",
2020
"org.mixedrealitytoolkit.spatialmanipulation": "3.0.0",
2121
"org.mixedrealitytoolkit.standardassets": "3.0.0",
2222
"com.unity.xr.interaction.toolkit": "2.3.0"

0 commit comments

Comments
 (0)