Skip to content

Commit

Permalink
Improve color modifier docs and rename private fld
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeTwentyThree committed Dec 27, 2024
1 parent 7ec1bef commit d367f2e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Nautilus/Utility/MaterialModifiers/ColorModifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ namespace Nautilus.Utility.MaterialModifiers;
/// </summary>
public sealed class ColorModifier : MaterialModifier
{
private Color color;
private readonly Color _color;

/// <summary>
/// Sets the <see cref="Material.color"/> property on all materials.
/// </summary>
/// <param name="color"></param>
/// <param name="color">The new color to be used.</param>
public ColorModifier(Color color)
{
this.color = color;
_color = color;
}

/// <summary>
/// Applies the color changes to the material.
/// </summary>
public override void EditMaterial(Material material, Renderer renderer, int materialIndex, MaterialUtils.MaterialType materialType)
{
material.color = color;
material.color = _color;
}
}

0 comments on commit d367f2e

Please sign in to comment.