64bit mode and RPC issues?

Hi,

I’m getting some really baffling issues that came pretty much out of the blue, here’s whats happening:

Whenever I use this line

networkView.RPC(“DoSomething”,RPCMode.All);

I get this error:

64 bit mode not supported yet
UnityEngine.NetworkView:RPC(String, RPCMode, Object)
BossEye:Correct(Int32) (at Assets/Scripts/Enemy/Bosses/BossEye.js:247)
$:MoveNext() (at Assets/Scripts/Enemy/Bosses/BossEye.js:133)

Originally the RPC had a few parameters and such, but I made everything as plain as possible and I still get the error. The function the RPC is calling is just this:

@RPC
function DoSomething()
{
print("MADE IT HERE");
}

If I take out the networkView line the error does not occur, and since I’ve been using RPC’s pretty extensively, I have literally no idea why this one is causing problems, I’ve renamed it, renamed the function, copy and pasted RPC functions that did work, to no avail.

So any help with this would be really appreciated.

EDIT:

I REALLY do need help with it now, any new objects that use RPC’s are starting to do it as well, I’m starting to think it has to do with the view ID number being too high, maybe?

I tested this by creating a new prefab object out of slightly changed old prefab, then attacked it to test if gave the RPC error, and indeed it did, but weirdly enough, it still functioned properly (i.e. the RPC went through, although this was a single player test, I’ll check multiplayer next).

So I really don’t know whats going on here. It works but it’s giving the 64 bit mode not supported error on any new prefabs that use RPC’s. Has anyone dealt with this before, because I really can’t find anything on it.

Exactly as you guessed, this assert is triggered if you have view IDs that are bigger than expected. The code appears to want view IDs to be smaller than 2<<29, since 3 bits are used to encode the 32-bit encoding. There does not appear to be any workaround. You might want to scratch your head a little and ask why you are getting such large view IDs. A view ID is meant to be unique across all the clients and all the objects. If you had 100 players and 1000 objects to synchronise, you’d have 100k network view ids, and that should fit into a 29 bit value.

Are you using a very large number as your Level Prefix?

I was just running into this issue, too.
I was trying to load levels with Network.SetLevelPrefix set to a randomly generated ID in a test I was doing.
Simply limiting the random int range to 3 digits solved my issue.

See the Network.SetLevelPrefix docs:

“Set the level prefix which will then be prefixed to all network ViewID numbers.”