From 5f4c30b3aec8a1e11dbcc7c1134a0563c9965437 Mon Sep 17 00:00:00 2001 From: ManlyMarco <39247311+ManlyMarco@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:19:32 +0100 Subject: [PATCH] Update docs --- doc/KKAPI.Utilities.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/KKAPI.Utilities.md b/doc/KKAPI.Utilities.md index 4ad263e..a1183c6 100644 --- a/doc/KKAPI.Utilities.md +++ b/doc/KKAPI.Utilities.md @@ -138,6 +138,13 @@ public static class KKAPI.Utilities.IMGUIUtils ``` +Static Fields + +| Type | Name | Summary | +| --- | --- | --- | +| `GUILayoutOption[]` | EmptyLayoutOptions | Empty GUILayoutOption array. You can use this instead of nothing to avoid allocations. For example: GUILayout.Label("Hello world!", IMGUIUtils.EmptyLayoutOptions); At that point you might also want to use GUIContent (created once and stored) instead of string. | + + Static Properties | Type | Name | Summary | @@ -336,6 +343,7 @@ Static Methods | Type | Name | Summary | | --- | --- | --- | +| `Texture2D` | GetVisibleTexture(this `Sprite` spr) | Gets texture as it is shown by this sprite. If it's not packed then returns the original texture. If it's packed then this tries to crop out the part that the sprite is supposed to show and return only that. | | `Texture2D` | LoadTexture(this `Byte[]` texBytes, `TextureFormat` format = ARGB32, `Boolean` mipMaps = False) | Create texture from an image stored in a byte array, for example a png file read from disk. | | `Texture2D` | ResizeTexture(this `Texture2D` pSource, `ImageFilterMode` pFilterMode, `Single` pScale) | Create a resized copy of this texture. http://blog.collectivemass.com/2014/03/resizing-textures-in-unity/ | | `Sprite` | ToSprite(this `Texture2D` texture) | Create a sprite based on this texture. |