Purpose
The purpose of recording this blog is to switch between these two grammars frequently. One of the grammars has not been written for too long, so even if it is a very simple thing, you have to search for how to solve it, so write this blog, and you can quickly find it when you need it.
ScrollView in Unity cannot be dragged to the bottom
Add contentSizeFitter to content and select PreferredSize to solve the problem.
csv export Chinese garbled characters
When exporting in Excel, the tool selects Web Options-Encoding-UTF-8, and then opens it with Notepad. Save As select UTF-8. Chinese can now be displayed. If you open garbled characters in Excel, then switch to the original encoding.
C# judge whether it is a number
bool IsNumber = int.TryParse("asd", out int a);
Color usage in Unity
gridBg.color = new Color32(189, 250, 129, 255)
Modify left, right, top, bottom of RectTransform in Unity
offsetMin: corresponds to Left, Top
offsetMax: corresponds to Right, Bottom
RectTransform newUIRect = newUI.GetComponent<RectTransform>();
newUIRect.offsetMax = new Vector2(0, 0);
newUIRect.offsetMin = new Vector2(0, 0);
Determine whether the node is within the range in Unity
//ballParentCollider是Collider类型
Vector3 pos = GetFirstOrLastLineGrid(false).transform.position;
bool rendererIsInsideTheBox = ballParentCollider.bounds.Contains(pos);