ParameterContainerのComponent型で型を切り替える方法が知りたい

Here is the forum to do the questions about how to use to Arbor developer.
Attention point:
  • We can not answer your questions about your project specific issues.
  • We can not answer your questions on Unity's specification issues.
  • Please check Arbor Documentation and ask a question if you still don't know how to use it. If the desired function is not described in the document, it is highly possible that the function does not exist from the beginning, so go to the request forum.

ここは、Arbor開発者へ使い方に関する質問を行うフォーラムです。
注意点:
  • ユーザー様のプロジェクトの仕様上の問題や設計に対する質問には答えられません。
  • Unityの仕様上の問題に対する質問には答えられません。
  • Arbor Documentationを確認の上、それでも使い方がわからない場合にご質問ください。欲しい機能の記載がドキュメントにない場合は機能が元から存在しない可能性が高いので要望フォーラムへ。

Forum rules
Here is the forum to do the questions about how to use to Arbor developer.
Attention point:
  • We can not answer your questions about your project specific issues.
  • We can not answer your questions on Unity's specification issues.
  • Please check Arbor Documentation and ask a question if you still don't know how to use it. If the desired function is not described in the document, it is highly possible that the function does not exist from the beginning, so go to the request forum.

ここは、Arbor開発者へ使い方に関する質問を行うフォーラムです。
注意点:
  • ユーザー様のプロジェクトの仕様上の問題や設計に対する質問には答えられません。
  • Unityの仕様上の問題に対する質問には答えられません。
  • Arbor Documentationを確認の上、それでも使い方がわからない場合にご質問ください。欲しい機能の記載がドキュメントにない場合は機能が元から存在しない可能性が高いので要望フォーラムへ。
kag
Posts: 35
Joined: 2017/05/19 08:28

ParameterContainerのComponent型で型を切り替える方法が知りたい

Post by kag »

Component型にして、ImageコンポーネントのGameObjectを入れると、RectTransform型になってしまいます。
Image型に切り替える方法はありますか?
FlexibleComponentの方でSlotTypeを決めて受け取っても、中に入っているのがRectTransformコンポーネントなので、
結局gameObject.GetComponent<Image>()しないと受け取れなくて不便だなと。
User avatar
caitsithware
管理人
Posts: 493
Joined: 2015/08/17 12:41

Re: ParameterContainerのComponent型で型を切り替える方法が知りたい

Post by caitsithware »

ParameterContainerでの設定ではどの型かを指定できないため、Inspectorからコンポーネントをドラッグ&ドロップして格納する必要があります。

作業の流れは以下の通りです。
  • Inspectorを2つ表示する。
    Inspectorを追加するには、右上のポップアップボタンをクリックし、「AddTab / Inspector」
    [Suport]Arbor2.2.2_ParameterContainer_SetComponent01.gif
    [Suport]Arbor2.2.2_ParameterContainer_SetComponent01.gif (103.36 KiB) Viewed 4170 times
  • ParameterContainerのGameObjectをHierarchyで選択し、片方のInspectorをLock。
    InspectorをLockは、右上の錠前アイコンをクリック。
    [Suport]Arbor2.2.2_ParameterContainer_SetComponent02.gif
    [Suport]Arbor2.2.2_ParameterContainer_SetComponent02.gif (50.3 KiB) Viewed 4170 times
  • Image付きGameObjectをHierarchyで選択し、Imageコンポーネントのタイトルバーをドラッグし、Componentパラメータにドロップ。
    [Suport]Arbor2.2.2_ParameterContainer_SetComponent03.gif
    [Suport]Arbor2.2.2_ParameterContainer_SetComponent03.gif (161.17 KiB) Viewed 4170 times
  • 最後に、設定し終わったらLockした方のInspectorは閉じてしまって問題ありません。
手順がややこしいので、今後の更新で改善できないか検討いたします。
kag
Posts: 35
Joined: 2017/05/19 08:28

Re: ParameterContainerのComponent型で型を切り替える方法が知りたい

Post by kag »

できました!
ありがとうございました。
Post Reply