<?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>
    <anon>UniRx</anon>
  </categories>
  <description>ゲーム中で「ある値を監視して毎フレームごとに値の変化を監視し、値が変化した時に特定の処理を実行する」という実装方法は色々にありますが、最も一般的な Update メソッド内で値の監視処理を書く実装は規模が大きくなると徐々にコードが見づらくなっていきます。 監視対象の変数が増えた時にUpdate内の実装量が増えるため本来 Update メソッド内でやりたいことが分かりづらくなったり、処理が複雑化すると不具合の要因になったりもします。 そこで今回は、最も一般的な変数の監視方法と、UniTask, UniRx を用いた値の変更検出方法を 5つ紹介したいと思います。 確認環境 (1) 一般的な検出方法…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2023%2F07%2F15%2F160311&quot; title=&quot;【Unity】値の変更を検出して処理を実行する方法 - 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>https://cdn-ak.f.st-hatena.com/images/fotolife/T/Takachan/20230715/20230715181301.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-07-15 16:03:11</published>
  <title>【Unity】値の変更を検出して処理を実行する方法</title>
  <type>rich</type>
  <url>https://takap-tech.com/entry/2023/07/15/160311</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
