What now?! MyPhotonClient.dll

bloodthief
edited October 2010 in Photon Server
Hi there! Hello Exitgames Team!

I tried to build a Server taught by the "doc\photon-blank-server-setup.pdf" from the "ExitGames-Photon-Server-SDK_v2-0-5-1.zip". At step 3) my IDE outputs errors, but adding the references and compiling the solution seems to work!

I guess I succeed in that Tutorial and I'm running the Server now:
3424: 11:31:14.486 - Service is running...
("bin_x64/log/Photon-Instance1-20101002.log")

After that I completed the "doc\photon-blank-client-setup.pdf", compiled the binaries "MyPhotonClient.dll" and "PhotonDotNet".dll along with "MyPhotonClient.pdb" ...

fine, and what now? How do i start/use this Client? How can I implement it into Unity 3D? One shot into the blue, should i put 'em into a Unity 3d Project folder: / photn/libs/ ? And than?

(Next thing I'll try is "Netsync\Doc\NSOTutorial1.pdf" from the "Netsync-Demo-for-Photon-v2-0-5-1.zip". Looks useful.)


Thanks for reading, and more thanks for every helping answer!

Comments

  • (Next thing I'll try is "Netsync\Doc\NSOTutorial1.pdf" from the "Netsync-Demo-for-Photon-v2-0-5-1.zip". Looks useful.)

    Well, after I realised, that I have to go through the readme.txt first, to setup the right server requierements I'm Stuck:

    After fixing the references I tried to
    3) Build the solution files.
    my IDE says everthing is build well, but infact no new files where generated in "src-server/Netsync/server/bin". In that folder the old files form the package remain. So i tried to continue with that files to see what happens:
    4) Use the build/Build.Prompter.cmd command to deploy the applicaiton
    or copy \Netsync\Server\bin to \deploy\Netsync\bin.
    5) Add the application to the configuration in PhotonSocketServer.xml:
    <Application
    Name="NetSync"
    BaseDirectory="NetSync"
    Assembly="Photon.NetSyncObject.Server"
    Type="Photon.NetSyncObject.Server.PhotonApplication">
    </Application>
    6) Run Photon
    Photon failed to run
    3968: 07:05:38.035 - CService::OnException() - Exception: CManagedHost::CreateApplicationDomain() - Failed to create new application domain for : "NetSync" - Der vom Host angegebene Domänenmanager konnte nicht als Instanz definiert werden.

    Any Suggestions?

    Thanks for reading, and more thanks for every helping answer!
  • If you build by IDE, you will have to copy the files to \Netsync\Server\bin manually.
    The project files don't have a post-build copy task (in light of current issues, it might make sense though).
    The build command file will copy the files after building them.

    This should solve the mystery why the binaries don't get refreshed.
    Also make sure Photon (below v2.2.0.) is not running while you try to copy the files over.
  • Hi Tobias! Thanks for your answer! I appreciate it!

    Here a short List what I did, maybe u can point out the mistake a made:

    1.) Decompiled the "Netsync" Folder into my local directory c:\Photon\src-server\
    (This folder already contains CounterPublisher, Lite, LiteLobby, Policy form the Server "ExitGames-Photon-Server-SDK_v2-0-5-1.zip")

    2.) In the local "Netsync" folder I opened the "Photon.NetSyncObject.sln". As in the readme mentioned, the references have to be fixed manually. I Dit that for (PhotonUnity3D.dll (found in Photon-Unity3D_v5-9-0_SDK.zip), UnityEditor.dll, UnityEngine.dll (both found in unity 2.6.1 installation folder /data/lib)). I copied the 3 files to c:\Photon\libs

    3.) I looked at the files in the folder c:\Photon\Netsync\Server\bin (18 files already there from the extracting see 1.) I moved these files away so that it's empty now, c'ause i expect new ones right here when building the solution for the server.

    4.) I started the build process, the IDE states: "Build successful." but when checking the folder, its still empty.
    Thats the first thing that made me wonder (I would like to blame the IDE "MonoDevelop", but it worked like i stated before in the blank server/client builds. The bin folder got filled with files. but not in this case, any idea?)

    5.) I skiped this part and took the files I previously moved away (at step 3) and moved them to c:\Photon\deploy\Netsync\bin\ and hoped they could do the job. I altered the "PhotonSocketServer.xml" in c:\Photon\deploy\bin_x64\ like this:
    <Applications Default="NetSync">
    <!-- NetSync Application -->
    <Application
    Name="NetSync"
    BaseDirectory="NetSync"
    Assembly="Photon.NetSyncObject.Server"
    Type="Photon.NetSyncObject.Server.PhotonApplication">
    </Application>
    </Applications>

    6.) started Photon via Control and crossed my fingers ... No luck! That's where the error form the previous Post came from. I guess the files from the extracting arent ready to use...

    Okay, that's what i did so far. Any Suggestions?
  • We have to make step 4 working first. Otherwise the server won't have the proper logic to understand the NetSync client.

    I didn't try the MonoDevelop that's associated with the Unity 3 release but the beta's looked like they behave like VS. Could you check the project settings in MD where it places the built files? Need to find them :)
    Maybe it also states where the dlls are in the build output (VS does at least)...
  • Hi Tobias!

    Thanks for the answer/question!

    Yes, MD comes along with the release of 3.0 of Unity 3D. I did checked that (under solution options -> output) it says: output path: "C:\Photon\src-server\Netsync\Server\bin\". So everything fine and as expected I guess. Runtime Version: Mono / .NET 3.5

    Waaaaaaaaaaaaaaait: Under "General" it stated it is in "Debug" mode, I switched to "Release" mode and now the files where build!!!

    Copied 'em to "C:\Photon\deploy\Netsync\\bin\" and hit "Start Appl." in Photon Control ... Works! Opened Unity project, started "Tutorial1", hit connect and join! bamm! here we go! I'm excited! Awesome!

    Now i have to study the scripts and docu :D Thx! (but i could foretell: New questions coming soon ;-)