New answers tagged

0

There's nothing particularly special in how font rendering is handled in OpenTK. OpenTK - among other things - contains an OpenGL wrapper. And as such any techniques you'd use to render text in OpenGL apply here, namely: Using bitmap fonts - loading font atlas texture and rendering textured quads. BMFont Using geometric primitives (triangles/quads) to ...


2

You can use a coroutine to change the alpha. You'd attach a CanvasGroup component to the UI's container object. Then adjust the alpha like so: public class Fade : MonoBehaviour { public float changeTimeSeconds = 5; public float startAlpha = 0; public float endAlpha = 1; float changeRate = 0; float timeSoFar = 0; bool fading = false; CanvasGroup ...


2

Another approach, non-programmatically: Add animator component to your Text element. Create an animator asset for it, or: Select your text and Ctrl+6. In the opened window, click 'Create animation', that will add Animator component and Animator controller asset. Click add property and select Text->Color. Click on Color.a Click on Curve editor tab. You ...


7

Here is a rather simple extension class that you can use. public static class GraphicExtensions { /// <summary> /// Fade methods forUI elements; /// </summary> /// <param name="g"></param> public static void FadeIn(this Graphic g) { g.GetComponent<CanvasRenderer>().SetAlpha(0f); g.CrossFadeAlpha(1f, ....


2

There are the built-in functions to show textboxes to the user: Read strings or integer from the user: get_string(...); (for debug purpose only) get_string_async(...); get_integer(...); (for debug purpose only) get_integer_async(...); Show a dialog to load and save files: get_save_filename(...); and get_save_filename_ext(...); get_open_filename(...); ...



Top 50 recent answers are included