Photon & UE4

DinaOrlaDinaOrla
edited April 12 in Native
Dear Team,

I'm new to Photon and its community! I want to use Photon for Multiplayers in a VR project that I'm running in UE4 (4.24. - 26.). I don't consider myself a developper just a good user of UE4 (no programming experience etc.). I follow clearly the steps of this documentation (https://doc.photonengine.com/en-us/realtime/current/getting-started/unreal-engine) but the demo project is very out-of-date (as mentioned in the txt file: version 4.12.5) and it's not possible to build it or run it in any recent version. Is there any current demo project out there that could help me out to explore photon for UE4 (also for VR)?
Any recommendations much appreciated!

Thanks!

PS: Sorry if this isn't the category for this post and for any cross-overs

Comments

  • This is a question for the "Native" section of the forum (C / C++ clients).
    I will ping my colleague to chime in when he's available.
  • Hi @DinaOrla.
    This is a question for the "Native" section of the forum (C / C++ clients).
    I have moved it to that section now.
    but the demo project is very out-of-date (as mentioned in the txt file: version 4.12.5)
    The readme.txt is very out of date, not the project itself.
    it's not possible to build it or run it in any recent version
    In fact it is very possible.
    I have successfully run the demo project with UE 4.24, 4.25 and 4.26 myself.
    Make sure that you switch the demo UE4 version to the one that you intending to use it with via the context-menu of the .ueproject file.
    Also please make sure that you let the demo link to the correct variants of the Photon Windows libraries in the .Build.cs file: out of the box it specifies the '_vc14' variants (the ones for Visual Studio 2015), but for UE4.24 you need to change this to '_vc15' (Visual Studio 2017) and with UE4.25 and above to to '_vc16' (Visual Studio 2019).
    Afterwards generate the Visual Studio project files via the context-menu of the .ueproject file , open the VS solution and build and run the 'DevelopmentEditor' configuration.
    Assuming that you have copied the header and lib files to the correct locations inside the demo folder like instructed in the guide that you have linked in your post, the demo will build just fine for 4.24-4.26.
    Is there any current demo project out there that could help me out to explore photon for UE4 (also for VR)
    We don't have any VR-specific demos for UE4, but as far as Photon is concerned, there isn't really anything special about VR, so that the normal Photon UE4 integration demo should do just fine.

  • Hi Kaiserludi,

    Thanks for your answer!

    I tried out the steps that you mentioned above but I can't build the file for 4.24. although I specified the variables (_vc15 for VS 2017 and for 4.24.) so either I haven't copied the files to the correct locations (I'll do it again!) or I'm missing a basic info: do I need to use the source build versions of the engine or it doesn't matter? (sorry for these questions but as I said no experience there but I have to start from somewhere!)
  • Hi @DinaOrla.
    do I need to use the source build versions of the engine or it doesn't matter?
    It doesn't matter.
    so either I haven't copied the files to the correct locations (I'll do it again!)
    Inside the Windows SDK open folder Common-cpp.
    In that folder you find 2 subfolders: 'inc' and 'lib'
    The content of the Common-cpp/inc folder in the Windows SDK needs to be copied into the Common-cpp/inc folder of the UE project.
    The content of the Common-cpp/lib folder in the Windows SDK needs to be copied into the lib/Windows folder of the UE project.
    Do the same for Photon-cpp and LoadBalancing-cpp as well.

    If it still doesn't build afterwards, then please let me know the error messages that Visual Studio gives you.
Sign In or Register to comment.