您的 OnLogin Hook 具体是怎么写的呢?我试了一下,按照文档的写法部署了如下云函数:
[LCEngineUserHook(LCEngineUserHookType.OnLogin)]
public static LCUser OnLogin(LCUser user) {
throw new LCException(123, "An error occurred.");
}
部署成功后在 Unity 客户端试了一下,可以拿到的:
[DEBUG] 5/12/2022 1:54:13 PM === HTTP Response Start ===
URL: {{server url}}
Status Code: BadRequest
Content: {"code":142,"error":"Cloud Code validation failed. Error detail : {\"code\":123,\"message\":\"An error occurred.\"}"}
=== HTTP Response End ===