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)

0
votes
1answer
34 views

How to set up the camera for a PS Vita game?

I am starting my first project for Unity and I want to start a new game for PS Vita. This console has a resolution of 960x544 pixels. How do I have to set up my camera so that it adapts to this ...
0
votes
1answer
225 views

How to import animations from one model to others

I have two models (one animation in each) which I got for free from Mixamo. I imported them in Unity and they look like this: http://imgur.com/atjQbkI Justin@Idle and Justin@Walking. As can be seen ...
0
votes
1answer
72 views

How to create 2D shadows and lightning?

How do I create shadows and lights in a 2D top down perspective game? I want to achieve an effect similar to this game (also made in unity) where some objects like a torch, different sprites and the ...
0
votes
1answer
93 views

GUI.Box z-index for mouseover

So I am drawing an inventory with slots like so: private void DrawItemSlotAndAttachActions(Item currentItem, Rect slotRectangle, Event e, int itemSlotPosition) { if (!(currentItem is ...
1
vote
1answer
50 views

Restricting body movement withing a specific length while dragging a gameobject in unity

private void OnMouseDrag() { Vector3 screen_sp=new Vector3(Input.mousePosition.x,Input.mousePosition.y,screen_space.z); Vector3 cur_pos=Camera.main.ScreenToWorldPoint(screen_sp)+offset; ...
0
votes
0answers
28 views

Unity 5 Networking Send Rate: Send Rate is Zero but server movement is still happening

I have a client server scenario, just a player moving about on the client and he moves about on the server using the built in networking provided in Unity 5. I have my client scene running in the ...
0
votes
1answer
25 views

Can I export a model and texture from a terrain file built in Unity3D?

I am mostly familiar with building my level maps within unity, and have become quite use to its inbuilt terrain creator, in both generating my terrain, and spraying a texture on to it. I am making a ...
1
vote
0answers
20 views

The animation state could not be played because it couldn't be found!

If I try to use animation.Play() or have Play automatically ticked in the inspector on the animtion object, it gives me the follwing error: The animation state could not be played because it couldn't ...
0
votes
1answer
32 views

Determine facing direction mecanim 2d movement

I'm using this script to move my character in my 2d world: public float speed; //Movementspeed public Rigidbody2D rbody; Animator anim; void Start () { rbody = ...
1
vote
0answers
35 views

Set Render Target usage

I am using Unity and I have some difficulties about understanding the way Set Render Target works and how it can behave with the shaders. Is it possible to render a shader pass in multiple render ...
1
vote
2answers
53 views

How to display a list of 2D arrays in the inspector

Simply put, how do I make public List<bool[,]> appear in the inspector? Every 'bool[,]' is a solution to a puzzle in my game and I want to be able to view and edit them in the inspector.
0
votes
2answers
462 views

Basic C# Script in Unity3D for firing a bullet (not working)

working on a 2D top-down view game. Im trying to get my player to fire a bullet when spacebar is pressed. I added a component to my player (a bullet sprite) and placed it under his gun (so you can't ...
0
votes
0answers
8 views

Display Google play service profile Image in Unity [closed]

I need help displaying a logged in user's profile image using google play service plugin for unity.
3
votes
1answer
62 views

Vibration on Android

How to change duration of vibration on Android(Unity3D)? For example: public void Jump() { if (grounded) { rb2d.velocity = new Vector2(rb2d.velocity.x, jumpPower); ...
0
votes
1answer
5 views

Animation package from Assert Store not working probably with Unity Model/Custom Model?

I downloaded the animation pack from here: https://www.assetstore.unity3d.com/en/#!/content/25794 The assert contains a fbx file, which contains a bunch of animations. Then in Animator window I added ...
1
vote
3answers
101 views

How to build a spaceship with interior in unity?

I've begun to study a unity engine in one purpose: I have a great multi player game idea! The main essence: In space there are two (or even more) huge spaceships with crew consisted of players (all ...
0
votes
1answer
22 views

Delete EdgeCollider issue

In this program, When i draw a hill, a car can road on it's surface, and when I draw another one, the previous hill should remove. but unfortunately the previous edge collider looks still there. ...
1
vote
3answers
73 views

Collision Detection/Response Issues in Unity

Sprite A: Box Collider 2D and Rigidbody 2D. Sprite B: Box Collider 2D. Both sprites have a Sprites/Default material with Pixel Snap enabled. The textures being used are set to Truecolor Format and ...
0
votes
1answer
484 views

Game object position issue in unity3d

I have a set of objects placed on the same layer where all the objects are invisible except one. When I drag an object into a selected area, the current dragged object gets destroyed, and the object ...
0
votes
1answer
93 views

Add Existing Animation

I have several animations that I am using on a GameObject. I switched the folder they were stored in, and they got detached from the gameObject. How can I add the existing animations to my ...
0
votes
1answer
88 views

Is it possible to load asset bundle dependencies manually in Unity 5.0?

Is it possible to tell Unity to not load asset bundle dependencies automatically so they can be loaded manually. If so, how can this be done?
0
votes
3answers
203 views

How to access multiple 2DTexture which is assigned in Unity3D inspector panel created by an array in C#?

I am making a puzzle game, i made 5X5 cube, lets take example of orange. very left column is orange, upper with orange dot is static and lower with orange dot is also static. inbetween there are 3 ...
0
votes
0answers
16 views

invaliduriexception with photon unity

I am using photon unity networking right now to make a multiplayer game. When I publish to windows the build works fine, but when I change unitys build settings from windows to webgl it gives my a ...
0
votes
1answer
28 views

Changing long float to number + short scale

I am looking to use a piece of code to take an extremely long number and convert it to decimal equivalent + short scale. (i.e. 120100000000 would be 120.1 Billion) I am doing this with two separate ...
0
votes
0answers
65 views

FPS : Hands+Weapon Animation

I want to create multiplayer first person shooter . Now I want to create animation where the soldier is walking with rifle . I have separated hands from the body of the model and I have dropped ...
4
votes
2answers
167 views

What format should I choose? [closed]

I am making models in blender to export them then in unity, and unity can import .blend formats as well as .fbx, so which one is better, is there even any difference.
0
votes
1answer
14 views

problems with imported texture

I have done a texture in GIMP and imported it in Unity but for some reason the texture appears to be squashed in the sides. Image done in gimp: And here is what happens in Unity:
0
votes
1answer
32 views

Unity tiles with wierd border flickering when moving horizontal 2D

I recently made some Tiles using a program called Pyxel Edit to create some placeholder graphics. The problem I'm having is that when I move the camera horizontal the edge of the tiles starts to ...
5
votes
1answer
68 views

How can shader code duplication be reduced in Unity?

In our current Unity project we have a few shaders that are basically just supersets of another shader. For example, we have a shader that performs lighting calculates with diffuse, normal, specular, ...
0
votes
2answers
53 views

Shooting at mouse in unity

I'm using unity and trying to get my bullet to shoot at a target. I am clicking the mouse and I'm wanting to fire my bullet in that direction. I have gotten the coordinates of the mouse click and ...
-2
votes
0answers
28 views

Can someone translate the comments in this script to proper code? [closed]

Can someone translate the comments in this script to proper code? I want to detect a long press on a touch screen then activate an animation. When the finger is released, play another animation ...
0
votes
1answer
117 views

Unity3D - Cancel a build process (Windows, Unity 5)

I accidently pressed build for iOS and just realized that it might take a few hours to build the project. I tried to kill the unity process in the task manager, but on next start up unity instantly ...
3
votes
2answers
788 views

How to mirror flip animation curves in Unity?

I have a animation that moves my camera from left to right. Now I'd like to copy it with 'mirror' transformation so I can use it to move from right to left. Is it possible to do it using script or ...
0
votes
1answer
31 views

How can I detect a long press then activate an animation?

How can I detect a long press on a touch screen then activate an animation? And when the finger is released, play another animation smoothly? Let's take for example the main character in Crossy Road: ...
1
vote
1answer
296 views

VertexColor shader is not working correctly in built application

I want to change the vertex colors of my mesh. The light sources must not affect the objects with this shader, its lighting must be determined only by its vertices colors, so I turned the Lighting ...
0
votes
1answer
74 views

Touchscript: multiple overlapping colliders

Im building a tower defense game on unity and would like to allow the player to pan the camera on a large map. I am using touchscript to handle the touches. I made a testing project with the ...
1
vote
2answers
35 views

Create a 2D trail in Unity?

I would like to make a trail for a pixelated snake such as this one : As you can see, the cross simply repeats itself to create the snake. In Unity I have messed around with Trail Renderer, tried ...
0
votes
2answers
152 views

How to make instantiated objects not on top of each other?

I randomly instantiate game objects, to create a dynamic "sky map". But some planets appear on top of another ones. I'm trying to solve this problem with Collision detection and Colliders, but it ...
2
votes
1answer
475 views

Can I create a Sprite Asset using a downloaded Texture at runtime?

I know that Asset Bundles exist, and I'm already taking a look at them. But I'm still interested in this particular approach: I am interested in downloading a .png image from the Web, and then ...
1
vote
1answer
20 views

How to revert to MonoDevelop's old “ctrl-tab” behavior? [closed]

I believe MonoDevelop (bundled with Unity3D) has changed its ctrl-tab and ctrl-shift-tab behavior and I would like to get back to the old behavior, as the new way frustrates my workflow. Ctrl-tab ...
0
votes
1answer
3k views

Sending RPC calls from server to client inside Unity

In my game inside Unity, I have two scenes setup. One for the main server ( acts like authoritative server ) and the other scene for my client. The game starts once my client connects to the server. ...
0
votes
1answer
239 views

How to find the closest point on a plane

So I have this terrain with a perpendicular plane setup, now I want to move the vertices of the plane to their closest resp. vertices on the terrain. I made a drawing to illustrate my thoughts. ...
0
votes
1answer
32 views

Can't see instantiated UI element

I'm trying to create a level editor for a 2D game and I wanted to instantiate radio buttons, the backgrounds and numbers of which are determined by the tilesheet I load. I'm sure I'm doing something ...
0
votes
1answer
109 views

Trying to get reference to Button in Javascript Unity3d

I've this simple script in Unity3d: #pragma strict public var topLeft : UnityEngine.UI.Button; public var topCenter : UnityEngine.UI.Button; public var topRight : UnityEngine.UI.Button; public var ...
0
votes
2answers
270 views

How can I disable an NGUI button when I pause my game?

There is an NGUI button in my game, which when pressed increases the player's power. When I press the escape key, my game pauses completely. But the button still functions normally. Here's how I ...
2
votes
1answer
79 views

How to remove a component of an object in a script?

I want to remove a Sphere Mesh Renderer component from a certain gameobject. I want to do this in a script. How do I do it? I do not want to destroy the sphere itself, just the component
1
vote
1answer
80 views

How to create a material that blends textures in Blender to Unity workflow

I'm new to Blender and Unity and trying to figure out the best way to create a material that will use either vertex colors or a texture map to interpolate between other textures on a single mesh. ...
0
votes
2answers
93 views

Position child on the edge of the parent circle while scaling unity3d

I have come across to some different situation. I have one circle sprite and i am rotating circle continuously while rotating i want to make circle smaller and larger. I have one object on the edge ...
0
votes
1answer
22 views

(Unity) Drag and detect object below when dropping

I'm studying game development in Unity and I want to create a idle/clicker game like Cow Evolution. I'm using OnMouseDown, OnMouseDrag and OnMouseUp to move the GameObject around the scene. Now I ...
0
votes
1answer
47 views

How to achieve a for loop without Unity crashing?

I want to make a for statement that repeats constantly until a stop variable becomes "1". But wherever you type a "for" statement in any way or even without anything in the statement, Unity just ...