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?

More than 5 years have passed since last update.

【Unity】画像の外部読込時に、端に謎の線が出る際の対処法

Last updated at Posted at 2020-03-19

画像の外部読込時に、画像の端に謎の線が残る現象が起きました。
どうやら画像の逆端の部分が見えてしまっているようです。
インスペクターで設定を変更すればいいのですが、外部読込の場合スクリプトで設定を変更する必要があります。

TextureWrapModeをClampに設定する
filename.TextureWrapMode
image.sprite.texture.wrapMode = TextureWrapMode.Clamp;

下記記事を参考にしました。

参考記事:
Unityで画像の端に謎の線が出るときの対処法

下記も試したので、一応載せておきます。
(→僕の場合は線が残りました)

filename.UseSpriteMesh
image.useSpriteMesh = true;

参考記事:
【Unity】SpriteAtlasでパックしたスプライトをUIに使用したときに出るゴミの対処

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?