- Home /
Question is off-topic or not relevant
Make damage screen ui image
Hi friends.I want to display the bloody screen (With UI unity) when it comes to me, and no matter how much my blood feels , the percentage of transparency becomes less, that is, to the darkness (like call of duty) , And now that's how I can put the enemy's position in the UI when it's fired. sorry for my english type!
Hello.
We are developers, not players. we don't know what effect you are sayig... paste a video link of this CAll of dutty effect so we know what are you talking about...
hello I mean, when it hits, the blood screen is displayed through UI Image unity Something like that, please see this : http://lovattostudio.com/Demo/DHUD/DamageHUD.html https://vimeo.com/68207738
Answer by tormentoarmagedoom · Jun 06, 2019 at 10:59 AM
Hello again.
You need to create a canvas, set its render mode option to "Camera Space" so it will be in front of the camera.
Make the canvas with all images (blood) you want at 0 transparency.
Then, you only need to add a CAnvasGroup compoennt, wich allows you to change the alpha value (transparency) of all images in the canvas toghater.
Watch the manual: https://docs.unity3d.com/Manual/class-CanvasGroup.html
So, by code, you only need to change this alpha value to 0 (100% transparent) at the start of the scene, and change the value whenh you recieve damage.
Bye!
Can you explain more?How much transparency can be with health? I would appreciate if you explain the code to me.
Follow this Question
Related Questions
Fade In / Out UI Image 3 Answers
Instantiating Image makes whole Canvas disappear in Playmode 1 Answer
How to fine-control UI elements scale 0 Answers
Scaling game to fit screen size 2 Answers