1
1

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で作成したゲームをweb上にデプロイしたら文字が消えた

Posted at

はじめに

https://qiita.com/fukaken5050/items/03e07ba3700f5be8c35f
この記事にしたがってweb上に作ったゲームをデプロイしてみたところ、デプロイ自体はできたのですが文字が表示されませんでした。色々調べて解決できたので解決方法をまとめていきます。

原因

Unityに標準で適用されているフォントだと表示されないらしいです。なので、フォントを変えます。

フォントを変更

フォントをダウンロード

https://fonts.google.com/specimen/Noto+Sans+JP
上のリンクからフォントをダウンロードして、解凍しておきます。

フォントをUnityのプロジェクトに追加し適用

UnityのAssetsフォルダにFontsフォルダを作成し、そこにさっき解凍したファイルを追加します。追加したら適用したいTextのTextコンポーネントのFontに追加したファイルを適用します。
スクリーンショット 2024-09-30 142922.png

もし新たにフォントを適用して文字が画面に映らなくなってしまった場合はだいたい文字のサイズが原因なので、TextコンポーネントのFont Sizeをいじってみてください。
スクリーンショット 2024-09-30 143114.png

これでweb上でも文字が表示されるようになりました。

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?