Right approach to change materials of actors by widget

I have solved the issue with the motion controller. On the testcube it works good…