Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jun 16, 2016 at 11:47 AM by Bunny83 for the following reason:

The question is answered, right answer was accepted

avatar image
1
Question by Arshd · Jun 15, 2016 at 01:38 PM · networkingnetworkphotonrpc

PhotonView with ID has no method marked with the [PunRPC](C#) property! BUT IT HAS ???

In my game 2 players only join a room and i have to switch turns between them so i do something like that:

 using UnityEngine;
 
 // .. more code
 public PhotonView photonView; // i get it from editor
 bool myTurn = false;
 
 void Start() {
     // .. some other code
 
     if (PhotonNetwork.player.isMasterClient) {
          myTurn = true;
     }
 }
 
 void Update() {
     // ... LOTS OF CODE
     if(myTurn) {
         // Play till i finish
     }
 
     if(EndOfTurn) {
         // ... Do things
 
         myTurn = false;
         photonView.RPC("SwitchTurns()", PhotonTargets.Others);
     }
 }
 
 // ... Many lines of code
 
 [PunRPC]
 void SwitchTurns()
 {
     myTurn = true;
 }

and my GameObject has the script and the PhotonView component (Owner is Fixed) with no Observed Components and I've tried observing the script same error too.

as you can see I'm not " using Photon; " nor " Photon.MonoBehaviour " if that have to do something...?

Please any clue would be great, Thank you!

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Arshd · Jun 15, 2016 at 02:30 PM 0
Share

I've tried making "SwitchTurns()" public too but nothing different.

avatar image Arshd · Jun 16, 2016 at 09:52 AM 0
Share

also tried " Photon.$$anonymous$$onoBehaviour " still nothing...

1 Reply

  • Sort: 
avatar image
2
Best Answer

Answer by Arshd · Jun 16, 2016 at 11:45 AM

I'm sorry, It was just a stupid mistake -_- i'm suppose to call the RPC like this

photonView.RPC("SwitchTurns", PhotonTargets.Others);

not like that

photonView.RPC("SwitchTurns()", PhotonTargets.Others);

again I'm sorry :(

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Chintan-Kansagara · Sep 26, 2017 at 10:44 AM 0
Share

PhotonView with ID 1001 has no method "RemovePlayer" marked with the [PunRPC](C#) or @PunRPC(JS) property! Args: String UnityEngine.Debug:LogError(Object) NetworkingPeer:ExecuteRpc(Hashtable, PhotonPlayer) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2949) NetworkingPeer:RPC(PhotonView, String, PhotonTargets, PhotonPlayer, Boolean, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:3711) PhotonNetwork:RPC(PhotonView, String, PhotonTargets, Boolean, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:2914) PhotonView:RPC(String, PhotonTargets, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:597) Snake$$anonymous$$ovement2D:Update() (at Assets/Scripts/Snake$$anonymous$$ovement2D.cs:119)

avatar image Chintan-Kansagara · Sep 26, 2017 at 10:47 AM 1
Share

PhotonView with ID 1001 has no method "RemovePlayer" marked with the [PunRPC](C#) or @PunRPC(JS) property! Args: String

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

RPC and inheritance 1 Answer

Proper way to instantiate projectile in PUN 1 Answer

Multiplayer Scoreboard Problem. 1 Answer

Photon Unity Player Kill Counter 2 Answers

RPC sync issues 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges