Skip to content

Commit e6ef99a

Browse files
committed
added validations page
1 parent 33cd4d3 commit e6ef99a

2 files changed

Lines changed: 153 additions & 1 deletion

File tree

docs/cck/.pages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ nav:
99
- Spawnable: spawnable
1010
- Components: components
1111
- Lua Scripting: lua
12-
- Examples: examples
12+
- Validations: validations.md
1313
- FAQ: faq.md

docs/cck/validations.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
The CCK runs a series of validation steps on your content before upload. Each validation flags issues at one of three severity levels: Info, Warning, or Error, and some provide an automatic fix to resolve detected problems.
2+
3+
Validations which report an Error block the build process until the issue is resolved, while those that report a Warning or Info do not block building but indicate potential issues that should be addressed.
4+
5+
The following sections describe each validation, its severity, and any automatic fixes it provides.
6+
7+
## Total Triangle Count
8+
9+
`Severity: Info`
10+
11+
Counts the total number of triangles (the basic polygons that make up your 3D meshes) on your content.
12+
13+
An info is reported if the total triangle count exceeds `100,000` triangles. A warning is reported if the total triangle count exceeds `200,000` triangles.
14+
15+
This is a soft limit to help you keep your content performant. Excessive triangles can lead to poor performance, especially on lower-end hardware.
16+
17+
## Total Material Slots
18+
19+
`Severity: Info`
20+
21+
Counts the total number of material slots in your content.
22+
23+
An info is reported if the total material slot count exceeds `15`. A warning is reported if it exceeds `30`.
24+
25+
This is a soft limit to help you keep draw calls low. Each material slot generates a separate draw call, and too many draw calls can overload the CPU and reduce frame rate.
26+
27+
## Camera Missing Render Texture
28+
29+
`Severity: Warning`
30+
31+
Finds any Camera component on an Avatar or Prop that has no assigned Render Texture. Cameras without a render target are removed on content load to prevent such content from drawing on top of the player camera.
32+
33+
## Potential Depth Light
34+
35+
`Severity: Warning` `Autofix Available`
36+
37+
Detects directional lights that meet all of the following criteria:
38+
39+
* Intensity of 0.01 or less
40+
* Culling mask includes only the Ignore Raycast, Water, or CVRReserved3 layers
41+
* Hard shadows enabled
42+
43+
These lights are usually part of prefabs shipped alongside shaders, (Mochie, Doppelgänger, cancerspace, and Poiyomi), that require depth information to function. These lights force the depth buffer to be available by casting shadows on empty layers which the player camera always renders.
44+
45+
These `DepthGet` prefabs are only needed in environments where the depth buffer is not made available by default.
46+
47+
In ChilloutVR the depth buffer is always provided so these lights are not needed. While they do not cause any issue being present, they are a hack, so it is recommended to remove them.
48+
49+
###### Autofix
50+
51+
Destroys any detected depth‑forcing lights
52+
53+
## Long Range Audio
54+
55+
`Severity: Warning`
56+
57+
Flags any AudioSource component set to 2D mode or with a maximum falloff distance greater than 15 meters. Long range audio sources can cause audio to remain audible when it should fade out, so your content will be tagged with a warning.
58+
59+
## Loud Audio
60+
61+
`Severity: Warning`
62+
63+
Identifies audio clips whose average volume exceeds –8dB. Clips above this level can clip or be uncomfortably loud. Your content will be tagged with Loud Audio if any audio clips exceed this threshold.
64+
65+
## Potentially Non SPI Shaders
66+
67+
`Severity: Warning`
68+
69+
Scans every shader for the four Unity stereo rendering macros:
70+
71+
* UNITY\_VERTEX\_INPUT\_INSTANCE\_ID
72+
* UNITY\_VERTEX\_OUTPUT\_STEREO
73+
* UNITY\_SETUP\_INSTANCE\_ID
74+
* UNITY\_INITIALIZE\_VERTEX\_OUTPUT\_STEREO
75+
76+
If any of these macros are missing, the shader is considered potentially Non-SPI (Single Pass Instanced) compatible and may not render correctly in VR.
77+
78+
This check is not guaranteed to be accurate. It only looks for specific macro patterns and may miss broken or improperly implemented stereo support. Likewise, some valid shaders may be flagged if they do not use the standard macro layout, or may not be a concern such as shaders used in blits.
79+
80+
This validation does not block building but is useful to identify shaders that could cause rendering issues in VR.
81+
82+
For more information on SPI requirements, see Unity’s documentation on [Single-pass instanced rendering and custom shaders](<https://docs.unity3d.com/Manual/SinglePassInstancing.html>).
83+
84+
## Missing or Broken Shaders
85+
86+
`Severity: Error`
87+
88+
Finds materials using the built‑in error shader or shaders that failed to compile. Unity's error shader is not SPI compatible (only renders in one eye in VR). This blocks building until all shaders compile and no materials reference the error shader.
89+
90+
## Requires Streaming Mipmaps
91+
92+
`Severity: Error` `Autofix Available`
93+
94+
Ensures that every texture used by a MeshRenderer or SkinnedMeshRenderer has Streaming Mipmaps enabled. Unity uses mesh bounds and UVs from these components to determine which mip level to load at runtime. Without streaming, all mip levels are loaded which increases GPU memory usage and can reduce performance.
95+
96+
This validation reports an error for any supported renderer using textures without streaming enabled.
97+
98+
See the Unity documentation for more information:
99+
100+
* [How Unity calculates the required mip level](https://docs.unity3d.com/2022.1/Documentation/Manual/TextureStreaming.html#calculate-mip-level)
101+
* [Limitations](https://docs.unity3d.com/2022.1/Documentation/Manual/TextureStreaming.html#limitations)
102+
103+
###### Autofix
104+
105+
Enables Streaming Mipmaps on textures used by MeshRenderer and SkinnedMeshRenderer components
106+
107+
## Unsupported Streaming Mipmaps
108+
109+
`Severity: Warning` `Autofix Available`
110+
111+
Detects textures with Streaming Mipmaps enabled that are not used on supported renderer components. When used on particle systems or other components without mesh bounds and standard UVs, Unity cannot calculate the correct mip level and defaults to low-resolution mips. This results in blurry textures.
112+
113+
This validation reports a warning for any texture with streaming enabled in unsupported use cases.
114+
115+
See the Unity documentation for more information:
116+
117+
* [How Unity calculates the required mip level](https://docs.unity3d.com/2022.1/Documentation/Manual/TextureStreaming.html#calculate-mip-level)
118+
* [Limitations](https://docs.unity3d.com/2022.1/Documentation/Manual/TextureStreaming.html#limitations)
119+
120+
###### Autofix
121+
122+
Disables Streaming Mipmaps on textures used outside of supported renderers
123+
124+
## Texture Too Large
125+
126+
`Severity: Error` `Autofix Available`
127+
128+
Finds textures with import dimensions larger than `8192×8192` pixels. These textures are too large for practical use and can significantly increase memory usage. This validation blocks building until all oversized textures are addressed.
129+
130+
###### Autofix
131+
132+
Clamps the texture’s import size to 8192 or lower without modifying the source image.
133+
134+
## Non Legacy Blendshape Normals
135+
136+
`Severity: Error` `Autofix Available`
137+
138+
Identifies meshes whose blendshape normals import mode is set to Calculate. Calculated normals greatly increase file size and can cause lighting artifacts when blendshapes are changing. This blocks building until the import mode is changed to Legacy or None.
139+
140+
###### Autofix
141+
142+
Sets blendshape normals import mode to Legacy on affected meshes
143+
144+
## Missing Scripts
145+
146+
`Severity: Error` `Autofix Available`
147+
148+
Finds any GameObject with missing MonoBehaviour references. Missing scripts cause the build to fail. This blocks building until all missing references are removed.
149+
150+
###### Autofix
151+
152+
Removes missing script components from affected GameObjects

0 commit comments

Comments
 (0)