How To Display Profile Pictures & Names - Steam Multiplayer Game in Unity

Поделиться
HTML-код
  • Опубликовано: 22 май 2024
  • In this video I will be showing you how to display members who join your lobby. I will show you how to make this modular so no matter how many people join your lobby will look neat and nice. I will also go over how to display steam usernames and profile pictures and how to get it all setup so no matter who joins and leaves it works. Finally I will show you how to remove users when someone leaves or disconnects.
    -----Tutorial Links-----
    Previous Tutorial: • How To Make A Steam Mu...
    Mirror: assetstore.unity.com/packages...
    FizzySteamworks: github.com/Chykary/FizzySteam...
    Steam Docs: partner.steamgames.com/doc/home
    Source Code: / steam-displaying-61375850
    -----My Personal Links-----
    Discord: / discord
    Instagram: / gabzxd
    Twitch: / officialzyger
    Twitter: / zygerdesigns
    ➤WISHLIST MY GAME:
    store.steampowered.com/app/16...
    //Code Snippet From Video
    private Texture2D GetSteamImageAsTexture(int iImage)
    {
    Texture2D texture = null;
    bool isValid = SteamUtils.GetImageSize(iImage, out uint width, out uint height);
    if (isValid)
    {
    byte[] image = new byte[width * height * 4];
    isValid = SteamUtils.GetImageRGBA(iImage, image, (int)(width * height * 4));
    if (isValid)
    {
    texture = new Texture2D((int)width, (int)height, TextureFormat.RGBA32, false, true);
    texture.LoadRawTextureData(image);
    texture.Apply();
    }
    }
    AvatarReceived = true;
    return texture;
    }
    ----Time Stamps-----
    0:00 - Intro
    0:19 - Stage 1 - Setting Up UI & Scene
    1:51 - Stage 2 - Prefab and Script Making
    3:16 - Stage 3 - Writing Scripts
    5:05 - Player Object Controller Script
    7:14 - Network Manager Script
    8:28 - Player List Item Script
    11:02 - Lobby Controller Script
    20:57 - Player Object Controller Script
    23:47 - Final Editor Changes
    24:49 - Testing
    25:37 - Outro
  • РазвлеченияРазвлечения

Комментарии • 227

  • @trix_dev6088
    @trix_dev6088 Год назад +34

    INPORTANT If you are having issues with loading of lobby names or player icons go back and add "CurrentLobbyID = callback.m_ulSteamIDLobby;" at 1:20. Zyger deleted this line and that causes issues. Thanks to Kristan Want for pointing this out.

    • @ZygerGFX
      @ZygerGFX  Год назад +6

      yeah sorry I mentioned this earlier but forgot to pin a comment about it

    • @DashM670
      @DashM670 Год назад +2

      You literally saved my skin. Thanks so much for pointing this out :):)

    • @talxongames4919
      @talxongames4919 Год назад

      thx dude

    • @SealStream
      @SealStream 4 месяца назад

      I love ya man!!

  • @ThatGamePerson
    @ThatGamePerson 2 года назад +38

    My biggest suggestion would just be adding a 1 or 2 second pause before jumping sections. At 13.29 basically the exact frame you finish the line of code, it's gone which makes it harder to follow. I know you have to breeze through all this but just that little extra would be a help.
    I will say otherwise these have been great. I've used Mirror for years and I've stayed away from Steamworks because I always assumed it would be a monumental task. These have made me feel confident to try more things regarding steam.
    Edit: I realized this has been said below. Sorry!

  • @szaboattila155
    @szaboattila155 Год назад

    Been looking for these exact solutions for days on forums. Should started looking for videos right away. This video is top quality and explains mirror better than all of the documentation combined which is not a lot at all. Please unity if you haven't already hired Zyger do it asap.

  • @user-gm1ty7lk2w
    @user-gm1ty7lk2w Год назад

    This is intense af and makes brain hurt a bit, but straight to the point thx for such treasure

  • @Mn7o0s
    @Mn7o0s 2 года назад

    Really appreciate your tutorials

  • @xyoxus
    @xyoxus 2 года назад +11

    21:58 GetPersonaName returns a string, no need for a ToString at the end.
    Also it would be super helpful to say which is the "other" script where LocalGamePlayer is used instead of just saying it's in another script. (It's the LobbyController at 15:21)
    Just some little details.

  • @elmajordaan5248
    @elmajordaan5248 Год назад +6

    For those of you struggling with the same thing as I on 20:56 in the player object controller script where non of the override functions Wil work you have to make sure as the to by class, the monnobehaviour should be NetworkBehaviour

    • @the_original_jake
      @the_original_jake Год назад

      life saver, was looking to see if anyone else had issues with this, thank you!

  • @HYPERMUSH64
    @HYPERMUSH64 2 года назад +2

    Another banger tutorial, you upload them so fast!

  • @Viytek
    @Viytek 2 года назад

    I spent all day watching you and I see you writing code or something while you sleep :D

    • @ZygerGFX
      @ZygerGFX  2 года назад

      ?

    • @Viytek
      @Viytek 2 года назад +1

      @@ZygerGFX sorry my english is a bit bad. I watched your videos so many times that I wanted to say that I see them in my dreams

    • @Viytek
      @Viytek 2 года назад

      Also, the steam profile icon is not visible in my game.

    • @Viytek
      @Viytek 2 года назад

      just kidding, never mind

    • @ZygerGFX
      @ZygerGFX  2 года назад

      @@Viytek oh ahaha

  • @TemporalJimi
    @TemporalJimi 2 года назад +17

    Great tutorial, small feedback as it tripped me up a few times, but you have a habit of closing the function/editing a cut elsewhere as soon as you finish a line of code. which is fine and all, i can go back and pause, but since im trying to follow along i need to alt+tab and go back and see what actually just happened. Small criticism, but just a couple of seconds of hang time there would make it easier to follow along! Appreciate u

    • @ZygerGFX
      @ZygerGFX  2 года назад +5

      Thanks for the feedback. Definitely will try my best not to do that :)

    • @metramaster
      @metramaster 2 года назад

      I fully agree with Jimi here :) -- I spent probably a solid 1-2 hours troubleshooting why my names were not updated correctly on the client, and it was because I missed to call SetPlayerValues() as you show on 18:47, but its only shown there for a few milliseconds before the UpdatePlayerItem method is collapsed. I think just introducing a 1 second pause after a function is completed before it is collapsed would help.
      On the bright side, my troubleshooting of this issue did help me understand the code flow better :D

    • @ZygerGFX
      @ZygerGFX  2 года назад +2

      @@metramaster thank you so much for this feedback. Definitely will try to pause after completing a function so that its easier to follow and saves the hassle of trying to figure out what's wrong!

  • @NaviYT
    @NaviYT Год назад +17

    For this video I reccomend watching at .75x speed. Honestly a lot easier to wrap your head around the subject whilst writing your code with no errors 😄 no hate Zyger, you're just a fast talker. Some people enjoy that :)

    • @dekirudev
      @dekirudev Год назад +1

      I had a bit of trouble following along because she talks so fast. Thanks for the tip :)

  • @gre3k_tv563
    @gre3k_tv563 2 года назад +1

    This was somehow in my algorithm within 30 seconds of upload...not even mad

  • @Orionhart
    @Orionhart Год назад +3

    I've checked the pinned and other comments. Everything functions wonderfully on my end, except I am not getting any textures set for my PlayerIcon rawImage texture. No errors in code or anything. Curious.

  • @Redping32
    @Redping32 8 месяцев назад

    Hi I'm Korean and your videos are really helping me a lot, thank you!
    I was wondering how you learn to make tutorials or how you find the resources you refer to. I'm too dependent on other people's tutorials. I'm looking for a way to make programs that I can think of on my own. Any advice would be appreciated!

  • @MaxDolotboy
    @MaxDolotboy Год назад +3

    Can someone help me this is half working, the host doesn't get the lobby name and his icon and name doesn't appear in the lobby but when someone join, this person get his own content in the player and can correctly see the lobby name. I only get one error which is "Transport already running as server"

  • @diegograjales2166
    @diegograjales2166 2 года назад +2

    These tutorials are just too great!

  • @TripalYT
    @TripalYT 2 года назад +1

    These tutorials are great as, I can't wait to see what else we're gonna learn

  • @colecancode
    @colecancode 2 года назад +12

    8:25
    In CustomNetworkManager, OnServerAddPlayer() takes conn as a paramater, which is of type NetworkConnection. When I do this, it gives me errors saying that there is no suitable method to override, and that it cant convert NetworkConnection to NetworkConnectionToClient. When I change NetworkConnection to NetworkConnectionToClient, I get no errors. Is this ok? Or must it be NetworkConnection, and I'm missing something.

    • @ZygerGFX
      @ZygerGFX  2 года назад +6

      your just using a different version of mirror I believe. where the methods were slightly changed. i believe that is still fine using the new method name.

    • @septicwahab4312
      @septicwahab4312 2 года назад +16

      Change OnServerAddPlayer(NetworkConnection conn) to OnServerAddPlayer(NetworkConnectionToClient conn)

    • @NaviYT
      @NaviYT Год назад

      @Septic Wahab ily😭

  • @grambino8622
    @grambino8622 5 месяцев назад +1

    great video! got everything working except my steam player icon quality is very poor and it resorts to the same color as the raw image. any workarounds?

  • @FedeRzVz
    @FedeRzVz Год назад +1

    What an amazing tutorial Zyger, I think that I followed all the steps and it works almost 100%, It happens to me that when creating a Lobby, it works, but 2 lobbies are shown, the default lobby that was created with canvas is maintained and then as a second one lobbyItem that I created with my name and Steam logo appears, that is, 2 lobbies appear (The default and mine), why the default lobby are shown?

  • @mieskeb8095
    @mieskeb8095 Год назад +1

    Hey! I had a question. At 4:10 you create a GamePlayers property with only a getter. How does GamePlayers know where to get its data from? I have been taking for granted that it just works, but right now I am busy refactoring my code and I need to know its functionality

    • @xcgasparxc
      @xcgasparxc 9 месяцев назад

      That means that the variable GamePlayers can only be accessed and not assigned by outside classes, the game players then are added to the list with the .Add() method.

  • @delmtm569
    @delmtm569 Год назад

    Hi, i am watching your tutorials because i need to add steam on my game already with mirror but i have a question, why players can't be spawn directly from the Network Manager ?
    Now they don't spawn when i change scene and every network identity component are invisible.

  • @carlosfdezoliver1420
    @carlosfdezoliver1420 4 месяца назад

    Thank you very much for the tutorial, I am having a small problem, when a scene takes a while to load the images are always the same as the player (server), when the scene loads quickly the server/client images do appear fine, Would you know what could be the reason?

  • @WolfServant
    @WolfServant Год назад

    Question, what if we want to return to lobby from game or leave the lobby/close the lobby without it breaking the game?

  • @Vyrussy
    @Vyrussy Год назад +1

    Why is the Lobby Controller a singleton? It is going to break if you finish a game and return to the lobby, as it loses all references to the UI.

  • @rabiehaddad1925
    @rabiehaddad1925 Год назад +1

    The problem is how to spawn the real player when the match started i just have third person shooter game ,and i am wondering is this method works

  • @g1zeuz
    @g1zeuz 25 дней назад

    I did everything as in the video, but when I press the "Host Game" button after starting the game in the Unity editor, the Unity editor closes. Can you help me?

  • @snipwilder6717
    @snipwilder6717 2 года назад +2

    Hey, thanks for this tutorial. I'm still trying to get it to work and wanted clarity at 1:22. Do we delete all of that? Because I'm not able to see my own icon and the lobby name is missing if I delete "CurrentLobbyID = callback.m_ulSteamIDLobby;". I'm also trying to figure out why friends aren't able to see the same lobby as I do when they join. I'm looking into it but any pointers would be great! Thanks

    • @snipwilder6717
      @snipwilder6717 2 года назад

      Fixed the issue, I forgot to replace the default Steam App ID with the ID for my game.

    • @serefcaliskan4865
      @serefcaliskan4865 2 года назад +1

      I was having the same problem, I solved it thanks to you. Thank you.
      "CurrentLobbyID = callback.m_ulSteamIDLobby;" Do not delete your code. :)

    • @snipwilder6717
      @snipwilder6717 2 года назад

      @@serefcaliskan4865 👍

  • @auraa8015
    @auraa8015 Год назад +2

    mine not working and i have no errors and the player names and prfiles arent showing up

  • @rubirubig3944
    @rubirubig3944 10 месяцев назад

    How can I fix this error?
    CustomNetworkManager.cs(14,26): error CS0115: 'CustomNetworkManager.OnServerAddPlayer(NetworkConnection)': no suitable method found to override

  • @cedriclaps
    @cedriclaps 7 месяцев назад

    Pls help my override function OnStartAuthority is not passing. So the function never runs

  • @doccampbell2006
    @doccampbell2006 2 года назад +1

    Do you know if mirror is available for any other game engine or is it a unity exclusive? I don’t use Unity but 9/10 times the same concepts can be used in my engine without to much difficulty

    • @ZygerGFX
      @ZygerGFX  2 года назад

      Well mirror is built upon the old Unity net code. SO probably not. They basically took the old untiy multiplayer stuff and kept working on it and improved it. So my guess is no but dont 100% quote me.

    • @pb3dpb3d
      @pb3dpb3d 2 года назад

      Steam distributes dll files that you can link to and call functions provided in it.

    • @ZygerGFX
      @ZygerGFX  2 года назад

      @@pb3dpb3d yes steam api can be used on virtually on anything but I think mirror is unity only.

    • @pb3dpb3d
      @pb3dpb3d 2 года назад

      @@ZygerGFX yeah mirror is made on UNet HLAPI as the compatible alternative to it, so yes - it is unity specific.

  • @zephthegamer8635
    @zephthegamer8635 Год назад +1

    WTF, in Lobby controller and in player list item script they arent showing up with any fields!!! HELP PLEASE

  • @rabiehaddad1925
    @rabiehaddad1925 Год назад

    I made a join button but its not working will what kind od script need to be on the join button

  • @themoni2761
    @themoni2761 8 месяцев назад

    Can someone help me? So the issue i have right now is that when the Host hosts a game he joins the lobby and his player item is added and is visible by the client and the host. But when a client joins his item is not created so neither the host or the client can see it. I have put the "CurrentLobbyID = callback.m_ulSteamIDLobby;". And my game is not published on steam so im using the default Spacewar 480 ID. Any help is appriciated! Sorry if i have mistakes in my writing but English is not my first language.
    EDIT: They are overlapping so i just messed up some setting

  • @koferperk
    @koferperk Год назад +1

    I need help.
    The build only works when there is a file "steam_appid.txt" in the same directory. But how does that work since when I build the game it does not bring the steamappid.txt integrated into it so when using that build on another computer it does not work when clicking start host unless manually putting a steamappid.txt in the same directory as the app.
    What do I do? and if I were to push out a game onto steam and get my own steamID, will this issue stay the same or go away?

    • @ZygerGFX
      @ZygerGFX  Год назад +1

      It should automatically create it. If not make it yourself. Thankfully once you make it once and keep it in the build folder it will stay there. Once you get your own appid you can change it in unity. Hopefully that will fix itself and generate it for you. If not you have to make it yourself and replace the default 480 in the text file with yours. But as I said you only need to make the file once. Also this is a known bug and only happens to a few people

    • @malfagafo
      @malfagafo Год назад +1

      Thank you so much for your comment. I was getting crazy trying to figure out why I couldn't start the host game when I opened via .exe. I simply copied the steamappid.txt and it worked.

  • @regalmarmot4833
    @regalmarmot4833 Год назад +1

    Hi! I was wondering because this doesnt work for me and i wanted to join the patreon do i get the actual project or just the scripts?

    • @MaxDolotboy
      @MaxDolotboy Год назад

      What's not working for you we might have the same problem

  • @willcroft5105
    @willcroft5105 Год назад

    Can one somewhat reuse this and other videos in the series with the new Netcode and facepunch steamworks? Would much have to change to the code? If you could provide some advice/examples, that would be awesome. Cheers.

    • @ZygerGFX
      @ZygerGFX  Год назад

      Unfortunately this uses mirror and facepunch is entirely different. They do have a documentation on facepunch and some examples on github though

  • @BaroBeans69
    @BaroBeans69 3 месяца назад

    for some reason when i click host lobby i see 3 player list items and its all me, how can i fix this?

  • @h1tman_
    @h1tman_ Год назад +4

    My game crashes, whenever i hit host. The reason might be the player object controller as when i make the player object controller null(in custom network manager), it loads rather then crashing but the pfp and name dont load. It couldn't be a coding problem as i coded this FIVE TIMES! i removed the lobby controller from lobby scene it loads but still that problem

    • @IMsTRACH
      @IMsTRACH Год назад +2

      I had the same or similar problem. I made a typo in LobbyController script, CreateHostPlayerItem() function, the foreach condition has to use the Manager with capital M, not the lowercase one.

    • @skygge1136
      @skygge1136 Год назад

      @@IMsTRACH you saved life

  • @CRAITIFT
    @CRAITIFT Год назад

    Great tutorial, I just have one issue... I can't seem to find where you code the scene change from Main Menu to Lobby. When I run the game and click the Host button, it doesn't switch over to the Lobby scene. Is this just a simple "LoadScene" fix? If so, how would I get other clients to load into that same scene?

    • @CRAITIFT
      @CRAITIFT Год назад

      Nevermind, It started working now... not quite sure what fixed it though, but most likely a problem on my end.

    • @ZygerGFX
      @ZygerGFX  Год назад +1

      @@CRAITIFT On the network manager where you supply the offline and online scene that is where the scene switch happens. That particular function is already built in the network manager. Glad its fixed btw :))

  • @CreativelyBad
    @CreativelyBad 10 месяцев назад

    Not sure why but when I add a client to the lobby list the name is being set. this only happens on the client cause the clients name is showing up on the server. anyone know how to fix?

  • @cloudie9450
    @cloudie9450 Год назад +2

    When i type this line 15:40 i get this error "error CS0428: Cannot convert method group 'GetComponent' to non-delegate type 'PlayerObjectController'. Did you intend to invoke the method?"

    • @cloudie9450
      @cloudie9450 Год назад +2

      I fixed it sry. I just had to add "()" at the end.

    • @ALeUnus
      @ALeUnus 2 месяца назад

      @@cloudie9450 thank you very much man

  • @user-ih2dd5rd8b
    @user-ih2dd5rd8b Год назад

    I can't check Callback function for Debuging in Editor. So, Is it impossible in Editor?
    And, I can't check
    // SteamLobby component // - function
    if (NetworkServer.active)
    return;
    manager.networkAddress = SteamMatchmaking.GetLobbyData
    (new CSteamID(p_Callback.m_ulSteamIDLobby), HostAddressKey);
    manager.StartClient();
    When it is useful? I can't understand. sorry. TT

  • @wildwookiee9559
    @wildwookiee9559 2 года назад +6

    "public override void OnServerAddPlayer(NetworkConnection conn)" turns into "public override void OnServerAddPlayer(NetworkConnectionToClient conn)" How do I fix this so that it will work for just NetworkConnection?

    • @wildwookiee9559
      @wildwookiee9559 2 года назад +2

      This is in the network Manager btw.

    • @Urhrhfhsusjjd
      @Urhrhfhsusjjd 2 года назад +2

      I have the same problem as well. Wondering how to fix this

    • @user-kg5cv2uv5h
      @user-kg5cv2uv5h 2 года назад +1

      I am also seeing this issue.

    • @wizardly
      @wizardly 2 года назад +2

      for anyone wondering this is fine it will work fine like this

    • @septicwahab4312
      @septicwahab4312 2 года назад +1

      Change OnServerAddPlayer(NetworkConnection conn) to OnServerAddPlayer(NetworkConnectionToClient conn)

  • @Implicitz
    @Implicitz Год назад

    Hi Zyger, I really need help with this error.
    Assets\Scripts\Online\CustomNetworkManager.cs(15,26): error CS0115: 'CustomNetworkManager.OnServerAddPlayer(NetworkConnection)': no suitable method found to override

    • @ZygerGFX
      @ZygerGFX  Год назад

      the name of the function changed. go into the original mirror script and chekc the new name. make sure you override the func with that name and its references.

    • @minecraftmaniacawesome3857
      @minecraftmaniacawesome3857 Год назад +1

      Hey, just if you haven't figured this out yet or if someone else needs help on the same topic, the method is named the same but the name of the variable has changed. The new method is called:
      OnServerAddPlayer(NetworkConnectionToClient conn)

  • @kristianwant6775
    @kristianwant6775 2 года назад +2

    Super nice tutorial! I've managed to get it working when i launch it in unity (bar the profile picture is always white, but i can work on that..), however the button to create a lobby doesn't work when i run it through steam. Do you know what could be causing this difference? All the best!

    • @ZygerGFX
      @ZygerGFX  2 года назад +2

      do you set the current lobby id inside of the update lobby name ? this would probably fix your profile pictures and might be the reason why its not working in steam.

    • @kristianwant6775
      @kristianwant6775 2 года назад +1

      @@ZygerGFX Thanks for your swift reply! Wowzas that was an adventure to try and get it working again - you pushed me in the right direction. Turns out that keeping the line you said to delete at 1:20 (CurrentLobbyID = callback.m_ulSteamIDLobby;') fixed everything. Although this has left me a little confused, should I have removed the 4 lines of code or should I have kept them?

    • @ZygerGFX
      @ZygerGFX  2 года назад

      @@kristianwant6775 ah thank you for pointing it out to me. I was actually only meant to delete 3 lines of code so excluding the current lobby ID. sorry for the issues all my fault

    • @ozmega
      @ozmega Год назад +1

      @@kristianwant6775 holy shit i was about to go thru the same rabbit hole, thx

    • @kristianwant6775
      @kristianwant6775 Год назад

      @@ozmega glad I helped! Wish someone had worked it out before me too haha

  • @theexiledone5742
    @theexiledone5742 Год назад +1

    First of all, thank you for your great tutorials. Found no one else who does it that good and in depth. But I am encountering one problem: In Unity everything works perfectly fine. I press Host, my Icon l+ name is shown, and I can ready Up and start. But as soon as I build the game and start the game via .exe and via steam, the "host" Icon just isnt there. Is there any explanation for that? I looked it up now for several hours, but didnt find any solutions... Is it because of the Steam ID? It should be for testing on steam 480, right?
    Thanks in advance :)

    • @theexiledone5742
      @theexiledone5742 Год назад

      I figured it out. Other UI-Elements were just blocking it... But now my Movement in multiplayer is a problem.

    • @coolorphans
      @coolorphans Год назад

      I have a similar problem. I build the project and download the build on my other computer with a different steam account but I can't join the other steam account.

  • @cyrubix328
    @cyrubix328 9 месяцев назад

    I followed this tutorial but the scene isn't switching when I click the host button.

  • @RuneOracle
    @RuneOracle 10 месяцев назад

    I had everything working great, went onto your movement tutorial, things were still working great, and now all of a sudden the clients don't properly connect to the server/see the correct info on the lobby screen. Send help. lmao
    Even when loading into the Game, the host can see the client, and both move around, but the client does not see the host anymore....

  • @RealUtku
    @RealUtku Год назад

    Hi i have a problem i write all script but it says in customnetworkmanager it says
    Assets\Scripts\CustomNetworkManager.cs(14,26): error CS0115: 'CustomNetworkManager.OnServerAddPlayer(NetworkConnection)': no suitable method found to override

    • @minecraftmaniacawesome3857
      @minecraftmaniacawesome3857 Год назад +1

      Hey, just in case you haven't figured it out yet, the method's name is the same but it's dependency has a different name just put this in it's place
      OnServerAddPlayer(NetworkConnectionToClient conn)

  • @isntityoshi5657
    @isntityoshi5657 Год назад +3

    i cant see profile pictures?

  • @kilogram_o7204
    @kilogram_o7204 Год назад +2

    17:37 make sure you add the "!", i spent 2 days trying to figure out why my lobby controller wasn't working

    • @voodookittoys7606
      @voodookittoys7606 Год назад

      Thaaannkkk you I had the same problem and couldnt figure it out the whole day

  • @kayo_tv
    @kayo_tv Год назад

    hello, i have an issue... when i run the game in my project all is fine but when i build and run it, the host bouton just make nothing (also in steam). Can you help me pls ?

    • @ZygerGFX
      @ZygerGFX  Год назад +1

      does your build folder have a textile called steam_appid.txt ? if not you need to create one and write the app id which should be 480 unless you're using a custom one.

    • @kayo_tv
      @kayo_tv Год назад

      @@ZygerGFX Hi! I already have a steam_appid.txt in my PROJECT folder but not in the BUILD folder. I will try… Thanks for the help :)

  • @2unleash
    @2unleash 4 месяца назад

    my script crashes when calling any Texture2D constructor, i have tried almost all combinations... I haven't been able to find a solution - any one any idea?

  • @EnchikO
    @EnchikO 2 года назад

    I can't test it, because when i send request to my friend or he wants to join, it automatically starts Spacewar (some game about space ships in space). How can I tell Steam, that game, I want to join is that I add as non-steam game.

    • @ZygerGFX
      @ZygerGFX  2 года назад

      as mentioned in video 1. if you use the defualt APP ID the game will be called spacewar. But as long as both of you have added the game into your steam library and launched it through there it should work fine.

    • @EnchikO
      @EnchikO 2 года назад

      @@ZygerGFX Yes, thank you. Problem was that we both added game to steam library but my friend didnt launch it (i just send him a invite) so it starts the Spacewar game.

  • @HighOnQuack.
    @HighOnQuack. 2 года назад

    When I press host the lobby name is black and the name for py steam account is LocalGamePlayer, any idea where i've gone wrong?

    • @ZygerGFX
      @ZygerGFX  2 года назад

      I recommend going over the tutorial and checking that your code is exactly the same. if this doesn't fix anything then join my discord ( link in the description) where I will be able to help you more ! :)

  • @gabrielmendesmatos5121
    @gabrielmendesmatos5121 2 года назад

    Thanks for the video! Is it possible to test this with multiple steam accounts without having a second pc?

  • @channeltrash6257
    @channeltrash6257 Год назад +1

    PlayerListItem not spawned. GamePlayers count = 0.... where did i might wrong

  • @pepper.
    @pepper. Год назад +2

    Anyone struggling with the override issue in the CustomNetworkManager change 'NetworkConnection' to 'NetworkConnectionToClient'

  • @firefoxiyt1516
    @firefoxiyt1516 4 месяца назад

    HELP :( i have a bug in my code for the Host its only loading his data to every player that joins, for the client no profiles are getting loaded. Someone got a idea?

    • @user-ix8qj8wz8x
      @user-ix8qj8wz8x 3 месяца назад

      I havev the same bug, have you found any solution?

  • @hammyham
    @hammyham 8 месяцев назад

    can anyone help me? Everything works fine in the unity editor I can connect and everything. But when I try building it and try adding it as a non steam game to my library and running it it the host button doesn't do anything. can someone help? thanks!

    • @ZygerGFX
      @ZygerGFX  8 месяцев назад +1

      hey, so you need to ensure that in your build folder you have a txt file called "steam_appid" where you have the appID of your game written on the first line. So if you're using the default one that would be 480. Normally the compiler should create this file for you, which is why i didn't mention it. But it seems like that is not always the case

    • @hammyham
      @hammyham 7 месяцев назад

      @@ZygerGFX thanks for the quick reply lol. this worked and im back in business tysm!

  • @colecancode
    @colecancode 2 года назад

    How would I change the GetPlayerIcon() method in the PlayerListItem script so that it works with ANYONE, not just steam friends? I ask because the lobbies I plan on making are public, so the "int ImageID = SteamFriends.GetLargeFriendAvatar((CSteamID)PlayerSteamID);" line wouldn't work for people not in the players friends list.

    • @larsmaas07
      @larsmaas07 Год назад

      shrek

    • @xxtremestudio
      @xxtremestudio Год назад

      Hey Cole, Did you ever find out the answer to your question? Im trying to make mine public as well

    • @FedeRzVz
      @FedeRzVz Год назад

      @@xxtremestudio Hello, did you find out something?? Im trying to make it public too

    • @xxtremestudio
      @xxtremestudio Год назад

      @@FedeRzVz You just change whatever she puts down for the friends list to public, it should be shown when you start writing the thingy hehe

    • @FedeRzVz
      @FedeRzVz Год назад

      @@xxtremestudio that simple? So I replace every function that says "friend" with its alternative to "public" and it should work? It sounds very easy but hey, I'll try it there. thank you very much bro

  • @zachbyron4012
    @zachbyron4012 Год назад

    Im getting a null reference when trying to call Lobby controller for just "LobbyController.Instance.etc" in the PlayerObjectController, I noticed its not referenced ealier in the script

    • @zachbyron4012
      @zachbyron4012 Год назад

      I had my awake function in lowercase. tldr im a dingus

    • @chair4099
      @chair4099 Год назад

      @@zachbyron4012 explain because I've been trying to find the instance for ever in the steam lobby video

    • @zachbyron4012
      @zachbyron4012 Год назад

      @@chair4099 the only instance is the game network manager reference made in the player object controller script. Apparently you don’t need a reference to the lobby controller, just using the methods in the video seem to work fine for me.

  • @lukakvlogs1478
    @lukakvlogs1478 2 года назад +2

    Im sorry but I cant seem to find the "GetSteamImageAsTexture" code:( if anyone know where to find it please tell me:)

    • @ZygerGFX
      @ZygerGFX  2 года назад +1

      sorry about that just realised that its not in the description. ive gone ahead and added it

  • @m3k4studio25
    @m3k4studio25 Год назад +1

    Hello Zyger,
    Thanks your tutorials first.
    i host the game to lobby then can show the icon, but can't show the name. i check many time but can't find what happen.
    i want to ask the in the script of the PlayerListItem
    public void SetPlayerValues()
    {
    PlayerNameText.text = PlayerName;
    if (!AvatarReceived) { GetPlayerIcon(); }
    }
    Which one script is setting the "PlayerName"
    Many many thanks!!

    • @skygge1136
      @skygge1136 Год назад

      did you solve it?

    • @theconfusedllama9405
      @theconfusedllama9405 4 месяца назад

      @@skygge1136 hope that helped ^

    • @theconfusedllama9405
      @theconfusedllama9405 4 месяца назад

      Seeing as YT keeps deleting my comment about the code, third time:
      CustomNetworkManager.cs > under where you assign PlayerSteamID:
      GamePlayerInstance.PlayerName = SteamFriends.GetFriendPersonaName((CSteamID)GamePlayerInstance.PlayerSteamID);

  • @joaotarik6328
    @joaotarik6328 5 месяцев назад

    I make all correctly, but when i go hit play on mainmenu, it starts the scene but Name of the lobby doesn't show, Player List not work, nothing works, i tried to see if is creating a lobby, but connection id is 0.... helppp

    • @ZygerGFX
      @ZygerGFX  5 месяцев назад

      2 fixes i can think of. 1st one check pinned comment. second fix is make sure that your game folder has a text file called "steam_appid" and make the first line of the text file the app id so either 480 or your custom one.

    • @joaotarik6328
      @joaotarik6328 5 месяцев назад

      ​@@ZygerGFX
      Hi, sorry for late response... I've already done what the first comment says and it was already 480 in the file and it's still not working

  • @trix_dev6088
    @trix_dev6088 Год назад

    Hey, I am having some issues with the PlayerObjectController script. First I cannot overload functions OnStartAuthority, OnStartClient or OnStopClient, and they are missing any references(they are never called). Second isServer and isClient are not recognized. My first thought was that i was missing an assembly reference as both of these are default variables/functions in mirror, but I think I have all the necessary assembly references. If anyone can help/offer ideas that would be great! attached is my assembly references.
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using Mirror;
    using Steamworks;
    using Mirror.FizzySteam;

    • @simplisticgames2036
      @simplisticgames2036 Год назад

      Did you change the code from:
      public class PlayerObjectController : MonoBehaviour .
      To:
      public class PlayerObjectController : NetworkBehaviour

    • @trix_dev6088
      @trix_dev6088 Год назад

      @@simplisticgames2036 No I did not! Thank you so much for the help! You just saved me lots of time!

  • @artymer5021
    @artymer5021 Год назад

    EDIT: I was missing a line in the "OnLobbyCreated" function. The line was "manager.StartHost()." Quite a crucial line to miss haha
    Hi there. I'm having a few issues I couldn't find in the comments and have yet to find anything on my deep dive into Google.
    When I click the Host button in the editor the lobby is successfully created but the scene doesn't change from MainMenu to Lobby even though I've specified those scenes like the tutorial.
    Another issue I have is that the lobby still times out after the specified amount of time (25 seconds) even though the lobby is successfully created.
    I'd appreciate any help. Thanks.

  • @NotPalliot
    @NotPalliot 2 года назад

    So I've come to a point where none of the override voids work in this tutorial, not in the NetworkManager script, nor the PlayerObjectController Script. I've looked through the tutorial for hours, and I believe I have it word for word. Is it possible the tutorial is a little bit outdated? I understand it is very possible I just got something wrong, as I am not used to writing code.
    Thanks!

    • @ZygerGFX
      @ZygerGFX  2 года назад

      Hi, The newer version of mirror changes function names so the override method won't be called the same. Try see what the new methods and called and override those.

    • @kilogram_o7204
      @kilogram_o7204 Год назад

      @@ZygerGFX hi do you know what the new method names are?

    • @MaxDolotboy
      @MaxDolotboy Год назад

      @@kilogram_o7204 Did you get the infos ?

    • @justinbena6392
      @justinbena6392 4 месяца назад

      did you fixx

  • @masterx82
    @masterx82 5 месяцев назад +1

    Who edited this video?

  • @danbe9835
    @danbe9835 2 года назад +1

    i went trough the video now 2 times. everytime i press play and host lobby unity starts loading for 3secs~ and then just crashes without an error message. anybody can help?

    • @GougeO
      @GougeO 2 года назад +1

      Same, I've gone through the video twice trying to see if a mistake was made. In fact both the app and Unity crashes. If I uncheck "Auto Create Player" it doesn't crash, but doesn't work properly either. I used latest Mirror with FizzySteamworks 4.4.1. Has anyone else encountered and resolved this?

    • @mikkelsrensen3176
      @mikkelsrensen3176 2 года назад

      @@GougeO Happens to me too, Did you ever find a fix?

    • @TMMarkus_
      @TMMarkus_ Год назад

      Make sure you write "UpdatePlayerItem()" instead of "UpdatePlayerList()" on the line "if (PlayerListItems.Count == Manager.GamePlayers.Count)" in LobbyController. This was my solution, because if you wrote "UpdatePlayerList()" it causes an infinite loop and Unity crash.

  • @jesuslover8541
    @jesuslover8541 Год назад +1

    the code is good no erorrs but the image is not showing
    how to fix this

    • @ZygerGFX
      @ZygerGFX  Год назад +1

      Check the pinned comment :) hope it helps

  • @nikbox609
    @nikbox609 Год назад +6

    Dont know why but my Icons dont load

  • @LinesStudio55
    @LinesStudio55 8 месяцев назад +1

    In lobby, i dont see my avatar and name, and lobby name doesn't changed, what can i do? Edit: i have found, that NetworkServer.Active isn't active when i launch a game

    • @ZygerGFX
      @ZygerGFX  8 месяцев назад

      Look at the pinned comment but also go back to 1:20 and add this line:
      CurrentLobbyID = callback.m_ulSteamIDLobby;
      that I accidentally removed.

    • @LinesStudio55
      @LinesStudio55 8 месяцев назад

      @@ZygerGFX thanks for your answer, but i have already returned it)

    • @LinesStudio55
      @LinesStudio55 8 месяцев назад

      @@ZygerGFX And i noticed, that in in unity, when i start game, at the up-left corner of the screen appears "Snapshot-interp" HUD, i dont see it in video, what is that? Maybe it causes the problem?

  • @Disisameme
    @Disisameme 4 месяца назад

    Looks like it doesnt work with the newest version of the network manager because you dont have the option with the sceneswitch anymore. Another tutorial series of mirror x steam multiplayer in 2024 would be cool

    • @ZygerGFX
      @ZygerGFX  2 месяца назад +1

      Hey the function doesn't exist in the network manager but you can go into the old version of mirror where it does exist and see how they do the scene switch. Then simply copy that and implement it in again.

  • @azart23301
    @azart23301 2 месяца назад

    my name player not add but avatar is work
    , what is problem?

    • @ZygerGFX
      @ZygerGFX  2 месяца назад

      Hey please check the pinned comment. If that doesn't work please double check your code and that its the same as the video!

  • @Gguniform14
    @Gguniform14 2 года назад +1

    What kind of computer would I need to download Unity

    • @ZygerGFX
      @ZygerGFX  2 года назад

      i mean not sure .it doesn't have to be too good. maybe google it

    • @Gguniform14
      @Gguniform14 2 года назад

      @@ZygerGFX ok Thank you anyway

  • @Keroyz
    @Keroyz Год назад +2

    hello Zyger, im having this problem in unity "Disconnecting connId=0 to prevent exploits from an Exception in MessageHandler: NullReferenceException Object reference not set to an instance of an object
    at LobbyController.CreateHostPlayerItem () [0x00000] in C:\Users\dante\Downloads\Ghost House BETA\Ghosthouse\Assets\LobbyController.cs:72
    " do you know how I could fix this? The line in LobbyController in 72 is: "foreach (PlayerObjectController player in Manager.GamePlayers)"
    EDIT: Nvm fixed it, it was an incorrect operand usage. I had it as "if (Instance == null) {Instance = (this)" when it should have been "if (Instance != null) {Instance = (this)"

    • @berkeerdeniz9373
      @berkeerdeniz9373 5 месяцев назад

      private void Awake()
      {
      if (Instance != null && Instance != this)
      {
      Destroy(gameObject);
      }
      else
      {
      Instance = this;
      DontDestroyOnLoad(gameObject);

      PlayerListItems = new List();
      }
      }

  • @Keroyz
    @Keroyz Год назад +3

    Everyone if you're having some bugs after following the whole tutorial I recommend that you re-watch the tutorial comparing the scripts to see what might be wrong in yours, I did that and it fixed pretty much everything, al though if you are experiencing a few issues comment below and I'll try to help

    • @MaxDolotboy
      @MaxDolotboy Год назад +1

      That's what I did and everything is the same but it's still half working, the host doesn't get the lobby name and his icon and name doesn't appear in the lobby but when someone join, this person get his own content in the player and can correctly see the lobby name. I only get one error which is
      "Transport already running as server"

    • @nilsleonhardtdev
      @nilsleonhardtdev Год назад

      @@MaxDolotboy did you fix the error?

    • @MaxDolotboy
      @MaxDolotboy Год назад

      @HALİL ERKMEN I used something on the Unity Asset Store, pre-made steam multiplayer lobby system with Mirror. I think that what causes this problem is the Mirror version not being the right one for the the rest. With the asset I am talking, everything is perfectly fitting. Its free, but I dont remember the name

  • @Spooky_Josh
    @Spooky_Josh 2 года назад

    My icons are transparent and are dull.

    • @evbishop9011
      @evbishop9011 Год назад

      I had the same issue, you're probably using
      texture = new Texture2D((int)width, (int)height, TextureFormat.ARGB32, false, true);
      instead of
      texture = new Texture2D((int)width, (int)height, TextureFormat.RGBA32, false, true);

  • @Tanicorn
    @Tanicorn Год назад

    I love you

  • @WheremyPoptart
    @WheremyPoptart Год назад +1

    In your CustomNetworkManager script, make sure you put the correct scene name for the lobby.

  • @scryptol16
    @scryptol16 6 месяцев назад

    good tutorial but slow down omd

  • @33Cerberus
    @33Cerberus Год назад +1

    My player icons is so brightness, what I must to do?

    • @GosoeGoose
      @GosoeGoose 9 месяцев назад

      Did you get a fix for this?

  • @frosty7674
    @frosty7674 2 года назад +2

    If only i used Unity these videos would have been more than just being awesome.

  • @OhJustinYT
    @OhJustinYT 9 месяцев назад

    7:14

  • @robertsharp2633
    @robertsharp2633 Год назад

    20:50

  • @OhJustinYT
    @OhJustinYT 9 месяцев назад

    10:36

  • @mr_floax
    @mr_floax 2 года назад +1

    I dont use unity but good tutorial

  • @matiasgabrielarellanosanch5776
    @matiasgabrielarellanosanch5776 2 месяца назад

    10:6

  • @hugofrogboywithstuff
    @hugofrogboywithstuff 2 года назад

    Could you make a video about game maker 2? (I wanna use it and I don't want to use unity)

    • @ZygerGFX
      @ZygerGFX  2 года назад +3

      sorry but no. i dont own game maker and dont use it anymore

  • @EMPERENIKA
    @EMPERENIKA Год назад

    Spaghetti code

    • @ZygerGFX
      @ZygerGFX  Год назад +1

      what parts exactly? I'd love to improve my code so let me know what parts you think could be better :)

  • @user-kh2xr2nl5s
    @user-kh2xr2nl5s 2 года назад

    I like you. Can you work on a game with me

    • @ZygerGFX
      @ZygerGFX  2 года назад +1

      thank you. but no sorry I have my own projects that I'm working on.

  • @christian7865
    @christian7865 2 года назад +1

    This seems fun to create, destroy your social life, stop touching grass and start talking in C#... kinda easy ;)

  • @serefcaliskan4865
    @serefcaliskan4865 2 года назад

    I made 20+ typos because I was so careless. Ahahahahah.

  • @sebbie7132
    @sebbie7132 2 года назад

    Hi Why do i keep getting this Erorr Assets\CustomNetworkManager.cs(14,26): error CS0115: 'CustomNetworkManager.OnServerAddPlayer(NetworkConnection)': no suitable method found to override in customnetworkmanager

    • @ZygerGFX
      @ZygerGFX  2 года назад +1

      make sure that your script is inheriting from the network manager. if you are still getting the issue it might be because you are using a newer version of mirror where the function has slightly been changed and renamed. so locate the add player/spawn player function in the network manager as see what tis called and what it takes, and then override that one.

    • @septicwahab4312
      @septicwahab4312 2 года назад +4

      Change OnServerAddPlayer(NetworkConnection conn) to OnServerAddPlayer(NetworkConnectionToClient conn)

  • @jesuslover8541
    @jesuslover8541 Год назад

    bool isVaild = SteamUtils.GetImageSize(iImage, out uint width , out uint height); got an error
    .GetSteamImageAsTexture(int)': not all code paths return a value

  • @t0xangames207
    @t0xangames207 Год назад +1

    When I connect to the lobby, nothing changes on the lobby scene, and 2 errors appear pointing to the LocalGamePlayer object. One of the mistakes:
    NullReferenceException: Object reference not set to an instance of an object
    T0xanGames.Multiplayer.LobbyController.UpdateLobbyName() (at Assets/T0xan Games/Scripts/_Mirror/Lobby Controller.cs:52)
    T0xanGames.Multiplayer.PlayerObjectController.OnStartAuthority () (at Assets/T0xan Games/Scripts/_Mirror/PlayerObjectController.cs:36)
    the first one points to the string: CurrentLobbyID = GetComponent().CurrentLobbyID; in the UpdateLobbyName method of the LobbyController class,
    and the second to call this method in the OnStartAuthority method of the Player Object Controller class. It will be good if you can help me fix this
    also, the ConnectionId value of LocalGamePlayer = 0

    • @sangotwtom5
      @sangotwtom5 Год назад

      I guess you are using TMP text, like in my case. Changing to the other object loading method (or back to the old text UI) can fix this.
      see StackOverflow "Unity TextMeshProUGUI.text is NullReferenceException"

    • @t0xangames207
      @t0xangames207 Год назад

      @@sangotwtom5 I have been working at Unity for 3 years. And I know perfectly well that TMPro and regular UI Text are different things. I use plain text because it's simpler

    • @t0xangames207
      @t0xangames207 Год назад

      @@sangotwtom5 Moreover, the errors do not point to LobbyController, but to LocalPlayerObject , which does not have text fields

  • @thepancakeexpert
    @thepancakeexpert 2 месяца назад

    Hi Zyger. So my player object controller works as intended, it gets the right steam name. However the player list item does not. It doesn't produce anything on the client side and only copies the host name for the host. So if there are 2 players it has 2 player list items and both say the host name. Any ideas? I think it has something to do with my lobby controller since thats where we create the player list item and set the values but I'm unsure.

    • @thepancakeexpert
      @thepancakeexpert 2 месяца назад

      UPDATE: The condition for creating a client list player object is not met but on the host it is so I'm assuming the connection ID is off and only syncing with the host. Will troubleshoot here
      Edit: bro I didn't see that exclamation point, testing now but I feel stupid😂