Skip to content

Commit

Permalink
Fixed sound and music being disabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
SiiMeR committed Jan 28, 2018
1 parent 814b7ae commit 5df137c
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 31 deletions.
4 changes: 2 additions & 2 deletions Assets/Prefabs/Menu.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -2323,7 +2323,7 @@ RectTransform:
m_GameObject: {fileID: 1662494159825826}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.7, y: 0.7, z: 0.7}
m_LocalScale: {x: 0.8, y: 0.8, z: 0.8}
m_Children:
- {fileID: 224071709951876118}
- {fileID: 224241199243549528}
Expand All @@ -2334,6 +2334,6 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 280, y: 157.5}
m_AnchoredPosition: {x: 320, y: 252.5}
m_SizeDelta: {x: 800, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
70 changes: 62 additions & 8 deletions Assets/Scenes/MainMenu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ Prefab:
- target: {fileID: 224941336562339878, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchoredPosition.x
value: 370
value: 320
objectReference: {fileID: 0}
- target: {fileID: 224941336562339878, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 300.5
value: 252.5
objectReference: {fileID: 0}
- target: {fileID: 224941336562339878, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
Expand Down Expand Up @@ -213,17 +213,17 @@ Prefab:
- target: {fileID: 224941336562339878, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_LocalScale.x
value: 0.925
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 224941336562339878, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_LocalScale.y
value: 0.925
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 224941336562339878, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_LocalScale.z
value: 0.925
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 224823645951736554, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
Expand All @@ -243,7 +243,7 @@ Prefab:
- target: {fileID: 224823645951736554, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchoredPosition.y
value: -47.4
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224823645951736554, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
Expand All @@ -268,7 +268,7 @@ Prefab:
- target: {fileID: 224463087255423964, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchoredPosition.y
value: -47.4
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224463087255423964, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
Expand All @@ -293,13 +293,67 @@ Prefab:
- target: {fileID: 224205663708990492, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchoredPosition.y
value: -47.4
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224205663708990492, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_SizeDelta.x
value: 153.49333
objectReference: {fileID: 0}
- target: {fileID: 1863370104155984, guid: cdd21528fd10d3b41849b582b0bddf50, type: 2}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224300132960177494, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224300132960177494, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224139042955547290, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224139042955547290, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224139042955547290, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224842498501644688, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224842498501644688, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224202639891076956, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224202639891076956, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224202639891076956, guid: cdd21528fd10d3b41849b582b0bddf50,
type: 2}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: cdd21528fd10d3b41849b582b0bddf50, type: 2}
m_IsPrefabParent: 0
Expand Down
33 changes: 21 additions & 12 deletions Assets/Scenes/Mihkel.unity
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,17 @@ Prefab:
- target: {fileID: 224120339577557352, guid: b8fecf5c95e379e429097bc32af8e461,
type: 2}
propertyPath: m_AnchoredPosition.x
value: 0
value: 320
objectReference: {fileID: 0}
- target: {fileID: 224120339577557352, guid: b8fecf5c95e379e429097bc32af8e461,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
value: 252.5
objectReference: {fileID: 0}
- target: {fileID: 224120339577557352, guid: b8fecf5c95e379e429097bc32af8e461,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
value: 800
objectReference: {fileID: 0}
- target: {fileID: 224120339577557352, guid: b8fecf5c95e379e429097bc32af8e461,
type: 2}
Expand Down Expand Up @@ -271,18 +271,33 @@ Prefab:
- target: {fileID: 224120339577557352, guid: b8fecf5c95e379e429097bc32af8e461,
type: 2}
propertyPath: m_Pivot.x
value: 0
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 224120339577557352, guid: b8fecf5c95e379e429097bc32af8e461,
type: 2}
propertyPath: m_Pivot.y
value: 0
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 95938018738340126, guid: b8fecf5c95e379e429097bc32af8e461,
type: 2}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: b097840d542a69f44a544a3cd535a3b7, type: 2}
- target: {fileID: 224120339577557352, guid: b8fecf5c95e379e429097bc32af8e461,
type: 2}
propertyPath: m_LocalScale.x
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 224120339577557352, guid: b8fecf5c95e379e429097bc32af8e461,
type: 2}
propertyPath: m_LocalScale.y
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 224120339577557352, guid: b8fecf5c95e379e429097bc32af8e461,
type: 2}
propertyPath: m_LocalScale.z
value: 0.8
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: b8fecf5c95e379e429097bc32af8e461, type: 2}
m_IsPrefabParent: 0
Expand Down Expand Up @@ -354,7 +369,7 @@ Prefab:
type: 2}
propertyPath: text
value:
objectReference: {fileID: 1396773144}
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: ecdd02acf8ab3cd4391597ec9e11bfe2, type: 2}
m_IsPrefabParent: 0
Expand Down Expand Up @@ -488,12 +503,6 @@ Prefab:
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: becb8664467cd0f488b5ce043d774846, type: 2}
m_IsPrefabParent: 0
--- !u!114 &1396773144 stripped
MonoBehaviour:
m_PrefabParentObject: {fileID: 114584002680070762, guid: b8fecf5c95e379e429097bc32af8e461,
type: 2}
m_PrefabInternal: {fileID: 335034696}
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
--- !u!1 &1438706640
GameObject:
m_ObjectHideFlags: 0
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scenes/Reimo.unity
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ AudioSource:
m_audioClip: {fileID: 8300000, guid: 4e6a1a44972e30b4fbddd8353b09912e, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 0.72
m_Pitch: 1
Loop: 1
Mute: 0
Spatialize: 0
Expand Down
5 changes: 2 additions & 3 deletions Assets/Scripts/AudioManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ private void Update()

void Awake()
{
musicVolume = PlayerPrefs.GetFloat("MusicVol");
soundVolume = PlayerPrefs.GetFloat("SoundVol");
//print("adoaiwdja " + PlayerPrefs.GetFloat("SoundVol"));
musicVolume = PlayerPrefs.GetFloat("MusicVol",1);
soundVolume = PlayerPrefs.GetFloat("SoundVol",1);

audioMap = new Dictionary<string, AudioClip>();

Expand Down
6 changes: 3 additions & 3 deletions Assets/Scripts/MenuController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public class MenuController : MonoBehaviour

// Use this for initialization
void Start ()
{
music.value = PlayerPrefs.GetFloat("MusicVol");
sound.value = PlayerPrefs.GetFloat("SoundVol");
{
music.value = PlayerPrefs.GetFloat("MusicVol",1f);
sound.value = PlayerPrefs.GetFloat("SoundVol",1f);
}

// Update is called once per frame
Expand Down
5 changes: 3 additions & 2 deletions ProjectSettings/QualitySettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
QualitySettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_CurrentQuality: 5
m_CurrentQuality: 2
m_QualitySettings:
- serializedVersion: 2
name: Very Low
Expand Down Expand Up @@ -174,4 +174,5 @@ QualitySettings:
asyncUploadBufferSize: 4
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
m_PerPlatformDefaultQuality: {}
m_PerPlatformDefaultQuality:
Standalone: 2

0 comments on commit 5df137c

Please sign in to comment.