Unity code optimization

1. Delete the unused code, because even the unused code will IL2Cpp.

2. The method of MonoBehaviour is an empty method, especially the Update method. If it is deleted, there will be performance consumption.

3. The class where the override method is located in Unity, if it is determined that the class will not be inherited, seal the method, because in IL2Cpp, the override modified method will be placed in a list to find, of course, Of course, the search process will bring consumption. When it is decorated with sealed, it is certain and no longer needs to be searched.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325286637&siteId=291194637