Closed baoxiehao closed 2 years ago
btw,any suggestion on the code intelligent tips which will not be shown when writing UIWidgets pages?
Hi Thanks a lot for the feedback!
For the blinking issue, I noticed that it only happens when you are resizing the the size of the camera's view area. Although I still cannot reproduce the issue in my repo locally, I believe it could be relevant to the fact that UIWidgets has to recreate a new texture and bind it to the RawImage in Unity as well as the flutter engine when the canvas size changes: This is a relatively heavy job and often not possible to finish in one frame, resulting in empty gap frames and blink.
To solve this issue, you may try giving UIWidgets enough time to finish the job by slowing down the lerp frequency, e.g., resizing the canvas every other several frames instead of one frame. You can also share a simplified repo to us to investigate this issue.
For the second issue, you may want to use Jetbrains Rider (https://www.jetbrains.com/rider/). The dev team is using it to develop UIWidgets and like most of the functionalities (e.g., intelligent tips) it provides.
There are 2 cameras, each one attach a canvas on which UIWidgets draws.
floatCamera.rect = new Rect (Mathf.Lerp (0.7f, 0.1f, step), 0.1f, Mathf.Lerp(0.25f, 0.8f, step), Mathf.Lerp(0.5f, 0.8f, step));
But translate the camera doesn't blink.
floatCamera.rect = new Rect (Mathf.Lerp (0.1f, 0.7f, step), 0.1f, 0.25f, 0.5f);