DezOnlyOne Posted August 18, 2016 Share Posted August 18, 2016 I have a few sprites that I am using for info panels in certain camera views. I want to hide and show different sprite panels depending on the camera angles. I really just need to know how to hide a sprite. Am I missing something? Shouldn't this be something simple to do? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 18, 2016 Share Posted August 18, 2016 not sure, i have not worked with sprites yet but id assume: sprite.isVisible = false; or like sripte.setEnabled(false); Quote Link to comment Share on other sites More sharing options...
DezOnlyOne Posted August 18, 2016 Author Share Posted August 18, 2016 8 minutes ago, Pryme8 said: not sure, i have not worked with sprites yet but id assume: sprite.isVisible = false; or like sripte.setEnabled(false); I tried that earlier, but it doesn't work. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 18, 2016 Share Posted August 18, 2016 dispose it and then recreate it when needed? Turn its alpha color to 0? Im assuming your rotating a camera around a sprite like a character and have different sheets for if its the side vs front ect... So I would lean tword disposing. Quote Link to comment Share on other sites More sharing options...
DezOnlyOne Posted August 18, 2016 Author Share Posted August 18, 2016 10 minutes ago, Pryme8 said: dispose it and then recreate it when needed? Turn its alpha color to 0? Im assuming your rotating a camera around a sprite like a character and have different sheets for if its the side vs front ect... So I would lean tword disposing. I am not sure why turning its alpha to 0 does not work, but it didn't. dispose gets rid of it, but for some reason when I recreate it does not come back. Quote Link to comment Share on other sites More sharing options...
adam Posted August 18, 2016 Share Posted August 18, 2016 It's not ideal, but you can set the size to 0. Quote Link to comment Share on other sites More sharing options...
DezOnlyOne Posted August 18, 2016 Author Share Posted August 18, 2016 For brevity's sake I went ahead with size 0. Thanks everyone. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.