<?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>.NET</anon>
    <anon>C#</anon>
    <anon>Unity</anon>
  </categories>
  <description>ある GameObject が削除されたときに関連付けた Object が一緒に削除される仕組みを紹介したいと思います。 特に、Unity の Material はプロパティに一度でも触ると勝手にコピーされて解放は自分でやってね、という動作のため解放処理を OnDestroy にいちいち書くのが面倒です。なので何もせずとも同時に破棄されるようにしたいと思います。 確認環境 Unity 2022.3.5f1 Windows11 + VisualStudio 2022 エディター上のみで動作確認 問題の確認 問題の確認です。以下のコメントのようにマテリアルのプロパティに触った瞬間マテリアルが複製さ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2023%2F07%2F22%2F182141&quot; title=&quot;【Unity】GameObjectがDestroyされたら一緒にオブジェクトを削除する - 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>2023-07-22 18:21:41</published>
  <title>【Unity】GameObjectがDestroyされたら一緒にオブジェクトを削除する</title>
  <type>rich</type>
  <url>https://takap-tech.com/entry/2023/07/22/182141</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
