- Edited
skeletongraphicのリファレンスについて
すみません、大変申し訳無いのですが、skeletongraphicのリファレンスページなどございますでしょうか。
調べてみたのですがなかなか見つからず質問させていただきます、よろしくおねがいします。
ここにスパインユニティランタイムドキュメントのセクションがあります(申し訳ありませんが英語です)。
There is a section in the spine-unity runtime documentation here (I'm sorry it is in English):
spine-unity Runtime Documentation: SkeletonGraphic Component
一般に、 SkeletonAnimation
と同じAPIが SkeletonGraphic
で利用できます。SkeletonAnimation
の場合と同様に、単にskeletonGraphic.Skeleton
と skeletonGraphic.AnimationState
にアクセスできます。
また、 SkeletonGraphic
はUI要素なので、階層内のCanvasの下に配置するようにしてください。
In general, the same API is available for SkeletonGraphic
as for SkeletonAnimation
, you can simply access skeletonGraphic.Skeleton
and skeletonGraphic.AnimationState
as you would with SkeletonAnimation
.
And as SkeletonGraphic
is a UI element, please be sure to place it below a Canvas in the hierarchy.
特定の問題が発生しましたか?
Have you encountered a specific problem?
ありがとうございます、調べたのですがわからないので相談させてください。
以前質問させてもらった
Unityで使用する際の一部Spine素材のモザイク処理について
と同じようにSpineの一部にシェーダーを利用したいと思いました。
今度はUIに使用したいのでskeletongraphicのリファレンスを探したのですが一部のスロットにシェーダーを付ける方法が見つかりませんでした。
(CustomSlotMaterialが使用できませんでした。)
良い解決方法などありますでしょうか。
お手数ですがよろしくおねがいします。
複数のマテリアルとシェーダー(または複数のブレンドモード)が単一の SkeletonGraphic
インスタンスでサポートされていないことを残念に思います。 問題は、単一の SkeletonGraphic
で複数のアトラスページテクスチャのサポートを妨げるUnityのCanvasRenderer
の単一のサブメッシュ制限です。 したがって、異なるブレンドモード用に Spine / SkeletonGraphic
シェーダーの独自のコピーを記述したとしても、単一のCanvasRenderer
で複数のマテリアルを割り当てることはできません。
I'm sorry to say that multiple materials and shaders (or multiple blend modes) are not supported on a single SkeletonGraphic
instance. The problem is the single submesh limitation of Unity's CanvasRenderer
which also prevents support for multiple atlas page textures at a single SkeletonGraphic
. So even if you would write your own copy of the Spine/SkeletonGraphic
shader for different blend modes, it will not be possible to assign multiple materials at a single CanvasRenderer
.
別の回避策を介してSkeletonGraphic
のブレンドモードのサポートを扱う問題チケットがありますが、この機能を実装するまでに時間がかかるのではないかと心配しています。
[unity] SkeletonGraphic blend modes support · #1316
There is an issue ticket that deals with support of blend modes at SkeletonGraphic
via a different workaround, but I fear it will take some time until we get to implement this feature:
[unity] SkeletonGraphic blend modes support · #1316
したがって、現時点での最善の回避策は、スケルトンを異なるマテリアルの複数のパーツに分割することです。
The best workaround for now is to split the skeleton into multiple parts for different materials.
そうなのですね、情報ありがとうございます!
現在実装が難しいということなら別の方法を考えようと思います。
Haraldさん、いつも回答ありがとうございます!
どういたしまして! 機能が実装されたらお知らせします。
You're welcome! We will let you know once the feature is implemented.
4.0ブランチで SkeletonGraphic
のスロットブレンドモードのサポートを実装しました。 この機能を実装するまでに時間がかかって申し訳ありません。 新しいspine-unity4.0 unitypackageは、通常どおりここからダウンロードできます。
Spine Unity Download
スパインユニティのドキュメントページ(英語版のみ、申し訳ありません)も更新され、 SkeletonGraphic
ブレンドモードのプロパティが一覧表示されています。
spine-unity Runtime Documentation: Parameters
We have just implemented slot blend mode support for SkeletonGraphic
on the 4.0 branch. Sorry that it took long until we got to implement this feature! A new spine-unity 4.0 unitypackage is available for download here as usual:
Spine Unity Download
The spine-unity documentation page (the English version only, sorry) has also been updated to list the SkeletonGraphic
blend modes properties:
spine-unity Runtime Documentation: Parameters