Unity is a highly cross-platform engine that focuses on easy art pipeline process and uses Mono as its scripting back end.

learn more… | top users | synonyms (1)

0
votes
0answers
111 views

Bad quality of the sprite in Unity

I need to import a few sprites (background platform and sky) into my game scene but it seems that their quality after importing into Unity is too bad (they are blurred). The original resolution of ...
0
votes
1answer
40 views

Why does changing texture change it for both objects? [duplicate]

I have two identical objects in my Unity scene. When I change the texture of one, the texture is changed on the other, almost as though the first one is a prefab. Why is this happening and how can I ...
0
votes
1answer
69 views

What is the speed difference between cross platform HTML5 games and native mobile games? [closed]

Microsoft is advertising and promoting cross platform HTML5 game development. I am thinking of creating a simple 2D side scroller game and I am trying to decide what engine should I use for creating ...
1
vote
1answer
132 views

Mouse click movement

I need to make realistic human movement (3D) using mouse click. Get mouse click point using Raycast. Smoothly Slerp to LookRotation. Move transform.forward. Everything works fine, except I have ...
0
votes
1answer
90 views

Enemy clones don't target player

In a small game that I'm making enemies multiply when you kill them, however when clones are instantiated they don't chase the player like the original prefabs do (example: ...
1
vote
0answers
41 views

Can I switch off scenery elements on a 3D model?

I am using a 3D asset that has flat scenery elements (3D island with 2D bushes). [1] Having encountered a number of problems with this scenery [2] I want to deactive it (not visible, not collidable, ...
-1
votes
1answer
62 views

How do we detect keypresses in a sequence? [closed]

using UnityEngine; using System.Collections; public class TrollingRowlandMK2 : MonoBehaviour { int cheat_progress = 0; float cheat_delay = 0.0f; void detect() {if(cheat_progress == 0 ...
0
votes
1answer
38 views

Combination Keypad in Unity

Im having a slight problem in getting my Combination keypad to work. Ok so basically I'm using gameObject buttons to use for the numbers 0-9. So each gameObject button has a number link to it. The ...
-1
votes
0answers
61 views

Fixing textures in unity

I have been having problems getting a texture to work in unity. This is what it looks like. The "maze" structure you see in the screenshots is infinitely thin if you look from the top. Does anybody ...
0
votes
0answers
50 views

Calling an android method from Unity3D with a JAR plugin

I am developing a game with Unity only for Android platform and I am requiring to share content of my game through an intent so I have implemented a JAR plugin according to several tutorials with this ...
1
vote
0answers
69 views

Dynamic Level Loads [ Story Saves ] [closed]

I have recently revisited the legend of zelda series and got inspired by it to create a game similar to majora's mask. After some slight work on the player movement and key game mechanics I started to ...
1
vote
2answers
84 views

Locking frame rate to 60 in the editor

My game runs at several hundred frames per second. I want to limit it to 60. So I used Application.targetFrameRate = 60; This works on the iPhone. But in the editor it only reduced the frame ...
1
vote
1answer
51 views

Should I use textures that are the size of the object?

I've been reading but couldn't find an answer to my question: If I have an object, let's say 30x30. Should I use a texture that is 30x30, 300x300, or even 3000x3000 or should I follow 'the powers of ...
0
votes
0answers
21 views

get vector of enemies that facing player [duplicate]

if I have player location (4,6,-3), thee y- axis is vertical and I have enemies at (7, 6, 12), (16,6,11) and (11,6,1) how to calculate the vector of each enemies that is needed to face the player? how ...
1
vote
2answers
144 views

How should I store edge weights in my A* graph in C#?

I am working on A* pathfinding in Unity, using C#. I am currently implementing Dijkstra's shortest path algorithm. I have a Dictionary with nodes as keys and corresponding lists of adjacent neighbors ...
0
votes
2answers
55 views

Destroy GameObject as an Array of Transform instantiated destroying the whole array

I am trying to destroy a GameObject with the Destroy() method, but when I call it the whole array is destroyed, not just that element. //Instantiating the prefabs public Transform[] blue; foreach ...
2
votes
2answers
94 views

Detecting mouse clicks in Unity UI Beta

I want my game script to detect mouse clicks everywhere on my screen, except one corner where I have a pair of buttons to control the sound and will be handled separately. To help identify this ...
2
votes
1answer
86 views

Sending POST data with WWW in Unity C#

I would like to use Unity's WWW class to send a an HTTP request with POST data. So in my server, my PHP script can do something like $number = $_POST["NUMBER"]; According to ...
0
votes
2answers
128 views

Explaining vector math for a pendulum camera

I came across a code that I guess is doing a pendulum camera, that's the class name. I would like to know the math behind that. I would like also to know how to decipher those stuff in game math, ...
0
votes
1answer
48 views

Trigger an event when a game object touches a non-solid game object

For a 2d game, I are currently making an AI and I want it to jump when it touches a invisible cube, which isn't solid, how do I do this?
14
votes
3answers
2k views

How can I create a stretchy, breakable pizza cheese material?

I want to create realistic pizza and allow user interact with it. What I want: What I created: I created model of the pizza (8 pieces) in Blender, then imported it into Unity. The piece of ...
3
votes
2answers
162 views

How to design a drag and drop inventory system with transition from icons to game objects?

I’m trying to write a simple 2D game in Unity with an inventory where the user can drag and drop different objects on the screen. I need the inventory to contain icons which on drag will become ...
1
vote
1answer
82 views

Collision detection across multiple components

I have been reading this article: http://gameprogrammingpatterns.com/component.html which describes how a game object should be constructed out of components. It also encourages the decoupling of ...
4
votes
3answers
460 views

How do I procedurally animate a cell eating another cell?

The entities in my game are soft-body, amorphous cells. I'd like to create an animation where enemies are engulfed by the player's cell. That is, I want to generate a "cell eating another ...
1
vote
1answer
71 views

Night cycle on a globe

I am working on a tile based game on a globe. I am trying to implement a simple day night cycle on my hex globe something similar to the image below Here is the picture of my globe inside Unity ...
0
votes
1answer
67 views

Unity 2D detect if swipe goes through an object

I am developing a game in unity with flying arrows that the user tries to deflect by swiping through them (changing their direction). I can get the arrows to move with the swipes, but they move no ...
1
vote
1answer
64 views

Prefab disables its script when a clone is instantiated

A clone of a cube is spawned when it is destroyed, however the clones disable the script in the editor (example: http://gfycat.com/SnarlingScornfulEgg). Used the exact same script for a different kind ...
0
votes
1answer
77 views

Unity3d wheelcollider falling through terrain

I have created simple project with 3D car and terrain. I have added 4 Wheel Colliders on model wheels. But when I run project wheels falling through terrain. Before run: After run: I am sure that ...
1
vote
2answers
105 views

Position GUI Text in 2D game

I am working on a 2D game, and my camera is a orthographic with a size of 320. I want to display some text, but not with OnGUI(). Rather, with a GUI Text game object. I couldn't help but notice that ...
2
votes
1answer
53 views

How do I change the material of an object with Script in Unity?

I was making a game with Unity and I want to change an object's material using JavaScript when the player collects 5 collectables that I made. The collectables get stored in an int variable called ...
2
votes
1answer
48 views

How do I save variables and load them in Unity with JavaScript?

I made a game and i want to save the high score and load it back. I need to save 3 variables and load them when the game starts. How do i do it?
0
votes
1answer
43 views

View Rigidbody 2D Wire Frame

Simple question. When I prototype game ideas I like to create objects without having to attach sprites. Is it possible to create a Rigidbody 2D in unity, set its size and render its wire frame? I am ...
0
votes
1answer
69 views

Save player data in Unity 3D [closed]

I've started to design a commercial Client/Server game in Unity and I need server-side saves players data for later analysis and web consultation (like battle.net). Is there a best practice to achieve ...
1
vote
1answer
57 views

How do I use elapsed time as the player's score in Unity?

I'm making a "survival" game, where the goal is to stay on a rotating board as long as possible. I want to add a score system based on how many seconds passed. For example, if you stay on the board ...
0
votes
1answer
45 views

Unity3D: Change Background Image on a GUI Skin

So I'm testing with GUI Skins and trying to make something cool, and I want to change the background image of the application background. This is what I mean In the screenshot above, the background ...
1
vote
0answers
11 views

Unity3D: Rendering images weirdly in GUISkin

So i'm trying to make a gui skin in Unity3D and i'm having some problems with the images, what I mean is the images are being rendered all weirdly, not properly and some have lines through them. I ...
2
votes
1answer
88 views

Saving Game Data In Windows Store App

I am creating a windows store game using unity . I want to save the current high score data . I most probably use StreamReader / StreamWriter for saving data but when i build the executable for ...
0
votes
2answers
63 views

Getting neighbors of hex tiles in 3D space

I have a hex tiled model like attached below. Each of the hex tiles are separate objects meaning I can access each of the hex tiles individually inside Unity Now in my program I want to be able to ...
1
vote
2answers
64 views

Fastest way to assign sprites to components in Unity

I'm using a sprite atlas and Unity's built-in sprite editor to tease out the individual images. Specifically, I have a single texture containing lots and lots of icons for armor, and I am assigning ...
0
votes
0answers
40 views

Render text on a Quad

I have created a quad with a single color that's rendered on screen as a square, which is fine. I want to add some text to it (or slightly in front of it) that says "Hello". It sounds from reading ...
1
vote
1answer
117 views

How to save a Unity prefab on file?

I'm working on a Unity project, and what I'm doing is creating a new scene. In my new scene, I want add some prefabs that there aren't in the project folders, but I can see them in another scene. So ...
2
votes
0answers
47 views

Transparent diffuse fails to render from all viewing angles

I'm rendering this chunk as a Unity mesh and I have just one material (with alpha) which is applied over all the mesh. Everything in the chunk is automatically generated at runtime, so it's not ...
2
votes
1answer
53 views

Lidgren peer to peer

I am currently integrating Lidgren into my Unity game. I need to move away from the built in networking capability in Unity because of the style of game I am making, basically MMO, I will have far too ...
2
votes
2answers
200 views

Problem loading level layout from file in Breakout clone

I'm working on a Breakout clone and I decide to use files as method to load level layouts. The file is something like this: N,N,N,N,N N,N,N N,N,N Only indicates what type of brick I'll ...
-2
votes
1answer
67 views

if statement is executed even when condition is false [closed]

I've made some code that is triggered when the player is in range of the enemy. Everything was working fine until I tried to implement a condition when the countdown reached zero. I made a method ...
0
votes
1answer
67 views

Unity Guitext object always triggering a collision - 2D

I have a guitext object which I can drag. I have attached a 2d rigid body. I have also attached the collider with the following code: void setCollider() { Rect box = ...
2
votes
0answers
63 views

Aligning pathfinding to the center of tiles?

I'm looking to achieve tile by tile movement in a project I'm working on. I employed the use of the asset Simply A* Path-finding to allow a unit to navigate the terrain. Since the tiles are ...
1
vote
2answers
72 views

How to edit colliders in Unity2D

I can edit colliders by holding down the shift key. But when i add a second collider, the shift key always selects the first one. And there is no "Edit Collider" button in the editor (Win/4.5.4f1). ...
0
votes
0answers
97 views

Unity 2.5D Character Movement

I'm wondering if anyone can point me in the right direct as to how to take a 2D character/sprite in Unity and have said character turn corners in a 3D style. Solutions or resources welcome.
1
vote
0answers
50 views

Square tile navigation unity

I'm looking to generate a grid style navigation system in Unity. I have created a map in Tiled and am unsure how to continue considering the tiles will have different properties. The closest example ...