Legacy Documentation: Version 5.4
GI Visualisations in the Scene View
Light troubleshooting and performance

GI Cache

The GI Cache is used by the Global Illumination system to store intermediate files when building lightmaps, light probes and reflection probes. The cache is a shared cache, so projects with the same content can share some of the files to speed up builds.

You can find the settings for the GI Cache in Edit -> Preferences -> GI Cache on Windows and Unity -> Preferences -> GI Cache on Mac OSX. Here you can set the cache size, clear out the current cached files, as well as set a custom cache location.

If nothing in the scene has changed then lighting data should load from the cache in a very short amount of time when reloading your scene.

When the cache size grows larger than the size specified in the prefrences, Unity is spawning a job to trim the least recently used files. If all the files in the cache is in use, because the scene is very large or the cache size is set too low, you need to increase your cache size in the preferences or you will see a lot of recomputation when baking.

It is not safe to delete the GI Cache directory yourself while the Editor is running. The GI Cache folder is created on Editor startup and the Editor maintains a collection of hashes that is used to look up the files in the GI Cache folder. If a file or directory suddenly disappear, the system can’t always recover from the failure and will print an error in the Console… Please use the button in Preferences -> GI Cache -> Clean Cache for clearing the cache directory, as this will ensure that the Editor releases all references to the files on disk before they are deleted.

In the Lighting window, the bake button can expand into a dropdown that lets you clear the baked data if you are in non-continuous baking mode. This will not clear the GI Cache as that would increate bake time afterwards.

It is possible to share the GI Cache folder among different machines, this can make Lighting Data asset rebuild faster.

GI Visualisations in the Scene View
Light troubleshooting and performance
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961