<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Piler</title>
    <description>The latest articles on DEV Community by Piler (@piler-tam).</description>
    <link>https://dev.to/piler-tam</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1649601%2F3076ffb5-0790-4101-ae44-eb4e18eb3ced.jpeg</url>
      <title>DEV Community: Piler</title>
      <link>https://dev.to/piler-tam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/piler-tam"/>
    <language>en</language>
    <item>
      <title>[Unity] Delegate and loop related issue</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Mon, 06 Jan 2025 07:42:14 +0000</pubDate>
      <link>https://dev.to/piler-tam/unity-delegate-and-loop-related-issue-2mn0</link>
      <guid>https://dev.to/piler-tam/unity-delegate-and-loop-related-issue-2mn0</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    void Start()
    {
        for (int i = 0; i &amp;lt; 3; i++)
        {
            button.onClick.AddListener(() =&amp;gt; Foo(i));
        }
    }

    void Foo(int i)
    {
        Debug.Log(i);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you write code like this, you expected the output is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0
1
2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;but the result is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3
3
3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reason is when using delegate, variable is captured by reference. (Closure and Captured Variable Behavior)&lt;/p&gt;

&lt;p&gt;Solution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    void Start()
    {
        for (int i = 0; i &amp;lt; 3; i++)
        {
            int temp = i;
            button.onClick.AddListener(() =&amp;gt; Foo(temp));
        }
    }

    void Foo(int i)
    {
        Debug.Log(i);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>[Design Pattern] Observer pattern for achievement System</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Thu, 02 Jan 2025 06:52:31 +0000</pubDate>
      <link>https://dev.to/piler-tam/design-pattern-observer-pattern-for-achievement-system-1223</link>
      <guid>https://dev.to/piler-tam/design-pattern-observer-pattern-for-achievement-system-1223</guid>
      <description>&lt;p&gt;I would use Node.js as example.&lt;/p&gt;

&lt;p&gt;eventBus.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const EventEmitter = require('events');
const eventBus = new EventEmitter();
module.exports = eventBus;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;account.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const eventBus = require("../eventBus");
function register(uid) {
    eventBus.emit("onRegister", { uid, time: Date.now() });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;gacha.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const eventBus = require("../eventBus");
function gacha(uid) {
    eventBus.emit("onGacha", { uid, grade});

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;achievement.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const eventBus = require("../eventBus");
eventBus.on("onRegister", (args) =&amp;gt; {
  createUserAchievements(args.uid);
});

eventBus.on("onGacha", (args) =&amp;gt; {
  updateProgress(args.uid, `gacha`);
  updateProgress(args.uid, `gacha:${args.grade}`);

});

async function updateProgress(uid, type, count = 1) {
  console.log(`[userId:${uid}] updateProgress: ${type}`);

  try {
    // Fetch user achievements
    const userAchievementsData = await UserAchievement.findOne({ userId: uid });
    if (!userAchievementsData || !Array.isArray(userAchievementsData.achievements)) {
      console.error(`[userId:${uid}] No achievements data found`);
      return;
    }

    // Iterate through user achievements
    let hasUpdates = false;
    for (const userAchievement of userAchievementsData.achievements) {
      // Skip achievements not in progress
      if (userAchievement.status !== "in_progress") continue;

      // Fetch the related achievement
      const achievement = await Achievement.findById(userAchievement.achievementId);
      if (!achievement) {
        console.error(`[userId:${uid}] Achievement not found: ${userAchievement.achievementId}`);
        continue;
      }

      // Update progress if type matches
      if (type === achievement.requirements.type) {
        userAchievement.progress += count;
        hasUpdates = true;

        // Check for completion
        if (userAchievement.progress &amp;gt;= achievement.requirements.count) {
          userAchievement.status = "completed";
          console.log(`[userId:${uid}] Achievement "${achievement.en}" completed`);
        }
      }
    }

    // Save updates if any changes were made
    if (hasUpdates) {
      await userAchievementsData.save();
      console.log(`[userId:${uid}] Progress updated successfully`);
    } else {
      console.log(`[userId:${uid}] No progress updates required`);
    }
  } catch (error) {
    console.error(`[userId:${uid}] Error updating progress:`, error);
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>[Unity] Two texture transition shader</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Thu, 02 Jan 2025 03:15:51 +0000</pubDate>
      <link>https://dev.to/piler-tam/unity-two-texture-transition-shader-2f4g</link>
      <guid>https://dev.to/piler-tam/unity-two-texture-transition-shader-2f4g</guid>
      <description>&lt;p&gt;Target Effect:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwexl1ez70sp5z9a49535.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwexl1ez70sp5z9a49535.gif" alt="Image description" width="209" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create variables: two texture and origin(float)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fww9wb6igr02udx1xtkas.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fww9wb6igr02udx1xtkas.png" alt="Image description" width="181" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a binary mask
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsvz2bdknqqxk7a09ign6.png" alt="Image description" width="800" height="544"&gt;
&lt;/li&gt;
&lt;li&gt;Create a reversed binary mask
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F37p1pvdosfmucd599qzp.png" alt="Image description" width="800" height="459"&gt;
&lt;/li&gt;
&lt;li&gt;Multiple the binary mask and texture, then add them together
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpb3ph4ebv7g4xba064am.png" alt="Image description" width="738" height="636"&gt;
&lt;/li&gt;
&lt;li&gt;Done! You can modify the origin to do transition!&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>[Unity] use UnityWebRequest by async/without coroutine</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Mon, 16 Dec 2024 07:02:31 +0000</pubDate>
      <link>https://dev.to/piler-tam/unity-use-unitywebrequest-by-asyncwithout-coroutine-enf</link>
      <guid>https://dev.to/piler-tam/unity-use-unitywebrequest-by-asyncwithout-coroutine-enf</guid>
      <description>&lt;p&gt;UnityWebRequestAsync class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Networking;

public static class UnityWebRequestAsync
{
    public async static Task&amp;lt;string&amp;gt; Request(string url, RequestMethod method, string body = null)
    {
        if (string.IsNullOrEmpty(url))
        {
            Debug.LogError("URL cannot be null or empty.");
            return null;
        }

        string[] arr = new string[]
        {
            "GET",
            "POST",
            "PUT",
            "DELETE"
        };

        using UnityWebRequest request = new UnityWebRequest(url, arr[(int)method]);
        try
        {
            // Setup
            if (method != RequestMethod.GET &amp;amp;&amp;amp; body != null)
            {
                byte[] jsonDataBytes = Encoding.UTF8.GetBytes(body);
                request.uploadHandler = new UploadHandlerRaw(jsonDataBytes);
            }

            request.downloadHandler = new DownloadHandlerBuffer();
            request.SetRequestHeader("Content-Type", "application/json");
            request.SetRequestHeader("version", Application.version);

            // Send request
            var operation = request.SendWebRequest();
            while (!operation.isDone)
            {
                await Task.Yield();
            }

            // Check Result
            if (request.result == UnityWebRequest.Result.Success)
            {
                return request.downloadHandler.text;
            }
            else
            {
                Debug.LogError($"Request failed: {request.error} (HTTP {request.responseCode})");
                return null;
            }
        }
        catch (System.Exception ex)
        {
            Debug.LogError($"Exception occurred during request: {ex.Message}");
            return null;
        }
    }
}

public enum RequestMethod
{
    GET,
    POST, 
    PUT, 
    DELETE
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;string result = await UnityWebRequestAsync.Request(url, RequestMethod.GET);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>[Unity] Reducing loading time while entering play mode</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Wed, 16 Oct 2024 06:52:00 +0000</pubDate>
      <link>https://dev.to/piler-tam/unity-reducing-loading-time-while-entering-play-mode-5377</link>
      <guid>https://dev.to/piler-tam/unity-reducing-loading-time-while-entering-play-mode-5377</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Go to Project Settings-&amp;gt;Editor&lt;/li&gt;
&lt;li&gt;Enable "Enter Play Mode Options", Let "Reload Domain" and "Reload Scene".&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpxtiw6xoukg9573u3tf9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpxtiw6xoukg9573u3tf9.png" alt="Image description" width="301" height="89"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*After the above settings, static variables will not be reset while entering play mode.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>[Unity] Fix video player start with black screen in Android</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Fri, 02 Aug 2024 07:29:01 +0000</pubDate>
      <link>https://dev.to/piler-tam/unity-fix-video-player-start-with-black-screen-in-android-fpa</link>
      <guid>https://dev.to/piler-tam/unity-fix-video-player-start-with-black-screen-in-android-fpa</guid>
      <description>&lt;p&gt;Solution: set the render texture initialization color to transparent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Video;

public class VideoPlayerFixBlackScreen : MonoBehaviour
{
    public int width = 848;
    public int height = 480;

    public RawImage rawImage;
    VideoPlayer vp;

    void Start()
    {
        vp = GetComponent&amp;lt;VideoPlayer&amp;gt;();

        var renderTexture = new CustomRenderTexture(width, height);
        renderTexture.initializationColor = new Color(0f, 0f, 0f, 0f);
        vp.targetTexture = renderTexture;

        rawImage.texture = renderTexture;
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>[Unity] How to create a conveyor?</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Thu, 20 Jun 2024 07:29:30 +0000</pubDate>
      <link>https://dev.to/piler-tam/unity-how-to-create-a-conveyor-2h8a</link>
      <guid>https://dev.to/piler-tam/unity-how-to-create-a-conveyor-2h8a</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3x9ks3vwk9h6s6cohirl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3x9ks3vwk9h6s6cohirl.png" alt="Image description" width="461" height="345"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Conveyor : MonoBehaviour
{
    public float speed = 1f;
    Rigidbody rb;

    void Start()
    {
        rb = GetComponent&amp;lt;Rigidbody&amp;gt;();
    }

    private void FixedUpdate()
    {
        Vector3 pos = rb.position;
        rb.position += -transform.forward * speed * Time.fixedDeltaTime;
        rb.MovePosition(pos);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reference: &lt;a href="https://www.youtube.com/watch?v=hC1QZ0h4oco"&gt;https://www.youtube.com/watch?v=hC1QZ0h4oco&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>[Unity] Dropdown menu with search</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Wed, 19 Jun 2024 07:35:22 +0000</pubDate>
      <link>https://dev.to/piler-tam/unity-dropdown-menu-with-search-3a4c</link>
      <guid>https://dev.to/piler-tam/unity-dropdown-menu-with-search-3a4c</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using UnityEditor;
using UnityEngine;
using UnityEditor.IMGUI.Controls;

class WeekdaysDropdown : AdvancedDropdown
{
    public WeekdaysDropdown(AdvancedDropdownState state) : base(state)
    {
    }

    protected override AdvancedDropdownItem BuildRoot()
    {
        var root = new AdvancedDropdownItem("Weekdays");

        var firstHalf = new AdvancedDropdownItem("First half");
        var secondHalf = new AdvancedDropdownItem("Second half");
        var weekend = new AdvancedDropdownItem("Weekend");

        firstHalf.AddChild(new AdvancedDropdownItem("Monday"));
        firstHalf.AddChild(new AdvancedDropdownItem("Tuesday"));
        secondHalf.AddChild(new AdvancedDropdownItem("Wednesday"));
        secondHalf.AddChild(new AdvancedDropdownItem("Thursday"));
        weekend.AddChild(new AdvancedDropdownItem("Friday"));
        weekend.AddChild(new AdvancedDropdownItem("Saturday"));
        weekend.AddChild(new AdvancedDropdownItem("Sunday"));

        root.AddChild(firstHalf);
        root.AddChild(secondHalf);
        root.AddChild(weekend);

        return root;
    }
}

public class AdvancedDropdownTestWindow : EditorWindow
{
    void OnGUI()
    {
        var rect = GUILayoutUtility.GetRect(new GUIContent("Show"), EditorStyles.toolbarButton);
        if (GUI.Button(rect, new GUIContent("Show"), EditorStyles.toolbarButton))
        {
            var dropdown = new WeekdaysDropdown(new AdvancedDropdownState());
            dropdown.Show(rect);
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>unity3d</category>
    </item>
    <item>
      <title>[Unity] Create Dropdown in PropertyDrawer</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Wed, 19 Jun 2024 07:34:45 +0000</pubDate>
      <link>https://dev.to/piler-tam/unity-create-dropdown-in-propertydrawer-1gme</link>
      <guid>https://dev.to/piler-tam/unity-create-dropdown-in-propertydrawer-1gme</guid>
      <description>&lt;p&gt;Offical example code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
    index = EditorGUILayout.Popup(index, options);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to update property value after select:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
  int index = Array.IndexOf(options, property.objectReferenceValue);

  if (index!= -1)
  {
      index = EditorGUI.Popup(position, label.text, index, options);
      property.objectReferenceValue = options[index];
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>unity3d</category>
    </item>
    <item>
      <title>[Unity] Remove non-visible characters/Weird string behavior</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Wed, 19 Jun 2024 07:16:20 +0000</pubDate>
      <link>https://dev.to/piler-tam/unity-remove-non-visible-charactersweird-string-behavior-3na8</link>
      <guid>https://dev.to/piler-tam/unity-remove-non-visible-charactersweird-string-behavior-3na8</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using System;
using System.Text.RegularExpressions;

string input = "Hello\u200B World\u200C!"; // Example string with non-visible characters

string result = Regex.Replace(input, @"\p{C}+", ""); // Remove non-visible characters

Console.WriteLine(result); // Output: Hello World!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>unity3d</category>
    </item>
    <item>
      <title>[Unity] Fix HDRP UI affected by Anti-Aliasing</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Wed, 19 Jun 2024 07:15:50 +0000</pubDate>
      <link>https://dev.to/piler-tam/unity-fix-hdrp-ui-affected-by-anti-aliasing-3o9g</link>
      <guid>https://dev.to/piler-tam/unity-fix-hdrp-ui-affected-by-anti-aliasing-3o9g</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Project Settings -&amp;gt; Quality -&amp;gt; HDRP -&amp;gt; Custom Pass, Enable it&lt;/li&gt;
&lt;li&gt;Create a Custom Pass Volume as below&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4a7hhodqkwfksl8qjyl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4a7hhodqkwfksl8qjyl.png" alt="Image description" width="457" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>unity3d</category>
    </item>
    <item>
      <title>[Unity] TextMeshPro Chinese Font</title>
      <dc:creator>Piler</dc:creator>
      <pubDate>Wed, 19 Jun 2024 07:08:16 +0000</pubDate>
      <link>https://dev.to/piler-tam/unity-textmeshpro-chinese-font-3bd6</link>
      <guid>https://dev.to/piler-tam/unity-textmeshpro-chinese-font-3bd6</guid>
      <description>&lt;p&gt;Unity version: 2022.3 LTS&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prepare a Chinese font file (e.g. ttf file)&lt;/li&gt;
&lt;li&gt;Select your font file in Project view.&lt;/li&gt;
&lt;li&gt;Asset-&amp;gt;Create-&amp;gt;TextMeshPro-&amp;gt;Font Asset&lt;/li&gt;
&lt;li&gt;Select the font asset just created in Project view.&lt;/li&gt;
&lt;li&gt;Set Altas Width &amp;amp; Altas Height to higher resolution. (e.g. 4096)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl09ye91cjbxz9fe50cos.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl09ye91cjbxz9fe50cos.png" alt="Image description" width="567" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Done!&lt;/p&gt;

&lt;p&gt;Thanks to Paul&lt;/p&gt;

</description>
      <category>unity3d</category>
    </item>
  </channel>
</rss>
