{"id":187,"date":"2015-06-10T11:47:03","date_gmt":"2015-06-10T02:47:03","guid":{"rendered":"https:\/\/cg-method.com\/unity\/?p=187"},"modified":"2026-10-31T13:58:02","modified_gmt":"2026-10-31T04:58:02","slug":"unity-playoneshot","status":"publish","type":"post","link":"https:\/\/cg-method.com\/unity\/unity-playoneshot\/","title":{"rendered":"Unity\u2502AudioSource.PlayOneShot\u3067\u52b9\u679c\u97f3\u3092\u9cf4\u3089\u3059\u65b9\u6cd5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u672c\u8a18\u4e8b\u3067\u306f\u3001Unity\u521d\u5fc3\u8005\u5411\u3051\u306b\u52b9\u679c\u97f3\u306e\u518d\u751f\u624b\u9806\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u57fa\u672c\u30b3\u30fc\u30c9\u306f\u5f93\u6765\u306eInput Manager\u3092\u4f7f\u3046\u30de\u30a6\u30b9\u64cd\u4f5c\u306e\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Input System\u7528\u306eUpdate\u5dee\u3057\u66ff\u3048\u4f8b\u3082\u63b2\u8f09\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unity\u3067\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u30fb\u5b9f\u969b\u306e\u97f3\u58f0\u518d\u751f\u306f\u4eca\u56de\u78ba\u8a8d\u3057\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u3010Unity\u3011AudioSource.PlayOneShot\u3067\u52b9\u679c\u97f3\u3092\u9cf4\u3089\u3059\u65b9\u6cd5\u3010\u521d\u5fc3\u8005\u5411\u3051\u3011<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">AudioSource\u3078\u97f3\u58f0\u3092\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u3068\u3001PlayOneShot\u3067\u77ed\u3044\u52b9\u679c\u97f3\u3092\u91cd\u306d\u3066\u518d\u751f\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">BGM\u306e\u30eb\u30fc\u30d7\u5236\u5fa1\u306f\u3053\u306e\u30b3\u30fc\u30c9\u306e\u5bfe\u8c61\u5916\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u969b\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u97f3\u3092\u9cf4\u3089\u3059\u624b\u9806\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Unity\u3067\u4f7f\u3048\u308b\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u306f\u3058\u3081\u306b\u3001Unity\u3067\u4e3b\u306b\u4f7f\u308f\u308c\u308b\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u3068\u305d\u308c\u305e\u308c\u306e\u7279\u5fb4\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u5f62\u5f0f<\/th><th>\u7279\u5fb4<\/th><th>\u5411\u3044\u3066\u3044\u308b\u7528\u9014<\/th><\/tr><\/thead><tbody><tr><td>WAV \/ AIFF<\/td><td>PCM\u306eWAV\/AIFF\u306f\u975e\u5727\u7e2e\u306e\u7d20\u6750\u3068\u3057\u3066\u4f7f\u3048\u308b\u3002\u5b9f\u884c\u6642\u306e\u5bb9\u91cf\u30fb\u8ca0\u8377\u306f\u30a4\u30f3\u30dd\u30fc\u30c8\u8a2d\u5b9a\u306b\u3082\u4f9d\u5b58<\/td><td>\u52b9\u679c\u97f3\uff08SE\uff09<\/td><\/tr><tr><td>MP3 \/ OGG<\/td><td>MP3\/Ogg Vorbis\u306f\u975e\u53ef\u9006\u5727\u7e2e\u306e\u7d20\u6750\u3002Unity\u3078\u306e\u53d6\u308a\u8fbc\u307f\u5f8c\u306e\u5727\u7e2e\u5f62\u5f0f\u3068Load Type\u3082\u78ba\u8a8d\u3059\u308b<\/td><td>BGM<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u7d20\u6750\u306e\u62e1\u5f35\u5b50\u3060\u3051\u3067\u306f\u3001\u5b9f\u884c\u6642\u306e\u30e1\u30e2\u30ea\u30fc\u4f7f\u7528\u91cf\u3084CPU\u8ca0\u8377\u306f\u6c7a\u307e\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unity\u306f\u7d20\u6750\u3092\u30bf\u30fc\u30b2\u30c3\u30c8\u5411\u3051\u306b\u518d\u5727\u7e2e\u3059\u308b\u305f\u3081\u3001AudioClip\u306eCompression Format\u3068Load Type\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u77ed\u3044\u52b9\u679c\u97f3\u3068\u9577\u3044BGM\u3067\u3001\u97f3\u8cea\u30fb\u5e38\u99d0\u30e1\u30e2\u30ea\u30fc\u30fb\u518d\u751f\u6642\u306e\u5c55\u958b\u8ca0\u8377\u3092\u6bd4\u8f03\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u97f3\u3092\u9cf4\u3089\u3059\u4ed5\u7d44\u307f\u3092\u7406\u89e3\u3057\u3088\u3046<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Unity\u3067\u97f3\u58f0\u3092\u518d\u751f\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u57fa\u672c\u3068\u306a\u308b3\u3064\u306e\u8981\u7d20\u306e\u5f79\u5272\u3092\u628a\u63e1\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8981\u7d20<\/th><th>\u5f79\u5272<\/th><\/tr><\/thead><tbody><tr><td>AudioClip<\/td><td>\u97f3\u58f0\u30c7\u30fc\u30bf\u306e\u30a2\u30bb\u30c3\u30c8\uff08GameObject\u3078\u8ffd\u52a0\u3059\u308bComponent\u3067\u306f\u306a\u3044\uff09<\/td><\/tr><tr><td>AudioSource<\/td><td>\u97f3\u3092\u518d\u751f\u3059\u308b\u30b9\u30d4\u30fc\u30ab\u30fc<\/td><\/tr><tr><td>AudioListener<\/td><td>\u97f3\u3092\u805e\u304f\u30de\u30a4\u30af\u3084\u8033\u306e\u5f79\u5272\u3002\u521d\u671f\u72b6\u614b\u306eMain Camera\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u6709\u52b9\u306aAudioListener\u30921\u3064\u3060\u3051\u306b\u3059\u308b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u65b9\u6cd51\uff1a\u3068\u308a\u3042\u3048\u305a\u97f3\u3092\u9cf4\u3089\u3057\u3066\u307f\u308b\uff08\u30b3\u30fc\u30c9\u306a\u3057\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u3082\u3063\u3068\u3082\u30b7\u30f3\u30d7\u30eb\u306a\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304b\u305a\u306b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u8a2d\u5b9a\u3060\u3051\u3067\u97f3\u3092\u518d\u751f\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Hierarchy\u3067\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001\u300cCreate Empty\u300d\u3092\u9078\u629e\u3057\u3066\u7a7a\u306eGameObject\u3092\u4f5c\u6210\u3059\u308b<\/li>\n\n\n\n<li>\u4f5c\u6210\u3057\u305fGameObject\u3092\u9078\u629e\u3057\u3001Inspector\u3067\u300cAdd Component\u300d\u304b\u3089\u300cAudio Source\u300d\u3092\u8ffd\u52a0\u3059\u308b<\/li>\n\n\n\n<li>Audio Source\u306e\u300cAudioClip\u300d\u6b04\u306b\u3001\u9cf4\u3089\u3057\u305f\u3044\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u3092\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u3059\u308b<\/li>\n\n\n\n<li>Audio Source\u306e\u300cPlay On Awake\u300d\u306b\u30c1\u30a7\u30c3\u30af\u304c\u5165\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b<\/li>\n\n\n\n<li>\u30a8\u30c7\u30a3\u30bf\u4e0a\u90e8\u306e\u518d\u751f\u30dc\u30bf\u30f3\u3092\u62bc\u3059<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0a\u306e\u8a2d\u5b9a\u3067\u3001\u30b2\u30fc\u30e0\u958b\u59cb\u3068\u540c\u6642\u306b\u8a2d\u5b9a\u3057\u305f\u97f3\u58f0\u304c\u518d\u751f\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u65b9\u6cd52\uff1a\u30af\u30ea\u30c3\u30af\u3067\u52b9\u679c\u97f3\u3092\u9cf4\u3089\u3059\uff08\u30b3\u30fc\u30c9\u3042\u308a\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5de6\u307e\u305f\u306f\u53f3\u306e\u30de\u30a6\u30b9\u30dc\u30bf\u30f3\u3092\u96e2\u3057\u305f\u30d5\u30ec\u30fc\u30e0\u3067\u3001\u5225\u3005\u306e\u52b9\u679c\u97f3\u3092\u518d\u751f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Input.GetMouseButtonUp\u306f\u5f93\u6765\u306eInput Manager\u7528\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Player Settings\u306eActive Input Handling\u304cInput Manager (Old)\u307e\u305f\u306fBoth\u306ePC\u7528\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u524d\u63d0\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Input System\u306e\u307f\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u3001\u5f8c\u8ff0\u306eUpdate\u5dee\u3057\u66ff\u3048\u4f8b\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u624b\u9806<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Hierarchy\u3067\u7a7a\u306eGameObject\u3092\u4f5c\u6210\u3057\u3001Audio Source\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8ffd\u52a0\u3059\u308b<\/li>\n\n\n\n<li>\u4ee5\u4e0b\u3092PlaySound.cs\u3068\u3057\u3066\u4fdd\u5b58\u3057\u3001\u540c\u540d\u306ePlaySound\u3092\u4f5c\u6210\u3057\u305fGameObject\u306b\u30a2\u30bf\u30c3\u30c1\u3059\u308b\u3002Audio Source\u306ePlay On Awake\u3092\u30aa\u30d5\u3001Spatial Blend\u30920\uff082D\uff09\u306b\u3059\u308b<\/li>\n\n\n\n<li>Inspector\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u300cSound 01\u300d\u300cSound 02\u300d\u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u3001\u9cf4\u3089\u3057\u305f\u3044\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u3092\u8a2d\u5b9a\u3059\u308b<\/li>\n\n\n\n<li>\u30b2\u30fc\u30e0\u3092\u518d\u751f\u3057\u3001Game\u30d3\u30e5\u30fc\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3092\u7f6e\u3044\u3066\u5de6\u53f3\u306e\u30dc\u30bf\u30f3\u3092\u96e2\u3057\u3001\u305d\u308c\u305e\u308c\u306e\u97f3\u3068Console\u3092\u78ba\u8a8d\u3059\u308b<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">\u30b9\u30af\u30ea\u30d7\u30c8<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">C#\u306e\u4f8b\uff1a<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>using UnityEngine;\n\n[RequireComponent(typeof(AudioSource))]\npublic class PlaySound : MonoBehaviour\n{\n    public AudioClip sound01;\n    public AudioClip sound02;\n    private AudioSource audioSource;\n\n    void Awake()\n    {\n        audioSource = GetComponent&lt;AudioSource&gt;();\n        if (sound01 == null || sound02 == null)\n            Debug.LogWarning(&quot;Sound 01 \/ Sound 02\u306bAudioClip\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002&quot;, this);\n    }\n\n    void Update()\n    {\n        if (audioSource == null || !audioSource.isActiveAndEnabled) return;\n        if (Input.GetMouseButtonUp(0) &amp;&amp; sound01 != null)\n            audioSource.PlayOneShot(sound01);\n        if (Input.GetMouseButtonUp(1) &amp;&amp; sound02 != null)\n            audioSource.PlayOneShot(sound02);\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Input System\u306e\u307f\u306e\u74b0\u5883\u3067\u306fUpdate\u3092\u5dee\u3057\u66ff\u3048\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Package Manager\u3067\u4f7f\u7528\u4e2d\u306eUnity\u7248\u306b\u5bfe\u5fdc\u3059\u308bInput System\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001Project Settings \u2192 Player \u2192 Other Settings \u2192 Active Input Handling\u3092Input System Package (New)\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5909\u66f4\u6642\u306fEditor\u306e\u518d\u8d77\u52d5\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Project Settings \u2192 Input System Package\u306eUpdate Mode\u306f\u3001\u3053\u306e\u4f8b\u3067\u306fProcess Events In Dynamic Update\u3092\u524d\u63d0\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8a2d\u5b9a\u306f<a href=\"https:\/\/docs.unity3d.com\/Packages\/com.unity.inputsystem@1.17\/manual\/Installation.html\">\u516c\u5f0f\u306e\u5c0e\u5165\u624b\u9806<\/a>\u3068<a href=\"https:\/\/docs.unity3d.com\/Packages\/com.unity.inputsystem@1.17\/manual\/Settings.html\">\u66f4\u65b0\u30e2\u30fc\u30c9\u306e\u8aac\u660e<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u306ePlaySound\u30af\u30e9\u30b9\u306eUpdate\u30e1\u30bd\u30c3\u30c9\u3060\u3051\u3092\u6b21\u3078\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AudioClip\u30d5\u30a3\u30fc\u30eb\u30c9\u3068Awake\u306f\u305d\u306e\u307e\u307e\u6b8b\u3057\u3001Update\u30922\u3064\u5b9a\u7fa9\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">asmdef\u3092\u4f7f\u3046\u5834\u5408\u306f\u3001\u305d\u306eAssembly\u304b\u3089Unity.InputSystem\u3092\u53c2\u7167\u3067\u304d\u308b\u8a2d\u5b9a\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Input System\u304c\u5165\u3063\u3066\u3044\u306a\u3044\u74b0\u5883\u3067\u306f\u3001\u3053\u306e\u5dee\u3057\u66ff\u3048\u30b3\u30fc\u30c9\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>void Update()\n{\n    if (audioSource == null || !audioSource.isActiveAndEnabled) return;\n    var mouse = UnityEngine.InputSystem.Mouse.current;\n    if (mouse == null) return;\n    if (mouse.leftButton.wasReleasedThisFrame &amp;&amp; sound01 != null)\n        audioSource.PlayOneShot(sound01);\n    if (mouse.rightButton.wasReleasedThisFrame &amp;&amp; sound02 != null)\n        audioSource.PlayOneShot(sound02);\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/docs.unity3d.com\/Packages\/com.unity.inputsystem@1.17\/api\/UnityEngine.InputSystem.Mouse.html\">Mouse.current<\/a>\u304cnull\u306a\u3089\u51e6\u7406\u3092\u305b\u305a\u3001<a href=\"https:\/\/docs.unity3d.com\/Packages\/com.unity.inputsystem@1.17\/api\/UnityEngine.InputSystem.Controls.ButtonControl.html\">wasReleasedThisFrame<\/a>\u3067\u30dc\u30bf\u30f3\u3092\u96e2\u3057\u305f\u30d5\u30ec\u30fc\u30e0\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Play Mode\u3067Game\u30d3\u30e5\u30fc\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3092\u7f6e\u304d\u3001\u5de6\u53f3\u305d\u308c\u305e\u308c\u306e\u52b9\u679c\u97f3\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u5dee\u3057\u66ff\u3048\u4f8b\u3082Unity\u3067\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u30fb\u5b9f\u97f3\u306f\u672a\u78ba\u8a8d\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PlayOneShot\u3068\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>AudioSource.PlayOneShot()<\/code>\u306f\u3001\u52b9\u679c\u97f3\u306a\u3069\u306e\u30ef\u30f3\u30b7\u30e7\u30c3\u30c8\u518d\u751f\u306b\u9069\u3057\u305fAudioSource\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u7279\u5fb4<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u97f3\u58f0\u30921\u56de\u3060\u3051\u518d\u751f\u3059\u308b<\/li>\n\n\n\n<li>\u540c\u3058AudioSource\u4e0a\u3067\u518d\u751f\u4e2d\u306e\u97f3\u3092\u9014\u5207\u308c\u3055\u305b\u305a\u3001\u97f3\u3092\u91cd\u306d\u3066\u518d\u751f\u3067\u304d\u308b<\/li>\n\n\n\n<li>\u7b2c2\u5f15\u6570volumeScale\u3092AudioSource.volume\u306b\u639b\u3051\u3066\u518d\u751f\u97f3\u91cf\u3092\u8abf\u6574\u3059\u308b<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">C#\u306e\u4f8b\uff1a<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>\/\/ AudioSource.volume\u306b0.7\u3092\u639b\u3051\u3066\u518d\u751f\u3059\u308b\u4f8b\naudioSource.PlayOneShot(sound01, 0.7f);<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u6ce8\u610f\u70b9<\/strong>\u3068\u3057\u3066\u3001\u77ed\u6642\u9593\u306b\u5927\u91cf\u306e\u97f3\u3092PlayOneShot\u3067\u540c\u6642\u306b\u9cf4\u3089\u3059\u3068\u51e6\u7406\u8ca0\u8377\u304c\u5897\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9023\u5c04\u6642\u306e\u52b9\u679c\u97f3\u306a\u3069\u306f\u540c\u6642\u518d\u751f\u6570\u3084\u518d\u751f\u9593\u9694\u306b\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u3088\u304f\u3042\u308b\u30a8\u30e9\u30fc\u3068\u5bfe\u51e6\u6cd5<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u75c7\u72b6<\/th><th>\u539f\u56e0\u3068\u5bfe\u51e6<\/th><\/tr><\/thead><tbody><tr><td>\u97f3\u304c\u9cf4\u3089\u306a\u3044<\/td><td>AudioListener\u304c\u30b7\u30fc\u30f3\u5185\u306b\u5b58\u5728\u3059\u308b\u304b\u78ba\u8a8d\u3059\u308b\u3002\u30ab\u30e1\u30e9\u3092\u524a\u9664\u3057\u3066\u3044\u308b\u3068\u6d88\u3048\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308b<\/td><\/tr><tr><td>AudioSource\u306e\u53c2\u7167\u304c\u306a\u3044<\/td><td>\u540c\u3058GameObject\u306eAudioSource\u3068\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u78ba\u8a8d\u3059\u308b\u3002Console\u306e\u4f8b\u5916\u6587\u3092\u8aad\u307f\u3001\u672a\u8a2d\u5b9aAudioClip\u3068\u3082\u533a\u5225\u3059\u308b<\/td><\/tr><tr><td>\u97f3\u304c\u5c0f\u3055\u3044\u30fb\u805e\u3053\u3048\u306a\u3044<\/td><td>AudioSource\u306eMute\/Volume\u3001Game\u30d3\u30e5\u30fc\u306eMute Audio\u3001OS\u51fa\u529b\u5148\u3068Mixer\u3092\u78ba\u8a8d\u3059\u308b\u30023D\u8a2d\u5b9a\u306e\u5834\u5408\u306fListener\u3068\u306e\u8ddd\u96e2\u3082\u78ba\u8a8d\u3059\u308b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Unity\u306b\u95a2\u3059\u308b\u307b\u304b\u306e\u8a18\u4e8b\u306f\u3001\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u304b\u3089\u3054\u89a7\u3044\u305f\u3060\u3051\u307e\u3059\u3002<\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/unity\/wp-content\/uploads\/2026\/09\/unity-matome-3-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/unity\/unity-matome\/\">Unity\u306e\u4f7f\u3044\u65b9\u30ac\u30a4\u30c9\uff5c\u74b0\u5883\u69cb\u7bc9\u30fbUI\u30fb2D\u30fb\u30a2\u30bb\u30c3\u30c8\u6d3b\u7528<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Unity\u306e\u74b0\u5883\u69cb\u7bc9\u3001UI\u5236\u4f5c\u30012D\u7d20\u6750\u306e\u7d44\u307f\u8fbc\u307f\u3001\u30a2\u30bb\u30c3\u30c8\u5c0e\u5165\u3001Prefab\u7ba1\u7406\u3092\u76ee\u7684\u5225\u306b\u6848\u5185\u3002\u66f8\u7c4d\u30fb\u30aa\u30f3\u30e9\u30a4\u30f3\u6559\u6750\u306e\u9078\u3073\u65b9\u3068\u3001\u5236\u4f5c\u4e2d\u306b\u3064\u307e\u305a\u3044\u305f\u3068\u304d\u306e\u89e3\u8aac\u8a18\u4e8b\u3092\u63a2\u305b\u307e\u3059\u3002<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<p class=\"wp-block-paragraph\">\u5143\u8a18\u4e8b\u306e\u30b3\u30fc\u30c9\u306f\u3001GitHub\u306e<a href=\"https:\/\/github.com\/MOTOKI-LLC\/cg-method-code\/tree\/main\/unity\/unity-playoneshot\">MOTOKI-LLC\/cg-method-code<\/a>\u306b\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6587\u306e\u4fee\u6b63\u7248\u3068\u306e\u540c\u671f\u306f\u672a\u78ba\u8a8d\u3067\u3059\u3002<\/p>\n\n\n<!-- cgm-topic:start -->\n\n\n<p class=\"wp-block-paragraph\">Unity\u306e\u57fa\u790e\u3068\u5b66\u7fd2\u306e\u8a18\u4e8b\u306f\u3001\u307b\u304b\u306b\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/unity\/wp-content\/uploads\/2016\/10\/multiple-scene-load-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/unity\/multiple-scene-load\/\">Unity\u3067\u30b7\u30fc\u30f3\u3092\u5207\u308a\u66ff\u3048\u308b\u65b9\u6cd5\uff5cSceneManager\u3068UI\u753b\u9762\u306e\u9055\u3044<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Unity\u3067Button\u304b\u3089\u5225Scene\u3078\u79fb\u308b\u624b\u9806\u3092\u89e3\u8aac\u3002Unity 6.3\u306eBuild Profiles\u3068Scene List\u3001SceneManager\u306e\u6700\u5c0f\u30b3\u30fc\u30c9\u3001Single\u30fbAdditive\u30fb\u975e\u540c\u671f\u306e\u9055\u3044\u3001\u540c\u4e00Scene\u306eUI\u79fb\u52d5\u3001\u5931\u6557\u6642\u306e\u78ba\u8a8d\u9806\u3092\u6574\u7406\u3057\u307e\u3059\u3002<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/unity\/wp-content\/uploads\/2017\/06\/create-vr-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/unity\/create-vr\/\">Unity\u3067\u30b9\u30de\u30dbVR\u3092\u4f5c\u308b\u306b\u306f\uff5cCardboard\u306e\u73fe\u884c\u624b\u9806\u3068Unity 5.6\u65e7\u8cc7\u6599<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u73fe\u884cCardboard XR Plugin\u306e\u5165\u53e3\u3068Unity 5.6\u306e\u65e7\u8a2d\u5b9a\u3092\u5206\u3051\u3066\u89e3\u8aac\u3002Android\u74b0\u5883\u3001\u4e21\u773c\u8868\u793a\u3001\u5b9f\u6a5f\u78ba\u8a8d\u306e\u5207\u308a\u5206\u3051\u3092\u6574\u7406\u3057\u307e\u3059\u3002<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/unity\/wp-content\/uploads\/2026\/10\/unity-learning-19813-20261003-300x158.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/unity\/unity-online-learning\/\">Unity\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\uff5c\u7121\u6599\u306e\u516c\u5f0f\u6559\u6750\u30fb\u65e5\u672c\u8a9e\u8b1b\u5ea7\u306e\u9078\u3073\u65b9<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Unity\u3092\u7121\u6599\u3067\u5b66\u3073\u59cb\u3081\u308b\u516c\u5f0f\u6559\u6750\u3068\u65e5\u672c\u8a9e\u8b1b\u5ea7\u3092\u76ee\u7684\u5225\u306b\u6bd4\u8f03\u3002Unity Learn\u3001ZEN Study\u3001Udemy\u306e\u524d\u63d0\u30fb\u5bfe\u5fdc\u7248\u3068\u3001\u65e7\u8b1b\u5ea7\u306e\u6ce8\u610f\u70b9\u3001\u6700\u521d\u306e\u8ab2\u984c\u3067\u6b62\u307e\u3063\u305f\u3068\u304d\u306e\u78ba\u8a8d\u9806\u3092\u6574\u7406\u3057\u307e\u3059\u3002<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/unity\/wp-content\/uploads\/2026\/10\/unity-learning-19825-20261003-300x158.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/unity\/unity-engineer-book\/\">Unity\u5165\u9580\u5f8c\u306e\u5c02\u9580\u66f8\u30fb\u95a2\u9023\u66f812\u518a\uff5cC#\u30fb\u30b7\u30a7\u30fc\u30c0\u30fc\u30fb\u6570\u5b66\u30fb\u62e1\u5f35\u3067\u9078\u3076<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Unity\u5165\u9580\u5f8c\u306b\u8aad\u3080\u672c\u3092\u76ee\u7684\u5225\u306b\u6bd4\u8f03\u3002C#\u3001\u30b7\u30a7\u30fc\u30c0\u30fc\u3001\u6570\u5b66\u3001VR\u3001\u30a8\u30c7\u30a3\u30bf\u30fc\u62e1\u5f35\u306e\u516c\u5f0f\u76ee\u6b21\u3068\u5bfe\u5fdc\u6761\u4ef6\u3092\u78ba\u8a8d\u3057\u3001\u65e7\u7248\u8cc7\u6599\u3084\u5225\u8a00\u8a9e\u306e\u66f8\u7c4d\u306e\u4f7f\u3044\u5206\u3051\u3082\u89e3\u8aac\u3057\u307e\u3059\u3002<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<!-- cgm-topic:end -->\n\n\n<h3 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u97f3\u58f0\u7d20\u6750\u306e\u5f62\u5f0f\u3068\u3001Unity\u3067\u306e\u5727\u7e2e\u5f62\u5f0f\u30fbLoad Type\u3092\u5206\u3051\u3066\u78ba\u8a8d\u3059\u308b<\/li>\n\n\n\n<li>\u97f3\u3092\u9cf4\u3089\u3059\u306b\u306fAudioSource\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u5fc5\u8981\u3068\u306a\u308b<\/li>\n\n\n\n<li><code>PlayOneShot()<\/code>\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u540c\u4e00AudioSource\u4e0a\u3067\u52b9\u679c\u97f3\u3092\u91cd\u306d\u3066\u518d\u751f\u3067\u304d\u308b<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ed5\u69d8\u306e\u53c2\u7167\u5148\u306f<a href=\"https:\/\/docs.unity3d.com\/6000.3\/Documentation\/ScriptReference\/AudioSource.PlayOneShot.html\">PlayOneShot<\/a>\u3001<a href=\"https:\/\/docs.unity3d.com\/6000.3\/Documentation\/ScriptReference\/Input.GetMouseButtonUp.html\">GetMouseButtonUp<\/a>\u3001<a href=\"https:\/\/docs.unity3d.com\/6000.3\/Documentation\/ScriptReference\/AudioClipLoadType.html\">AudioClipLoadType<\/a>\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c0f\u3055\u3044\u97f3\u91cf\u304b\u3089\u8a66\u3057\u3001\u9023\u7d9a\u518d\u751f\u6642\u306e\u97f3\u5272\u308c\u3068\u8ca0\u8377\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">\u3088\u304f\u3042\u308b\u8cea\u554f\uff1aUnity\u306eAudioSource.PlayOneShot\u3067\u52b9\u679c\u97f3\u3092\u9cf4\u3089\u3059<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Unity\u3067\u52b9\u679c\u97f3\u3092\u9cf4\u3089\u3059\u306b\u306f\u3001\u4f55\u304c\u5fc5\u8981\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u97f3\u58f0\u30c7\u30fc\u30bf\u306eAudioClip\u3001\u518d\u751f\u5f79\u306eAudioSource\u3001\u97f3\u3092\u805e\u304f\u5f79\u306eAudioListener\u306e3\u3064\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AudioListener\u306f\u521d\u671f\u72b6\u614b\u306eMain Camera\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u6709\u52b9\u306aAudioListener\u30921\u3064\u3060\u3051\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u52b9\u679c\u97f3\u3068BGM\u3067\u306f\u3001\u3069\u306e\u97f3\u58f0\u5f62\u5f0f\u3092\u9078\u3079\u3070\u3088\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PCM\u306eWAV\/AIFF\u306f\u975e\u5727\u7e2e\u306e\u7d20\u6750\u3001MP3\/Ogg Vorbis\u306f\u975e\u53ef\u9006\u5727\u7e2e\u306e\u7d20\u6750\u3068\u3057\u3066\u6271\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u884c\u6642\u306e\u5bb9\u91cf\u3084\u518d\u751f\u8ca0\u8377\u306fUnity\u306eCompression Format\u3068Load Type\u306b\u3082\u4f9d\u5b58\u3059\u308b\u305f\u3081\u3001\u77ed\u3044\u52b9\u679c\u97f3\u3068\u9577\u3044BGM\u3067\u97f3\u8cea\u30fb\u30e1\u30e2\u30ea\u30fc\u30fbCPU\u8ca0\u8377\u3092\u6bd4\u8f03\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b3\u30fc\u30c9\u3092\u66f8\u304b\u305a\u306b\u97f3\u3092\u9cf4\u3089\u3059\u65b9\u6cd5\u306f\u3042\u308a\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7a7a\u306eGameObject\u3092\u4f5c\u6210\u3057\u3066Audio Source\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8ffd\u52a0\u3057\u3001AudioClip\u6b04\u306b\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u3092\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Play On Awake\u306b\u30c1\u30a7\u30c3\u30af\u304c\u5165\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u518d\u751f\u3059\u308b\u3068\u3001\u30b2\u30fc\u30e0\u958b\u59cb\u3068\u540c\u6642\u306b\u97f3\u304c\u9cf4\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PlayOneShot\u3068\u306f\u4f55\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">AudioSource\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u3001\u52b9\u679c\u97f3\u306a\u3069\u306e\u30ef\u30f3\u30b7\u30e7\u30c3\u30c8\u518d\u751f\u306b\u5411\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u97f3\u58f0\u30921\u56de\u3060\u3051\u518d\u751f\u3057\u3001\u540c\u3058AudioSource\u4e0a\u3067\u518d\u751f\u4e2d\u306e\u97f3\u3092\u9014\u5207\u308c\u3055\u305b\u305a\u306b\u3001\u97f3\u3092\u91cd\u306d\u3066\u518d\u751f\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c2\u5f15\u6570volumeScale\u306fAudioSource.volume\u306b\u639b\u3051\u308b\u500d\u7387\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">0.7f\u306f\u6700\u5927\u97f3\u91cf\u306e70%\u3092\u76f4\u63a5\u6307\u5b9a\u3059\u308b\u5024\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u77ed\u6642\u9593\u306b\u52b9\u679c\u97f3\u3092\u4f55\u5ea6\u3082\u9cf4\u3089\u3057\u3066\u3082\u5927\u4e08\u592b\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u77ed\u6642\u9593\u306b\u5927\u91cf\u306e\u97f3\u3092PlayOneShot\u3067\u540c\u6642\u306b\u9cf4\u3089\u3059\u3068\u3001\u51e6\u7406\u8ca0\u8377\u304c\u5897\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9023\u5c04\u6642\u306e\u52b9\u679c\u97f3\u306a\u3069\u306f\u3001\u540c\u6642\u518d\u751f\u6570\u3084\u518d\u751f\u9593\u9694\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u97f3\u304c\u9cf4\u3089\u306a\u3044\u3068\u304d\u306f\u3001\u4f55\u3092\u78ba\u8a8d\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u3001AudioListener\u304c\u30b7\u30fc\u30f3\u5185\u306b\u5b58\u5728\u3059\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ab\u30e1\u30e9\u3092\u524a\u9664\u3057\u3066\u3044\u308b\u3068\u6d88\u3048\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AudioSource\u53c2\u7167\u306e\u30a8\u30e9\u30fc\u3067\u306f\u540c\u3058GameObject\u306eComponent\u3092\u3001\u672a\u8a2d\u5b9a\u306e\u8b66\u544a\u3067\u306fSound 01\u3068Sound 02\u306eAudioClip\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u97f3\u304c\u5c0f\u3055\u3044\u3001\u307e\u305f\u306f\u805e\u3053\u3048\u306a\u3044\u3068\u304d\u306f\u3069\u3046\u3057\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">AudioSource\u306eMute\/Volume\u3001Game\u30d3\u30e5\u30fc\u306eMute Audio\u3001OS\u51fa\u529b\u5148\u3001Mixer\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Spatial Blend\u304c3D\u5bc4\u308a\u306e\u5834\u5408\u306fListener\u3068\u306e\u8ddd\u96e2\u3082\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8a18\u4e8b\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u305d\u306e\u307e\u307e\u3069\u3093\u306a\u74b0\u5883\u3067\u3082\u52d5\u304d\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8a18\u4e8b\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u3001\u30de\u30a6\u30b9\u306e\u5de6\u30af\u30ea\u30c3\u30af\u3068\u53f3\u30af\u30ea\u30c3\u30af\u3067\u5225\u306e\u52b9\u679c\u97f3\u3092\u9cf4\u3089\u3059\u4f8b\u3067\u3001Input.GetMouseButtonUp\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Input Manager (Old)\u307e\u305f\u306fBoth\u3092\u6709\u52b9\u306b\u3057\u305fPC\u7528\u306e\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Input System\u306e\u307f\u306e\u5834\u5408\u306f\u3001\u672c\u6587\u306eUpdate\u5dee\u3057\u66ff\u3048\u4f8b\u3068\u5c0e\u5165\u30fb\u66f4\u65b0\u30e2\u30fc\u30c9\u306e\u8a2d\u5b9a\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u56de\u3001Unity\u3067\u306e\u5b9f\u884c\u30fb\u5b9f\u97f3\u306e\u78ba\u8a8d\u306f\u884c\u3063\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u8a18\u4e8b\u3067\u306f\u3001Unity\u521d\u5fc3\u8005\u5411\u3051\u306b\u52b9\u679c\u97f3\u306e\u518d\u751f\u624b\u9806\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002 \u57fa\u672c\u30b3\u30fc\u30c9\u306f\u5f93\u6765\u306eInput Manager\u3092\u4f7f\u3046\u30de\u30a6\u30b9\u64cd\u4f5c\u306e\u4f8b\u3067\u3059\u3002 Input System\u7528\u306eUpdate\u5dee\u3057\u66ff\u3048\u4f8b\u3082\u63b2\u8f09\u3057\u307e\u3059\u3002 Unity\u3067\u306e\u30b3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":21741,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","book_review_data":"","footnotes":"","ssp_meta_title":"Unity\u306ePlayOneShot\u3067\u52b9\u679c\u97f3\u3092\u9cf4\u3089\u3059\u65b9\u6cd5","ssp_meta_description":"Unity\u521d\u5fc3\u8005\u5411\u3051\u306b\u52b9\u679c\u97f3\u306e\u9cf4\u3089\u3057\u65b9\u3092\u89e3\u8aac\u3002\u30b3\u30fc\u30c9\u4e0d\u8981\u306e\u8a2d\u5b9a\u624b\u9806\u304b\u3089\u3001C#\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u3044\u5de6\u53f3\u30af\u30ea\u30c3\u30af\u3067\u97f3\u3092\u5206\u3051\u308b\u624b\u9806\u3001\u97f3\u3092\u91cd\u306d\u308bPlayOneShot\u306e\u7279\u5fb4\u3084\u9cf4\u3089\u306a\u3044\u30c8\u30e9\u30d6\u30eb\u306e\u5bfe\u51e6\u6cd5\u307e\u3067\u5206\u304b\u308a\u307e\u3059\u3002"},"categories":[25],"tags":[],"class_list":["post-187","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting"],"_links":{"self":[{"href":"https:\/\/cg-method.com\/unity\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cg-method.com\/unity\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cg-method.com\/unity\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cg-method.com\/unity\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cg-method.com\/unity\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":11,"href":"https:\/\/cg-method.com\/unity\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":22683,"href":"https:\/\/cg-method.com\/unity\/wp-json\/wp\/v2\/posts\/187\/revisions\/22683"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cg-method.com\/unity\/wp-json\/wp\/v2\/media\/21741"}],"wp:attachment":[{"href":"https:\/\/cg-method.com\/unity\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cg-method.com\/unity\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cg-method.com\/unity\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}