Start and Debug LiteApplication
Options
Hello,
at the moment I'm trying to build an unity application which connects to my own photon server app.
For debugging purposes I went through the whole forum to find some working solutions.
Well... I took the "Lite"-solution, added the "PhotonSocketServer" to this solution, set it as start project, made some changes in the "PhotonServer.config" and set "/debug MyServer" as start arguments for the PhotonSocketServer-"project".
Now I can start to debug my project. In Unity I'm able to connect to my own server and I'm also able to join a room
("OnConnectedToMaster" and "OnJoinedRoom" will be triggered).
When I will stop the debugging, I couldn't connect to the server anymore. Fine.
Ok, the debugging process:
To figure out some stuff, I just want to set breakpoints in specific classes / functions.
The "Setup"-function in "MyApplication.cs" will be triggered some seconds after starting the project and the debugger stops at this breakpoint (as expected).
But the "CreatePeer"-function wouldn't be triggered. I think it should be, when I will connect to the server (or join a room?!).
I have no idea what I'm missing...
Thanks in advance
Daniel
Btw. this is my server config:
at the moment I'm trying to build an unity application which connects to my own photon server app.
For debugging purposes I went through the whole forum to find some working solutions.
Well... I took the "Lite"-solution, added the "PhotonSocketServer" to this solution, set it as start project, made some changes in the "PhotonServer.config" and set "/debug MyServer" as start arguments for the PhotonSocketServer-"project".
Now I can start to debug my project. In Unity I'm able to connect to my own server and I'm also able to join a room
("OnConnectedToMaster" and "OnJoinedRoom" will be triggered).
When I will stop the debugging, I couldn't connect to the server anymore. Fine.
Ok, the debugging process:
To figure out some stuff, I just want to set breakpoints in specific classes / functions.
The "Setup"-function in "MyApplication.cs" will be triggered some seconds after starting the project and the debugger stops at this breakpoint (as expected).
But the "CreatePeer"-function wouldn't be triggered. I think it should be, when I will connect to the server (or join a room?!).
I have no idea what I'm missing...
Thanks in advance
Daniel
Btw. this is my server config:
... <Configuration> ... <!-- MyServer --> <MyServer MaxMessageSize="512000" MaxQueuedDataPerPeer="512000" PerPeerMaxReliableDataInTransit="51200" PerPeerTransmitRateLimitKBSec="256" PerPeerTransmitRatePeriodMilliseconds="200" MinimumTimeout="5000" MaximumTimeout="30000" DisplayName="MyServer"> <!-- 0.0.0.0 opens listeners on all available IPs. Machines with multiple IPs should define the correct one here. --> <!-- Port 5055 is Photon's default for UDP connections. --> <UDPListeners> <UDPListener IPAddress="0.0.0.0" Port="5055" OverrideApplication="Master"> </UDPListener> <UDPListener IPAddress="0.0.0.0" Port="5056" OverrideApplication="Game"> </UDPListener> </UDPListeners> <!-- 0.0.0.0 opens listeners on all available IPs. Machines with multiple IPs should define the correct one here. --> <TCPListeners> <!-- TCP listener for Game clients on Master application --> <TCPListener IPAddress="0.0.0.0" Port="4530" OverrideApplication="Master" PolicyFile="Policy\assets\socket-policy.xml" InactivityTimeout="10000" > </TCPListener> <TCPListener IPAddress="0.0.0.0" Port="4531" OverrideApplication="Game" PolicyFile="Policy\assets\socket-policy.xml" InactivityTimeout="10000"> </TCPListener> <!-- DON'T EDIT THIS. TCP listener for GameServers on Master application --> <TCPListener IPAddress="0.0.0.0" Port="4520"> </TCPListener> </TCPListeners> <!-- Policy request listener for Unity and Flash (port 843) and Silverlight (port 943) --> <PolicyFileListeners> <!-- multiple Listeners allowed for different ports --> <PolicyFileListener IPAddress="0.0.0.0" Port="843" PolicyFile="Policy\assets\socket-policy.xml"> </PolicyFileListener> <PolicyFileListener IPAddress="0.0.0.0" Port="943" PolicyFile="Policy\assets\socket-policy-silverlight.xml"> </PolicyFileListener> </PolicyFileListeners> <!-- WebSocket (and Flash-Fallback) compatible listener --> <WebSocketListeners> <WebSocketListener IPAddress="0.0.0.0" Port="9090" DisableNagle="true" InactivityTimeout="10000" OverrideApplication="Master"> </WebSocketListener> <WebSocketListener IPAddress="0.0.0.0" Port="9091" DisableNagle="true" InactivityTimeout="10000" OverrideApplication="Game"> </WebSocketListener> </WebSocketListeners> <!-- Defines the Photon Runtime Assembly to use. --> <Runtime Assembly="PhotonHostRuntime, Culture=neutral" Type="PhotonHostRuntime.PhotonDomainManager" UnhandledExceptionPolicy="Ignore"> </Runtime> <!-- Defines which applications are loaded on start and which of them is used by default. Make sure the default application is defined. --> <!-- Application-folders must be located in the same folder as the bin_win32 folders. The BaseDirectory must include a "bin" folder. --> <Applications Default="MyApplication"> <Application Name="Master" BaseDirectory="LoadBalancing\Master" Assembly="Photon.LoadBalancing" Type="Photon.LoadBalancing.MasterServer.MasterApplication" ForceAutoRestart="true" WatchFiles="dll;config" ExcludeFiles="log4net.config" > </Application> <Application Name="Game" BaseDirectory="LoadBalancing\GameServer" Assembly="Photon.LoadBalancing" Type="Photon.LoadBalancing.GameServer.GameApplication" ForceAutoRestart="true" WatchFiles="dll;config" ExcludeFiles="log4net.config"> </Application> <!-- CounterPublisher Application --> <Application Name="CounterPublisher" BaseDirectory="CounterPublisher" Assembly="CounterPublisher" Type="Photon.CounterPublisher.Application" ForceAutoRestart="true" WatchFiles="dll;config" ExcludeFiles="log4net.config"> </Application> <Application Name="MyApplication" BaseDirectory="MyApplication" Assembly="MyApplication" Type="MyApplication.MyApplication" ForceAutoRestart="true" WatchFiles="dll;config" ExcludeFiles="log4net.config"> </Application> </Applications> </MyServer> </Configuration>
0
Comments
-
it looks like you are using websockets to connect to game server, right?
could you also provide logs from deploy/bin_win64/logs folder. if you started debugger they may be somewhere else, for instnance in solution/log. File names should look like Photon-MyServer-date.log0 -
Hey,
obviously there went something wrong with the syntax highlighting. Actually I'm using the udp listener for my connection. I left all the other stuff in the config to minimize the sources of error.
the unity photon settings look like this:
hosting: self hosted
address: 127.0.0.1
port: 5055
protocol: udp
appid: xxxxxxx
this is the log file: Photon-MyServer-20161222.log0 -
Hi
as far as i may see from your config, all your connections are forwarded either to 'Master' or to 'Game'
your application will not get any incomming connections
Remove 'OverrideApplication' from config and durring connect set correct application name, then it will connect to your application
or add new port and set for it 'OverrideApplication' to your 'MyApplication'
best, ilya1 -
Great. I will check it out after christmas break.
Many thanks.
Daniel0