Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Due to no changes CubismUpdateController to add new type Controllers #34

Conversation

koichiyamashita
Copy link
Contributor

When we add a new custom Controller, we have to change CubismUpdateController.
Due to no changes CubismUpdateController to add new Controllers.


SDK利用者がController を追加したい場合にSDK内のCubismUpdateController の変更が必要になると思いますが、そういった場合でもCubismUpdateControllerの変更なしで行えるように対応しました。

Copy link
Contributor

@itoh-at-live2d-com itoh-at-live2d-com left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提供ありがとうございます。
ご指摘頂いたCubismUpdateControllerの部分ですが、こちらは弊社が提供している実装の順番でOnLateUpdateを呼び出す必要があります。(さもないと、コンポーネント間にて値の伝搬が正しく行われないためです)
順番を維持するか、それに準じた実装として頂けますでしょうか。

@koichiyamashita
Copy link
Contributor Author

実行順序の定義を追加しました。

@itoh-at-live2d-com
Copy link
Contributor

@koichiyamashita
ありがとうございます!
こちら一旦PR頂いているブランチを、動作試験にて確認いたします。

Copy link
Contributor

@ono-at-live2d-com ono-at-live2d-com left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koichiyamashita
修正対応ありがとうございます。
意図通りの動作になることを確認いたしました。

一点だけ対応をお願いしたいのですが、各クラスでExecutionOrderに設定する値を定数にするなどで、マジックナンバーを使わないようにしていただけませんでしょうか?

Copy link
Contributor

@itoh-at-live2d-com itoh-at-live2d-com left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

問題なさそうです😀
対応ありがとうございます!

public static readonly int CubismHarmonicMotionController = 600;
public static readonly int CubismLookController = 700;
public static readonly int CubismRenderController = 10000;
public static readonly int CubismMaskController = 10100;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

問題なさそうです😃

@koichiyamashita
Copy link
Contributor Author

CubismUpdateExecutionOrder にてSDK でのExecutionOrder を定義しました。
SDK 利用者がCustom Controller を追加する場合は、このファイルを編集するのではなく、処理タイミングとしてこれを参照しながら利用者側で別に定数定義を用意する運用を想定しています。
*そうすることでSDK をupdateする際の開発フローも確保されるかと思います。

@itoh-at-live2d-com
Copy link
Contributor

@koichiyamashita
動作確認OKでした。
マージします

@itoh-at-live2d-com
Copy link
Contributor

itoh-at-live2d-com commented Jun 21, 2019

We defined the execution orders of OnLateUpdate in CubismUpdateExecutionOrder.
In adding a custom controller, the user can modify the code to change the execution orders more easier than past procedure.

  • By doing this, the user can update the Sdk easy going.

@itoh-at-live2d-com itoh-at-live2d-com merged commit aa46e1e into Live2D:develop Jun 21, 2019
@itoh-at-live2d-com
Copy link
Contributor

@koichiyamashita
マージしました。
ご提供誠にありがとうございました🙇‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants