一,如下代码配置
<MyGameInstance MaxMessageSize="512000" MaxQueuedDataPerPeer="512000" PerPeerMaxReliableDataInTransit="51200" PerPeerTransmitRateLimitKBSec="256" PerPeerTransmitRatePeriodMilliseconds="200" MinimumTimeout="5000" MaximumTimeout="30000" DisplayName="MyGame" > <!-- OverrideApplication表示加载下面定义的Applications的名字如下MyGame1, --> <UDPListeners> <UDPListener IPAddress="0.0.0.0" Port="5055" OverrideApplication="MyGame1"> </UDPListener> </UDPListeners> <TCPListeners> <TCPListener IPAddress="0.0.0.0" Port="4530" PolicyFile="Policyassetssocket-policy.xml" InactivityTimeout="10000" OverrideApplication="MyGame1" > </TCPListener> </TCPListeners> <Runtime Assembly="PhotonHostRuntime, Culture=neutral" Type="PhotonHostRuntime.PhotonDomainManager" UnhandledExceptionPolicy="Ignore"> </Runtime> <!-- Default表示默认加载的应用 如加载下面Application的MyGame1--> <Applications Default="MyGame1"> <!--BaseDirectory文件夹。Assembly程序集。Type那个类为起始类--> <Application Name="MyGame1" BaseDirectory="MyGameServer" Assembly="MyGameServer" Type="MyGameServer.MyGameServer" ForceAutoRestart="true" WatchFiles="dll;config" ExcludeFiles="log4net.config"> </Application> </Applications> </MyGameInstance>
二,log4net的配置,选择为始终复制,这样才会生成到输出目录