【1】
The path in Untiy3D uses
// Convert the \ in the path to /
string path = path.Replace(@"\" , "/");
ps: Correct path writing
1.Resources/Texture/sky
2.Resources \Texture\sky
【2】
Reduce the use of enum, use more class
【3】
Reduce the use of foreach, each iteration loop is the creation and destruction of Enumerator objects, increasing GC
【4】
Transform transform;
transform.rotation = Quaternion.Euler(new Vector3(x,y,z));
【5】
Set 4 grid alignment for vs: Tools - Options - All Languages - Tabs
Set code block automatic alignment: ctrl + k , ctrl + f