Photon多人VR
Photon的组成
Photon Server :
Photon Cloud : 服务端引擎 windows 服务端
Photon启动设置
-
下载photon
-
下载Photon Server License丢到Deploy-Bin64下
-
启动phton Server
<MMoDemo
MaxMessageSize="512000"
MaxQueuedDataPerPeer="512000"
PerPeerMaxReliableDataInTransit="51200"
PerPeerTransmitRateLimitKBSec="256"
PerPeerTransmitRatePeriodMilliseconds="200"
MinimumTimeout="5000"
MaximumTimeout="30000"
DisplayName="MMO Demo"
>
//UDP Photon server 封装了UDP 又快又安全
<!-- 0.0.0.0 所有IP都可以链接:5055.如果设置特定IP 只能链接特定IP -->
<UDPListeners>
<UDPListener
IPAddress="0.0.0.0"
Port="5055"
OverrideApplication="MMoDemo">
</UDPListener>
</UDPListeners>
//TCP Photon server
<TCPListeners>
<TCPListener
IPAddress="0.0.0.0"
Port="4530"
PolicyFile="Policy\assets\socket-policy.xml"
InactivityTimeout="10000"
OverrideApplication="MMoDemo"
>
</TCPListener>
</TCPListeners>
//应用统一应用数据端口
<Applications Default="MMoDemo">
<!-- MMO Demo Application -->
<Application
Name="MMoDemo"
BaseDirectory="MmoDemo"// 部署的文件夹 相对于Depoly来说
Assembly="Photon.MmoDemo.Server" //程序集
Type="Photon.MmoDemo.Server.PhotonApplication" //程序集的哪个类启动
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>
</Applications>