Quantcast
Channel: Latest Questions by gdbjohnson
Browsing latest articles
Browse All 24 View Live

Spritesheets and Unity: best practices

Hello, I'm pretty new to Unity, and am currently porting a Cocos2d game into this new platform. I was using TexturePacker to create my spritesheets, but I'm wondering now what I should be looking at...

View Article



Why is Instantiated object's scale changing?

I have very simple code to instantiate a prefab object that is set like so many tutorial examples I am currently following. I am finding however, that my object below has a scale changed to (2, 2, 2),...

View Article

Setting the transform.position not working

I'm a bit confused as to what's happening here. The position of my transform is not changing despite me setting it to a zero vector. Here's the code. Any ideas why this change isn't taking? Vector3 v =...

View Article

Why does Unity Answers not allow me to add tags?

Somewhat of a meta question, but this has happened to me twice now where I have tried to submit a question here, only to be denied because the process of adding tags to the question fails. I then just...

View Article

My HUD UI events are being intercepted

I am building a 2D game with a HUD. On the HUD, I have a button (for pause). In the game, I detect taps on the screen to fire a gun with a gameobject that spans the screen. I reviewed EventSystems for...

View Article


Creating an AssetList of Scriptable Objects

I was playing around a bit with creating asset lists and I noticed a curious behaviour that I wanted to understand a bit better. I have: [System.Serializable] public class SpawnItemList :...

View Article

Design pattern: Loading custom data into prefab objects

I have a prefab object that I load into memory, and then I apply some changes to it (initialization stuff), and then I send it to an object pooler to load a bunch of copies into memory for game play....

View Article

Why does this Lerp take twice as long as I expect?

I am animating a box onto a panel (on a Canvas) using a simple LERP in a Coroutine. I take a duration parameter, normalize it, and then apply the LERP. However, I am noticing that the amount of time...

View Article


Rotating an Image around Z-Axis (2D)

I have a 2D game, and I have an Image on a Canvas. I read the online docs, and read a few help posts on this topic, but I must admit to being confused as to why something that should be trivial eludes...

View Article


Animating UI Transforms in Unity 4.6

I think I am beginning to understand this problem, after reading some similar questions, but they were old. So, I'm asking again to see if there's an updated answer based on v4.6, or perhaps v5.0 has...

View Article

RigidBody2D Performance with AddForce on WakeUp

I recently explored using RigidBody2D.AddForce to move my sprites around on the screen, instead of translating the gameobjects directly in FixedUpdate. When the user pauses my game, I was saving the...

View Article

How to know which Collider fires Trigger event

I have an object hierarchy with multiple coliders, and the parent has a rigidbody on it. I have learned now that each collider will cascade it's collision messages up the hierarchy to the first...

View Article
Browsing latest articles
Browse All 24 View Live




Latest Images