Questions tagged [unity3d-2dtools]

Use this tag if your question is about using Unity's built-in 2D features, like the Sprite type and the 2D physics engine, based on Box2D.

The 2D Tools refers to the collection of tools to make 2D applications.

Useful links


Related tags

492 questions
7
votes
2 answers

Why do my Unity Buttons need multiple taps to finally work?

As the title suggests, I have a screen with two canvases. Both literally a copy of each other, but simply having a different layout for my Portrait and Landscape orientations. As and when the orientation changes, I disable to appropriate Gameobject…
Augmented Jacob
  • 1,567
  • 19
  • 45
6
votes
1 answer

Shooting a projectile towards mouse location in Unity

I'm in the process of creating a 2D game where the player needs to click to shoot. Wherever the mouse cursor is on the screen is the direction to which the projectile will move. I was able to get the projectile to instantiate and to the mouse…
AwesomeBob2341
  • 135
  • 2
  • 14
6
votes
2 answers

Touch Controls unity 2D

I have script called PlayerCharacter to control a player on the Unity 2D Platform. It's perfect, working as usual. using UnityEngine; using System.Collections; using System.Collections.Generic; [RequireComponent(typeof…
user3186627
  • 71
  • 1
  • 1
  • 6
5
votes
3 answers

Blue screen appeared after Build & Run project in unity

So i made my first unity game. I run (play) the scene on unity every thing works fine. (no exceptions or error what so ever). Then i tried to Build & Run the project, but after launching the game, Unity splash screen appeared and than my screen was…
yestin
  • 53
  • 1
  • 4
5
votes
0 answers

Unity 2D side scrolling game stutter/jerk/lag issue when run on iOS devices

I just want to say thanks in advance for anyone you can provide some help on this we're completely stuck at the moment. Project Scenario : -> 2D side scrolling game with simple 2d sprites -> Camera is orthographic and stays in its place (camera…
4
votes
4 answers

Connecting Rule-Tiles with different textures in Unity (2D)

I am creating a 2D platformer in Unity and I am using ruletiles from the "2D Extras" add-on. I am currently trying to let two ruletiles connect with each other even if they have a different texture. Here you can see an example for the Ruletiles…
J. Kreller
  • 150
  • 1
  • 10
4
votes
1 answer

How to play 3D animation on a 2D canvas in Unity

I like to play animation on a Canvas. I made a canvas as shown in the following image. I like to play a golfer animation on the green color canvas. Is it possible? I have animation model as shown in the second figure. I like to play that golfer…
batuman
  • 7,066
  • 26
  • 107
  • 229
4
votes
2 answers

What is the consequence of doing heavy work in fixedUpdate()?

I know if I do too many thing in update() the consequence would be dropped frame rate below the target frame rate. But what would happen if I do the same thing in fixedUpdate()? Would it cause Unity's physicsEngine to mess up, or would it crash the…
AVAVT
  • 7,058
  • 2
  • 21
  • 44
4
votes
2 answers

PlayerPrefs are present after uninstalling the app developed with unity?

I am having a similar problem but only in one mobile SAMSUNG GALAXY S6, we are providing some default coins when player installs the game(suppose 15000). When i install the game, 14,500 coins are showing,when i checked it, playerperf has a key at…
Mohan Reddy
  • 49
  • 1
  • 7
4
votes
1 answer

Why is the SpriteRenderer color not updating at runtime?

I have a GameObject with a SpriteRenderer and its default color is set to white. At runtime I'm setting the color to Color.gray and for some reason it is not updating at runtime to the new gray tint. I have confirmed that the objects in my script…
vane
  • 2,125
  • 1
  • 21
  • 40
4
votes
1 answer

Why isn't my definition for OnCollisionEnter() being used?

I have a character that a Boolean flag which determines whether or not he is jumping (if he is jumping, he cannot jump again). When he jumps, the jump flag is set to true, and when he collides with something it is set back to false (so he can jump…
4
votes
1 answer

What is the most elegant way to let UI objects swallow touches in unity 5?

My game uses unity 5 new UI system with canvas. The game itself can receive touches to shoot ammos via functions OnMouseDown() on several game objects with 2D colliders indicating touchable areas, and I can adjust the priorities of different…
ArtS
  • 1,730
  • 1
  • 20
  • 43
4
votes
1 answer

BoxCollider2D bounds.Contain(somePoint) works not as expected

I have a little problem with BoxCollider2D. When I do this: bool someBool = someBounds.Contains(somePoint); I get expected result when the body has no rotation like on the picture 1. (red area is where somePoint makes someBool true) And when the…
Andy671
  • 75
  • 8
4
votes
1 answer

Feasibilty/efficieny of using 3D models for a 2D game

I've been using Unity3D for a while now and I've also had experience coding 2D games using LibGdx. In the past, I used to get my sprites off the net or make my own however that wasn't really the best way to do things since I'm more of a programmer…
Amposter
  • 787
  • 2
  • 8
  • 27
4
votes
2 answers

Unity: Can't find UI Layout Element Max Size

In Unity UI, LayoutElement has a min, prefered and flxible size, but it do not have a max size property. For example if I have a text1 and layoutElement.flxibleWith = 1 layoutElement.minHeight = 19 text1 with one line txt: But when I load text in…
hanan
  • 1,768
  • 1
  • 14
  • 19
1
2
3
32 33