internal static void SaveAtlasAndConfigureResultMaterial(MB3_TextureCombinerPipeline.TexturePipelineData data, MB2_EditorMethodsInterface textureEditorMethods, Texture2D atlas, ShaderTextureProperty property, int propIdx)
        {
            bool doAnySrcMatsHaveProperty = MB3_TextureCombinerPipeline._DoAnySrcMatsHaveProperty(propIdx, data.allTexturesAreNullAndSameColor);

            if (data._saveAtlasesAsAssets && textureEditorMethods != null)
            {
                textureEditorMethods.SaveAtlasToAssetDatabase(atlas, property, propIdx, doAnySrcMatsHaveProperty, data.resultMaterial);
            }
            else
            {
                if (doAnySrcMatsHaveProperty)
                {
                    data.resultMaterial.SetTexture(property.name, atlas);
                }
            }

            if (doAnySrcMatsHaveProperty)
            {
                data.resultMaterial.SetTextureOffset(property.name, Vector2.zero);
                data.resultMaterial.SetTextureScale(property.name, Vector2.one);
            }
        }