Link to home
Create AccountLog in
Avatar of James Hancock
James HancockFlag for United States of America

asked on

Unity games - how are images best enlarged in C# to the center of the screen?

Hi

In my Unity C# game, - I'd like it if my players could press any of the puzzle clue sprites and have it shown in the center of the screen, briefly, appropriately enlarged, so anyone who finds a clue pic unclear can really look at it v. closely.


How might I prompt an image object to be cloned ?  and appear enlarged in the middle for 4 seconds? A timer in my singleton and a pointer to it to delete the clone? An update method for the clone?


Thanks

Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

What about a generic custom modal?

pop up a modal form, centered on screen.

I would lose the 4 seconds.  Allow them to look at it for as long as they'd like, add a close button to the bottom or allow them to close the form on the top right.

If you were set on the timer you could just add a timer.Start() to the form_open event and then on tick close the modal.


Good  tutorial here:
https://www.youtube.com/watch?v=SzQABx2YTJA


ASKER CERTIFIED SOLUTION
Avatar of dfke
dfke

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of James Hancock

ASKER

Thanks.

Can I just double the size of the original image ( maybe a clone - to the center) - in code? and set off a timer handler to hide it after 4 seconds?
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account