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
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
160
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
290
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
450
気持ちぃ〜角丸 Squircle
ryu1013
0
320
[2026-10-14](C)Re:ゼロから始める異世界生活〜始まりの終わりと終わりの始まり〜
tosite
0
140
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
970
No More NoSuchMethodError
exoego
1
110
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.1k
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
820
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
AmebaブログはKMPから卒業します
kmars0605
0
210
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4.2k
Featured
See All Featured
Skip the Path - Find Your Career Trail
mkilby
1
260
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Git: the NoSQL Database
bkeepers
PRO
433
67k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
580
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Designing for humans not robots
tammielis
254
26k
Raft: Consensus for Rubyists
vanstee
142
7.8k
Building Adaptive Systems
keathley
44
3.3k
Ethics towards AI in product and experience design
skipperchong
2
440
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Docker and Python
trallard
47
4.2k
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)