Quantcast
Channel: Latest Questions by lancer
Browsing index pages (72 articles)

Lerping 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


Snapping 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 Article


Serialize 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 Article

Rect.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 Article

Help 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 Article


Remove 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 Article

Align 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 Article

How 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 Article


Heightmap 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 Article


Improve 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 Article

Improve 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 Article

Terrain 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 Article

int 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 Article


Unhandled 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 Article

NullReferenceExeption

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 Article


Mecanim 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 Article

Import 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 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 Article

Line 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

Make 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 Article
Browsing index pages (72 articles)


Latest Images