<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hanaaaaaachiru</author_name>
  <author_url>https://blog.hatena.ne.jp/hanaaaaaachiru/</author_url>
  <blog_title>はなちるのマイノート</blog_title>
  <blog_url>https://www.hanachiru-blog.com/</blog_url>
  <categories>
    <anon>Unity</anon>
  </categories>
  <description>はじめに 今回はエディタ上でスクリプトからAudioClipを再生する方法を書きたいと思います。具体的な利用場面は、EditorWindow内でボタンを押したら音声を出力したいといった場合とかですかね。 はじめに 概要 やり方 補足 補足2 概要 エディタ上で音声を再生するAPIはUnityは公式で用意してくれていません。ただUnityEditor.AudioUtil.dllに含まれるAudioUtilクラスをリフレクションを用いて利用することで音声を流す事ができます。 github.com内部実装はc++で記述されているので見る事はできませんが、そのC#ラッパーはUnityCsReferen…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.hanachiru-blog.com%2Fentry%2F2022%2F09%2F22%2F120000&quot; title=&quot;【Unity】エディタ上でスクリプトからAudioClipを再生する(Unity 2020.2からPlayClip -&amp;gt; PlayPreviewClipになったので注意) - はなちるのマイノート&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-09-22 12:00:00</published>
  <title>【Unity】エディタ上でスクリプトからAudioClipを再生する(Unity 2020.2からPlayClip -&gt; PlayPreviewClipになったので注意)</title>
  <type>rich</type>
  <url>https://www.hanachiru-blog.com/entry/2022/09/22/120000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
