fix
This commit is contained in:
parent
0a6192427f
commit
cd46a88eaa
|
@ -27,5 +27,6 @@ const (
|
||||||
WEBSOCKET_RENDER_IMAGE Websocket = "WEBSOCKET_RENDER_IMAGE" //图片渲染消息(1级消息,双向通信)
|
WEBSOCKET_RENDER_IMAGE Websocket = "WEBSOCKET_RENDER_IMAGE" //图片渲染消息(1级消息,双向通信)
|
||||||
WEBSOCKET_RENDER_IMAGE_ERR Websocket = "WEBSOCKET_RENDER_IMAGE_ERR" //图片渲染失败消息(1级消息,单向通信)
|
WEBSOCKET_RENDER_IMAGE_ERR Websocket = "WEBSOCKET_RENDER_IMAGE_ERR" //图片渲染失败消息(1级消息,单向通信)
|
||||||
WEBSOCKET_COMBINE_IMAGE Websocket = "WEBSOCKET_COMBINE_IMAGE" //反回合成刀版图消息(2级消息,单向通信,属于 WEBSOCKET_RENDER_IMAGE 消息的子流程)
|
WEBSOCKET_COMBINE_IMAGE Websocket = "WEBSOCKET_COMBINE_IMAGE" //反回合成刀版图消息(2级消息,单向通信,属于 WEBSOCKET_RENDER_IMAGE 消息的子流程)
|
||||||
|
WEBSOCKET_ASSEMBLE_RENDER_DATA Websocket = "WEBSOCKET_ASSEMBLE_RENDER_DATA" //组装unity需要的数据
|
||||||
WEBSOCKET_SEND_DATA_TO_UNITY Websocket = "WEBSOCKET_SEND_DATA_TO_UNITY" //发送到unity进行渲染
|
WEBSOCKET_SEND_DATA_TO_UNITY Websocket = "WEBSOCKET_SEND_DATA_TO_UNITY" //发送到unity进行渲染
|
||||||
)
|
)
|
||||||
|
|
|
@ -321,6 +321,8 @@ func (w *wsConnectItem) assembleRenderDataToUnity(taskId string, combineImage st
|
||||||
"data": tempData,
|
"data": tempData,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
//发送运行阶段消息(组装数据)
|
||||||
|
w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_ASSEMBLE_RENDER_DATA, websocket_data.ToUnityRspMsg{RenderId: info.RenderId}))
|
||||||
sendData := map[string]interface{}{
|
sendData := map[string]interface{}{
|
||||||
"id": taskId,
|
"id": taskId,
|
||||||
"order_id": 0,
|
"order_id": 0,
|
||||||
|
@ -359,7 +361,7 @@ func (w *wsConnectItem) assembleRenderDataToUnity(taskId string, combineImage st
|
||||||
unityRenderBeginTime: unityRenderBeginTime,
|
unityRenderBeginTime: unityRenderBeginTime,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
//发送send 到unity 运行阶段信息
|
//发送运行阶段消息
|
||||||
w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_SEND_DATA_TO_UNITY, websocket_data.ToUnityRspMsg{RenderId: info.RenderId}))
|
w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_SEND_DATA_TO_UNITY, websocket_data.ToUnityRspMsg{RenderId: info.RenderId}))
|
||||||
logx.Info("发送到unity成功,刀版图:", combineImage /*, " 请求unity的数据:", string(postDataBytes)*/)
|
logx.Info("发送到unity成功,刀版图:", combineImage /*, " 请求unity的数据:", string(postDataBytes)*/)
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue
Block a user