StateBehaviourにおけるenabled扱い及び、Monobehaviourとの差異について

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を確認の上、それでも使い方がわからない場合にご質問ください。欲しい機能の記載がドキュメントにない場合は機能が元から存在しない可能性が高いので要望フォーラムへ。
nice

StateBehaviourにおけるenabled扱い及び、Monobehaviourとの差異について

Post by nice »

お世話になっております。
StateBehaviourはMonobehaviourの派生クラスとなっており、
Unity歴の浅い私にも扱いやすく大変助かっております。ありがとうございます。

質問なのですが、StateBehaviourではMonobehaviourのように、
ユーザースクリプト側にて、enabledを任意のタイミングで変えるのは禁止でしょうか?
(状態に入ったらState内のenabledをtrueに、状態から出たらfalseにしているような挙動に思えたので…)

また、上記以外にも、Monobehaviourにある機能でStateBehaviourでは使用禁止だったり、
挙動が変わるものがありましたら、それらが一覧となっていると嬉しく思います。

以上、よろしくおねがいします。
nice

Re: StateBehaviourにおけるenabled扱い及び、Monobehaviourとの差異について

Post by nice »

自己レスとなってしまいますが…

見落としが無いかとスクリプトリファレンスを再度見なおした所、
behaviourEnabledというプロパティを見つけました。
恐らくこれをenabledの代替として使用すれば良いのですね。

大変失礼いたしました。。
User avatar
caitsithware
管理人
Posts: 493
Joined: 2015/08/17 12:41

Re: StateBehaviourにおけるenabled扱い及び、Monobehaviourとの差異について

Post by caitsithware »

おっしゃるとおり、enabledはBehaviourの実行制御のためすでに使用していますので、代替となるbehaviourEnabledを使用していただければと思います。
この辺に関して詳細がドキュメントになかったので追記しておきます。


Last bumped by Anonymous on 2017/01/05 18:52.
Post Reply