Catlike Coding's C# and Shader Text Tutorials

Great tutorials, they work for me.

:slight_smile: Great! Thanks for telling.

Hi Jasper,

i did the first and the second Tutorial. They were very, very good! I learned a lot!! Right now i am doing the sidescoller tutorial and it works perfect for me. You explain very good and I got never lost! Would love to see other tutorials as well :wink:

Keep going!!!

Cheers

I’ve updated the Clock tutorial to Unity 4. Mostly some small visual changes, some Q&A tweaks, and the download is now a unitypackage.

I’m also working on new tutorials. Started out as just one, but got way too big so instead I’m working on a series.

The Graphs tutorial has been updated as well. It has some new tidbits, like the Range attribute and programming while staying in play mode.

Thanks. I really liked your tutorials. Couldn’t complete the last one though, it was really hard.

You mean the Star one? I also need to update that one to Unity 4. Was there something specific you got stuck with?

Finally, Runner is now fully up-to-date with Unity 4!

I added a new tutorial. It’s part of an upcoming set that will replace the Star tutorial.

Custom Data, an introduction to serialized classes and property drawers
This tutorial shows how to create a custom data type and how to write a property drawer for it.

Thanks a lot Jasper! I started to work through two of your tutorials and they are great. I’ve learned so much in a short period of time!

Finally some text tutorials! Thanks for making these.

@0x12 Overx: Great to hear they’re useful!

I just released the second editor tutorial of the set.

Custom List, displaying data your way
This tutorial shows how to use an attribute and a property drawer to customize how lists are shown in the editor.

And the third editor tutorial is out! I also kept the old Star tutorial available, for those who still use Unity 3.

Star, an introduction to custom editors
This tutorial shows how to use an attribute and a property drawer to customize how lists are shown in the editor.

Dude, your graph tutorial is such a badass! I’m totally impressed! I’ve been wanting to do this years ago! (didn’t know Unity at that time) - I used to draw stuff with nucala (simple grapher) - But your stuff is crazy! - Please tell me you’re not a super genius and you didn’t come up with all the equations/functions by yourself! o.o - Where did you get the functions equations from? - Thanks a lot!

I hope you can answer me soon about those formulas, I’d really appreciate. I’m currently trying to graph a heart shape, no luck :confused:

@vexe: The functions are simple combinations of basic mathematics, nothing special. Especially sines can be pretty all by themselves.

A heart shape is more complex, as it consists of multiple parts. Below is an example I made from a formula I grabbed from the web. First I scale it to fit inside the graph’s 0-1 domain and add a time-based pulse to it. Then I precompute some squares and a cube of the coordinates, which makes it easier to see what’s going on. Then I describe a sphere flattened on the Z-axis. Then I mold it into a heart-shape, whose boundary is where the formula hits zero.

	private static float Heart (Vector3 p, float t){
		t = Mathf.Sin(t);
		t = 3f - 0.5f * t * t;
		p *= t;
		t *= 0.5f;
		p.x -= t;
		p.y -= t;
		p.z -= t;
		
		float
			x2 = p.x * p.x,
			y2 = p.y * p.y,
			y3 = p.y * y2,
			z2 = p.z * p.z;
		
		float s = x2 + y2 + z2 + z2 - 1f;
		s = s * s * s;
		
		return s - z2 * y3 * 0.1f - x2 * y3 <= 0f ? 1f : 0f;
	}

1376130--69606--$heart.png

Hi I just tried this but it does not work.
I have sent you an email.

Cheers,
Steve

@Cereal_Killa: It works just fine for me, with Unity 4.2.2f1. What version are you using? Are you getting any errors? Does the script compile?

I have updated the Clock, Graphs, and Runner tutorials to Unity 4.3. The screenshots now show the new editor UI and I fixed some typos and inconsistencies.

The editor tutorials still need to be updated. They require extra work because of some changes to Unity’s editor API.

@Jasper thanks for everything really appreciated. I’m currently trying to learn writing custom inspectors and editor scripting. I found your tutorials to be nice. But at the top of each tutorial it says “needs to be updated to work with 4.3” or something. Can’t I take the stuff from the tutorial as is and learn from them? or do I have to wait for you to update them? if so… please consider taking the time doing so. There is very little material on that subject in the internet. Thanks. And keep us updated.