18
2020
Debug.Log: Show actual color from Color variable
Had to debug what color is the script returning for mouse pixel position, but printing out the value didn’t really help:Debug.Log(col);
Since the output is like this (you don’t know whats the actual color)RGBA(0,349, 0,204, 0,416, 0,000)
Enter Debug.Log with <color></color> and utf8 block:Debug.Log("<color=#"+ColorUtility.ToHtmlStringRGB(col)+">
██████████</color> = "+col);
Snippet, if copying from blog is messed up:
https://gist.github.com/unitycoder/37872953bd27901391ed0b27d4702e9c
Related Posts
Leave a comment
Recent posts
- MotionVector Effect: Object “disappears” when paused
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
Recent Comments
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on