Skip to content

Commit

Permalink
fix(Pointer): ensure material change is done correctly
Browse files Browse the repository at this point in the history
The `ChangeMaterial` method in the BasePointerRenderer script was
only being called if the current colour was different to the previous
colour, however it should only be called if the current colour is
not `Color.clear` otherwise it can be set incorrectly.

This fix ensures the pointer colours are set correctly.
  • Loading branch information
thestonefox committed Jun 21, 2017
1 parent 77ddf36 commit 0676113
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,11 @@ protected virtual void ChangeColor(Color givenColor)
if (givenColor != Color.clear)
{
currentColor = givenColor;
ChangeMaterial(givenColor);
}

if (previousColor != currentColor)
{
ChangeMaterial(givenColor);
EmitStateEvent();
}
}
Expand Down

0 comments on commit 0676113

Please sign in to comment.