Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [unity]

Unity is a cross-platform game creation system that focuses on easy art pipeline process. It consists of a game engine and an integrated development environment. The game engine's scripting is built on Mono.

9
votes
1answer
2k views

2D Water top surface profile

I am trying to create the effect of the water surface thickness with a vertex-fragment shader. I am in a 3D game environment but It's a scroll view so a "2D" view. Here is a good tutorial of creating ...
9
votes
1answer
2k views

How to occlude lights in Unity3D?

First off, I own Unity Pro. I've been looking in to occluding lights when they aren't being viewed for a while now to improve performance. The main methods I ran in to were using BecameVisible() and ...
9
votes
2answers
15k views

How do I make my character slide down high-angled slopes?

I am currently working on my character's movement in Unity3D. I managed to make him move relatively to the mouse cursor. I set a slope limit of 45°, which does not allow the character to walk up the ...
9
votes
3answers
3k views

Preventing a Combination of Rigidbody Jump Force & Bounce Magnitude in Unity3D

I'm building a fairly simple marble racing game in Unity3D. The ball is a 3D physics object that moves only on the X and Y axes. It has the ability to roll left and right, and to jump. Pretty basic ...
9
votes
1answer
969 views

How to save the Mesh from an Interactive Cloth at runtime in Unity?

At the start of a scene I have GameObject called 'sheet' positioned above a 'ball' GameObject. The sheet has an Interactive Cloth component on it and a Cloth Renderer. The Mesh for the Interactive ...
8
votes
2answers
1k views

Unity 3d 4 players Only 4 buttons can be pressed at a time

Only 4 buttons can be pressed at a time, so players cant move sometimes Each Player Has their own Controls i Change, Up Arrow and the other ones for each player---v InputsV-V-V ...
8
votes
3answers
10k views

How to get all tiles from a Tilemap?

I have been trying a little bit the new TileMap system in Unity and I was looking for a way to access the tiles as a List or 2D array but I can't find anything ...
8
votes
3answers
7k views

How to synchronize a game with music

You may be familiar with ryhtm games as Dancing Line, Geometry Dash, or even Guitar Hero. They have something in common : every single action in the game is synchronized with the music. My purpose is ...
8
votes
1answer
7k views

How can I create a height-based volumetric fog?

Recently, I have been looking for techniques to make volumetric fog on some Y position level of the game world. But all I have found are some fog made by using particle system or built-in engine fog ...
8
votes
2answers
3k views

Constant 2D Bullet movement in a shmup

I've been following the pixelnest tutorial to make a 2D shmup (http://pixelnest.io/tutorials/2d-game-unity/player-and-enemies/). While working on this I've experimented with increasing the firing ...
8
votes
1answer
1k views

Is it wrong to be creating new objects in Update()?

I'm using Unity and sometimes I'm using th new keyword in Update, like new Vector3() etc... ...
8
votes
3answers
18k views

How to dynamically create an UI text Object in Unity 5?

I have been searching for something that should be simple, but Unity 5's documentation on that is fairly outdated. What I want to achieve is to be able to create UI Text totally from script, i.e. ...
8
votes
3answers
979 views

How can I keep two racing players synchronised?

I am working on a Unity mobile game, much like a multiplayer version of Temple Run. I'm seeing a fluctuating network latency (generally 200-500ms) because of the mobile platform. The two player ...
8
votes
2answers
7k views

Where and how to check if game was developed with bought Unity3D licence (not cracked app)?

We hired an external team from Eastern country. They built our mobile game app using Unity3d which we paid a lot of $K. We asked them to only use the software with bought license, not cracked one, and ...
8
votes
2answers
6k views

Why does Unity3D crash in VirtualBox?

I'm running Unity3D in a virtual instance of Windows, using the Virtual Box software on Linux. I have guest additions installed with DirectX support. I've tried using Windows XP SP3 32-bit, and ...
8
votes
4answers
2k views

Which for basic RTS prototype: Unity or Torque? [closed]

I'm wanting to test my hand at writing an RTS (something I've never gotten very far with), and so I'm looking for an indie engine that would give me the most success with a quick setup that I can then ...
8
votes
3answers
940 views

Can a Game Engine be built into a Game Engine?

This confuses me as the title says "Mostly Civilized: A Hex-Based 4x Game Engine for Unity - Part 1" Unity is a Game Engine, and he is building a game engine for a game engine. Did he word this ...
8
votes
2answers
658 views

How to create a 2D physics waterfall

I am trying to create a waterfall that looks similar to the first image below (please check this video for a better idea of what I want to achieve) with physics properties so it can move or around ...
8
votes
3answers
4k views

Overcoming float limitations for planet-sized worlds in Unity

As far as I know, going further than 1M units from the world origin in Unity is hardly possible due to floating point precision issues. Making a world more than 1M units in radius would require ...
8
votes
1answer
11k views

Understanding pixel art in Unity 2d

I am struggling to understand the basics behind pixel art in Unity. I understand what a unit is, and that if I draw my sprite with 16x16 pixels, I should set PPU to 16. Take stardew valley for ...
8
votes
4answers
3k views

Infinite 3D Cave in Unity

A friend and I are hoping to make a game in Unity in which you fly through an infinite 3D cave that can twist and wind in any direction (though obviously not to the point that the turns are impossible ...
8
votes
1answer
2k views

Moving texture according to position in shader

Divinity Original Sin have beautiful particle effect , When I move around game I see galaxy through particle that move according to my position.how can I make like it? you can see this effect here: ...
8
votes
3answers
13k views

Unity: “inconsistent line endings” dialog shows up ever time I open VS with unity

Everytime I open a script file from unity with visual studio this dialog shows up about normalizing the line endings? What does this mean? I click Yes every time but still can't get rid of it. It only ...
8
votes
2answers
8k views

Pointers in C# Unity

Hey I've just learned about pointers recently and am wondering how I can use them in c# (I just learned about them in c++) in unity. I do have some questions though. Pointers use low level ...
8
votes
5answers
11k views

What is the logic behind the 'Loading' scenes in games?

I'm making my first game, it's a tower defense type of game, using Unity game engine and taking Fieldrunners as a reference. I would like to know more about the functionality behind 'Loading' scenes ...
8
votes
4answers
2k views

Is it “wrong” to build Unity games entirely with UI elements VS sprites?

I find myself coming on board a Unity project with an outsourced programming team. Our mobile game has a number of minigames and they have built them entirely out of UI elemetents, or raw images on ...
8
votes
1answer
9k views

Animated textures for models; How to write a shader?

Was watching some Rocket League and notice there was animated decals and wheels. . I would like to implement something similar to the effects in the image above. How would I go about writing a ...
8
votes
3answers
5k views

Networking and movement in MMORPG's UNITY

I'm programming a dedicated server in C# using BeamServer2 DLL's. At first I wanted to be able to see other players move on our already made Omuni map. This I did by just sending your position to the ...
8
votes
2answers
10k views

shader tutorial for unity [closed]

I would like to start developing my own shaders within unity. For starters I would like to do a screen spaced blur. Are there any good tutorials to learn shader development besides the official ...
8
votes
2answers
30k views

How to detect mouse over for UI image in Unity 5?

I have an image that I have setup to move around and zoom in and out from. The trouble is the zoom can be done from anywhere in the scene, but I only want it to zoom when the mouse is hovering over ...
8
votes
1answer
2k views

Why is my custom Texture2D blurry?

Have some WWW object downloading a .PNG image. ((SpriteRenderer)renderer).sprite = Sprite.Create(request.texture, new Rect(0,0,100,100)); My sprite ...
8
votes
1answer
4k views

Mip Maps on 2D Sprite causing black line above. Why is this?

I am new to Unity. I'm trying it out and using Futile for a code-first approach, but still importing textures using the Unity system. The problem I'm having is that when I use mip maps to scale large ...
8
votes
1answer
14k views

Angle between two points

I have a character who walks to random points in my room in Unity. The problem is he always faces one direction, I want to write in C# a piece of code that will get the direction the character is ...
8
votes
3answers
3k views

Can I run my own loading script during the Unity splash screen?

Can I load data in the background while the Unity splash screen is up? If so, how? I am trying to run code during the splash screen, not just load assets. I have not been able to find any ...
8
votes
1answer
6k views

Unity: Apply an Image Effect on one layer only

Please consider this simple scene. It’s composed of 3 different game objects. 1 background image + 1 static character image + 1 small part (with the pet) that is changed at runtime to perform an ...
8
votes
3answers
2k views

Flash, Java, Unity plugin install penetration?

Is there data on how many users have Flash, Java, or Unity plugins installed?
8
votes
3answers
6k views

Why does Unity in 2d mode employ scaling and the default othographic size the way it does?

I previously used SFML, XNA, Monogame, etc. to create 2d games, where if I display a 100px sprite on the screen, it will take up 100px. If I use 128px tiles to create a background, the first tile will ...
8
votes
2answers
3k views

How does Unity3D lower an imported .obj vertex count?

I have a question regarding how Unity3D handles importing of .obj files. I'm importing this teapot: http://groups.csail.mit.edu/graphics/classes/6.837/F03/models/teapot.obj The number of vertices ...
8
votes
1answer
2k views

Snapping shapes together in game

I'm trying to work out how to snap shapes together the player may move around on a canvas. As the square approaches the other object, I want to pull that shape in (given a certain proximity) and have ...
8
votes
3answers
3k views

How can I launch a GameObject at a target if I am given everything except for its launch angle?

I am trying to launch an object at a target, given its position, its target position, the launch speed, and the gravity. I am following this formula from Wikipedia: $$ \theta = arctan \bigg( \frac{v^...
8
votes
1answer
743 views

Custom Editor - keep default look but add more

What I would like to know is if there is a easy way using OnInspectorGUI, to replace the inspector with one that includes just one or two additional fields (so that it looks identical to the non-...
8
votes
2answers
4k views

Animation workflow between Blender and Mecanim

I've recently started learning Unity. Not being able to add custom animations to the standard FBXs you get from Unity's app store is really really slowing me down. When I import one into Blender, it ...
8
votes
2answers
1k views

Advanced Cellular Automata to generate caves

I am trying to make caves in Unity. To do this, I am trying to use cellular automata. I found the following (Rouge Basin Cellular Automata for Caves) that resembles what I am trying to accomplish. ...
8
votes
1answer
4k views

How do I create a 2.5d parallax effect?

I have a decent background in 3D graphics and programming, but I'm new to game development. I'm currently exploring different possibilities and I really want to make an RPG game. I was thinking about ...
8
votes
2answers
3k views

Billboard rendering without distortion?

I use the standard approach to billboarding within Unity that is OK, but not ideal: transform.LookAt(camera) The problem is that this introduces distortion ...
8
votes
2answers
3k views

Top down space game control problem

As the title suggests I'm developing a top down space game. I'm not looking to use newtonian physics with the player controlled ship. I'm trying to achieve a control scheme somewhat similar to that ...
8
votes
4answers
3k views

How does creating 2d game assets differ from regular 2d art? [closed]

I've done some digital paintings and concept sketches in the past, and I was thinking about employing those skills in my game making efforts. From an artists standpoint, what does he have to do ...
8
votes
2answers
3k views

Force Reload VS soution Explorer when adding new c# Script via Unity3d?

When I create C# script (Create -> C# Script) via Unity3d or delete it from Unity3d - <...
8
votes
1answer
2k views

Learning how to make imposters manually in Unity - how to render an object to a texture not what camera sees?

I am trying to learn the most performant way to make an imposter in Unity manually - not using pre-fabricated solutions. My first guess is that it should be achieved by using RenderTexture and a ...
8
votes
2answers
1k views

How do I create a draggable object which snaps to obstacles in the way?

I bring yet-another-drag-with-mouse question (I am using Unity with C#), but with a less common particular detail: the existence of obstacles in the middle of the way trough which dragging occurs (3D ...