ํ๋๋ฅผ ๋๊ธฐํ์ํค๋ ค๋ฉด
public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.IsWriting)
{
stream.SendNext(value);
}
else
{
value = (int)stream.ReceiveNext();
}
}
์ํจ๋ค๋๊ฑธ ์๊ณ ์๋๋ฐ์, ๋ง์ฝ ๊ทธ๋ฌ๋ฉด ํ๋ ์ด์์ ๋๊ธฐํ์ํค๊ณ ์ถ์ผ๋ฉด
public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.IsWriting)
{
stream.SendNext(int);
stream.SendNext(bool);
...
}
else
{
int = (int)stream.ReceiveNext();
bool = (bool)stream.ReceiveNext();
...
}
}
์ด๋ฐ์์ผ๋ก ์ฌ์ฉํ๋ฉด ๋๋๊ฑด๊ฐ์??
+++ ์ถ๊ฐ
ํฌํค ํธ๋์คํผ ๋ทฐ ์ ๋๋ฉ์ดํฐ ๋ทฐ ์ด๋ฐ ์ ๋ค ์๋ ๋๊ธฐํ๋ PhotonNetwork.Instantiate๋ก ๋ง๋ ์ ๋ค๋ง ๋๋ ๊ฑด๊ฐ์?
์ฌ์ ์ ๋ง๋ค์ด๋ ์ค๋ธ์ ํธ๋ค์ ๋๊ธฐํ๊ฐ ์ ๋๋ค์...
๊ฐ์ฌํฉ๋๋ค. ๊ทผ๋ฐ ํฌํค๋ทฐ๋ฅผ ํตํ ๋๊ธฐํ๋ ๋์ ์ค๋ธ์ ํธ๋ค๋ง ๊ฐ๋ฅํ๊ฑด๊ฐ์? ์ฌ์ ์ ๋ง๋ค์ด๋ ์ ๋ค์ ๋ณ์๋๊ธฐํ๋ ์ ๋๊ณ ๋๋จธ์ง๋ ์ ๋จน๋ค์;;
๊ฐ์ฌํฉ๋๋ค ์ ์ฅ ๊ทธ๊ฑธ ๋ชฐ๋ผ์ ์ฌํ ํค๋งธ๋ค์ ์น์ ํ ๋ต๋ณ ๊ฐ์ฌํฉ๋๋ค!!!