I wanna know Next State's Name

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

I wanna know Next State's Name

Post by lanslot »

i wanna implement a function that follow special string to transition next state,
Just like

Code: Select all

public List<StateLink> nextLinks;
public string nextStateName;
void Update(){
     foreach(StateLink link in nextLinks){
          if(nextStateName.Equals(link.name)){
                Transition(link);
          }
     }
}
but StateLink.name equals ""
what should i do for this function
lanslot
Posts: 13
Joined: 2016/09/30 09:54

Re: I wanna know Next State's Name

Post by lanslot »

ok,i know it
just change link name in StateLink Button
But I have a little advice.
when i link the StateLink to another State, Arbor can auto change StateLink's name
if someone need change StateLink Button's name,you can add field called "Display Name"
how do you think? :D
lanslot
Posts: 13
Joined: 2016/09/30 09:54

Re: I wanna know Next State's Name

Post by lanslot »

Another Question:
How to transmit a Message to another state?
User avatar
caitsithware
管理人
Posts: 495
Joined: 2015/08/17 12:41

Re: I wanna know Next State's Name

Post by caitsithware »

i wanna implement a function that follow special string to transition next state,
Is it that you want to get the state name of the connected StateLink?
The code for getting State name from StateLink is as follows.

Code: Select all

public StateLink nextState;
void Update()
{
	State state = stateMachine.GetStateFromID(nextState.stateID);
	if (state != null)
	{
		Debug.Log("NextState : " + state.name);
	}
}
If the field name StateLink.name is complicated, I will change it to displayName.
Another Question:
How to transmit a Message to another state?
Please use InputSlot and OutputSlot to exchange data between State.
http://arbor.caitsithware.com/en/manual ... ulatornode
http://arbor.caitsithware.com/en/manual ... ulatornode
Post Reply