当前位置:网站首页>Unity project optimization case 1
Unity project optimization case 1
2022-07-03 16:12:00 【Listening star】
For the optimization problems encountered in the work , Make a note of , Provide some ideas for everyone to optimize their own projects .
A company has been established recently VR project . I found that the performance problem was serious when I was about to deliver
Usage environment
unity 2018.4.36
cpu i5 10400f
The graphics card 2060 6g
Memory 16G
Analyze and solve the problem
When the program runs, it runs to 100 millisecond ~
Optimization idea
1. Install the development environment on the corresponding computer
2. Use Profile Debug and locate performance problems
a.SkinMesh Excessive consumption .
b. There is one Depth The related consumption is also great . Affect every frame about 10~20 millisecond
3.SkinMesh It's easier to deal with , There are too many animated models , The processing idea is based on whether it is visible , Hide unwanted animation models , Open it when you need it .
4. The corresponding calling function is not found for depth related , Then I looked at the number of calls in each frame 50 many times . Then guess it has something to do with the camera , Finally, it is located that a certain function is used for camera rendering RenderTexture. And then created 50 Multiple cameras . However, this function does not require the camera to be activated all the time , Then change the camera to the de activated state .
5. adopt FrameDebug It is found that the consumption of shadow is also more , Then I observed the scene and found that the object did not produce shadows , The option to generate shadows has been turned off ( As for why to turn off the shadow is another topic ~). Then since the current effect of the scene does not need shadows , But there will be performance consumption on the shadow , Turn off the shadows on the directional light in the scene .
Final effect
Final effect from each frame 100 millisecond , Optimize to most scenes 5 millisecond , Scenes with many animations of individual models 12 Millisecond or so . It takes a total of time to program 2 God , The fine arts 2 God .
边栏推荐
- “用Android复刻Apple产品UI”(2)——丝滑的AppStore卡片转场动画
- Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (III)
- Microservice - Nacos registration center and configuration center
- Download and install common programs using AUR
- Distributed task scheduling XXL job
- Microservice - fuse hystrix
- [proteus simulation] 8 × 8LED dot matrix screen imitates elevator digital scrolling display
- 突破100万,剑指200万!
- 远程文件包含实操
- [redis foundation] understand redis persistence mechanism together (rdb+aof graphic explanation)
猜你喜欢
First knowledge of database
嵌入式开发:避免开源软件的7个理由
【声明】关于检索SogK1997而找到诸多网页爬虫结果这件事
Initial test of scikit learn Library
[web security] - [SQL injection] - error detection injection
How can technology managers quickly improve leadership?
[proteus simulation] 74hc595+74ls154 drive display 16x16 dot matrix
Principles of several common IO models
工资3000,靠“视频剪辑”月入40000:会赚钱的人,从不靠拼命!
[system safety] 43 PowerShell malicious code detection series (5) automatic extraction of ten thousand words from abstract syntax tree
随机推荐
分布式事务(Seata) 四大模式详解
Three dimensional reconstruction of deep learning
The difference between mutually exclusive objects and critical areas
Page dynamics [2]keyframes
Hibernate的缓存机制/会话级缓存机制
[list to map] collectors Tomap syntax sharing (case practice)
Why can't strings be directly compared with equals; Why can't some integers be directly compared with the equal sign
请做好3年内随时失业的准备?
Secsha system 1- login function
【声明】关于检索SogK1997而找到诸多网页爬虫结果这件事
The difference between calling by value and simulating calling by reference
[combinatorics] combinatorial identity (sum of combinatorial identity products 1 | sum of products 1 proof | sum of combinatorial identity products 2 | sum of products 2 proof)
Redis high availability and persistence
The mixlab editing team is recruiting teammates~~
Remote file contains actual operation
Semi supervised learning
Microservice - fuse hystrix
A Fei's expectation
六月 致 -.-- -..- -
Microservice API gateway zuul