File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
Assets/JCSUnity/Scripts/Webcam Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -86,10 +86,6 @@ public class JCS_Webcam
8686
8787 [ Header ( "- Sound" ) ]
8888
89- [ Tooltip ( "Sound player for 3D sounds calculation." ) ]
90- [ SerializeField ]
91- private JCS_SoundPlayer mSoundPlayer = null ;
92-
9389 [ Tooltip ( "Sound when taking the screenshot." ) ]
9490 [ SerializeField ]
9591 private AudioClip mTakePhotoSound = null ;
@@ -106,14 +102,6 @@ public class JCS_Webcam
106102
107103 /* Functions */
108104
109- protected override void Awake ( )
110- {
111- base . Awake ( ) ;
112-
113- if ( mSoundPlayer == null )
114- mSoundPlayer = this . GetComponent < JCS_SoundPlayer > ( ) ;
115- }
116-
117105 private void Start ( )
118106 {
119107 ActiveWebcam ( ) ;
@@ -217,7 +205,11 @@ public void TakeSnapshotWebcam()
217205 mResumeTrigger = true ;
218206
219207 // play sound.
220- mSoundPlayer . PlayOneShot ( mTakePhotoSound ) ;
208+ {
209+ var soundm = JCS_SoundManager . instance ;
210+ JCS_SoundPlayer sp = soundm . GetGlobalSoundPlayer ( ) ;
211+ sp . PlayOneShot ( mTakePhotoSound ) ;
212+ }
221213 }
222214
223215 /// <summary>
You can’t perform that action at this time.
0 commit comments