`PunRPC': is not an attribute class

Options
I just upgraded to the latest version of PUN (free, 1.56), now I keep getting these two errors:
- error CS0616: `PunRPC': is not an attribute class.
- The type or namespace name `PunRPCAttribute' could not be found

Does anyone know what that is? I don't know what namespace it is talking about or what I have to do to resolve this.

PS: loading PUN into a new project doesn't give any errors, but removing PUN from my existing project and then importing the new version does give it. I also can't get to the PUN wizard (network setup) as the scripts won't compile due to the errors

Edit: in trying to debug this i started to load all my assets into a new project with PUN already loaded. the error starts to show up when I import scripts. I didn't find a specific one yet since there are a couple that are referencing each other so I cant put them separately.

What is also strange is that the error is given in one of the scripts that is already in my project when there is no error. So no error shows, I add one of my own scripts, then there is an error in a script that was already there..

Exact error message:
"Assets/Photon Unity Networking/UtilityScripts/InRoomChat.cs(71,6): error CS0246: The type or namespace name `PunRPCAttribute' could not be found. Are you missing a using directive or an assembly reference?"

Comments

  • D3Duck
    Options
    FOUND IT!! wow. Only took me about 4 hours. *endsarcasm*

    I found out that System.Attribute was being inherited from by the RPC class. I also have a class called Attribute (not knowing that System also had a class named this way (yay for the coding newbs)). So now the compiler thought RPC inherited from my class (which is just a class for the player statistics) and went nuts over that.

    I changed my class name and now all is well. (I know I could have made the inheritance more explicit but I preffered not having a similar problem later
  • Tobias
    Options
    Sorry for the late reaction but you found your solution before we could react at all.
    Thanks for posting the update!
  • I have the same problem, could you pelease help me in order to solve it? Please tell me exactly what you did. Thanks
  • D3Duck
    Options
    I did exactly what I wrote above. Made an empty project. Imported pun. Then startedsimporting all of my project by very small parts. And then found when the problem started to occur. Then I found that I made a class "attribute" in my game which is also a class in the standard classes that come with C.

    That's all, hope it helps youyou.
  • Sorry, my error is the following:
    "No attribute with the name 'PunRPC' or 'PunRPCAttribute' was found (attribute names are case insensitive). "
    What can I do?
  • Tobias
    Options
    I still can't reproduce the issue locally.
    Please read this and reply to the thread, if that doesn't help.
    http://forum.photonengine.com/discussion/6317/punrpc-help#latest