This is the first tutorial of my free beginner series on how to make an online multiplayer game. In this episode we will look at setting up the networking engine Photon in Unity, and creating a username and server/main menu screen.
Photon engine –
********************************
Patreon!
Play my games!
********************************
If you have any problems, let me know in the comments 🙂
StickmanAnimates
28.06.2022you saved my game thanks diving_squid
DonTouchLollo
13.06.2022how can I use photon with the new Input systems?
This is my movement with the new input system and it didn't work with "photonView.isMine".
public void Move(InputAction.CallbackContext context)
{
if (photonView.isMine)
{
horizontal = context.ReadValue<Vector2>().x;
animator.SetFloat("Speed", Mathf.Abs(horizontal));
}
}
Please, Someone can help me to adapt my code to photon?
Szymon Zieliński
13.06.2022does it work on a 3D games ?
Bob2D
13.06.2022I'm a beginner. And it's not working 😞
Lemon King
13.06.2022I'm sorry for being stupid, but can anybody tell me what she's using to close the SerializeField? I don't know if it's brackets or parentheses. 4:37
Shah Pranay
13.06.2022why doesnt photon work.It says are you missing assembly
Shrinivas Desai
13.06.2022Hey thanks , but how I can implement photon for unity 2017.4 . Is there any old version
Hai lam Le
13.06.2022hey i have a problem
error: PhotonNetwork is not exist any current text
Kingclassic
13.06.2022This works for photon2 too?
KalpolProductions
13.06.2022can the same steps work in 3d?
ParabolicCODM
13.06.2022Nice Vid loved it so much easy learning easy making ,good job well done
Semira Fernando
11.06.2022What UI do you use? The yellow UI, can you leave a link in the description for it please?
Eagle
11.06.2022Thank you so much. The video is amazing!
Phoenix Aspect
11.06.2022It says the name 'PhotonNetwork' does not exist in the current context on line 14 5:05
VEOdev
11.06.2022I don't think photon is good for indie devs and it is not free at all , it is expensive .. I mean what online game that will not have more than 20 CCU ? .. as online game like at least 300 CCU
MrEverStrucked
11.06.2022When I import it it comes up with a gui that says pun demo what do I do?
BIGmanYTT_alt
11.06.2022how do i change the background and font
ABHINAV DUPARE STUDIOS
11.06.2022Script pls
Just some random stuff.
11.06.2022I'm totally new with coding and game developing so I have a basic question.
If I create that with photon, what should I do if I want to put the game on iOS, android, Steam? Does it matter? Do I do something different regarding the online?
notfabben
11.06.2022thank you soo much i will credit you in my indie game thx.BTW where did u learn this?
Team Tube TV
11.06.2022Just next time, do your tutorial slower please
leona_xysc
08.06.2022how do i open the game after i copy the game ID
Amirhosein Gharaati
08.06.2022why R U running?
CC the Mystery Monster Boy 826
08.06.2022A unity game online in a new game oh God
CC the Mystery Monster Boy 826
08.06.2022Can you hear me I will make a game
Mark Sandoval
08.06.2022Have errors using unity 2020 please help
Luca Phillips
08.06.20221:10 she doesnt tell me where to go or how to get on that screen someone please help me
Bjarki
08.06.2022error CS0103: The name 'PhotonNetwork' does not exist in the current context error CS0103: The name 'TypedLobby' does not exist in the current context. I keep getting these errors and i dont know how to fix it and i have followed everything in the turtorial perfectly
Ángel
08.06.2022This is AWESOME, really, I thought there wasn't any good tutorial out there but then I found this,
Gabrielndjldc
08.06.2022👍
Lequan
08.06.2022I love this tutorial so far! Thanks for making this!
POOG
06.06.2022Thank you. This is the only solution that cost less than my college savings, and took less than the rest of my life.
Dertydub
06.06.20224:43
COMPUTER BUG
06.06.2022does this work for 3d
Unlisted Variable
06.06.2022Hi Diving Squid,
It is not working for me. It says that trouble converting string with realtime when i made a pun. Plus, it says the "TypedLobby" Does not exist.
__c0d3
06.06.2022My menu controller doesnt have the options to drag to?
Farqaad Gaming
06.06.2022can i use panels instead of images?
Pulsegamer
06.06.2022its not working any more outdated probably
Ida March
06.06.2022If I'm looking for a video tutorial I'm checking your channel first. ALWAYS
Steven Wai Yan
06.06.2022hello,gib source code
Da.Maskie boy
06.06.2022This confused me so much 🙁
I copied the ID but you never specified what to do next… You just jumped to a new app and said Unity Scene without specification…
harrup
02.06.2022Uhhh; I keep getting this error saying "the name PhotonNetwork does not exist in this context." I installed the thing correctly though??
Just Dance 2.0.v
02.06.2022Hi there! I have a question about photon. Is there a way that the player can save the things that are done in the game? I was thinking that the person who creates it, gets all the data. Tysm
Hamm102
02.06.2022help:
for some reason, my script won't let me plug in the things in the hierarchy as variables, like in 6:17. How do I fix this?
StickmanAnimates
02.06.20226:26
StickmanAnimates
02.06.20227:12
Digital Consultant
02.06.2022Diving Squid,
Thanks for your video.I have a question about 20 CCU. is it per game session per user or total game users?
For example if I create a P2P multiplayer game and I have 100 active users(logged in users at the given point of time) in my game.And in my game one player can choose another player for a challenge mode.It will be 1 vs 1 like that we have 50 players/users are playing with another 50 other users.Can I consider this scenario as 2 CCU per game?will it work with the given limit of 20 CCU?How this logic works?
Kindly help me to understand more about this limit.
Exp439
02.06.2022Whenever I import photon pun, I end up getting errors about missing prefabs and one that says “disconnecting no longer implemented” or something similar to that. How can I fix this?
What ?.
02.06.2022using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class MenuControl : MonoBehaviour
{
[SerializeField] private string VersioName = "0.1";
[SerializeField] private GameObject UsernameMenu;
[SerializeField] private GameObject ConnectPanel;
[SerializeField] private InputField UsernameInput;
[SerializeField] private InputField CreateGameInput
[SerializeField] private InputField JoinGameInput;
private void Awake()
{
PhotonNetwork.ConnectUsingSettings(VersioName);
}
// Start is called before the first frame update
private void Start()
{
InputUsername.SetActive(true);
}
private void onConnectedToMaster()
{
PhotonNetwork.JoinLobby(TypedLobby.Default);
Debug.Log("Connected");
}
public void ChangeUserNameInput()
{
if (UsernameInput.text.Length >= 3)
{
PlayButton.SetActive(true);
}
else
{
PlayButton.SetActive(false);
}
}
public void SetUserName()
{
UsernameMenu.SetActive(false)
PhotonNetwork.playerName = UsernameInput.text;
}
}
DZMO
02.06.2022Oh my gosh you have to be a teacher