18.移動経路表示用のゲームオブジェクトを作成する 19.DrawPath スクリプトを作成する 20.MoveToClickTileMapPoint スクリプトを修正し、移動時に移動経路の表示を行う機能を実装する
・LineRenderer コンポーネント
Unity 公式マニュアル
LineRenderer
https://docs.unity3d.com/ja/current/Manual/class-L...
Unity 公式スクリプトリファレンス
LineRenderer
https://docs.unity3d.com/jp/current/ScriptReferenc...
Unity 公式スクリプトリファレンス
LineRenderer.startWidth
https://docs.unity3d.com/jp/current/ScriptReferenc...
Unity 公式スクリプトリファレンス
LineRenderer.endWidth
https://docs.unity3d.com/jp/current/ScriptReferenc...
// 経路の頂点数の設定 line.positionCount = corners.Length;
Unity 公式スクリプトリファレンス
LineRenderer.positionCount
https://docs.unity3d.com/jp/current/ScriptReferenc...
// 経路の表示(描画) line.SetPositions(corners);
Unity 公式スクリプトリファレンス
LineRenderer.SetPositions
https://docs.unity3d.com/jp/current/ScriptReferenc...
はなちるのマイノート 様
【Unity】LineRendererをスクリプトから自由自在に操る
https://www.hanachiru-blog.com/entry/2020/10/05/12...