One of the things with RPC for object initialization is also that there don't seem to be a way of having a function that calls everyone (client AND server), so I basically have to do a public Initialize(...), and in it call a private InitializeInternal(...) and also a [ClientRpc] private InitializeClientRpc(...) {InitializeInternal(...);} to initialize on all sides (effectively initializing in InitializeInternal) if I want to avoid duplicating the code. It would have been practical to have like a [EveryoneRpc] to avoid having 3 initialization functions every time, but well, it's probably still better than adding OnValueChanged callbacks for every variable that is only set once.
#archived-networking
1 messages · Page 102 of 1
Been using mlapi to get clients together and synced up, but I need to save player information for future retrieval.
Not sure if this is the best place to ask, but does anyone have information on how to create a login/register system to a database securely? (with the intention to save more information later)
Or if this is a bad approach, I'd like to know alternative methods of saving player information, so that players cannot access / copy it.
im using MLAPI with cinemachine free look however the server doesnt spawn any players, and if 2 clients join the main camera starts to follow the last one that joined. It's been a couple of days and i couldn't find a fix for it yet. Does anyone have an idea why that would be happening? This is the movement code: https://hastepaste.com/view/9gvDPjVdG4
Don't use Start use NetworkStart IsLocalPlayer is always false in Start because it is not initialized yet
let me try it
should i override it?
Is your player object registered as a network prefab in the NetworkManager and did you check the player prefab flag?
Yes you should override it.
yes it is
the only problem is the camera starts to follow the last person that entered
but the movement is perfectly normal
Changing to NetworkStart should fix the camera issue
fingers crossed
i got blank screen
im guessing it worked but since the server doesnt spawn a player im guessing i have a different issue
Do you have a player object in the scene or how did it work in the first place if no player is spawned?
there is no initial player
its a prefab and its attached to the network manager
the server side didnt spawn before either
But you said the camera follows the last person who entered? But there is no player object spawned?
i dont understand it either when it was in the update function the client side spawned the player
but not server
now none of them spawn
maybe i should add a main camera to check and see if they actually are spawning
gimme a second
Well on the server IsLocalPlayer will be never true so you never attach the camera. It makes sense that you don't see anything
ok i attached the camera and tested
when the server starts there are no players as you explained it
once i start client the player object spawns in server but not in the client
i started the another client which i assume spawned another player on the server side but not on the client
Are you sure the clients have no players spawned or could it again just be a camera issue?
im sure the clients didnt spawn them
because i added a camera to the scene covering the entire plane
nor the cameras switched to the player
Can you run a client in editor and check for error messages or if there is really no GameObject around for the player?
yeah gimme a sec
i dont get any errors and the object hasnt spawned
i should probably just record and send it tbh
So i startet an litte multiplayer test project today and used the MLAPI package. I sett averything up and add my own moovement script to the player.
But when i start it and join as a host in the one tab and as an client in a nother tab and i hit anny w a s d key, the player just speeds out of the camera angle and comes back with an nother player parallel to it(only in the tab, where i dit it tho) same for the other tab. What am i dooing wrong??? (i also have a video: https://www.reddit.com/r/Unity3D/comments/o7uazk/mlapi_wierd_problem/)
here is the video
maybe its how i get the components
i have a question if my GFX, camera and free look camera under the same gameobject of player do i need network transform for all of them as well?
i am missing one for the GFX
hi people im having quite a riddle. lets say i have a game and in this game people can host their dedicated servers
but i want people to have items for example. like cosmetics and different things and also data. i want those to be global
i have a server machine at my disposal.
but im not sure whats the best way to archieve this in plain sockets
i basically want to have a server wich has all people's cosmetics and data. but when someone creates a server on his own (dedicated) the server picks up the player's data
at the same time i want this to be secure. and i have no idea how to do it
i also need some sort of authentication system. i already have one but its not enough for long-term use. basically when you join a server. you need to register with a name and password. then when you join you input those
and you have your data
I've been following this tutorial, and it seems to be what you are looking for. A few of the functions are slightly deprecated, but it's easy enough to update them.
https://www.youtube.com/watch?v=utwSPVGZiiw&list=PLTm4FjoXO7nfn0jB0Ig6UbZU1pUHSLhRU&index=2
Is there any reason why my MLAPI client RPC is never called when the server calls it from NetworkStart()? It works if I call it in a coroutine after doing a yield return new WaitForSeconds(3), so it seems timing-related somehow?
👍
that seems what im looking for!! thanks
it might be adaptable to what i need!
nodejs and mlapi is incomparable, you could use mlapi as your client side code library and nodejs for udp server side
hey i need some help with fizzysteamworks
so i have mirror and fizzysteamworks setup with a script that when i hit a button it spawns a player prefab and allows steam friends to join. i tested it and wshen i joined from another device it spawned another object, but the movement was happening seperately from the host and the client
here's my movement script and the steam lobby script
movement
lobby script(taken from this https://www.youtube.com/watch?v=wpHRcj9yATc video)
In this video, we're taking a look at a quick and simple guide on how to add Steamworks to a Unity Project so that you can connect and play with other Steam players inside of your multiplayer game.
Facebook: https://www.facebook.com/CGDCGame/
Instagram: https://www.instagram.com/cgdcgame/
Twitter: https://twitter.com/cgdcnews
LinkedIn: https://...
Hey everyone! I'm just getting started with multiplayer, was wondering what the difference between a host and a server is? Couldn't find a decent answer anywhere. Thanks! (Please ping me when you respond so I see it)
I don't understand why my LMAPI RPCs don't work, it's giving me headaches. I have a simple 3D object in my scene with a NetworkObject component and a TestClientRpcStart component (here https://dpaste.org/6HK5), I just call a ClientRpc in NetworkStart() and the call is never received by the clients. I make sure to start the client first, but the call is never received, I don't see my log.
If i call the client RPC in a coroutine started from NetworkStart() and that I wait like 2 seconds, then it works. So it looks like NetworkStart() is too early to call RPCs? But I thought it was the recommended way of doing it.
I even created a new project with the simplest setup possible to make sure it's not a library or something else that messes up with MLAPI, but I have exactly the same thing there.
What am I doing wrong?
Hi! I have a question about pun: there is rpc function to extinguish torch on wall. RpcTarget.AllBuffered. So new players see the state of the torch. However, if player that switched that torch rejoins, sees this torch lighted up again. What is the problem? Function:
[PunRPC]
public void ExtinguishTorch()
{
flameSpriteRenderer[0].enabled = false;
flameSpriteRenderer[1].enabled = false;
flameLight.enabled = false;
flameSound.enabled = false;
}
If it's something that persists (like torch on/off state) it should be done with NetworkVariables since RPCs are only executed once. Clients who re-join won't have the RPC called again. But RPCs can be used to launch a FX when this happens, something like that
ok thanks, what is FX?
Sound/visual effects (VFX for visual effects to be more precise)
thank you
do you mean OnPhotonSerializeView?
I don't know exactly for Photon, i just talked about VFX as an example of thing that I saw was useful with RPCs but it's also useful for other things.
Im using PUN 2 and I'm acessing my players photonview through a script on a different game object, but the photon view never returns as is mine, eventhough it should, how can I fix this?
maybe you return if different gameobject isMine not player?
I am receiving two errors with the "Photon Network Package".
Error 1: Assets\Multiplayer Package\Photon\PhotonVoice\Demos\DemoVoicePun\Scripts\SoundsForJoinAndLeave.cs(11,26): error CS0115: 'SoundsForJoinAndLeave.OnPlayerEnteredRoom(Player)': no suitable method found to override
Error 2: Assets\Multiplayer Package\Photon\PhotonVoice\Demos\DemoVoicePun\Scripts\SoundsForJoinAndLeave.cs(20,26): error CS0115: 'SoundsForJoinAndLeave.OnPlayerLeftRoom(Player)': no suitable method found to override
Code: ```using Photon.Pun;
using Photon.Realtime;
using UnityEngine;
public class SoundsForJoinAndLeave : MonoBehaviourPunCallbacks
{
public AudioClip JoinClip;
public AudioClip LeaveClip;
private AudioSource source;
public override void OnPlayerEnteredRoom(Player newPlayer)
{
if (this.JoinClip != null)
{
if (this.source == null) this.source = FindObjectOfType<AudioSource>();
this.source.PlayOneShot(this.JoinClip);
}
}
public override void OnPlayerLeftRoom(Player otherPlayer)
{
if (this.LeaveClip != null)
{
if (this.source == null) this.source = FindObjectOfType<AudioSource>();
this.source.PlayOneShot(this.LeaveClip);
}
}
}```
that other object, the one that's referencing the players photonview, doesn't have a photonview
only the players have photonviews
When using MLAPI, how do you spawn an avatar that has player functionalities for yourself but spawn avatars that has no player functionalities for the clients joining in the room?
how to make more than 4 players per room in PUN? The 5th player creates his own room
Did you check the max player count for the room?
Looking for some advice on websockets, has anyone used System.Net.Websockets while targetting iOS/Android?
Wondering if it's made the use of websocket-sharp obsolete "now" we have .NET Standard 2.
Appreciate the response have seen the SO thread, was very non conclusive.
However the library references is just a wrapped around System.Net.Websockets, but it makes no claim to support iOS or Android.
This claims support for Android & iOS: https://github.com/endel/NativeWebSocket and it says it uses System.Net.Websockets
Might just have to put together a demo app and try. Not too keen on this library due to .NET 4.
Hi im building an online game and im using my monitor which is sharing a screen to my laptop but when i load both players in and they start to jump the player jumping it looks good but on the other screen it looks like their lagging can someone help
also to add to that i have my player in if the player flips wen he turns either left or right but the other client dosen't see that so it looks like he's running one direction can someone help
hello?
Hi are you unity help?
I'm just a random Unity developer, I'm not "Unity help".
oh but can you stil help
luke
I can try, which network solution are you using? Most likely you are not buffering and interpolating position updates.
http://pastie.org/p/48XFCmtzrjgou3ukBOYUY5 heres the code
im using photon
and the input system
I don't know too much about PUN. I think they have something called "Simple" which you put on top of PUN to get smooth position sync..
@fair linden Unity doesn't offer support here, but some employees might choose to do so by answering questions posted here.
While on the topic of employees, employees of Photon are probably keeping a closer eye on the Photon discord.
You are more likely to get help if you provide all the information upfront, like code and videos of the issue.
so should i go on the photon discord then
Okay, pretty new and considering making my game in unity, but it will be sort of like a mini mmo. Does MLAPI or whatever support a dedicated server that can handle 100+ players, with significant amounts in one area?
If not, what unity solution exists that could? Mirrors?
Mirror at least have been known to test for that use case and they advertise themselves for it. No idea what MLAPI focuses on, but I wouldn't be surprised if scaling wasn't the highest priority atm considering the things they could be providing for non mass scale games.
If you do opt to look into Mirror, you might wanna check out Mirage
Awesome, thanks. Ive got mirror and mirage on my list to checkout then. I heard photon is an option but seems older/heard it might have issues with message rate or something
Oh wow, i didnt know secret lab used mirror
Hi! I have a problem with compiling, whats wrong?
here is the line:
using UnityEditor
itemPV.RPC("SetItemName", RpcTarget.AllBuffered, ObjectNames.NicifyVariableName(item.itemType.ToString()));
Hello.
I am try to understand the token consept.
Can I acquire a token from AWS server and convert it into binary to store local storage, so in the second session, I could check if it is valid.
this approach is true?
thank you
@cobalt python ObjectNames class inside of an Editor folder or wrapped in an #if UNITY_EDITOR perhaps?
Hello guys. I am trying to make a multiplayer 2-d strategy game with a 1v1 format in Unity. (I would like client to server to prevent/minimize cheating. )
Am I better off with Photon or Mirror?
Photon is meant for smaller lobbies handling 8-16 players at best, which means that a 1v1 game is perfect for Photon
what about for client to server or for 2-d or are both the same for those
You mean like dedicated server hosting?
I think so
Then they're both gonna be the same probably
for cheating prevention
You're welcome!
Hello, I am looking to make a multiplayer game where a only a few floats need to be stored server-side. What systems out there would work for this? I do not have very much networking experience. Would I be able to use something like PUN to get/set variables?
@silver peak As in some sort of persistent thing?
@spring crane No, just short matches...no need to store the data for any longer than an hour. I was hoping to stay away from having to use a database like mySQL.
PUN out of the box can deal with storing data during a match. You don't really have server side logic by default though
would this be something troublesome to write? I haven't used it before but I do see there is quite a bit of documentation on it
Well networking can be a bit daunting when starting out and it can get quite complex too. Sending a value over PUN to other clients is not terribly hard though.
PUN comes with several ways to keep values in sync and handles a lot of stuff when it comes to scene, connection and networked object management, so a solid documentation needs to be somewhat large.
You can ignore vast majority of it if all you wanna do is sync few values
Well that is good to note. I pretty much just need a lobby/mm system and then the few variables once in-game. Thank you for the input! much appreciated!
Can anybody suggest me a language within: Python, Java, C#, C++ for building a game server? I'm concerned about physics simulations, and overall performance and memory management. What language can i use to simulate Unity Physics, or any game engine physics? Does Unity Physics API work with a plain C# software? What about C++?
Thanks in advance for help!
Sorry, sort of adding to this question myself: dont photon/mirror have physics simulation?
I'm not using third party networking libraries tho, since i want to integrate my own protocol.
photon fusion and photon quantum yes
photon = company, there are many different products
Hello.
Is this logic correct?
I am thinking to embed my taken token into bytcode and check if it is valid.
"acquiring token by facebook" provider is little bit below. This diagram for the entry.
Have you implemented client/authorization server based realtime games?
If yes, what character controller do you use? I need deterministic one
Character controller is not deterministic and causes some server-client conflict and mismatch even when inputs are the same in the client and server, final states are different
https://forum.unity.com/threads/released-kinematic-character-controller.497979/
It has value to be tested 🙂
WWWForm form = new WWWForm();
Debug.Log(GetToken());
form.AddField("Content-Type", "application/json");
form.AddField("Authorization", GetToken());
using (UnityWebRequest www = UnityWebRequest.Post(API, form))
How do I set request's headers? I can't find any non-deprecated documentation on this.
edit: found solution
www.SetRequestHeader(header, headercontent);
how do i sync 2d objects in a multiplayer game? im using photon pun,
any ideas?.. i tried putting in in the observe of photon view but its not in the right place on other device
what i currently do is i sent its position through rpc but not sure if this is the right way
Yo whenever my friend tries out my multiplayer game and joins the lobby he always joins but he's always like binded another player and they are copying each other
idk why
and from my end it doesnt sync the movement even tho i have it on and it doesnt show my camera
anyone know the problem
In addition to the photon view, you can add the photontransformview or photonrigidbodyview and set it in the photonview of your object so it can keep the information. It will be the same for an animation, you have a component for this. Anything else will use the rpc. You can also make something custom, but I think those component are enough. Tell me if you still have problem with it
Which network lib are you using ?
Has anyone used the new unity networking?
Yeah and it's pretty good
For a version 0.1.0 release, the bugs are rather minimal and it's much more sophisticated than UNet
Photon
And i have photon view is mine
But it ain’t workin
And from my view the camera follow isn't working
Is it pretty self explanatory with good documentation for someone who has never worked with networking
does anyone know why my players aren't connecting
like my players don't go into the same server
idk why
i create the room and the other person can join it but i dont see the other player
@ancient iris Double check the region on each client
Thanks, it works! but whenever I try to move/rotate it..
on the other screen i goes out of place then slowly slides back to its current position?
Did you follow the tuto and make the second one join the same room or are you sure they don't create a new room each time ?
Hey, I'm looking for a way to set up some data networking without having a hosted server.
The basic idea is, the player fills out some data, in the form of a string. They then press a button that compiles all of this data, and outputs it in another part of the app, that other clients can view.
For example, a leaderboard.
Any methods for this?
I was thinking, picking a random client and run it local host, connecting all other clients to a specific client, and transferring that data to everyone. But IMO that sound's much more complicated, as it won't sync for anyone not on the app, and is a lot of work.
Seems like a lot of unnecessary connecting for players, lots of handling dropped connections
and how do the clients know about each other?
Haven't tried that method yet, it was just the only thing I can think of
mainly looking for suggestions
on a way that works good
I have started a new project and was going to do MLAPI since it feels like that is the path to take (my previous was Mirror). But it is far from bugg-free. It is also (very personal opinion here) too low-level and just not feature complete as is. And I am not just talking about the things not implemented, but what is implemented is missing a lot of vital pieces. I am still on the fence, as I am allergic to learning "outdated" tech and want to jump on the MLAPI bandwagon but having second thoughts abou that
yeah that is peer-to-peer network . And if you can, avoid it
having a 1 source-of-truth is just so much more convenient
What do you think of one specfic local host? For example; a file that when someone from one IP runs it, it sends a signal to every open app, and collects the required data, then sends back everyones data to everyone. The client app searches every few ms for this IP network
just use like Firebase realtime database or something similar.
It's not so easy to just "send a signal to every open app", you need some way to reach them
or you mean the clients asks the "one specific local host" for data? Then that is as much dedicated host as it gets 🙂
Is Firebase free?
I don't know the tiers and exact cost. But no it's not *free but probably low cost depending on how much data you want to send
amazon aws and azure also has similar products
np, good luck
Using Photon Fusion. What's the best way to implement Input System? The APIs use the old input system.
InputPoller.cs
public void OnInput (NetworkRunner runner, NetworkInput input)
{
// old input method:
if (Input.GetKey(KeyCode.A) { Do stuff}
}
Input System C# Events:
private void HandleAction(InputAction.CallbackContext context)
{
if (context.action.name == "ActionName") { Do stuff}
}
Would it make sense for to variablize every input so:
psuedo code:
private void HandleAction() {
if (ActionForward) {ActionForward.performed += forward = true;}
}
private void OnInput() {
if (forward) {inputData.foward |= forward}
input.Set(inputData);
}
inputData is a struct containing unsigned ints.
Could I override OnInput to somehow add HandleAction to it?
But then again, it is their first version
I mean no doubt they still got some debugging to do. Hell, they even say you shouldn't use it for production stuff
You'll have better luck asking in their discord server.
See here: https://doc.photonengine.com/en-us/fusion/current/getting-started/get-help
thx
very much true, I was just a bit overexcited I guess. Back to Mirror for a while.
lol yeah It'll get there soon
And wasn't MLAPI going to be a full-on integration with DOTS? I haven't heard anything about DOTS/ECS in a while... I think it's just dead at that point but I'm most likely wrong
Everytime I see anything about DOTS it's about how long it takes.
Think they just call it DOTS-NetCode (so not MLAPI)
Ah okay
Interesting view considering that it seemed like MLAPI had more features than Mirror before Unity acquisition, but haven't kept up with what Unity has done with it.
I'm having an issue when using photon I get this error:"Operation JoinLobby (229) not called because client is not connected or not ready yet, client state: PeerCreated"
@junior bronze You first need to connect to Photon
PhotonNetwork.ConnectUsingSettings() and wait for the OnConnectedToMaster callback
I have the connect using settings on the start function
It doesn't happen instantly, so are you waiting for it to complete?
yes so then I can open the tilte menu
How are you doing the waiting?
I'm not sure, I was told It would only call it once it was connected
Here is my code
That looks fine to me
i know, but when I run the game it gives the the same error
Are you sure you aren't calling JoinLobby from elsewhere?
the only other code I think that related is
Yea opening a menu in itself shouldn't be an issue, unless something in the menu is misbehaving
I even tried removeing the onjoinedlobby but satill the same error
What if you remove the JoinLobby call?
then the script doesn't do anything after joining the master
No error either?
no
I didnt get any errors
I think the problem lies whenever I try joining a lobby
To my knowledge Mirror is years ahead in features and stability. My biggest problem is that it seems that MLAPI is a lot lower level. Don't get me wrong, that can be good in some cases, but a future "de facto" solution integrated with Unity should probably not be. Networking is hard as it is so I feel usability in such a framework has to have high priority.
You don't have to join a lobby. They are optional to organize rooms in groups but even if you want that, you don't have to join.
In general, have a look at ConnectAndJoinRandom.cs and the matchmaking docs.
If you run into issues, enable the SupportLogger and you should get some more context in the logs which state you are in / what happened.
It is still telling me that the material data type is not supported
That sounds as if you callphotonView.RPC("LoadColor", ... material, ...). The type Material can not be serialized (sent), which is what this error seems to be about. The RPC method definition is ok.
Thank you
I'm trying to move vr clients using photon and I've got a function to move the different parts in worldspace but it says I can't convert vector3 into quaternion and also the other way around
You're setting the rotation to the position, and vice versa?
Did you intend on doing that?
oh my god thank you so much for pointing that out
Anyone have experience with webGL and PUN?
I'm looking for a friendly network method (API) for a webGL tool I want to make but I have 0 networking experience, but allot of experience with Unity.
Anyone able to fix some photon stuff for me? (I can pay you) dm me if you are interested
Hey guys, for Mirror; Whats the correct way to access the port for the transport in the network manager?
Do I need to .GetComponent or is there a field for it in the network manager singleton?
so what's going on with something like atavism. Is claims to be able to handle 10000 CCU based on their website based subscription, but... idk, is stuff like that achievable with unity networking? Is it because they have a non unity back end but use unity front end?
How can I keep track of the number of players when Im using MLAPI? Its the same prefab
NetworkManager has a Dict of ConnectedClients
for some reason when running my multiplayer game using the editor and a build, i get this error in the editor console:
Photon.Pun.DefaultPool.Instantiate (System.String prefabId, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation) (at Assets/Photon/PhotonUnityNetworking/Code/PunClasses.cs:997)
Photon.Pun.PhotonNetwork.NetworkInstantiate (Photon.Pun.InstantiateParameters parameters, System.Boolean sceneObject, System.Boolean instantiateEvent) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2447)
Photon.Pun.PhotonNetwork.Instantiate (System.String prefabName, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, System.Byte group, System.Object[] data) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2346)
RoomManager.OnSceneLoaded (UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode loadSceneMode) (at Assets/Scripts/MultiplayerScripts/RoomManager.cs:39)
UnityEngine.SceneManagement.SceneManager.Internal_SceneLoaded (UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode mode) (at <e2bce5d33e704a76a5c9576f4d43769b>:0)```
and this:
```DefaultPool failed to load "PhotonPrefabs\PlayerManager" . Make sure it's in a "Resources" folder.
UnityEngine.Debug:LogError(Object)
Photon.Pun.DefaultPool:Instantiate(String, Vector3, Quaternion) (at Assets/Photon/PhotonUnityNetworking/Code/PunClasses.cs:989)
Photon.Pun.PhotonNetwork:NetworkInstantiate(InstantiateParameters, Boolean, Boolean) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2447)
Photon.Pun.PhotonNetwork:Instantiate(String, Vector3, Quaternion, Byte, Object[]) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2346)
RoomManager:OnSceneLoaded(Scene, LoadSceneMode) (at Assets/Scripts/MultiplayerScripts/RoomManager.cs:39)
UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)```
even though my PlayerManager is in the resources folder
and its just
i hate this
lmao
You said "resources", is the folder called "Resources"
oh wait that wasnt even the issue
unity decided to think that scene 1 was not a valid scene
so i deleted it from the build and added it back
it works now?
thats such a weird bug
Ah
What is better for tdm game photon pun or mirror?
PHOTON ISSUES
Does anyone here have any experience with Photon?
For some reason code that used to work just fine, now all of a sudden decides to disconnect a player IMMEDIATELY after creating and joining a room.
It says it's doing so because of "client logic", but there is nothing in the code that is doing this to my knowledge:
https://pastebin.com/xVrTJQbP
Is there any way to drill don on where the issue is?
Because I am quite frankly at a loss and I see not where, why or how existing code that has worked for weeks, all of a sudden should stop working
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Hello.
I have a question regarding AWS Facebook Integration.
In the begginning of the application,
I want to check if my USER had already signed up before, if so I will redirect him to the "main menu" or not, I will put him through to the sign up menu with other options such as Google, Facebook, Twitter.
but do not know how to check?
i have a problem, i am trying to get multiplayer game using photon and i need to spawn the players, so i created a prefab for my player but in my script i need to reference my camera so i had to child my cameras to my main player, but then when i child it it's really buggy because it follows my player, btw i use cinemachine, i don't want it to follow it my cinemachine already covers that so idk how to fix.
hey guys, i tried to play my mlapi game over network with a friend and unsurpisingly it didnt work
from what ive seen he literally jsut needs the right ip adress to connect to and put that into "connect adress" on the u net transport script
but that didnt work out
can someone maybe give me some pointer what else i need to pay attention to?
i only tested the game via localhost on my own machine and it worked fine there
Did you port forward?
Well then his router is blocking your connection
He must port forward, port 7777 is default, UDP protocol
I'm making a multiplayer game and it's gonna be a long time before it's finished, so would it be a good idea to go ahead and use MLAPI since it's probably going to be more developed when the game is ready for release
You can use port 7777
so theoretically
There's a huge list on wiki, some are used by other programs
Yeah, less theory more actuality
👍
that seemed to not have done it
😦
is tcp the wrong protocol?
unet transport yes
still doesnt quite work
anything else i need to change in the unet transport script?
except the connect adress
and connect port to 7777
well thats one we took out of the ipconfig
his router gave him a new "ip adress on the web" for that port though
and we tried it with that one too
Yeah I'd reckon so
how do you check ur public ipv4 adress
Literally just type "whats my ip" into Google, there's a couple of sites for it
I think that's the simplest way
Maybe your friend has IPv4 disabled on the router
does internet even work without that haha
Uh I guess a lot of things would work
yeah he just checked
I know IPv6 uptake isn't fast, or totally universal yet though
ipc4 is enabled, and he gave me the right ip adress
for some reason i dont see mine though
maybe im the problem
yeah idk...
i dont think i have ipv4 disabled though
let me check
hm
😦
i was so hoping it would work lol
thanks for your help though! much appreciated
@olive vessel works!
i had connection approval still ticked on
which wasnt implemented correctly
disabling connection approval did the deal
Ahh
thank you man, super happy it actually works
kinda crazy that i literally created an online game, super cool man
thanks
👍
i need help with photon
If you post a problem, you're more likely to get a response by someone in passing
Assuming this fits here because im using it for networking:
I am trying to use JsonUtility#fromJson
on a serializable class wtih a list of serializable vectors.
the SVector3's are marked as serializable, but the data array ends up having no items.
the json string, when logged to the console has many items.
Any idea how I can deserialize a array properly?
[Serializable]
public class ChunkState
{
public SVector3 dimensions;
public float frequency;
public SVector2 origin = new SVector2();
public SVector3[] data = { };
}
I have no idea
Heya, how do you guys deal with the persistance layer ? I'm currently using PUNv2 and the consensus seems to be playfab.
Anyone who has some good docs about proper tick synchronisation between the client and server?
Hi guys! question about pun: I have an object-spawner that spawns item with PhotonNetwork.Instantiate. But when other player joins he dublicates these objects, what can i do about it? I tryed to add if MasterClient condition:
if (PhotonNetwork.IsMasterClient)
{
Transform transform = PhotonNetwork.Instantiate(ItemAssets.Instance.pfItemWorld.name, position, Quaternion.identity, 0).transform;
}
in this case dublicated objects are not spawned but i have its wired behavior like trembling, slipping away and fast local rotation.
well thanks, this is something exciting to research. I'm probably like a year+ away from doing anything network related, but knowing there are powerful solutions like that is great.
I'd hate to make a wonderful game, and plan for a small group, and then suddenly it gets blown up and I couldn't scale it because of the limitations of my network library lmao
The reason why I recommended the kit is because suriyun improved litelib on his own and made an extention
Yup
okay, yeah, if he modified it to make it integrate better, its worth
I just like-- you know
you see stuff like atavism, for example
Yeah of course
and its like
this is nice, and all
but I just want the network! Lol
He improved it so much the default will have some sync problems over 100 players
He gives an example to break up scenes too to improve network
And literally gives you a foundation for a mmorpg
You don't have to use everything
@brisk briar LAN is for local area network, which in practice is anything that doesn't go over the internet, while multiplayer goes over internet. The implementation in the game is basically the same regardless, apart from not having to deal with network firewalls and a lot of latency.
Pretty much
In LAN you just connect to devices in your local network
Otherwise you connect to a server outside of local devices
Which likely has been port forwarded to allow connections
the only difference is the IP that you connect to in the server
for example, LAN ips are usually 192.168.XXX.XXX or 10.4.XXX.XXX (i think?)
WAN ips are usually very different without a concrete pattern
as Danny said, you also dont have to deal with latency as much, and its possible to get pings as low as "0 ms" between LAN devices (because there is virtually no distance between devices)
on a LAN you just start a server locally, and also start a game client
you can then use UDP and broadcasted packets to implement discovery
the relevant C# socket option is SocketOptionName.Broadcast
under System.Net.Sockets
well i dont know much about network . should i start learning Mlapi or Mirror or code a server .
i want to make fps games
Anyone?? help
Jeez idk. I learn the basics of getting things working in photon, and that a pretty simple one. I just started looking into mlapi and realized idk shit about servers and stuff.
but photon Only have 20 ccu
Well only for free. You can have more but it’ll cost you. Any server hosting will cost you. Especially if you don’t have the equipment or know how to run your own servers
use Photon Fusion (not pun, not mirror, not mlapi). It's designed for that
okky but what if i want more then 20 ppls
then pay for more ccus
But im brokrrr
It really depends if you are planning to create a game to sell, or just a hobby project
learning
for learning, it's all good
then 20 ccus is more than enough
You can experiment with all these solutions
okks
20ccu is great for testing things out... And with fusion there's built-in punch+relay, so players host the game etc
No need to run a server
And you said FPS
For that you need client side prediction, lag compensation, etc
There are only two netcode SDKs with those built-in, and both are from us (photon)
but mirror is grt as well isnt it?
Bolt and Fusion (which is the new tech that is replacing both bolt and pun, so no reason to use any of the legacy solutions if you are just learning)
no...)
oh oky
mirror is free open source.
and has a good community around
for an FPS you absolutely need a tick-based netcode with client side prediction + lag compensation. Mirror/Mlapi has none of these
these things above is what every single competitive shooter uses... without these it's just a sloppy attempt
oh oky tnxs for the help
So you either develop them yourself (which is also a possibility)
In this first part of my C# networking tutorial series, we set up a TCP connection between a dedicated server and a Unity client.
If you get stuck or have questions, ask them on my Discord server: https://tomweiland.net/discord
Kevin Kaymak's channel: https://www.youtube.com/channel/UCThwyD-sY4PwFm7EM89shhQ
List of commonly used ports: https://...
or take a solution that includes them out of the box
u mean dis?
what you use depends on how much you want to learn
i want to learn then earn
as Erick is saying, you can either learn about how to make a game (and use Photon), or you can learn how to make a networking solution (and DIY it)
exactly
i would suggest going Photon
then, if you want to learn more later, just try to implement the netcode yourself
once you have a game that becomes easier, because you know what you need
if you are doing it DIY from the start the end goal is much more nebulous and harder to "reach" in any meaningful sense
what is netcode ....
netcode is just how clients and servers interact
basically, the networking aspect of a game
oh
so i should start photon ?
But i want u guys to decide cause im just starting
do you want to make games or becomes an engine developer?
do you like to implement A) gameplay, or B) do you like to write code/APIs for others to use?
if answer is A/games/gameplay, go for existing libraries...
I don't create games, I create libraries/engines for others to use... These are totally different things
i just got ur tutorial Hello Fusion FPS - Part 1 (client prediction, server reconciliation, lag compensation)
ye, that shows a couple of things you really need on an FPS
there's also a longer series on my twitch
can u give me the link
its about photon right??
unavailable?
Yes and no
😦
wrong link, fixed
🙂
I use photon fusion in the last series, but I discuss the topics in general terms
You could technically write your own stuff based on the discussion
so should i start from that?
no
that's a bit advanced
you should start coding a simpler game
If you've never done a game before, start with something single player even
yeah made one hehe
If yu've finished games before, then fine, go for MP, but write something very simple first
multiplayer pong incoming
nah
I don't like that as an example
🙂
Honestly, pong is technically NOT easy (if you want to make it correctly)
You need full predict rollback for it to look right
Just write something where players move around, collect some stuff, drop them, etc
Something slow paced, etc...
To have 100ccu, i normally means you have 2k DAU, 40k downloads/copies-sold or so
So it again boils down to what do you what to do with these games.
Sell them
So if you ever get to high CCUs it means you have a lot of people playing (and hopefully paying) your games
It's never been a problem for studios working with us
alright im starting
@gleaming prawn Hi Erick, I was wondering what's the go-to solution that photon users implement for persistance and account information, ie login, items, coins and whatnot.
Thanks!
I see many customers use Playfab
The other common solution is custom/proprietary backends (many studios and publishers have these, as they use across multiple games, etc)
Gotcha, I was already looking into playfab so it feels good to have a confirmation :)
(edit: I don't have exact numbers about which is most common of the two above, so won`t state that detail)
Hello.
I have been looking through the internet and could not found anything. Thank you in advance again!
My AWS IAM user can delete or update a slot in the dynamoDB only if they enter one time password.
I could not found how to do that.
you have any idea? thanks
A few more questions for the road.
What's the default tick rate w/ PUNv2 and is there a way to change it?
Also considering that bolt doesn't provide host migration, I suppose using playfab for that would work out right?
And last question, I just looked at fusion and it seems a lot better than PUNv2, seeing as i haven't made a ton of progress network wise, switching to fusion would be a good idea right ?
Hey guys, what does this setting actually do? (internet acces)
btw even if i set this to require and i turn off wifi on the android device the app starts anyway. Is there a way to prevent the app from starting if no internet connection is present?
I believe it i 15 ticks per second.
I suggest you check Fusion, which is replacing both Bolt and PUN
And Fusion WILL have built-in host migration.
Implementing host migration yourself is a MAJOR task, it's not as simple as "I suppose using playfab for that would work out right? "
Any ETA on that ?
We can't share hard ETAs
BUt it is a 1st class feature that will be in for when move from beta to relase candidate
notice Bolt and PUN are very different in feature-set
Alright that was very soft indeed lol
Fusion is a super-set of both
and the two legacy products are to be maintained in LTS mode (bug fixes only) for the long run
No new features anymore (for bolt and PUN)
They won't stop working (as we have lots of customers using them in production games), but won't receive major updates
Gotcha
WebGL support when
Will fusion also provide a persistance layer or something like playfab would still be needed ?
for fusion and quantum, no idea... When WebGL builds offer proper fast mem operations... We're re-evaluating that in the next couple of weeks
We don't work with player profiles, persistence, etc
Gotcha, thanks !
I have 2 NetworkTransform (MLAPI) components, one on parent object (synchronize position) and one on child object (synchronize GFX object rotation). When I join as a client the parent object's position is synchronized with all other clients but child object's rotation is not synchronized (all clients have quaternion identity rotation) at start, first I need to adjust this rotation (based on player's camera rotation) so that the rotation will be sychnronized with all other clients. Does anyone know why is this happening?
Well I found out that parent object with networktransform is synchronized with clients when they join but child object with networktransform is not (all other clients have default values when new client joins), it will synchronize only after the value has been changed. Dont know if I'm missing something but this behavior is kind of strange to me
Hello, would it be smart to use a Netty Java server for a multiplayer game? 😅
honestly, it would be a lot of work to write gameplay code twice in two different languages and tech stacks
There may be use cases for this, but it's not the easiest of the options, and there is no clear advantage either...
Hm Okay. What would you recommend?
it really depends a lot what kind of game you are trying to write
And how much experience you have
I wanted to start with a small 2D game
that does not say much
is it a turn based card game? an action game? a fighting game (difficult)?
A fighting game.
that's not the easiest ting to start with
You have two professional-grade options:
- use GGPO. together with a lot of custom code for hitbox detection, something to use as transport layer (could be steam etc)
- use photon quantum, which is a predict-rollback deterministic engine
Fighting games are notoriously difficult to network
Hi, where to ask questions about setting up a multiplayer game?
I understand, you're right about that. Otherwise, I would make a parkour game.
as long as the PvP interactions are not super complex, for that you can use basically any of the existing options... With different degrees of sync accuracy, etc
mirror, mlapi, pun, photon fusion, etc... whatever you feel more comfortable with
Okay I will have a look at the things, thank you.
What about checkers game? I have one from unity assets, which unfortunately doesn't support 2 player game with 2 devices
Is anyone knowledgeable on Photon? I'm copping an error Illegal view ID:0 method: OnPlayerSpawnedRPC GO:Player and I'm not having much luck finding a solution to it.
I have 2 codes, this one works:
public void SpawnPlayer()
{
float PlayerXPos = -6.26f;
float PlayerYPos = 5.542f;
float PlayerZPos = 27.07f;
PhotonNetwork.Instantiate(TestPlayer.name, new Vector3(this.transform.position.x, transform.position.y, transform.position.z), Quaternion.identity, 0);
GameCanvas.SetActive(false);
}```
Whereas this one throws the error
```cs
public void SpawnPlayer()
{
int index = -1;
for(int i = 0; i< availableHouses.Length; i++)
{
if (assignedHouses.ContainsValue(i))
{
continue;
}
assignedHouses[photonView.OwnerActorNr] = i;
index = i;
break;
}
if(index < 0)
{
return;
}
Vector3 spawnPos = availableHouses[index].SpawnPosition;
GameObject photonPlayer = PhotonNetwork.Instantiate(TestPlayer.name, spawnPos, Quaternion.identity, 0);
GameCanvas.SetActive(false);
photonView.RPC(nameof(OnPlayerSpawnedRPC), RpcTarget.OthersBuffered, index);
}```
Where to ask for help?
Depends on the question
This is for questions related to networking in Unity
(The TCP/UDP kind, not the making friends kind)
Ok, I get it, my issue is modifying a single player game into 2 player game. What do I need, is it enough to setup MLAPI?
Well it's a bit more than just importing MLAPI
DapperDino has a few videos about MLAPI
Thanks I will watch him
Is there a step by step guide like this one? https://learn.unity.com/tutorial/how-to-publish-for-webgl#5d925107edbc2a132148cc01
Didn't find anything of the like when I was learning mlapi
Your best bet is dapperDino
thanks again
MLAPI is relatively new, I would guess there are more tutorials for the older Mirror networking solution
This page aims to collate a series of Multiplayer Unity Networking tutorial videos that teach various concepts of the new Unity Official Multiplayer solution MLAPI, all made by Dapper Dino. Learn more about Dapper Dino and his Youtube channel and don't forget to click the subscribe button.
Full of Dino's videos
Hi! question about PUN. When a new player joins, can i get reference to a gameobject he controlls?
sorry, i mean when a new player joins the room a player prefab is instantiated. Can i have a reference to it?
you dont need to reference it, thanks to the glory that is photon.
what you need to do
is this simple line:
PhotonNetwork.Instantiate(Path.Combine("PhotonPrefabs", "YourPlayerPrefabName"), desiredPosition, desiredRotation)
make sure you have using System.Linq at the top of your script
and create a folder in your unity assets folder called "Resources"
exactly how i wrote it above without the quote marks here ^
and in the Resources folder make another folder called "PhotonPrefabs"
again, exactly how i wrote it above without the quote marks here ^
so u described how ti instantiate a prefab? I mean a little different thing:
i want to calculate distance to player that has joined the room. So i need a reference to a Player gameobject that has just joined.
anybody has a hint for me how to play live-video-streams in WebGL? I found video-plugins in Asset Store like Universal Media Player (UMP) that can run live-streams (RTMP / HLS) but only in Windows-Version. I wanted to show live-webcasts in WebGL version too
photonView is a shortcut for GetComponent<PhotonView>() make sure there is a photon view on the gameobject
Hey all, I’m wondering if anyone might be able to point me in the right direction for something. My current project requires me to listen for an incoming web request in unity in order to receive an authorisation token from Spotify. The system works fine when targeting windows/Mac but when targeting webgl it hangs without an error. This is because the current solution uses a small web server on a thread, which isn’t supported for webgl.
Is there any non threaded approach I could take to listen for the callback response coming back from Spotify?
Hello.
My question is so short.
Is it possible to use AWS (DynamoDB, S3 and other services) in Unity Editor?
My unity tool is going to make some CRUD operations.
Thank you in advance!
Hi, so I want to make a multiplayer 2d game with weapons and stuff like that, I added some simple player movement, when should I start add Photon to my game?
Oh alright
So I was thinking right
Cause I might need to rewrite most of the scripts for multiplayer, right?
At least integrate it with Photon.
Is it hard to add inventory system to a multiplayer game?
It's hard to add anyhting to multiplayer.
It's a lot of work to sync content.
Eh, I will take my time
I have one more question
If I want to make a matchmaking system, meaning in my game, there will be n numbers of matches at a time, do I need to make some more things besides writing the matchmaking script?
For short: if there are more rooms, do I need to sync more stuff?
Yes
What exactly?
Well, the rooms for one thing. Who's in them, number of players, passwords ,etc.
Just play an online game and see what information is being shown.
I hope there is enough documentation
In fact all the information you need to maintain the game, the info about the player, anything that is needed to be known.
Multiplayer is a pain, and as Osteel said, integrate it as early as possible, the more you wait, the more you will need to rewrite
the data needed to move for sure... since all client and the server if applicable need to be aware of the position of each player
nope sorry... by trial and error I suppose, it's how I learn everything
Oh
start by their website
Photon Unity Networking framework for realtime multiplayer games and applications with no punchthrough issues. Export to all Unity supported platforms, no matter what Unity license you have!
and the documentation section/SDK will certainly cover the information you need
Their documentation section seem to be well structure with everything you need to start
I don't know...
It says 100ccu or something like that
then yes, you have 100 concurrent users
Oh nice
Any really good tutorials for how to a 2d multiplayer games?
Please @ me
Hey Does anyone know how to make a killfeed with photon pun?
Hello.
In AWS can I reach the AWS servers in compiletime (UNITY EDITOR) not RUNTIME.
It is OnJoinedRoom. Typo...
Look carefully. Your code looks like in the first shot...?
wdym
The screenshots are identical. Ofc the second won't work better...
Just tell me what to do
Fix the method name. It must be OnJoinedRoom()
Also, your class inherits from MonoBehaviour, which does not define OnJoinedRoom(). Inherit from MonoBehaviourPunCallbacks.
oh oh i see Thx man
Set the request headers (content type, user agent etc) and try sending it that way
How can I do this?
UnityWebRequest www = new UnityWebRequest(url, UnityWebRequest.kHttpVerbPOST);
byte[] body = new System.Text.UTF8Encoding().GetBytes(json_string);
www.uploadHandler = (UploadHandler)new UploadHandlerRaw(body);
www.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
www.SetRequestHeader("Content-Type", "application/json");
www.SetRequestHeader("User-Agent", "DefaultBrowser");
www.SetRequestHeader("Cookie", string.Format("DummyCookie"));
www.chunkedTransfer = false;
yield return www.Send();
Copy Pasta code, might not work 1:1
Where did you copy this?
Google -> Unity WebRequest set header
how to remove Development Build text on bottom right? I am using Photon PUN 2 Free
Untick development build in build settings
Why is photon lying about their prices
Here it says that 100CCU is free
When I made an app, it says it costs 100 dollars
Is there a goog tutorial for making a 2d multiplayer game from scratch?
there's no lie, you are looking at two different products
The screenshot you attached is for self-hosted photon server (you can even read "Photon Server Pri..." in the header). 100ccu free is correct.
when you create App IDs on our dashboard, you are talking about photon realtime or PUN running on our cloud (which have a page for their pricing). This "pink" page is the one about photon server
For cloud-based pun/realtime, 20ccu is free
Anybody here use NetCode? There's part of the architecture I am having trouble understanding...
Ah
Not sure if this is the right channel.
What’s the recommended library for creating / signing JWTs token in Unity?
This is for a headless unity server that needs to communicate with the backend
The one on github, JWT-For-Unity hasnt been updated in years, and Mono did not support elliptic curve crypto methods last time I tried to use microsoft DLLs
Apparently my friends cant play my multiplayer game with me because im in a different country. i am using Photon PUN 2 free, why is this happening? i want to make the multiplayer global so peoples can play with peoples in different country
People from different countries can play together, but by default Photon connects to a region closest to the user
At some point the latency will become pretty painful, especially if you are doing something over masterclient
anyone have any idea where to find this build.gradle? Im trying to setup Firebase for my push notification. I skip this part but then when i tried sending message to device its not receiving it.
you could just copy and paste the text box in, (sorry, I'm not that well educated about firebase)
yeah but i cant find this build.gradle in my project
Does anyone know if the new unity networking supports clients joining multiple servers simultaneously?
hOW TO SOLVE DIS ERROR
i can only create rooms and cant join them
(Its photon pun 2)
read the message, and set a region in the proper slot, not in the on that says dev
That's what I take by reading the message
It is a warning, not an error. It tells you that you are running a "development" build/editor and that the region is fixed, due to that.
This is called "Dev Region", described here: https://doc.photonengine.com/en-us/pun/v2/getting-started/initial-setup
This is a separate topic. Read the Matchmaking docs. There is a Matchmaking Checklist, which should help.
Alternatively use the ConnectAndJoinRandom component.
I'd recommend the PUN Basics Tutorial, too. That should help you get over the teething problems. Read and code-along.
where to put this code in my xcode? Im not really sure where AppDelegate class is.
how to make peoples able to play on different country? what settings should i change?
At least you could force the region to be the same. You might also be able to combine regions together in a way that allows everyone to play with anyone on the network, but no idea if you actually can.
Combining would probably be ideal as going through Photon's infra might be faster than letting ISPs decide the route
okay, so i need to set the fixed region or the best region in the PhotonServerSettings?
Fixed
for the force the region method
okay
i might also try to the combining one
any networking suggestions?
i know about those i see people use them but i want other suggestions before I decided
i cant spel;
using Photon.Pun;
using System.Collections.Generic;
public class FirstPersonMovement : MonoBehaviour
{
PhotonView view;
public float speed = 5;
Vector2 velocity;
[Header("Running")]
public bool canRun = true;
public bool IsRunning { get; private set; }
public float runSpeed = 9;
public KeyCode runningKey = KeyCode.LeftShift;
/// <summary> Functions to override movement speed. Will use the last added override. </summary>
public List<System.Func<float>> speedOverrides = new List<System.Func<float>>();
private void Start()
{
view = GetComponent<PhotonView>();
}
void FixedUpdate()
{
if (view.IsMine)
{
// Move.
IsRunning = canRun && Input.GetKey(runningKey);
float movingSpeed = IsRunning ? runSpeed : speed;
if (speedOverrides.Count > 0)
movingSpeed = speedOverrides[speedOverrides.Count - 1]();
velocity.y = Input.GetAxis("Vertical") * movingSpeed * Time.deltaTime;
velocity.x = Input.GetAxis("Horizontal") * movingSpeed * Time.deltaTime;
transform.Translate(velocity.x, 0, velocity.y);
}
}
what is wrong with my code?
when I go to Multiplayer, in Unity I go two players but I control them both and in the build I only see one player
Honestly, if this is a new game with not really anything done with the multiplayer yet, use Photon Fusion
The base design of PUN/PUN 2 is around a decade old, and fusion is pretty new
it's better optimized, will have longer support, and is a much better solution tbh
hello guys I am trying to use Photons OnPhotonSerializeView funcion to send a gameobject variable but cannot figure it out, any suggestions?
Check out the doc pages online. There is a PUN Basics Tutorial, which handles instantiation and controlling only the local player instance.
And yes, it might make sense to get into Fusion right away, if you are just starting out with networking and PUN specifically.
Im using normcore for learning some basics about multiplayer games in vr
normcore has already a voice-chat setted up, but is spatializing, so if someone talk is 3D Sounded.
What I want to know if there's any possible way how to eliminate the 3D Sound only for Voice-Chat
There should be an option to set audio output to stereo mode only.
I have this script for a player, https://pastebin.com/bExCYdJw . When I spawn in players, they paint on the screen as expected. However, when I move a character, it only moves on the client (i.e not reflected to others). What could be the cause of that? I am using Mirror as my networking api
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
This is the player prefab
hello guys, I'm using google mob ads and tried test ads and it work, should I upload my game on playstore in order to show the real ads
because the real ads won't show after build
is there any good source to learn networking from?
and easy to read and understand
Anyone has an idea why i can go through the other player in multiplayer?
I use MLAPI btw
tho standing on top of other players works
i slowed it down to see if the issue is because of the speed of the player but it doesn't seem like it since i kind of still glitch through the other player
maybe collisions?
they both has box colliders
i have a theory that its because i the velocity is being set to a number so the network cant keep up with it ?
also i think that because when i jump on the other player i can collide
so maybe its something with the movement script
i use rb.velocity to move btw
well that didn't work
anyone has an idea ? im close to giving up lol
Have you tried it with using force to move rather than velocity?
I am moving my objects using this:
private void moveCharacter(Vector2 direction) {
rigidBody2D.MovePosition(rigidBody2D.position + direction * Time.deltaTime * speed);
} ```
However, it is very laggy when coming from a client, ref this video https://www.youtube.com/watch?v=LAUVcgRBrBQ . Char # 1 is server, char 2 is connected client. What am I doing wrong ?
yes in the last video
that one
can someone tell me how i can use sockets and how it works like is it code or a website
C# Sockets?
i mean yea whatever it runs on
I have no clue what you mean?
like tell me how stockets work
@carmine stag if you don't even know what sockets are.. you're not going to be able to use them
i looked that up
start by researching what a socket is before assuming it's the solution to whatever problem you're trying to solve
If you want multiplayer, there are higher level solutions than sockets you know
i know but someone said to look into sockets and mirror
+1 to that, highly suggest looking for a higher-level solution or even just a general introduction to network programming in Unity
What do sockets have to do with Mirror
Granted it uses them, but I doubt you'd see them
^ technically Mirror uses sockets, yea
The point of Mirror is so you don't have to do it yourself
but not at all in actual code you'd be writing
wait so they are kinda the same?
this is my first time making a mutiplayer game
sockets are a fundamental part of computer networking
oh
Mirror is really good, lots of different transports to get what you want
Instead of the typical "don't try it" response I'll suggest going over some multiplayer networking tutorials. There's lots of good resources on the subject on youtube
imma keep looking into sockets cuz i alr looked up Mirror Thank you for the help
i did that
"first time making a multiplayer game" "imma keep looking into sockets"
.... look man no one is going to hand you a multiplayer game for free, you're gonna have to read further into it than that
regardless of whether you've already looked up tutorials, if you're still asking questions like these you haven't absorbed enough information from those tutorials
not trying to be rude of course, I just want you to understand the reality of it
hopefully that helps
i am looking into like 5 videos right now
they just talk about how networking works
Any ideas to why my game is lagging for clients? 🙂 I am pretty sure I have misunderstood the concept of [Command] .. but I'd just like some verification 🙂
Hello. in AWS
Users in my app should be authenticated by Facebook and google. But if I use "Identity Pool" how can I save their profile data in cognito?
Should I use "User pool"
Or is it a good practice to save user data via Cognito Sync.
i looked at ur vid but it isnt lagging
@carmine stag the one character is lagging quite a lot compared to the other one (it's significantly slower). But I actually just fixed it. I was wrong to use a command for the move. This is automatically synced. I simply had to set my players as authoritative, and it works! 🙂
oh ok
Hello. After my users authenticate with facebook and federated identity pool in AWS, how can I save user data as a new user in database?
should I choose Cognito sync
Hey guys, is anyone interested in a subscription-based service that works with Unity that offers User Accounts and Saving Data? Basically PlayerPrefs but in the cloud
Depends how much it is 😂
There would be pricing tiers, but it would be as cheap as possible taking into consideration storage and data transfer costs
anyone has an idea ? i actually still cant figure this out lol
Are you using transform syncing? Setting the transform position isn't good for physics behaviour.
Anybody know how to implement peer-peer networking into Unity? Can't find any documentation really for it
My guess is that you push the remote player and then the transform sync kicks in and teleports the remote player behind you
I use the MLAPI Network transform, but on the playermovement i use rb.velocity
and i have to have that to see other players move around
Sure, but you are facing some of the issues with this sort of naive transform syncing
is there something else i can use?
that can work with the mlapi?
or can anything work with it?
Just like most basic networking solutions, I doubt they have a solution for this built-in. There obviously are ways around it as seen in other multiplayer games where collisions are important.
the weird thing is is that i can stand normally on top of the other player
but just running into them is the issue
Yea since the transform sync is effectively doing nothing in that scenario
Yes
ok do i just scrap using that package?
or do i just find another way to sync movement between the 2 players?
That's something to decide once you have found a more proper way to do this
Anybody got a method?
They'll work easy enough in Unity?
Speaking of mirror .. I have working networking now, but it seems physics isn't synced with the server. If I run with my character on one client and clash into another character, the other character will get pushed away, but this movement isn't reflected.. anything in particular I need to look at?
They are designed for Unity?
Unity took over MLAPI
Mirror is UNet but alive and better
Here's a video of the weirdness I'm experiencing, https://youtu.be/_ysF3o-MDF8
Anybody ? 🙂
When working with audio in multiplayer, is there an efficient method of changing the sound clip being played for all clients?
@lyric osprey I have very little experience with both unity and networking .. but I would think you could use a clientcommand and trigger a new clip? Maybe set a [SyncVar] (if you're using mirror) and change it via that ?
No clue 🙂 I am making a wild guess/suggestion 😛
Maybe you can syncvar an identifier and change it in your update code ?
Disclaimer: My sincere apology if I am completely missing the target or giving bad advice here. I must emphasise that I really don't know what I am doing here.
Yeah usually you try to map things like audio clips to ids and then you just sync the ids with a syncvar.
Any suggestions on how I can get my physics calculated on the server and returned to the clients? Is this, https://wirewhiz.com/unity-multiplayer-using-mirror/ , an appropriate approach in 2021 in a 2d setting ?
(code and test scene available on the Downloads page for Patrons) In the modern age of gaming, multiplayer is almost a requirement for any game. As good as your gameplay loop or story is people will eventually get bored if there isn’t ever anything new to experience. That’s why BRs got so popular, endless new… Read
Why not use RPC calls? Ask server/host to execute RPC call in every client, where you play some sound clip.
json deserialization is not working on android, any suggestions?
I need help with this.
Sorry for interrupting too
Newtonsoft.Json is not working either
Works fine on editor/ios
Question, what could possibly cause unitywebrequest to throw "unknown error"?
It works fine in editor, but it throws error on android device
request.useHttpContinue = false;
request.SendWebRequest();
while(request.isDone == false)
{
yield return null;
}
Debug.Log("Sending Request Complete");
Debug.Log(request.downloadHandler.text);
loadingIndicator.SetActive(false);
if(request.isNetworkError)
{
RetryAction = retryAction;
errorText.text = request.error;
errorPopUp.gameObject.SetActive(true);
}else
if(callback != null)
callback.Invoke(request.downloadHandler.text);```
You may be handling the network errors wrong
I solved that by using a dictionary to parse the result and making a check for "error"
No, the request.error itself is throwing "Unknown Error"
do you get the Debug.Log(request.downloadHandler.text); ?
I've read some google result and advice to switch to internal build, but I'm using unity 2019 so the option is not available anymore
Wait, I'll try to see the log in the device
if it's a network error your result should have a json starting with "error" element, isNetworkError checks the result for a similiar input
It doesn't check the class itself, or whether the result comes back or not for instance
I got
07-10 19:01:32.754 13080 13103 E Unity : Curl error 51: Cert verify failed: UNITYTLS_X509VERIFY_FLAG_NOT_TRUSTED
server side problem?
or that's just isError, but I remember it that way
Haven't used Minijson tbh, could be part of that
but if you do not get the debug.log before that
it could be that throwing the error so you don't see the rest of it
The above message is from the debug log
but do you see the Debug.Log(request.downloadHandler.text); line's result on your log?
or does that error you shared is all that you get?
this one
you might be missing a token for instance, cert (certification)
Yep, here's the full log (except for the unity start up log)
07-10 19:01:31.592 13080 13094 I Unity :
07-10 19:01:31.592 13080 13094 I Unity : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
07-10 19:01:31.592 13080 13094 I Unity :
07-10 19:01:32.754 13080 13103 E Unity : Curl error 51: Cert verify failed: UNITYTLS_X509VERIFY_FLAG_NOT_TRUSTED
07-10 19:01:32.754 13080 13103 E Unity :
07-10 19:01:32.754 13080 13103 E Unity :
07-10 19:01:32.754 13080 13103 E Unity : (Filename: ./Modules/UnityWebRequest/Implementations/TransportCurl.cpp Line: 734)
07-10 19:01:32.754 13080 13103 E Unity :
07-10 19:01:32.769 13080 13094 I Unity : Sending Request Complete
07-10 19:01:32.769 13080 13094 I Unity :
07-10 19:01:32.769 13080 13094 I Unity : (Filename: ./Runtime/Export/Debug/Deb
ug.bindings.h Line: 35)
07-10 19:01:32.769 13080 13094 I Unity :
07-10 19:01:32.772 13080 13094 I Unity :
07-10 19:01:32.772 13080 13094 I Unity :
07-10 19:01:32.772 13080 13094 I Unity : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
07-10 19:01:32.772 13080 13094 I Unity :```
This one returns null I think
problem is, how do i specify which clip i want to play?
i have a library where i can specify that a sound happened at a specific place, and then it's called on enemies around it
Can you try to get a debug.log of your Serialized class?
make sure it's before your webrequest
if you don't see it, somehow your minijson is not working, otherwise you can try to set some headers for authentication
but when headers are missing you get actual response with error
so it's not what you have.
I still need help with this
there seems to be a lot of people experiencing your issue too
Are you using Newtonsoft.Json from the original repo or somewhere else? I don't think the original deals with AOT/IL2CPP issues
I've followed a few answers from the web (I'm pretty sure from answers.unity) and installed the working one (and not the latest from official)
and not the one on Visual Studio
it works on the editor, ios too
and it worked on a separate dummy project
which I builded for android
it's silly, somehow I get a nullreference exception on deserialization of the same object
it's a bit large in size too, so I can't remove and try with and without all plugins
Well, Idk what multiplayer system/library you use, but if you use for example Mirror, you can say CmdPlayClip(int clipIndex) to communicate to server and then call clients: RpcPlayClip(Int clipIndex)
Hi! So Im using photon and in editor it does not let me create or join rooms but in builds it works. Why is that?
Hello! I'm making a game with vastly different gameplay for each client (1v1). One is basically at a desk in a 3d environment and can't move, while the other moves around on a 2d map.
How should I go about implementing this ? I can easily spawn clients with the same object essentially, but how do I make one have a completely different view & system than the other ?
I am using MLAPI btw.
Thanks!
Have you tried looking into documentation to see how you can replace the logic for spawning those prefabs?
int 😦
Yeah, you have a soundclips in an array or list and you play them based on int, simple.
Yep, it seems like invalid/expired https certificate, or maybe android doesnt accept self signed certificate(I'm not sure since server side is handled by someone else), I ended up bypassing the certificate handler by always returning true like suggested in the link.
Hello everyone,
I have questions about multiplayer networking. I have already done days of research on Google (now everything is purple XD so now i feel like im stuck)
- how do clients / server synchronize abilities ? (like a spell cast in League of legends)
- From what I got from a few GDCs, the local client predicts it's abilities with player inputs, but how does he predict others abilities.
- how to synchronize Clients / Server shooting projectiles.
- is a shooting event is sent for every bullet, or the server just says player X shoots and the client predicts the rest. but what if the client wrongly predicts a rocket or something really noticeable.
Thanks
Regarding sending messages from client to server and vice versa, does it NEED to be in a network behaviour?
I plan on making something instantiate an empty gameobject with an audiosource that plays at that location to make it easier to play sounds
Basically, the server and all the clients run the same gameplay logic. Clients run ahead of the server—they simulate each timestep (tick) before the server does—and send their inputs to the server. The "running ahead" is called prediction and it's done because those input packets take time to reach the server.
Anyway, with the inputs it receives, the server sims the true, authoritative version of every simulation step. Then the server sends a copy of the true game state (commonly called a snapshot) back to the clients. Again, the clients are predicting the future state of the world. The snapshots are in the past. So whenever a client receives a snapshot, they first have to rewind their simulation back to that step (now with the authoritative data), re-simulate however many steps to catch back up, and then predict the next step.
So 1) Clients predict their own actions by just processing your inputs and running the simulation ahead of the server. To extrapolate other players somewhat accurately, the server would have to send you their inputs. Doing that is rare though. (Rocket League does). Most games just interpolate the other players between those snapshots and have the server break causality (lag compensate) so you don't have to lead shots and stuff.
- Mispredicts basically amount to visual glitches. They won't affect the server's simulation (the server doesn't predict, so it can't be wrong), so you seeing the rocket spawn but then vanish because you actually got stunned, while annoying, is just an artifact.
^ That's all basically how your "standard" server authoritative multiplayer works.
The worse your ping to the server is, the further ahead of the server your client has to be to deliver its inputs on time, and the more likely you'll see mispredictions.
thank you very much @ Joy # 1194
from your first message i see you mentioned (ticks), i've probably seen it on every GDC i've watched but i don't know why i still don't get it 100%.
Tick is just another word for simulation step or timestep.
how does server and clients use it and ho they syc it
like how the server sync it with clients and when clients use it ?
Like it means you're simulating the game in discrete steps. Clients need to receive one snapshot from the server before they can start simulating.
But once they start, they need to simulate each step ahead of the server (tick 100 refers to the same in-game moment for everyone), by enough time so that the input packet doesn't arrive late.
I don't recommend using RTT/ping measurements to regulate that, but basically clients need to simulate ticks RTT/2 ahead of the server does, more if the network is unstable.
I think I finally got it 🙂
so clients start simulating once the server sends out the first tick and from there they start to predict the next ticks and reconciliate if any bad simulation occurs?
im already using the RTT/2 to push server snapshots more to the present and im also sending players inputs so all clients are simulating are fully ahead of the server.
Yes. Generally speaking though, it's easier to just always re-sim, even if you didn't mispredict. It's easier to profile, and finding differences gets more expensive the more state you have.
Rather than do any kind of time offsetting, the strategy suggested in the Overwatch GDC talk is to have clients simulate at a faster/slower rate to converge on the appropriate lead.
DOTs make it easier and very decoupled.
so it's better to fully predict the movements simulation on all players and reconciliate with the server, but to fully interpolate and wait for server commands regarding abilities except for local player (like spells and shots) ?
Like if the server is 60 ticks per second and my client is behind where I need to be, I'll do say 62 ticks per second temporarily to get further ahead.
that's genius
No idea about DOTS. I'm just saying that checking if you need to reconcile is kind of a waste. Like it doesn't help you detect or profile worst-case.
Like at some point, somebody is gonna need to reconcile a lot of ticks, and you can't know when. So it's better for you to know that your client can always handle it.
The only benefit I can see to reconciling just when needed is that it might save a bit of power on mobile devices.
it's clearer now !
thank you very much @dense hedge
Is webrequest broken in 2021? I updated my project from 2020 to 2021 and suddenly webrequest.downloadhandler.data always returns null
It works in 2020, it's broken in 2021.1, but updated to 2021.2 beta and it works there.
I'm new to networking (MLAPI) and I'm trying to spawn playable character, everything works as inteded, I spawn the character with ownership to the client that asked for this spawn, but then I try to get component from this client which still works but when I try to change spawnedCharacter value it doesn't change it, after calling testClientRpc() client that asked for the spawn has spawnedCharacter set to null, don't know why
I did find workaround around it, I would just like to understand why I can't do what I try to do
Hi everyone.
I'm having a problem when i try sync the bullets between the clients. (MLAPI)
The problem is the next, when i shoot a bullet in the server work perfectly, but in the client no work like in the server.
I try with NetworkVariables like NetworkVariableVector3 but no work in the client correctly.
This is my script for shoot the bullet.
Could you paste the code into a gist like https://gist.github.com instead of screenshotting?
Ok, yeah, sorry
Thank you
This looks correct. Does it not work?
No. In the client the bullet doesn't have force, but in the server has force. So idk what happen xd
Yes that's because you need the InstanciarBalaEnTodosLosClientesServerRpc to call a [ClientRpc] to add force to the object
When you add force to the object, it's only adding it on the server's instance of the game, not the clients'
Ok, thanks. i'll try
Ok, i tried, but doesn't work. I changed the code that i used in this test in the repository.
The Editor give me the next error
No that's slightly incorrect, sorry
Can you show me how I should do it?
Your client rpc should look like this cs [ClientRpc] private void InstanciarBalaEnTodosLosClientesClientRpc(GameObject gameObject) { gameObject.GetComponent<Rigidbody>().AddForce(-SalidaBala.transform.forward * VelocidadDeLaBala); }
And when you call it, you pass in the go InstanciarBalaEnTodosLosClientesClientRpc(go);
And make sure that your Bala GameObject has a NetworkObject component attached
I gotta go but I hope you can solve it!
Thanks so much
Hello.
var deleteObjectRequest = new DeleteObjectRequest
{
BucketName = bucketName,
Key = keyName
};```
This is the object for deleting object from s3 of AWS
var deleteObjectRequest = new DeleteObjectRequest
{
ObjectReference =
DirectoryArn =
}```
The second one is in my sdk but does not have proper properties.
Do you have any information about it.
thanks
Hi, I made a photon game, I can create rooms but I cant join rooms. Can someone please help? I cant figure out whats wrong.
I disabled the filter
It was EU default
I will send my code
It connects to the master server and I can create rooms without a problem
But it doesnt join rooms
To test it, I made a build by pressing ctrl and b
Display the region and rooms too
How do I send the code?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Photon.Pun;
public class CreateAndJoinRooms : MonoBehaviourPunCallbacks
{
public InputField createInput;
public InputField joinInput;
public void CreateRoom()
{
PhotonNetwork.CreateRoom(createInput.text);
}
public void JoinRoom()
{
Debug.Log("Joined in room");
PhotonNetwork.JoinRoom(joinInput.text);
}
public override void OnJoinedRoom()
{
PhotonNetwork.LoadLevel("Game");
}
}
here
what did I do wrong?
@spring crane
Did you confirm that you actually couldn't join a room and it isn't just the LoadLevel method failing?
The loadlevel works cause I use it for joining a room when created
I made a debug.log on the CreateRoom method and it worked
No error is displayed in my console too
Yea I highly urge to spend a sec to build something that displays you some of the state of PUN for dealing with this sort of thing
how do I do that?
I followed blackthornprod's photon tutorial video and I made the exact same steps
Explore the Photon's API to see where you can poll stuff like current lobby state, region, room count etc and display it on some UI
oh
@spring crane BROO
It works but just between builds
Any idea on how to fix that?
From my experience it should just work, as long as everyone is definitely on the same region
Oh yeah, one more thing, the vm cam is not following the player
It has in the inspector selected who to follow and who to look at
anyone know anything about steamworks.net here?
What's your question ?
Does anyone know how to get a list of the ‘rooms’ that are available to join using unities mlapi?
need some help with multiplayer
i have a steamlobby script where one player spawns when you start host, and another spawns when someone joins through steam
it displays the two players on both screens
but when i do movement
it is client side
anyone has an idea why my player teleports like this?
this is my movement script
https://gdl.space/nimezocolu.cs
and these are the settings in the inspector
nvm i fixed it i added NetworkRigidbody2D
it fixed a shit ton of things actually
tho im still having issues with sync lol, anyone knows why?
I was told to ask here, I have a unity build that works fine on PC, Mac & Linus Standalone but I can't get it working on WebGL (browser), any help is appreciated
Hi good morning/evening/night all
I've been trying to make a WebGL build of a project and already tried building it 3 times with different settings on each time, but it keeps crashing during loading and spamming those same errors on the browser console, tested on Firefox and Edge.
Is there any setting I should try changing to avoid this kind of error or any guidance? Google gives me nothing at all on those errors (feel free to ping me)
https://cdn.discordapp.com/attachments/763495187787677697/864326804424884254/unknown.png
Not sure where this question belongs but I'm gonna throw it here. I have a game idea where I'd need users to have an account which they would log in through and I'd need this so I could how often certain webservice calls would be processed, etc. Think of how you want to avoid a leaderboard from having it's updates spammed, just as an example, so you'd want a token of some sort for the account which you could filter against.
I'm curious what the simplest option for an account system like this would be which would be somewhat secure would be, if anyone has ideas.
I'm not qualified to write this myself.
okay using unity2020 and mirror40, i was running around, but i tried to add a new controller, both use the character controller + capsule collider. but now if my collider touches the terrain collider, player object warps to 0,0,0. if i stick a cube+box collider there scaled out, it will land on it and can run fine, but hop off onto terrain it zaps me back to origin. any ideas lol?
I'm using MLAPI and when i .Despawn() gameObject, client that previously owned that gameObject will lose the ownership, is there a way for the client to keep that ownership even when the object is despawned but not destroyed?
Im kinda lost with this MLAPI, when I .Despawn() gameObject, client that owned it will lose the ownership, so I decided to not .Despawn() gameObject but destroy them and if needed Instatiate them again. But when I Destroy() gameObject, host still owns it which doesn't make sense, so I try to .Spawn() it after I destroyed it because apparently host still owns that gameObject yet nothing is spawned because that gameObject literally doesnt exist
You have to destroy / despawn on the host
I know, you cannot call despawn function on the client anyway. All is done through [ServerRPC]
I'm not sure what you mean by "when you destroy an object the host still owns it". If you destroy an object it is destroyed so where do you get that ownership information from? Also you should not do anything with a Unity Object which you destroyed, you should definitely not try to spawn a destroyed object.
I know these operations after object was destroyed were just my desperate calls to figure out what is happening, basically I spawn new object for player with "metamorphosedPlayer.SpawnWithOwnership(OwnerClientId);", so at this point he has 2 owned gameobjects, then I destroy one of them and check how many owned gameObjects he has:
Destroy(player);
NetworkManager.Singleton.ConnectedClients.TryGetValue(OwnerClientId, out NetworkClient client);
Debug.Log(client.OwnedObjects.Count);
And it still shows 2 which isn't correct
This is the whole logic:
// Get player client that will be metamorphosed
NetworkManager.Singleton.ConnectedClients.TryGetValue(OwnerClientId, out NetworkClient playerClient);
playerClient.PlayerObject.GetComponent<PlayerStats>().isCharacterProp.Value = true;
Debug.Log(playerClient.OwnedObjects.Count); // => SHOWS 1
// First owned object is player's character
GameObject player = playerClient.OwnedObjects[0].gameObject;
// Get playable prop
NetworkObject playableProp = props.playableProps[props.getIndexOfPlayableProp(hit.transform.gameObject)];
// Instatiate playable prop
NetworkObject metamorphosedPlayer = Instantiate(playableProp, player.transform.position, player.transform.rotation);
// Spawn playable prop to player that will be metamorphosed
metamorphosedPlayer.SpawnWithOwnership(OwnerClientId);
Debug.Log(playerClient.OwnedObjects.Count); // => SHOWS 2
// Destroy player's character
Destroy(player);
Debug.Log(playerClient.OwnedObjects.Count); // => SHOWS 2 ?
Whole script is a [ServeRpc] method, and the player gameObject after being destroyed isn't shown in unity's editor
Yes destroy in Unity is not immediate. It will destroy the object before the next Update. During the next Update it should be no longer in the OwnedObjects lists. If you despawn it it should get removed immediately from the list.
I tried DestroyImmediate, Despawn and was also checking this OwnedObjects value inside of Update() and it kept giving me 2
If despawn returns two then that's an MLAPI bug I guess.
Yea probably
What do you need the OwnedObjects list for?
I want to switch between player's character and his prop which are 2 different gameObjects without the need of destroying one and then instantiating again, simply by using Spawn() / Despawn() feature
But first I found out that when you .Despawn() a gameObject, client that owned it will lose this ownership what I found out to be the desired behavior, So I changed my logic to destroy gameObject if it's not needed at the time, and then I found out that host still keeps destroyed gameObject ownership, so before calling Destroy() function I call this "player.GetComponent<NetworkObject>().RemoveOwnership();" first and It looks like it's working like it should so far
So essentially you want to despawn an object and then later spawn it again with the same owner correct?
Yes that would be perfect
I guess you could just store the owner on a MonoBehaviour on the object itself then maybe.
And the call SpawnWithOwnership with the correct owner.
Yes another idea was to keep the owners clientID stored
Anyways, thank you so much for your time now I atleast know that I didn't do something incorrectly because this is my first time trying networking stuff so I'm always unsure if it's my bad or not 😄
hello I have a problem in PUN can anyone help?
"Failed to 'network-remove' GameObject because it's null."
that's the error I got even though I used to use the same destroy method in the same place but for some reason after i change the team i get this error
I'm about to add a weapon system with client prediction, should I merge the prediction part of that weapon system with my current prediction code for movement or should I seperate it?
Hi, I want to disconnect but it doesnt let me cause only the master client can do that, how do I set my gameobject as a master client?
Guys im making a game with a small team but we dont know what is more efficient: mirror or that new thing
For multiplayer
@compact wigeon You sure you can't call PhotonNetwork Disconnect or LeaveRoom?
anyone who has had the error "Failed to 'network-remove' GameObject because it's null."
I couldn't find it but did now, thanks.