일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Unity
- 쉘
- List
- null
- FIND
- postgresql
- ubuntu
- sql
- sqlite
- 배열
- python
- pi
- C++
- Shader
- expect
- autovacuum
- SVN
- c++11
- SSH
- boost
- if
- with
- mysql
- DROP
- awk
- dataframe
- Eclipse
- conda
- pandas
- ngui
Archives
- Today
- Total
その先にあるもの…
RPC sync 본문
[RPC]
Send_A()
{
networkView.RPC( "FuncA", RPCMode.All, null );}
}
void FuncA()
{
Debug.Log("FuncA");
Send_B();
}
[RPC]
Send_B()
{
networkView.RPC( "FuncB", RPCMode.All, null );}
}
void FuncB()
{
Debug.Log("FuncB");
}
[RPC]
Send_C()
{
networkView.RPC( "FuncC", RPCMode.All, null );}
}
void FuncC()
{
Debug.Log("FuncC");
}
void Send()
{
Send_A();
Send_C();
}
결과
FuncB
FuncA
FuncC
패킷 순서 보장한다고 하여 위 코드처럼 짰다가 낭패를 봤다.
RPC 함수 호출 순서대로 패킷이 전송되는 줄 알았다.
문제가 없을 것 같았는데
콜스택을 보니 Send_A에서 FuncA를 바로 호출하여 마지막으로 호출된 Send_B 함수부터 패킷이 전송된다.
'프로그래밍 > Unity' 카테고리의 다른 글
Random.Range(min, max) (0) | 2015.02.13 |
---|---|
NGUI 유용한 링크 (1) | 2015.02.11 |
ngui button중복시 이벤트 (0) | 2014.11.25 |
coroutine 인자 (0) | 2014.08.27 |
Actor::updateMassFromShapes: Compute mesh inertia tensor failed for one of the actor's mesh shapes! Please change mesh geometry or supply a tensor manually! (0) | 2014.08.13 |
Comments