★お知らせ(2023/12/27)
いつもLive2D公式コミュニティをご利用いただき誠にありがとうございます。
本コミュニティは2023年12月27日 11:00をもって閉鎖いたしました。
今後の運営はすべて新Live2D公式クリエイターズフォーラムに移行します。
閉鎖に伴い、以下機能は利用不可となります。
・アカウントの新規作成
・トピック投稿、返信
たくさんのご利用誠にありがとうございました。

新Live2D公式クリエイターズフォーラムは以下バナーよりご利用いただけます。
Live2D公式クリエイターズフォーラム

なお、本コミュニティに投稿されたトピックはすべて残りますが、今後削除する可能性がございますので予めご了承ください。
閉鎖に関するお問い合わせにつきましてはLive2D公式クリエイターズフォーラムへご連絡ください。

SDK's Shader not working in LWRP.

Hello, I am using SDK Cubism4.1 and Unity 2019.3.0 (I have this same problem on previous unity versions).
After importing LWRP in Unity, animations which using live2d not working only in build (pc & webgl), in editor is everythink fine. I debugged parameters , change of parameters working correctly but it does not translate into character movement.
Somone know reason or have any tips how resolve this problem?
こんにちは、私はSDK Cubism 4.1とUnity 2019.3.0を使用しています(私は以前のUnityバージョンでこれと同じ問題を抱えています)。

UnityでLWRPを輸入した後に、Live 2 Dを使用しているアニメーションは、ビルド(PC & WebGL)だけで働いていません。パラメータのデバッグ、パラメータの変更が正しく動作しますが、文字の動きに変換されません。

ソロモン知っているか、この問題を解決する方法を任意のヒントがありますか?

コメント

  • Hi @phields

    Cubism SDK for Unity has two Mesh and swaps them with OnRenderObject().
    But, when using LWRP(URP), OnRenderObject() is not called.
    Therefore, the displayed model does not move because the updated mesh is not swapped and passed to the renderer.

    If CubismModel.OnRenderObject() is changed to CubismModel.LateUpdate(), the Cubism model will be animated.
    In this case, since the other Cubism components also operate Parameter values from LateUpdate(), set CubismModel execution order last.

    Thanks.
  • Thanks for reply @y_a_s_(Dev Staff)
    I think to put it to LateUpdate() is not a good ideal.
    I change my script to this:
    void OnEnable() {
    // Camera.onPostRender += OnRendered;
    RenderPipelineManager.endCameraRendering += OnRendered;
    }
    void OnDisable() {
    // Camera.onPostRender -= OnRendered;
    RenderPipelineManager.endCameraRendering -= OnRendered;
    }
    private void OnRendered(ScriptableRenderContext context, Camera camera) {
    OnRendered(camera); // OnRenderObject() from https://docs.unity3d.com/ScriptReference/GL.html
    }

  • @y_a_s_%28Dev%20Staff%29
    And I saw you use UnityCG.cginc in SDK's Shader.
    Unity will stop support these built-in shaders in 2020, Do you have any plan to update these to support SRP?
  • Hi @phields

    There is no problem with your method.
    As mentioned above, you can call it from anywhere as long as you have finished updating with Cubism Components.

    As for SRP, we recognize that Unity's main RP will move to SRP in the future, but we are currently considered specific details.

    Thanks.
コメントするにはサインインまたは登録して下さい。