Mouse Click To World Pos
I have a plane with a grid on it, and when I click it I need to know where the mouse clicked on it in world coordinates. I'm using JavaScript and Unity Free.
View ArticleFind Raycast Distance
How can I cast a ray and find the distance from where it started to where it hits an object? I'm using Unity Free and JavaScript.
View ArticleRight Mouse Down?
How can I check if I have right clicked on a collider? I know how to use: function OnMouseDown () {} But is there one for right clicking??
View ArticleDetecting Mouse Scroll Wheel?
I'm tying to make it so that when I scroll with the mouse wheel in moves the transform that the script is attached too forward and backward. How can I do this? I'm using Unity Free and JavaScript.
View ArticleEval not working??
I'm trying to use eval() in my script, but I keep getting this error about it: (1,1): BCE0172: `UnityScript.Scripting.IEvaluationDomainProvider' interface member implementation must be public or...
View ArticleGUI.TextField int?
Is there a way to pass GUI.TextField an int instead of a string? I need the user to be able to enter in a number into a text field, then the script passes that number to an array to get the...
View ArticleGUI Color Selector?
How can I make a GUI Color selector? Like this: ![alt text][1] [1]: /storage/temp/14967-color+selector.png I know it can be done because I've seen other people do it. Do you know how I can?
View ArticleFind IP Adress?
How can I find what the computer running the games IP address is from code?? I'm using Unity Pro and UnityScript. I'm setting up a networking system and need to know the IP address.
View ArticleHow Can I Get The Name Of The Game From Code?
I'm writing an editor add-on, and need the code to be able to get the name of the game running the add-on. I'm using Unity Free and UnityScript.
View ArticleMake A Laser?
I'm trying to make a laser for a weapon in a space ship game I'm making but not having much luck. I've tried using raycasts and a line renderer but then the line only shows when you hit something and I...
View ArticleLine Renderer Question
Using a line renderer, how can I make it draw a line from the object that the script is attached to, to straight out in front of it for an endless distance? I know how to use the line renderer but have...
View Article[CLOSED] Send an E-mail with unity
How can I send an E-mail with unity? I'm using Unity Free and C#.
View ArticleImport Managed .Dll
How do I import a .dll into my javaScript and C# Scripts? The .dll is in the plugins folder and is called Voice_speaker.dll. I've been looking how to do this for the last half hour. Also how do I...
View ArticleMecanim Capsule Collider Issue
I've been having an issue all day with Mecanim and I just can't solve the issue. The issue is that I have set up my collider right in the editor as so: ![alt text][1] The collider is all set right, but...
View ArticleNullReferenceExeption
Hey guys, So I'm writing a scrip for a game I'm working on, and I keep getting a NullReferenceExeption. I have been using unity for almost a year, but I still can't figure it out. It's on line 24, the...
View ArticleUnhandled Exception: System.UnauthorizedAccessException
Hey guys, So I have been having this issue for awhile now. Where Unity says the comuter refused permission for it to access the compilers. Here is the error: Internal compiler error. See the console...
View Articleint to TextField and TextField to int
I'm trying to use theGUILayout.TextField to display and edit an int. But I keep getting "FormatException: Input string was not in the correct format" on what I know should work. My code is: x =...
View ArticleTerrain Heightmap issues
I'm creating a tiled/chunk based terrain system. Instead of generating multiple terrain heightmaps, and attempting to stitch them together, I'm generating one large heightmap that is broken into pieces...
View ArticleImprove performance whilst using a TON of objects
So I'm currently working on a project where I'm importing GIS soil sample data into unity. I'm going to be visualizing it using a voxel/minecraft like system, where each voxel is a soil sample. I've...
View ArticleImprove performance when using a ton of primitive cubes
I'm currently working on a project where I need to instantiate around 9 million cubes based off of an image. There are plain primitive cubes, with no colliders, but even so, they freeze, and then crash...
View ArticleHeightmap to mesh
I'm looking for a way to convert a heightmap I have to a mesh, or more specifically, a plane with the heightmap deforming it. Is there any easy way to do this? (terrains are not currently an option)
View ArticleHow to UV a texture over the mesh with no tiling
So I'm currently generating a mesh based off a heightmap, and then I want to uv the mesh so that the heightmap texture is aligned with the created mesh. I've been using uvs.Add(new Vector2(Startx+i /...
View ArticleAlign rotation when using ScreenToWorldPoint
I'm using ScreenToWorldPoint to position some gameobjects on one side of the screen. The problem is that they are not aligned corrected because the camera is rotated. ![alt text][1] As the can see in...
View ArticleRemove vertices and triangles that are at a cirtain y value
Currently I'm generating a mesh at runtime based off of a heightmap. I have the UV unwraping and heightmap generation all working, but now I have an issue where I want there to be no mesh where there...
View ArticleHelp with converting script
I'm converting the "Zig-Zag" approach from [here][1] to c# in Unity. I've started the conversion, and it's nearly working, but there are a couple things I'm not sure how to convert. Here is my...
View ArticleRect.contains with mouse position in editorwindow
I have custom editor window, and I'm trying to detect when my mouse is over a GUI texture that I can in the window. I thought it seemed pretty straightforward, set wantsMouseMove to true, and then get...
View ArticleSerialize Jagged Class Array
I've got a class that looks like this: [System.Serializable] public class Hex { [SerializeField] public int x = 0; [SerializeField] public int y = 0; [SerializeField] public int nation = 0;...
View ArticleSnapping to grid with grid size of
I'm creating a basic voxel editor that uses several different sizes of cubes. The user has a slider the use to control the current cube size their editing with, then when adjusted changes the scale of...
View ArticleLerping in a shader
I'm trying to create a basic shader that just lerps between two base colors. The lerping works if I adjust the blend knob, but now I want to make it so it flashes by it's self. I was able to find...
View Article