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.

learn more… | top users | synonyms (1)

1
vote
2answers
62 views

Is there a difference in the time taken to load one texture instead of many?

Is there a difference in the loading time of 16 256*256 textures versus a single 1024*1024 texture? Specifically for level loading time?
1
vote
1answer
63 views

Continuous translation in Unity

I would like to apply a constant-speed everlasting translation to a game object (e.g a background) in Unity. Without physics. What is the best way to achieve that?
1
vote
0answers
52 views

Generate a large data structure using a compute shader

I know that RWTexture2D Result; void CSMain (uint3 id : SV_DispatchThreadID) { Result[id.xy] = float3(1,2,3); } will result in an texture containing the numbers 1,2,3 however I'm ...
0
votes
1answer
236 views

How to change the speed of the gameobject moving on the itween path

I have set an itween path for an object to move.And I have written the code as iTween.MoveTo(gameObject,iTween.Hash ("path",iTweenPath.GetPath("train"),"time",300)); The above code is working for ...
0
votes
2answers
262 views

How to procedurally generate Mountains that Looks more natural

My Terrain was looking a bit plain so to freshen it up a bit I decided to add mountains to the terrain generation. Unfortunately the Mountains don't look very natural with the surrounding terrain. ...
-1
votes
1answer
75 views

Material optimization in Unity3d

In my 2d game I need a road. And here is two ways, how can I make it. I can make it using a lot of quads with size 1*1, or for each specific area (they all have different length) I can use big quads ...
0
votes
0answers
329 views

Unity 5 Enlighten - How do I make objects look bright?

I've recently started using Unity 5 and have been reading up on their global illumination and physically-based shaders using Enlighten here. Unfortunately, I would seem that the demo project which ...
0
votes
1answer
152 views

Apk file installes two instances of a Unity game

I created an apk in Unity (4.6) and when I install that apk on the device it creates 2 instances of the game (2 icons are visible in the screen). Both icons start the same game, and when I uninstall ...
0
votes
1answer
126 views

My Raycast will not detect collisions in my Unity 2D project. What am I doing wrong?

I appreciate any help you can offer me. I created a script for a character controller that casts two rays below the player's gameobject. The rays extend infinitely and should collide with another ...
2
votes
1answer
70 views

Keep state in Unity editor without hitting serialization

In my game I have a MonoBehaviour WorldView that, when created at editor time, initializes a large dictionary. Later from a Editor WorldViewEditor I call WorldView.SetBlock() that tries to access this ...
0
votes
0answers
27 views

Bike rotation freeze rotation

Hello im making a bike game and need it to stay up (doing a wheelie) without gravity knocking it down ive tryed freezing the rotations and turning off gravity and it dosent work, so not sure how to do ...
0
votes
1answer
165 views

Unity - Proper use of threads with procedural generation

I have been working on a simple chunk based terrain generation system, with voxel octrees. The overall method works pretty well, but testing this system with large amounts of chunks completely freezes ...
2
votes
0answers
103 views

What events invalidate the Unity machine identification? [closed]

I bought a new solid state drive, cloned the old one to the new using CloneDrive, removed the old drive and booted. Everything went well, but when I tried to start Unity I got this popup: I am ...
-1
votes
1answer
81 views

How to draw arrows between bubbles

I have 2 * 3 matrix of bubbles and i want to draw arrows between those bubbles. it should be done in way as in below Image:- 1 ---->2--->3 What is happening here, When i touch 1 bubble, start point ...
0
votes
1answer
27 views

Unity .3ds file is purple [duplicate]

I imported a .3ds file from skethup and in the preview it shows it with the texture, but when I put it in the scene it shows it without the texture. http://puu.sh/gyYSU/a09541420c.png
0
votes
1answer
177 views

Spawning moving text make it disappear overtime

I am trying to display a text when I click the letter 'R'. When the text appears, it should slowly slide down on the y axis only, slowly disappear over 4 seconds and get disabled. I am not able to ...
0
votes
2answers
2k views

Unity 5 missing Standard Assets

I have Unity 5 and when I make a new project, there are no assets that are usually there (Character Controller, Terrain, etc.). How do I fix that?
0
votes
3answers
90 views

How to move an object to a position?

I'm trying to move an object to the coordinates 48.7, 51.07, 102.8, but it does not move. I did some test to make sure that "OnMouseDown" works, and it does, I think it could not be finding the object ...
0
votes
0answers
13 views

I want to swap textures on button click [duplicate]

public class Textswap : MonoBehaviour { public Texture imageone; public Texture imagetwo; private Texture gametexture ; void Update (){ if(Input.GetMouseButtonDown && gametexture ...
1
vote
0answers
46 views

Security of Unity Rpc calls

Im just starting to code my game in unity and have been reading up that rpc calls are not validated and can run havoc on the server. For example a modified client can connect to your server and just ...
0
votes
2answers
166 views

How to stop 3D model from reflecting light like plastic

I was browsing SketchFab and found a 3D model I decided to try in Unity. This is how the model looks in SketchFab's viewer: When I put it in Unity, I used a Directional Light object: As you can ...
0
votes
0answers
48 views

Textured/Vertex Colored Shader fallback

I have this simple ShaderLab shader that I use for particles, among other things (it's more complicated than this but I have omitted the unnecessary bits). When I do not specify a texture, it falls ...
0
votes
0answers
109 views

Insert 3d text to the front face of a cube GameObject

I want to add a text to a cube in Unity. I have a cube which has a 3d text as a child. I am using the below javascript to write on the 3d text: #pragma strict function Start () { } var countdown : ...
0
votes
1answer
70 views

Only 1 side is rendered

I'm trying to get my .blend object into Unity but for some reason I see it differently in Unity than in Blender. I was trying to solve the problem and someone said that I have to go to the edit mode, ...
1
vote
1answer
75 views

What's the scope of RPCs in unity?

I can define several RPCs in unity and I can call them via the networkView component. But it seems that it gets the RPC called regardless where it is defined. So I was wondering to know how do the ...
1
vote
1answer
160 views

How To calculate camera boundaries

Is it possible to calculate the exact camera bounds? By this I mean the white lines that represent the camera area e.g the lines in the picture: I'm using Camera.main.screenToWolrdCoordinates to ...
1
vote
2answers
363 views

Designing AI/NPC Task System

I am designing a game in Unity which has NPCs (Non-player controllers). I have worked out the path-finding but I need some help with how to implement tasks. I need the task system to be flexible and ...
0
votes
1answer
160 views

OnCollisionEnter2D incorrect contact point?

I am trying to shoot a bullet (rigidbody2d, boxcollider2d) to another enemy object (rigidbody2d, kinematic, circlecollider2d). I want the collision point between these two. When they collide, i want a ...
0
votes
1answer
382 views

How to show a popup with text when a game object is selected?

We're building an FPS game where you walk around a 3D environment and walk up to objects, click, and then a GUI message pops up. Basically, I've got a character, walking around in 3D space, and is ...
0
votes
1answer
287 views

How do I properly apply root motion when using a blender exported FBX in Unity?

So I realize the common way for animations to be done is in-place with sliding feet, then control the animation playback to coincide with the character's feet, etc. However, given a scenario such as a ...
0
votes
1answer
86 views

Unity Collision Difficulties (How do I make a ground in unity with lots of pieces that doesn't have poor collision?)

So I'm working on this game that I came up with the idea for while watching the Unity Roll-a-ball tutorials. So it's probably important to note that I'm extremely new to game design and I don't have a ...
0
votes
1answer
116 views

2D particles with a perspective camera?

I'm working on a 2D pixel art Unity game. I have multiple layers of scrolling so I need to use a perspective camera, the problem is though that it seems to mess up using particles as when the screen ...
0
votes
1answer
74 views

Unity shaders: best way of handling data structures

I'm working on a shader in Unity that uses a Binary Tree to store some precomputed values, this binary tree should be available to the shaders and would ideally also be constructed on the graphics ...
0
votes
1answer
171 views

Memory game - texture on cards

I'm new with Unity and I'm working on recreating memory game. I found this sample: http://xtasestudios.com/unity/samples (select "Memory"). I decided for C#. I've created my own card in Blender, ...
0
votes
0answers
31 views

texture2D wont render in webplayer Unity

I have an app that is pulling from a webcam and receiving from one on another computer. It takes the frames and does facial detection on them and draws a rectangle around it. This simple app works ...
0
votes
0answers
21 views

How to get camera to follow player, but stop when reaching end of screen? [duplicate]

I'm making a 2D game in Unity and I'm having issues with the camera. I need the camera to stay within the boundaries of the level (the background sprite), but then follow the player around the level. ...
1
vote
1answer
206 views

Custom shadowmapping in Unity not working properly

To experiment with a certain technique, I'm implementing my own shadow mapping in Unity. I'm using a camera for the light "view", which is rendered to a RenderTexture after being post-processed with ...
1
vote
1answer
125 views

Texture packer and 2d game sprite sheet creation

I am developing a game in Unity3D. I have a bunch of images which display the character animations. I decided to use texture packer to reduce the amount of individual images. I create one sprite sheet ...
0
votes
1answer
217 views

How do I destroy a Unity prefab when it goes off-screen?

I made an infinite path using prefab.Path moving in the negative x direction. I want to destroy the path clone once it goes offscreen. My path move script is: var Speed:float = 5; var ...
0
votes
3answers
126 views

How to rotate a gameobject to the specific angle

I have tree model that is being rotating .After certain angle it should stop rotating.I have done a sample code.But the tree is not stopping. void Update () { //transform.Rotate ...
2
votes
1answer
204 views

Why encode floats in RGBA?

Working on some effects that require depth (Z) data in Unity, I saw that these use a method to store the depth data encoded in the RGBA channels of a regular texture. half4 frag(v2f i) : SV_Target { ...
0
votes
0answers
49 views

unity pass texture from one camera to another for shader

I'm working on a system where I have to get a texture from one camera to another (render a -> render b) is there an easy way to do this? For a simplified example this would be used to get the ...
0
votes
0answers
438 views

Loading different navmeshes at runtime in Unity 5

In order to improve the extend ability of our maps, we load different components of the map at run time. The idea is a user can use Unity to make a map, drop it into a folder and it will be loaded. ...
0
votes
1answer
191 views

Unity5 TextAsset not functioning in WebPlayer

Preface I am working on a 2D Platformer in Unity5 utilizing TileMap techniques. I have a working system to read "Room Tile Data" from JSON files with the Unity TextAsset Class and the Newtonsoft ...
0
votes
1answer
175 views

How many directional lights in Unity

In Unity, how many directional lights can be active at once? 1, 2, 4, or 8? I thought 2, but I have searched and cannot confirm.
0
votes
1answer
179 views

How can I make player move on array of GameObjects in Unity?

I am making a board game where the players hit a dice and move on an array of GameObjects according to the number they got. So I declared a Gameobject array and added to it all the objects I need. ...
0
votes
1answer
279 views

How to correctly import 3D max files into Unity3d?

I am trying to import a downloaded 3D max (.3DS) object into Unity3D and preserve the textures correctly. I've tried to select the .3DS-file and its jpg-files and dragged and dropped it into Unity3D. ...
0
votes
2answers
83 views

RayCast method always outputting False

I am having trouble executing a raycast to check if there is anything between the player sprite and a second sprite. This is my code : void Start () { play1 = GameObject.Find("player"); ...
0
votes
0answers
26 views

Colliding wiith a smooth line of blocks

I'm having a strange problem. I'm creating a 2D platformer, and creating the gameplay map by reading a csv file and placing prefabs of the appropriate type on map. One part of the map is a simple ...
0
votes
1answer
98 views

How to properly give Image source for multiple sources?

I'm writing a script to change the image on the button based on previous selection. Another script is giving the CurrentAvatar variable once previous button is pressed. My problem is i can't seem to ...