![]() Soldier A got PhotonView ID 2001 and SoldierB got PhotonView ID 2002. Imagine you got 2 of the Soldier GameObject (Soldier A and B ). There is a -marked method PlayJumpMotion in the PunBehaviour. The PhotonView's ID is unique in your game room and is same on each Client running your game. The PunBehaviour is linked to the PhotonView. Remote Procedure Calls (RPC) are used to call a Method in an other Instance (on an other Computer) of the calling PunBehviour.Įxample: You got an GameObject Soldier which got an PhotonView and a PunBehaviour called SoldierController.Every GameObject with a PhotonView (the 'heart' of PUN) can have PunBehaviours containing Remote Procedures.Every PunBehaviour can have an unlimited amount of these remotely callable methods.A remote Procedure is just a normal Method of a Class, marked with Attribute. there are too many codes that maakes happen shooting. Even JS I have tried to understand but all codes have connected with each other. I found Angry bots project which has already integrated photon networking. I have tried many ways PhotonNetwork.Instantiate, OnSerialize., not fully RPC (because I didn't understand fully RPC method). ![]() I made projectile shooting Instantiting game object with rigidbody commponent attached. I have similar project that players must see their bullets. ![]() I can see how bullets throws and flies over network. There is a Demo asset calls Unity Angry Bots !/content/1917 Hello all, I would like to understand or just sample code with explains "Projectile Shooting".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |