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 (2)

-1
votes
1answer
65 views

This if statement doesn't end once triggered by touch

I have an if statement that successfully recognizes a touch, but continues executing after the touch has ended. void Update() { float currentstep = speed * Time.deltaTime; Vector3 ...
2
votes
2answers
166 views

About tiles in games

I'm trying to learn how to develop games in Unity and my base is tiled games, I would like to know if a simple tile is an image (sprite in 2D) or a game object in 3D. Since I'm trying to do some kind ...
0
votes
0answers
54 views

cannot sync for connected player after spawning meteorite ( photon PUN and ufps)

did anyone run into such bug? It happens when second player connects to a game, and that's what he sees. But players who connected earlier see everything well: meteors which I spawn by master-client ...
2
votes
1answer
122 views

Why is Unity UI Image color not being animated? [closed]

Animation is changing the color of an UI Image but the color only changes only in the inspector but not Game/Scene view. In this video I demonstrate the problem clearly.
0
votes
1answer
241 views

Unity not opening

When I start my Unity it opens up the menu where I can select a project, but when I pick a project nothing happens. The process is still running in my windows but nothing shows up. Here is my log file:...
0
votes
1answer
139 views

Why is FindObjectOfType(MyType) not finding anything?

Why would I get the following log? Start OpponentMotionReceiver motion receiver not found true public class ScoreAnimation : MonoBehaviour { private OpponentMotionReceiver ...
0
votes
0answers
48 views

Is it possible to use a Unity 3d Model with libGDX?

Can I use a 3d model like https://www.assetstore.unity3d.com/en/#!/content/36951 in a libGDX 3d game?
2
votes
1answer
92 views

Transitioning through menus in Unity: what is the best option performance-wise? [closed]

I'm making a menu manager and I'm not sure what should I do to make a transition from one menu to the other. What is better to be used performance wise? Here is the step in my mind. Simple enable or ...
2
votes
2answers
331 views

Play soundcloud in Unity 3d

I'm trying to make a game with cool soundtracks from a bunch of artists. I've made a few playlists in Soundcloud (soundcloud.com) and am trying to get those to play inside of Unity 3d. Is it possible ...
3
votes
1answer
358 views

With Cardboard, reorient player to direction of gaze

This may be a little hard to follow. I have a script set up in Unity, and attached to my CardboardMain object that allows a user to press the button on a Cardboard headset to move in the direction of ...
2
votes
1answer
185 views

Unity - Autoscroll when selecting buttons out of viewport

I have a ScrollView element, that contains many buttons. I want that when I select buttons (via arrow keys), the panel scrolls so that the selected button is contained within the viewport. How could ...
11
votes
3answers
823 views

Unity - How to move a ship realistically to a point in a 2D top-down game

i'm trying to move a sailing ship to the point where i clicked with the mouse. this movement should be realistic (oar at the back where the ship moves around) so if the mouse click is left and in ...
1
vote
3answers
142 views

Unity: How to manage a large amount of prefab variations?

The project that I'm working on demands the ability for game designers to be very flexible when balancing, customizing items, etc. The most difficult requirement to meet at the moment is that they ...
2
votes
3answers
93 views

How can I avoid instantiating multiple instances of a RigidBody?

I could use a little help. I've a state machine for an NPC that does a melee attack. The problem I'm running into is that the current code instantiates multiple instances when I only need one per ...
0
votes
1answer
115 views

Unity3D - post-process unwanted on UI

I have scene rendered with a single camera using target texture (a). Second camera is used to render UI and using same target texture (a) as the first one. Third camera takes target texture (a), ...
1
vote
0answers
75 views

Scale texture at runtime in unity

I need to scale the texture in unity3d.In unity we are able to adjust the scale using the option in the toolbar How will I scale the texture at runtime using the mouse pointer. the texture should ...
1
vote
3answers
915 views

In what size should i design sprites for unity iOS?

I am developing a 2D platform game in unity.I have conceptualised the game and have to design the art assets/sprites, but the problem is at what resolution or size do i design them? If I target the ...
4
votes
3answers
188 views

Can I use two Collision Boxes on the same GameObject?

I have two Collision Boxes on the same GameObject. I don't want the Collision Boxes to be triggers. I want the Collision Boxes on the actual GameObject, not its children. For example, if I want to ...
0
votes
1answer
34 views

Unity Editor equivalent of Playmode Start()

I am attempting to draw gizmos for easy debug in the editor. The gizmos code uses an array that gets populated during the start function. The array only needs to be populated once and may cause issues ...
1
vote
3answers
267 views

How to check for every n value interval, but not exactly n

Let's say I have a game where the player earns n number of points when they pick up an item; the value of n differs depending on what they picked up. When they pick up an item, a method gets called ...
3
votes
1answer
275 views

Writing a glow shader

I'm trying to learn writing shaders. And I've pieced together something that is kinda working. I want to create a transparent glow around a sphere. The problem I have is that I can't seem to alter the ...
1
vote
1answer
155 views

Handling items at the Server-side

I'm coding a very simple game Rust/Dayz like with Unity, and I'm using Forge Networking as network library. A few days ago, I started to code the Loot system. The Loots in my game are Items that ...
0
votes
2answers
328 views

Gyroscope Parallax Effect In Unity

I want to make a parallax effect in Unity 3D with gyroscope like the one on this site: http://matthew.wagerfield.com/parallax/ I found an asset, but it is too expensive. So I need a script which I ...
0
votes
2answers
266 views

Unity 3D: How to stop/reset 2D sprite animation after releasing key?

Im following a tutorial to create animations with a 2D sprite character. But i put in my own. Which has 8 animation positions. For some reason when my guy walks around,then stop, the walkings ...
0
votes
1answer
39 views

Why this if logic isnot short circuiting?

I've this script in UNITY to check if the hit RayCastHid2D variable has some gameobject with hole tag or a parent gameobject with hole tag when I Raycast... if (hit.collider != null && (hit....
3
votes
1answer
67 views

How can I turn off the sound from another scene?

I attached music file to my first scene and thanks to following javascipt code, sound continues without stopping in other scenes. public static var object : SingletonMusic = null; function Awake() { ...
3
votes
2answers
70 views

Problem with trigger

I am making a melee attack with my game, but I'm stuck in a problem related to using triggers. The enemy NPCs have a sphere collider set on trigger so I will know who is inside their range (radius of ...
2
votes
1answer
181 views

Unity 2D Hingejoints break under extreme force

I have added a rope to my game that is made up of multiple small gameobjects, each connected to eachother by a HingeJoint2D. Since 1 unit of mass in Unity is supposed to represent 1 kg, I've made the ...
2
votes
1answer
55 views

Rotating object around a rotating one?

I am developing a solar system animation in Unity3D. Planets rotates around sun. But ı have an issue simulating satellites like Moon. Moon should be rotating around world normally and moon should be ...
1
vote
1answer
116 views

How to remove destroyed clones out of the Hierarchy in Unity2D

I made a 2D edge collider which on contact destroys the other gameobject. When I launch the game all the other gameobjects in fact get destroyed but the clones are still listed in the Hierarchy. How ...
2
votes
1answer
134 views

Why are these unity UI buttons only responding to the top half?

I'm instantiating UI objects with buttons on them into a scrollrect. For some reason, all of the buttons will ignore their bottom half with the exception of the last prefab instantiated. Below is a ...
2
votes
1answer
114 views

Two 2D objects in Unity aren't colliding together

In Unity 5, I have a player shooting a projectile in aim to hit a boss, and inflict damage upon contact with the projectile. Though for some reason, the projectile and boss aren't colliding with each ...
1
vote
0answers
75 views

Unity3D Photon - Failed to 'network-remove' GameObject"

Failed to 'network-remove' GameObject. Client is neither owner nor masterClient taking over for owner who left: View (0)2001 on Player(Clone) This is the error I repeatedly get. I'm using ...
1
vote
0answers
80 views

Screenshot preview freezes a game for a few seconds

I have a screenshot preview at the end of the level, but when I show it my game freezes for a bit(low fps for a few seconds). This is code I use to load screenshot and crop it(for a little preview ...
2
votes
1answer
91 views

Unity procedural textures

I'm wanting to have an object that does random animation in Unity, within the object. Basically, I want a floor that has lights that go through it. I'm trying to figure out exactly what is the best ...
-1
votes
1answer
178 views

increase and decrease coin count

I am working in coin system. if the player get the coin it adding to +1 coin. after game over i want to store the coins. if the player again earn coin means the new coin want to add with existing ...
-2
votes
1answer
102 views

Cannot clone game object in Unity C#

I am having a bit of an issue with getting an empty bullet shell to clone every time a bullet is shot. The first empty shell appears and drops, but after the first empty shell, nothing is cloned. I ...
1
vote
0answers
278 views

Unity 5 lighting broken

EDIT: I've discovered the cause of the problem and it might make more sense if I continue in another question. To start with unity has decided that lighting inside reflection probe bounding boxes is ...
3
votes
3answers
245 views

How do you apply relativistic physics to a 4x strategy game?

I had the big idea of trying to create a hard science fiction 4x strategy game (with the obvious space setting), which is supposed to simulate a realistic way of creating interstellar societies while ...
0
votes
0answers
94 views

Simulate a touch on a point where ray hits in Unity

I want to simulate a touch input on the position where a ray hits an object, and only if it hits something. I know that it's not common to do it with a raycast, but I need it this way for the HTC ...
5
votes
2answers
191 views

Drawing circles at the background of a 3D scene and updating their size

So, here is what I am trying to do in Unity 5 (using C#). I want to draw a a 2D circle at the background of a 3D scene and apply a texture/image to fill it. Just like it would be if the circle was in ...
0
votes
1answer
78 views

Unity: Model Construction on the fly

So, forgive me if some of the terminology is wrong, I am just getting started with Unity again and I can't remember the proper names. I'm also on my phone, so I didn't have unity in front of me when I ...
1
vote
0answers
42 views

Applying Animation to specific parts of a humanoid model

I have imported a humanoid character from AutoDesk Character Generator into Unity. Once you specify that you want the character for Unity, a humanoid skeleton in integrated, in order to use MecAnim. ...
2
votes
3answers
489 views

2D Game has very bad lag because of one script?

I am making somewhat of a flappy bird clone (mostly for practice) and everything works fine, but it is just really slow with a low FPS of 13 and a max FPS of 28. Why would this be? So I ran a check ...
2
votes
0answers
135 views

Building an Octree for terrain generation

I've previously implemented marching cubes/tetrahedra to render an IsoSurface. It worked (YouTube), but the performance was dire as I never got around to implementing LoD (or even removing distant ...
2
votes
0answers
88 views

Unity: Create a custom editor for Vector2

I'm starting to dig into Unity's editor customization. What I'm looking for is a way to create custom line (or a point at least) which I could move around in SceneView and set a Vector2 value that way....
3
votes
1answer
297 views

Removing seams between procedurally-generated spherical terrain tiles

I'm working on procedural planet generation project in Unity. To create a sphere, I use the following technique: Create six planes arranged as faces of a cube Normalize all vertices' positions to ...
1
vote
1answer
90 views

Load custom resources in Unity

The situation is I work in my free time on one study project. I have resources of one game packed in it's own format. My intent was to use those with Unity without converting them into Unity's inner ...
0
votes
0answers
47 views

Unity 5: Play animations one by one

I am building a 2D turn-based RPG with Unity 5. In the battle scene, there are multiple characters owned by the player and multiple enemies. During the player's move, the player selects an enemy ...
1
vote
1answer
373 views

Unity 5: Check if an object's collider contains the mouse click point

I am building a 2D turn-based RPG battle scene with Unity 5. The enemies are represented as 2D sprites with box colliders. In my script, the relevant enemy class is defined as: public class EnemyView ...