WaitForSeconds and Time.timeScale = 0

So, it turns out that Unity’s WaitForSeconds is using scaled time, which means that you can experience all sorts of weirdness when waiting for a precise number of seconds and scaling time, say in a pause screen. using System.Collections; using UnityEngine; public class Pause : MonoBehaviour { void OnEnable() { Time.timeScale = 0f; StartCoroutine(Countdown(3)); } […]

Masking and clipping textures in Unity 5.4, NGUI 3.9.8

Two and a half years ago I made http://nickithansen.dk/masking-and-clipping-textures-using-shaders-in-ngui/ which in the mean time has broken in various ways. Ankh, in the comments, was kind enough to remind me to do something about that, so here is a new version that works in the newest versions of Unity3D and NGUI. Shader “Custom/MaskClipShader 1” { Properties { […]

Masking and clipping textures using shaders in NGUI

A question that showed up on Tasharen’s forum, where I happen to be a moderator, was this one: (..) I have a panel that’s draggable and clipped, which displays a list of GameObjects, each one composed of usernames, avatars, and some other text. The avatars are not square, they have an hexagonal mask. To achieve […]

New website

Hello folks. I’ve decided to change my website to use wordpress as a base, which will make it easier to make blogposts about stuff I think are interesting. I looked into the solutions for blogs out there, tumblr, blogger but none of them seemed really to offer the freedom I wanted. I first implemented wordpress […]