Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
DOTween便利Tips集/dotween-tips
Search
ゆーじ
March 24, 2021
Programming
3.5k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DOTween便利Tips集/dotween-tips
知らなかった!DOTween便利Tips集
ゆーじ
March 24, 2021
More Decks by ゆーじ
See All by ゆーじ
モチベーションとモーションの話/motivation-and-motion
yusuke57
0
400
パズル制作と絵作り(ドット絵)の話 / u1w-clones
yusuke57
0
430
DOTweenという神アセットの話 / DOTween-god-asset
yusuke57
0
1.5k
UI/UXを意識して 超快適なゲーム作ってみた / Push
yusuke57
1
670
Other Decks in Programming
See All in Programming
contenteditable と日本語入力に向き合う
colorful12
0
210
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
510
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
440
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
120
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
180
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
320
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
290
パスワード再設定メールのURLについて知っておこう
uyuki234
0
170
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.8k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
230
[2026-10-09]一枚の布で作らなくてもいい。 信頼性は「パッチワーク」で紡がれる~既存の運用と新しい可能性をつなぎ合わせてきたCREの話~
tosite
0
110
ChromeでローカルLLM
ryu1013
0
160
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
The Cult of Friendly URLs
andyhume
79
7k
Ruling the World: When Life Gets Gamed
codingconduct
0
410
Deep Space Network (abreviated)
tonyrice
0
380
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
490
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
750
Design in an AI World
tapps
1
360
How GitHub (no longer) Works
holman
316
150k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Transcript
8 min Gotanda.unity #17 ゆーじ @yuji_ap
自己紹介 『CUBE CLONES』 AppStore / GooglePlay 370円 DOTweenやUIデザインが好きなエンジニア 最近パズルゲームをリリースしました
今日の内容 便利だけど知らない人がいそうなDOTweenの機能をパパッと7つ紹介 DOTween触ったことない方は、 これだけ覚えてもらえれば何となく理解できるかと思います...! [ 対象 ] [ 操作 ]
[ 値 ] [ 秒数 ] 自身を X方向に動かす 3まで 0.5秒間で
秒数に0を指定する 便利Tips ①
秒数に0を指定する position.xの値を変更したい場合 DOMoveX()で秒数に0を指定すれば、同じことが1行でできる
相対的な値を指定する 便利Tips ②
相対的な値を指定する 通常は絶対的な値を指定する SetRelative(true) で相対的な値を指定できる
timescaleを無視する 便利Tips ③
timescaleを無視する SetUpdate(true)をつけることでtimescaleを無視できる ちなみにTween自体のtimescaleは以下のように変えられる
開始時の値を指定する 便利Tips ④
開始時の値を指定する 通常は終了時の値を指定する From() で開始時の値を指定できる 開始時に第一引数の値に瞬時に変わり、元の値まで進む
一定時間後に処理実行する 便利Tips ⑤
一定時間後に処理実行する UniTask、コルーチン、Invokeメソッドなど 広く知られている方法がいくつかある DOTweenを入れていれば、 DOVirtual.DelayCall() でも実現できる
共通のパラメータを使う 便利Tips ⑥
共通のパラメータを使う TweenParams型の変数にメソッドチェインでパラメータを指定することで、 パラメータのプリセットのようなものが作れる SetAs() でTweenに適用できる →同じパラメータを複数Tweenで使い回すことができる
SetAs()の別の使い方 SetAs() は引数に直接Tweenを指定することもできる →パラメータをコピーできる
往復アニメーション 便利Tips ⑦
往復アニメーション Loop回数を2、LoopTypeをYoyoにすることで 往復アニメーションができる 時間の都合上省略するが、 Ease.Flash系でも似たことが実現できる
まとめ DOTweenは便利な使い方がたくさん! 使っていく中で見つける便利ハックみたいなものもあるが、 今回紹介したものも半分以上は公式ドキュメントに書いてある http://dotween.demigiant.com/documentation.php
おまけ DOTweenの逆引きサンプル集をいつか作りたい 完成しているUIアニメーションを提示して、 「これはDOTweenでどう作っているのか」を解説する形式 「動かせます」「色が変わります」は機能として分かるけど、 じゃあいい感じのアニメーションを作るには何を動かして何色に変えればいいの? →完成品を見て「これのこの部分を真似したい!」が効率的なのでは
Gotanda.unity #17 ゆーじ @yuji_ap ① 秒数に0を指定する DOMoveX(3f, 0) ② 相対的な値を指定する SetRelative(true) ③
timescaleを無視する SetUpdate(true) ④ 開始時の値を指定する From() ⑤ 一定時間後に処理実行する DOVirtual.DelayCall() ⑥ 共通のパラメータを使う TweenParams, SetAs() ⑦ 往復アニメーション SetLoops(2, LoopType.Yoyo)