Bad File Length error!
I made a Unity3D game back in January of 2011. I no longer have the original source files for the game, but I do have the compiled webplayer.unity3d file. However, nowadays when I try to view it, it...
View ArticleTextures randomly stretching on certain polygons?
This is what is happening... ![alt text][1] [1]: /storage/temp/23358-stetching+textures.jpg The texture that is stretching is the big grey one in the middle. This whole room is one single mesh. I've...
View ArticleHow do you make light only hit part of a mesh?
I'm trying to use "layer" to select what part of my scene is affected my a directional light. Problem is, even with Pro Builder installed in Unity, if I set a particular peice of a mesh to a certain...
View ArticleMake object lay flat on a sphere + look up?
Looking around I found a youtube video (at https://www.youtube.com/watch?v=gHeQ8Hr92P4) which explained how to make a object, such as a player character, walk around on a sphere while keeping its...
View ArticleChanging Y rotation in Editor also changes X and Z?
I notice that if I'm not running / playing the game, if I change the Y rotation of an object in my scene, it only changes the Y rotation (es expected). But if I play the game by clicking the play...
View ArticleIs there a limit on the distance of raycast?
I'm using this line of code: if (!Physics.Raycast (Camera.main.ScreenPointToRay(Input.mousePosition), hit)) return; And the purpose is to detect if the mouse cursor touched a mesh collider. And it...
View ArticleUnity 5 trees have white dots...
Why are there white dots in the trees in unity 5? No matter what tree package I download from the asset store, same thing. No matter what shader those trees are using, same thing. White dots when the...
View ArticleSmooth terrain LOD transitions?
I'm using Unity 5 and I notice that unity appears to be automatically applying some sort of LOD (level of detail) effect to my terrain. I like that. But, it give a fairly obvious "snap" appearance as I...
View ArticleWhy don't trees block the sun flare?
My tree prefabs are set to layer "ignore raycast". My flare is a direction light with flare "sun". The flare goes right through the trees which looks unrealistic. What's the correct way to set this up?...
View ArticleWhy are my trees turning pale?
I'm using the tree creator, and I have 4 trees with textures and materials. Over time, as I worked on my scene (I was working on shadows, terrain textures and sun flares)... I began to notice my trees...
View ArticleReal pivot rotation of all vertices in a mesh?
I need to rotate a mesh by actually moving all the vertices, NOT by changing the transform.rotation of the gameobject. In other words, the mesh should rotate by the vertices, but the tranform.rotation...
View ArticleCreate a terrain prefab? Saving a terrain? No?
It seems like this should be intuitive. I should be able to save a terrain. Right? What's going on here? As I read through forums and documentation online, I'm seeing people writing their own scripts...
View ArticleTerrain LOD?
I notice there is some automatic level of detail happening on my terrains. I need to increase / decrease this terrain LOD. Where do I go to change the LOD settings for terrain, and is there a way to...
View ArticleMesh triangles don't match wireframe view?
So I have a mesh of a sphere made out of lots of fairly evenly shaped triangles. When I switch the scene view to "wireframe", I can easily see the triangles of my mesh. I assumed that if I got the...
View ArticleRotate a sphere by its vertices...
Hi, I need to rotate a sphere so that the pink vertex moves to the north pole where the blue vertex is. The whole sphere needs to rotate. I figure something like Quaternion.FromToRotation but I'm not...
View ArticleAccess terrain alphamaps directly? To clone them?
How do you clone a terrain's alphamap? It's inaccessible according to unity intellisense? In case anyone reading this doesn't understand: setalphamaps() changes all clones of the terrain. Not just the...
View ArticleWebplayer shadows are low quality?
I'm using Unity 4.6, and yes, I set the graphics settings for web player output to "fantastic". And yes, I did it specifically for web player output (repeating that statement, for emphasis). Shadows on...
View ArticleCan a camera cull lights on certain layers?
If I put a light into a layer, and then I tell my camera to cull that layer, the camera still sees the light. What I'm trying to do is have a camera that looks back at my own character (rear cam), so I...
View ArticleNGUI typing into UI makes my character jump!!
Ok so I'm using NGUI and it works great except every time I type a space, my character jumps because that's also my jump key. And anytime I press W+A+S+D my character moves. I looked around online for...
View ArticleCan you have multiple materials on a single polygon?
So I have a wall that's one big square polygon, or maybe it is two triangles (faces) that make a square. Great. Now I want to put multiple material(s) on that wall. For example: 1) A wallpaper that...
View ArticleAccess a script that has NO class?
I have a script I downloaded, and it works great, however it has NO class declaration! I want to access it from another script, to change its variables, but I can't figure out how to use...
View ArticleEdit anim or FBX file that's linked to Mechanim? Can't?
Okay so I have downloaded several "huge" mocap animation databases, with FBX animation files. Great. Now I want to fix some of them that have bad or wrong movements of joints. I can't do this in Unity?...
View ArticleSwitching shader back and forth fixes transparency issue?
Ok so I have a planet, with: 1) Water (Unity Standard shader set to simi Transparent) 2) Land (Opaque) 3) Fog of War (solid black color, alpha cutout shader, simi transparent). When my fog of war is...
View ArticleReplace GameObject with another GameObject and preserve references without...
This question has been asked before but nobody has ever actually answered it. Everyone has just provided work-arounds and alternate solutions. In my case, I am writing a plugin that needs to replace a...
View ArticleClear ALL undo history for entire scene
Hi, I just want to clear ALL undo history for an open scene. Meaning that if you click Edit -> Undo, nothing would happen. I know this can be done saving and reloading the scene, but I'd rather a...
View ArticleTake screenshot of pixels OUTSIDE the game window?
I'm wanting to create a program, not really a game, but a software that records parts of the screen for the user. I decided that I'd like to use shaders to help with the video processing, and since I'm...
View ArticleIs it possible to run Unity shader outside of Unity?
Now that I've gotten "so good" at making shaders in unity, I can't imagine trying to work with pixels without using shaders. That said, sometimes I do programming outside of Unity, such as c#...
View ArticleGet mouse's pixel position on the monitor, independent of the game window's...
I need to to simply know the mouse's position, where 0,0 is at the bottom left corner of the whole monitor, and not the bottom left corner of the game window. I could calculate the position of the...
View ArticleEasy way to render a texture, pixel perfectly, with a shader, and get the...
Normally to render a texture, with a shader, and get the result, you have to: 1) Attach the texture to a material. 2) Attach that material to a quad. 3) Get that quad to somehow fit the full area of a...
View Article