<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Takachan</author_name>
  <author_url>https://blog.hatena.ne.jp/Takachan/</author_url>
  <blog_title>PG日誌</blog_title>
  <blog_url>https://takap-tech.com/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>Unity</anon>
  </categories>
  <description>Canvas 内の RectTransform の範囲を背景を無視して切り取って画像に保存する手順です。かなり限定的な状況となりますが uGUI の Image などを子要素に持つ RectTransform を表示されている内容で保存することができます。 まずサブカメラを作成 → RenderTexture にUIレイヤーだけをカメラ表示を出力するように設定しておきます。 この時カメラの BackGroundType は SliodColor で色は 0x00000000（全部ゼロ）にしておきます。 で、以下のコードから ScriptableObject を作成してインスペクターに必要な項目…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2021%2F12%2F02%2F234433&quot; title=&quot;背景を除外してRectTransformの範囲をファイルに保存する - PG日誌&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>2021-12-02 23:44:33</published>
  <title>背景を除外してRectTransformの範囲をファイルに保存する</title>
  <type>rich</type>
  <url>https://takap-tech.com/entry/2021/12/02/234433</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
