Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hi, I'm using 3D models and model items as UI buttons. to fake a highlight onClick, i want to change and reset the color of the model-item. I know how to set the color, but I seem unable to reset the color field with "null", so that the original texture is visible again. basically no color at all.
I tried multiple things for
$scope.app.view.Home.wdg[widget].color = 'rgba(x,x,x,x)';
saving the initial value of color and resetting it doesnt work, setting it to null, or any other rgba color didnt seem to do the trick. I would really appreciate a little hint, since this is most likely just a small issue 🙂
Solved! Go to Solution.
So i do exactly this in experiances and use the $scope.setWidgetProp function. If i remember right it doesn't work with the function you are trying to use.
$scope.setWidgetProp(studioID, "color", "rgba(255,0,0, 1)"); //set color to red $scope.setWidgetProp(studioID, "color", ""); //restore color to default
So i do exactly this in experiances and use the $scope.setWidgetProp function. If i remember right it doesn't work with the function you are trying to use.
$scope.setWidgetProp(studioID, "color", "rgba(255,0,0, 1)"); //set color to red $scope.setWidgetProp(studioID, "color", ""); //restore color to default
Hi, thank you for your replies to all my questions.
Your proposed code "$scope.setWidgetProp(studioID, "color", "")" works on the actual Hololens.
Testing it in the Preview window though does not!
I see similar behavior. For me this doesn't work in Preview but does one Android and iOS devices. I have found a few places where the Preview doesn't match real use, this is one of them. I have learned that if I do something that really seems like it should work and it doesn't in Preview I always test it on a device to confirm before trying another method.