<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Unity on DMStory - 大喵的故事</title>
    <link>https://dmstory.github.io/posts/unity/</link>
    <description>Recent content in Unity on DMStory - 大喵的故事</description>
    <image>
      <title>DMStory - 大喵的故事</title>
      <url>https://dmstory.github.io/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://dmstory.github.io/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <lastBuildDate>Sun, 26 Jun 2022 11:12:15 +0800</lastBuildDate>
    <atom:link href="https://dmstory.github.io/posts/unity/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>使用shader实现fillamount效果</title>
      <link>https://dmstory.github.io/posts/unity/unity-shader-sprite-fillamount/</link>
      <pubDate>Sun, 26 Jun 2022 11:12:15 +0800</pubDate>
      <guid>https://dmstory.github.io/posts/unity/unity-shader-sprite-fillamount/</guid>
      <description>&lt;p&gt;使用UGUI的Image可以轻松实现进度条的效果。但是有些情况下我们需要制作针对游戏世界中的物体的进度条，例如人物头顶的HP条，机器旁边的CD条等。常规的做法通过将世界坐标映射到UI，然后使用Image制作这些元素。当游戏世界中的物体
位置改变的时候，需要通知UI去改变相应元素的位置，如果需要考虑摄像机对于进度条的影响，例如摄像机拉远时进度条变小，则会更加麻烦。&lt;/p&gt;
&lt;p&gt;这里提供一种使用shader实现进度条的方案。测试环境：Unity 2020.3.32。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Unity协程探究</title>
      <link>https://dmstory.github.io/posts/unity/unity-coroutine-research/</link>
      <pubDate>Sat, 21 May 2022 15:31:34 +0800</pubDate>
      <guid>https://dmstory.github.io/posts/unity/unity-coroutine-research/</guid>
      <description>&lt;p&gt;Unity提供了协程来实现一定程度上的“伪并发”。&lt;/p&gt;
&lt;p&gt;众所周知，UnityAPI只能在主线程中调用，如果我们希望通过多线程来实现多个过程的并发处理，那么如果涉及对UnityAPI的操作，则必须转到主线程去执行，比较繁琐。
&lt;a href=&#34;https://docs.unity3d.com/ScriptReference/MonoBehaviour.StartCoroutine.html&#34;&gt;MonoBehaviour.StartCoroutine&lt;/a&gt;可以创建一个协程(Coroutine)，
在协程中可以通过&lt;code&gt;yield&lt;/code&gt;语句暂停程序执行或者退出协程，从游戏运行的宏观角度看，它们似乎是在并行一样。&lt;/p&gt;</description>
    </item>
    <item>
      <title>浅谈UGUI优化-网格合并</title>
      <link>https://dmstory.github.io/posts/unity/ugui-optimize-rebatch/</link>
      <pubDate>Sun, 26 Dec 2021 19:11:33 +0800</pubDate>
      <guid>https://dmstory.github.io/posts/unity/ugui-optimize-rebatch/</guid>
      <description>&lt;p&gt;之前说到优化DrawCall可以降低CPU在渲染上的开销，那么是不是DrawCall越少就一定越好呢？单纯讨论DrawCall的话，确实是，但是如果为了合并DrawCall需要付出的代价很大，就会得不偿失。网格合并（Rebatch）就是UGUI解决DrawCall问题的代价之一。&lt;/p&gt;</description>
    </item>
    <item>
      <title>浅谈UGUI优化-网格重建</title>
      <link>https://dmstory.github.io/posts/unity/ugui-optimize-rebuild/</link>
      <pubDate>Sun, 26 Dec 2021 14:22:20 +0800</pubDate>
      <guid>https://dmstory.github.io/posts/unity/ugui-optimize-rebuild/</guid>
      <description>&lt;p&gt;在优化的过程中，我们经常会听到Rebatch和Rebuild这两个词，很多人将这两个词混为一谈，其实它们之间虽然有关联但是本质上是两个过程。今天先聊一聊网格重建(Rebuild)，要理解这一过程，就需要先明白为什么会有网格，然后再讨论为什么会重建。&lt;/p&gt;</description>
    </item>
    <item>
      <title>浅谈UGUI优化-DrawCall篇</title>
      <link>https://dmstory.github.io/posts/unity/ugui-optimize-drawcall/</link>
      <pubDate>Sat, 25 Dec 2021 11:34:43 +0800</pubDate>
      <guid>https://dmstory.github.io/posts/unity/ugui-optimize-drawcall/</guid>
      <description>&lt;p&gt;说起UGUI的优化，DrawCall一定是一个绕不开的话题。当然不只是UI优化，Unity中性能优化都会涉及DrawCall的优化。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
