Mar
2
2019

Create Gradient Texture From Array of Colors

Small tool to generate gradient Texture2D from array of colors. (Note: maximum colors is 8, since it uses unity Gradient internally ( https://docs.unity3d.com/ScriptReference/Gradient.html ) Source:https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Scripts/Texture/GradientTextureMaker.cs Example usage script: (attach script to some 3d object)https://gist.github.com/unitycoder/f7ea9019bb67b7042efbd08f0f4fa785

Dec
20
2018

Marching Ants Sprite Outline Shader

Saw interesting question here https://forum.unity.com/threads/animated-outline-effects-using-shader.600028/ and unity sprite outline https://github.com/wlgys8/Sprites-Outline + stackoverflow https://stackoverflow.com/a/16856878/5452781 to the rescue! (although this is for 2D sprite..) Results: TODO – Test how this would look with screenspace values (to keep same size even if zoomed) – Maybe could check neighbor pixel […]

Dec
13
2018

Adding Multiple Submit Keys to Input Manager

Had to make an UI button clickable by multiple different keyboard keys (like enter, space, left/right shift etc.) And almost started writing custom script to handle extra keys when selecting UI button.. but then realized that you can duplicate Input Manager keys, and sure enough […]

Dec
3
2018

DllNotFoundException: libnuitrack – nuitrack.NativeNuitrack.Init

Briefly tested https://nuitrack.com/ in unity, and had this error when trying to run examples: DllNotFoundException: libnuitrack nuitrack.NativeNuitrack.Init (System.String config) nuitrack.Nuitrack.Init (System.String config, NuitrackMode mode) NuitrackManager.NuitrackInit () (at Assets/NuitrackSDK/Nuitrack/NuitrackManager.cs:218) NuitrackManager.Awake () (at Assets/NuitrackSDK/Nuitrack/NuitrackManager.cs:117) There is a thread about it in nuitrack forums, https://community.nuitrack.com/t/dllnotfoundexception-libnuitrack/562/23 and the solution […]

Nov
30
2018

Sprite Sheet Flip Book Shader

Converted this old animated sprite sheet script into shader, its useful for animating sprites from sprite sheet. (when Animator is too heavy for simple sprite animation) Could be extended to have billboard option. Shader source: *Updated: 30/11/18 to fix index wrapping and UV direction https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Sprites/FlipBook.shader […]

Nov
20
2018

Use adb logcat with Colors

Had problems finding some Debug.LogError messages in the android logcat output, so googled around and sure enough you can enable output colors easily! Just add -v color parameter: adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG -v color Note: Default windows Command Prompt doesn’t support […]

Oct
31
2018

Find Nearby Objects using CullingGroup

Saw this tip at #UniteKL18, fast way to get nearby objects using CullingGroup! (main image with 5000 gameobjects, searching objects within 3m radius) example source code: https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Scripts/Docs/UnityEngine/CullingGroupExample.cs my example project: https://github.com/unitycoder/GetNearestObjectsWithCullingGroup Some notes on that: – You need to have MainCamera in the scene (as […]

Oct
19
2018

HSV Debugging and Color Match Shader

Quick test for color matching using shader, by converting colors into HSV and comparing target color with h-s-v threshold values. See Shader source at the bottom. (main image: Changing target color, shows inverted color for the texture in that matching hue position) Shader has different […]

Oct
14
2018

[External Tool] Search Text In Files

I couldn’t find a simple free tool for searching text in files.. so had to make one : / Seems to work well enough already, main just using it for searching unity builtin shader sources 🙂 Still few features to be added.. Sources & Download […]

Oct
3
2018

Convolution Filter Test

Quick test for simple convolution filter with unity Texture2D (using c# script, not shader) Source project: https://github.com/unitycoder/ConvolutionFilter  

Pages:«1...78910111213...50»

Connect

Twitter View LinkedIn profile Youtube Youtube Join Discord Twitch

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.