unitybuildsystem build asset bundle by rule or by need, check asset bundle duplicate rate the code is at Unity/Assets/BuildSystem/Editor