Created
June 23, 2016 03:58
-
-
Save kaorun55/ecc4c53bdeca5381e41dacf1bc7489c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[RequireComponent(typeof(AudioSource))] | |
public class SpatialSound : MonoBehaviour | |
{ | |
public void Awake() | |
{ | |
var audio = GetComponent<AudioSource>(); | |
audio.spatialize = true; | |
audio.spatialBlend = 1.0f; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment