Skip to content

Instantly share code, notes, and snippets.

@kaorun55
Created June 23, 2016 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaorun55/ecc4c53bdeca5381e41dacf1bc7489c7 to your computer and use it in GitHub Desktop.
Save kaorun55/ecc4c53bdeca5381e41dacf1bc7489c7 to your computer and use it in GitHub Desktop.
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