PunRPC in Javascript

Options
Hi, just downloaded photon 1.60 to test to see if I can use it in my game and I am getting a message saying 'No attribute with the name 'PunRPC' or 'PunRPCAttribute; was found. It is referring to a javascript script @PunRPC error.

Looking about in the forums it suggested that I made sure the RPC.cs existed and was intact.....Well its there and says:

public class PunRPC : Attribute
{
}

So not sure if that is how it should be?
I also removed the @PunRPC and let it compile then added it again and its still doesn't like it.
Any other ideas? Its a fresh install into a new project.

Cheers
Rob

PS Im HeskethStudios not HeskethGames, was having a brain fart when I typed that in.

Comments

  • vadim
    Options
    This is script compilation order (http://docs.unity3d.com/Manual/ScriptCompileOrderFolders.html) which we was not aware of because C# mostly used for scripting.

    Try to workaround this by moving RPC.cs to Assets\Plugins\ folder.
  • Cheers for that, worked fine.
    Although had to end up moving the whole folder into the root so that javascript could read it all, which led to having to make a few classes public instead of internal protected/static.
    I guess next time I update they will become internal again.

    However for now its all working fine.

    Cheers
    Rob