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{
|
||||
RequestId: requestId,
|
||||
Image: uploadRes.ResourceUrl,
|
||||
RenderProcessTime: websocket_data.RenderProcessTime{
|
||||
RenderProcessTime: &websocket_data.RenderProcessTime{
|
||||
UnityRenderTakesTime: fmt.Sprintf("%dms", unityRenderEndTime-unityRenderBeginTime),
|
||||
UploadUnityRenderImageTakesTime: fmt.Sprintf("%dms", uploadUnityRenderImageTakesTime),
|
||||
},
|
||||
|
|
|
@ -61,7 +61,7 @@ func (w *wsConnectItem) sendRenderDataToUnityStepResponseMessage(requestId strin
|
|||
func (w *wsConnectItem) sendRenderResultData(data websocket_data.RenderImageRspMsg) {
|
||||
//没开启debug
|
||||
if w.debug == nil {
|
||||
data.RenderProcessTime = websocket_data.RenderProcessTime{}
|
||||
data.RenderProcessTime = nil
|
||||
}
|
||||
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{
|
||||
RequestId: renderImageData.RequestId,
|
||||
Image: *resource.ResourceUrl,
|
||||
RenderProcessTime: websocket_data.RenderProcessTime{
|
||||
RenderProcessTime: &websocket_data.RenderProcessTime{
|
||||
UnityRenderTakesTime: "cache",
|
||||
UploadUnityRenderImageTakesTime: "cache",
|
||||
},
|
||||
|
|
|
@ -28,9 +28,9 @@ type TemplateTagColor struct {
|
|||
|
||||
// websocket发送渲染完的数据
|
||||
type RenderImageRspMsg struct {
|
||||
RequestId string `json:"request_id"`
|
||||
Image string `json:"image"` //渲染结果图片
|
||||
RenderProcessTime RenderProcessTime `json:"render_process_time"` //流程耗时
|
||||
RequestId string `json:"request_id"`
|
||||
Image string `json:"image"` //渲染结果图片
|
||||
RenderProcessTime *RenderProcessTime `json:"render_process_time"` //流程耗时
|
||||
}
|
||||
type RenderProcessTime struct {
|
||||
UnityRenderTakesTime string `json:"unity_render_takes_time"` //unity渲染用时
|
||||
|
|
Loading…
Reference in New Issue
Block a user