Daily Unity Notes

Andrei Marks · February 25, 2012

PSD Alpha Channel Not Importing Properly

This is one of those answers (to a question about a system that you can manipulate but don’t yet entirely understand) that is so on point and so simple that it not only answers your specific issue, but illuminates how the system works in the first place.

If you’re trying to import a psd with an alpha channel into Unity, if there’s any transparency in the base image, that transparency will get imported as the alpha channel instead.

http://answers.unity3d.com/questions/34697/texture-alpha-channel-not-importing.html

Also, Trigonometry and C#

I’m also going through a trigonometry textbook so I can have a clearer grasp of what’s going on in lots of game math. The vague recollections I have from high school just won’t cut it.

I’ve also been mucking about with C# in Unity, but I’d like to go through some more basic tutorials just in case there’s really simple syntax that I could be using but haven’t yet needed to learn because I’ve been bogged down in more specific Unity API stuff.

ARRAYS!

http://robotduck.wordpress.com/2009/11/04/88/

C# Coroutines!

http://answers.unity3d.com/questions/9315/how-can-i-use-startcoroutine-in-update.html

Actually putting these into effect in a project now…wow they’re cool.

Fade In/Out Screen

http://unifycommunity.com/wiki/index.php?title=FadeInOut#C.23

So I learned you can just make a texture on the fly. new Texture2D(h,w);

camera.ScreenToWorldPoint(Vector3);

Pretty helpful comment:

Never tried what I'm going to tell you but take a look at this: http://unity3d.com/support/documenta...orldPoint.html You have to pass a 3d vector. Now when you only pass your mouse position, the .z (depth) value will always be zero and thus exactly at your cameras position. So the position in the world will always be your camera position. You have to pass a .z value or may use tracing.

Twitter, Facebook