fix
This commit is contained in:
parent
496a56be5d
commit
1bd606a89c
|
@ -99,7 +99,7 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a
|
||||||
ws.sendRenderResultData(websocket_data.RenderImageRspMsg{
|
ws.sendRenderResultData(websocket_data.RenderImageRspMsg{
|
||||||
RequestId: requestId,
|
RequestId: requestId,
|
||||||
Image: uploadRes.ResourceUrl,
|
Image: uploadRes.ResourceUrl,
|
||||||
RenderProcessTime: websocket_data.RenderProcessTime{
|
RenderProcessTime: &websocket_data.RenderProcessTime{
|
||||||
UnityRenderTakesTime: fmt.Sprintf("%dms", unityRenderEndTime-unityRenderBeginTime),
|
UnityRenderTakesTime: fmt.Sprintf("%dms", unityRenderEndTime-unityRenderBeginTime),
|
||||||
UploadUnityRenderImageTakesTime: fmt.Sprintf("%dms", uploadUnityRenderImageTakesTime),
|
UploadUnityRenderImageTakesTime: fmt.Sprintf("%dms", uploadUnityRenderImageTakesTime),
|
||||||
},
|
},
|
||||||
|
|
|
@ -61,7 +61,7 @@ func (w *wsConnectItem) sendRenderDataToUnityStepResponseMessage(requestId strin
|
||||||
func (w *wsConnectItem) sendRenderResultData(data websocket_data.RenderImageRspMsg) {
|
func (w *wsConnectItem) sendRenderResultData(data websocket_data.RenderImageRspMsg) {
|
||||||
//没开启debug
|
//没开启debug
|
||||||
if w.debug == nil {
|
if w.debug == nil {
|
||||||
data.RenderProcessTime = websocket_data.RenderProcessTime{}
|
data.RenderProcessTime = nil
|
||||||
}
|
}
|
||||||
w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_RENDER_IMAGE, data))
|
w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_RENDER_IMAGE, data))
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,7 +258,7 @@ func (w *wsConnectItem) renderImage(renderImageData websocket_data.RenderImageRe
|
||||||
w.sendRenderResultData(websocket_data.RenderImageRspMsg{
|
w.sendRenderResultData(websocket_data.RenderImageRspMsg{
|
||||||
RequestId: renderImageData.RequestId,
|
RequestId: renderImageData.RequestId,
|
||||||
Image: *resource.ResourceUrl,
|
Image: *resource.ResourceUrl,
|
||||||
RenderProcessTime: websocket_data.RenderProcessTime{
|
RenderProcessTime: &websocket_data.RenderProcessTime{
|
||||||
UnityRenderTakesTime: "cache",
|
UnityRenderTakesTime: "cache",
|
||||||
UploadUnityRenderImageTakesTime: "cache",
|
UploadUnityRenderImageTakesTime: "cache",
|
||||||
},
|
},
|
||||||
|
|
|
@ -28,9 +28,9 @@ type TemplateTagColor struct {
|
||||||
|
|
||||||
// websocket发送渲染完的数据
|
// websocket发送渲染完的数据
|
||||||
type RenderImageRspMsg struct {
|
type RenderImageRspMsg struct {
|
||||||
RequestId string `json:"request_id"`
|
RequestId string `json:"request_id"`
|
||||||
Image string `json:"image"` //渲染结果图片
|
Image string `json:"image"` //渲染结果图片
|
||||||
RenderProcessTime RenderProcessTime `json:"render_process_time"` //流程耗时
|
RenderProcessTime *RenderProcessTime `json:"render_process_time"` //流程耗时
|
||||||
}
|
}
|
||||||
type RenderProcessTime struct {
|
type RenderProcessTime struct {
|
||||||
UnityRenderTakesTime string `json:"unity_render_takes_time"` //unity渲染用时
|
UnityRenderTakesTime string `json:"unity_render_takes_time"` //unity渲染用时
|
||||||
|
|
Loading…
Reference in New Issue
Block a user