0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Unity Localzation Smart String で変数を扱う

Last updated at Posted at 2025-10-29

結論

    private static void SetDay(LocalizeStringEvent currentDay , int day)
    {
        // day 変数部分を動的に更新
        currentDay.StringReference["day"] = new IntVariable { Value = day };
        currentDay.RefreshString(); // 手動更新が必要
    }

以上の設定で、翻訳テキストに変数を扱えるようになりました。

スクリーンショット 2025-10-02 11.13.49.png

結果

日付の n 日目の部分が動的に変化
日本語 -> 1日目
英語 -> Day 1

screenshot_20251002_111217.png

screenshot_20251002_111100.png

実際のゲームはこちら『トルービズの秘薬師』
https://store.steampowered.com/app/4083190/_/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?