Can anyone explain the decal scripts of the BootCamp Demo?

I would really appreciate it.
The bootcamp has decals which simply work, don’t show beyond corners and seem to work great.
I researched the topic of decals (especially for bullet holes) quite a bit and I haven’t found a good explanation of how to do it (or a solution which works well without the decal showing beyond corners or over edges of objects).
I know there is the decal package on the asset store but I’m really trying to UNDERSTAND how it works.
Many thanks!!!
Daniel

For the decal system to work, all the decal scripts needs to be in the right folders(same file structure as the Boot camp demo).
If you use the decal system on complex geometry and push distance is greater than zero the decal mesh might get messed up because its offset from the original geo is based on the normals. To solve this, find this part of the scrip:

vert_= nNormals * pushdistance;_
and change nNormals to a direction vector pointing away from your original geometry.