ํ•˜๋‚˜๋ฅผ ๋™๊ธฐํ™”์‹œํ‚ค๋ ค๋ฉด


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๋กœ ๋งŒ๋“  ์• ๋“ค๋งŒ ๋˜๋Š” ๊ฑด๊ฐ€์š”?

์‚ฌ์ „์— ๋งŒ๋“ค์–ด๋‘” ์˜ค๋ธŒ์ ํŠธ๋“ค์€ ๋™๊ธฐํ™”๊ฐ€ ์•ˆ ๋˜๋„ค์š”...