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?

【Untiy】LineRendererがskyboxで上書きされる【備忘録】

Posted at

事象

LineRendererでベジェ曲線を利用したUIを作成しようとしたところ,以下のような状態に...

UnitySS1

やりたいこと

次のスクリプトでLineRendererの始点と終点をオブジェクトになる様に指定したところ,オブジェクトと重なっているところだけ表示,LineRendererだけではSkyboxで上書きされている(?)状態に.

public class CreateBezierCurve : MonoBehaviour
{
    public Transform trans1;
    public Transform trans2;

    void Start()
    {
        
    }

    void Update()
    {
        LineRenderer render = GetComponent<LineRenderer>();
        render.positionCount = 2;
        render.SetPosition(0, trans1.position);
        render.SetPosition(1, trans2.position);
    }
}

解決策

直接の解決になるわけではないけど,現状の解決策です.
CameraのInspectorのClear FlagsをSkyboxではなくSolid Colorにすると問題なく表示される.(上書きされないから?)

UnitySS2

始点終点のオブジェクトよりカメラ側にあるのに何で表示されないんだろうか.
完璧な改善策を見つけたら追記します.

UnitySS3
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?