public override void Shutdown()
{
IssueEvent (RenderEvent.Shutdown);
base.Shutdown();
}
public override bool PollEvent(ref SvrManager.SvrEvent frameEvent)
{
uint[] dataBuffer = new uint[2];
int dataCount = Marshal.SizeOf(frameEvent.eventData) / sizeof(uint);
int eventType = 0;
bool isEvent = SvrPollEvent(ref eventType, ref frameEvent.deviceId, ref frameEvent.event
timeStamp, dataCount, dataBuffer);
frameEvent.eventType = (SvrManager.svrEventType)(eventType);
switch (frameEvent.eventType)
{
case SvrManager.svrEventType.kEventThermal:
//Debug.LogFormat("PollEvent: data {0} {1}", dataBuffer[0], dataBuffer[1]);
frameEvent.eventData.thermal.zone = (SvrManager.svrThermalZone)dataBuffer[0];
frameEvent.eventData.thermal.level = (SvrManager.svrThermalLevel)dataBuffer[1];
break;
}
return isEvent;
}在SvrPluginAndroid脚本中提供了Shutdown方法,向底层代码中发送RenderEvent.Shutdown事件,作用是关闭当前的VR模式,与Endvr不同的是 shutdown调用之后无法通过BeginVR重新开启vr模式。