-
Notifications
You must be signed in to change notification settings - Fork 8
Componentの追加方法
katsumasa edited this page Sep 1, 2020
·
1 revision
大まかには以下のフローで作業を行います。
- ComponentKun.csで定義されているComponentKunType へ追加したいComponentのTypeを追加します。
- Player/Scripts/ComponentフォルダにComponentKunを継承したClassを追加します。ComponentKunはClassをRuntime/Editorの両方でシリアライズ/デシリアライズを実現する為のClassです。
- Editor/Scripts/ComponentフォルダにComponentViewを継承したClassを追加します。ComponentViewはEditor上でComponentの内容を編集する為のClassです。
- componentPairDictとGetComponentKunTypeへ追加したいComponentとComponentKunを継承したClassを登録します。