The type or namespace name 'RoomInfo' could not be found
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
The type or namespace name 'RoomInfo' could not be found
Lethn
2019-01-21 03:58:45
Since I had bought PUN beforehand I decided to go ahead and upgrade to PUN 2 to see if that would help with network smoothing and so on at all. I got a bunch of assembly reference errors that I managed to fix myself but for some reason a RoomInfo one still stays,
Is there a using somethingorother that I've missed specifically for rooms now?
Comments
Hi @Lethn,
Thank you for choosing Photon!
RoomInfo
is now part of Photon.Realtime
namespace, you either add
using Photon.Realtime;
on top
or
use Photon.Realtime.RoomInfo
.
We will add this to the "Migration Notes".
Thank you! Now I'll get to experiment more with network smoothing and see if PUN 2 makes any difference to the movement etc.
Scratch that, I spoke to soon, I've got three new assembly reference errors.
Hi @Lethn,
Remove PUN Classic first then import PUN2.
There shouldn't be any trace of PUN classic as I deleted the Photon folder before importing.
Then follow "Migration Notes".
- AutoJoinLobby is removed
ServerSettings.EnableLobbyStatistics
is moved toServerSettings.AppSettings.EnableLobbyStatistics
isWriting
is renamed toIsWriting
Oh bloody hell, right, thanks, I'll check these out and report back if it's all working.
Okay, I'm working through the errors now, it just looks like I need to change the code to match the changes in the migration notes like you say, thanks for the help.
Okay, I've managed to whittle down my errors to about 5 now, one thing that's causing me a huge number of problems is
I get the following errors:
Here's a code snippet of what I'm trying to do.
createdRooms = ILobbyCallbacks.OnRoomListUpdate( List
Hi @Lethn,
I think you misunderstood how you should use interfaces and callbacks.
OnRoomListUpdate
does not return anything, it will be called when the server sends the client lobby rooms list updates. Take a look at examples in PUN2 demos to see how it works. Also, you may want to learn more about C# interfaces and how to implement them, also how to extend classes and override methods, etc.
As a start, I suggest that your classes extend MonoBehaviourPunCallbacks
instead of MonoBehaviour
(or old PUN1 Photon.PunBehaviour
or Photon.MonoBehaviour.
) then override the callbacks you need.
Hi, sorry, major necro/bump I know I should have absolutely written up a response earlier, in regards to interfaces I was doing research a lot on how to make a decent room browser and it was awhile back that I came across this write up which was working absolutely fine in PUN 1 and I was just following along with the migration notes to try and fix things.
https://sharpcoderr.com/blog/photon-network-beginners-guide
Oh and lol this is so typical, I just found the demo example you were talking about PUN Cockpit, I'll check this out and see if I can't use that demo to fix things, it should all work as it all seems to be up to date so that's nice. I had the flu most of January so I wasn't doing very well keeping on top of things.
public void OnRoomListUpdate(List
{
}</code>
That's why it wouldn't work -_- looks like I'm going to have to work using the demo as my resource rather than the PUN 1 tutorial which explains a lot.
Hi @Lethn,
You can find a good snippet of how to implement OnRoomListUpdate
here, read my last comment after that also.
Thanks @JohnTube! I'll check it out.
superbbros
2020-12-05 13:05:44
@JohnTube Thank you I was having the same problem!
Back to top