LoginSignup
1
0

More than 1 year has passed since last update.

【小ネタ】DeleteTrack()した際のTimelineEditorの描画崩れを防ぐ方法

Posted at

UnityでスクリプトからTimelineAssetのDeleteTrack()を行った際に、TimelineEditorの描画が崩れてしまう現象を防ぐ方法を記載します。

Timelineのエディタ拡張.csの一部
timelineAsset.DeleteTrack(track);
TimelineEditor.Refresh(RefreshReason.ContentsAddedOrRemoved);//←これが無いとエディタ表示が崩れる

ググったけど資料が少ないので書き留めておきます。
というかDeleteTrack()のページに書いておいてほしいなぁ。。

参考資料

Timeline.TimelineAsset-DeleteTrack - Unity スクリプトリファレンス
Unable to use DeleteTrack properly - Unity Forum

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