Unity 4.3 2d Create Sprite Programmatically

Posted on Nov 13, 2013 7:05 AM, Ios - Stack Overflow | stackoverflow.com

I'm trying my first steps with Unity's new 2d environment at the moment (coming from cocos2d). I'd love to have my game work on iOS / Android My question is: How can I position sprites pixel perfect / depending on screen size. E.g. have the menu button on the top left on the screen.

I'm parsing levels from XML files. In those files the positions of each sprite are determined. Where's the best point to parse that file and how can I create my level from that file?

Hope somebody can help!

Tagged unity

Similar Messages
  1. Ubuntu 12.04 lost Unity?, now using Unity 2D
  2. (Unity 2D) Destroy instantiated prefab when it goes off screen?
  3. (Unity 2D) How to stop default animation?
  4. 12.04 + Unity 2D: "Run command" prompt keeps popping up on alt-anything
  5. (12.04) Unity 2D seems to be eating alt-shift-right-arrow
  6. Unity 3D Compositing Broken on Two Different Systems, Have To Use 2D
  7. How do I create a white rectangle in Unity 2D?
  8. Is there any ways to optimize transparent objects on iOS? Our framerate is horrible!
  9. Learn Unity 2d game development for Android
  10. 2D massive stutters on iOS device caused by swapping Overhead and Device.Present
  11. Changing Sprite Spawns
  12. How to create sprite surface like in "cham cham"
  13. Computer running too slow help me to remove Unity and install lighter DE
  14. 12.04 Unity 2D: Want to auto-hide the launcher but this is now broken
  15. Screen Rendering in Unity 2D Android Build Glitch?
  16. Unity game crashes on my android after some time
  17. Unity Game Deveopment - Looping background
  18. IOS - Sprite Helper - Images are blurred on cocos2d v3
  19. Social board Game cross platform, suggestions?

Ubuntu 12.04 lost Unity?, now using Unity 2D

Posted on Nov 17, 2013 5:10 AM,

I believe I accidentally uninstalled Unity when uninstalling Compi. Now only i can use Unity 2D. Please let me know what's package name for Unity to be installed....

Read RepliesRead Related

(Unity 2D) Destroy instantiated prefab when it goes off screen?

Posted on Apr 22, 2014 11:13 AM,

Im making a 2D Game in Unity 2D(4.3), and I need to destroy the prefabs that get instantiated when those prefabs go off the screen. I have written some code to spawn the Objects, but then I want to delete those prefabs when they go off screen. Here is the code I have written so far. To...

Read RepliesRead Related

(Unity 2D) How to stop default animation?

Posted on Apr 29, 2014 9:01 AM,

Yet another error in Unity with my game.. Like always in Unity. I'm making a game in Unity 2D (4.3) and whenever I start the game, the default animation plays. How can I stop this? I havent told it to start in void Start() or anything... Also, animation.Play("Anim") doesnt work. I'l...

Read RepliesRead Related

12.04 + Unity 2D: "Run command" prompt keeps popping up on alt-anything

Posted on Jun 12, 2014 3:07 AM,

I'm using Ubuntu 12.04 with the Unity 2D desktop. When I started using Unity a couple of months ago, I found that the Alt key would open a "run command" prompt. This was annoying, so I looked in the Keyboard > Shortcuts system control panel and found "Run command prompt," and disabled...

Read RepliesRead Related

(12.04) Unity 2D seems to be eating alt-shift-right-arrow

Posted on Jun 17, 2014 8:46 AM,

Okay... another keyboard mapping question with Unity (2D) in Ubuntu 12.04. I use org-mode in Emacs daily. It uses Alt-Shift-LeftArrow to promote a subtree (move it one level to the left) and Alt-Shift-RightArrow to demote a subtree. Alt-Shift-LeftArrow works perfectly. It...

Read RepliesRead Related

Unity 3D Compositing Broken on Two Different Systems, Have To Use 2D

Posted on Nov 19, 2013 5:44 AM,

So Unity 3D stopped working a while back, on two devices, with wildly different hardware. One's an AMD64 desktop with a Radeon HD Catalyst setup, the other is an Acer dual Celeron with some form of integrated Intel Graphics chipset. I'm forced into using Unity 2D, which lacks some features -...

Read RepliesRead Related

How do I create a white rectangle in Unity 2D?

Posted on Dec 18, 2013 11:29 AM,

Hello Stack Overflow community. I've just started to use Unity to port my video game to multiple platforms. I had a question about creating objects programmatically in Unity. This is what it my game looks like currently: ...

Read RepliesRead Related

Is there any ways to optimize transparent objects on iOS? Our framerate is horrible!

Posted on Dec 23, 2013 11:40 AM,

Our game is a 2D sprite game (not using Unity's new sprite engine), so almost every single thing on the screen is rendered with alpha, since they are all 2D shapes surrounded by transparent pixels. In addition, we have some occasional effects that cover large parts of the screen with...

Read RepliesRead Related

Learn Unity 2d game development for Android

Posted on Jan 07, 2014 2:51 AM,

I have experience in developing android applications for a while, but I am more interested in moving on making games(starting from android platform). After some research i decided that unity is the best platform for starting game development. So my question what is the best place to start learning unity 2...

Read RepliesRead Related

2D massive stutters on iOS device caused by swapping Overhead and Device.Present

Posted on Feb 16, 2014 9:24 AM,

I am trying to make 2d platform game on mobile device, but it is impossible using that version of Unity to make it on iPhone4. To debug this I've used Unity 2d official demo and stripped it from everything except simple background and hero player, Of course there is some bug with animator which ...

Read RepliesRead Related

Changing Sprite Spawns

Posted on Mar 17, 2014 10:46 AM,

Here is my code that I m using below and i want it to spawn from the bottom of the x-axis in portrait mode right now in spawns from the top in portrait mode how do i edit the code to do this? - (void)addBalloon { // Create sprite SKSpriteNode * monster = [SKSpriteNode sprit...

Read RepliesRead Related

How to create sprite surface like in "cham cham"

Posted on Apr 12, 2014 6:47 AM,

My question maybe a bit too broad but i am going for the concept. How can i create surface as they did in "Cham Cham" app https://itunes.apple.com/il/app/cham-cham/id760567889?mt=8. I got most of...

Read RepliesRead Related

Computer running too slow help me to remove Unity and install lighter DE

Posted on May 04, 2014 6:19 AM,

Hi . I have Pentium 4 with 1 GB ram . It was fine with Ubuntu 12 04 but when I upgraded it to 14 04 it became too slow to use . Then I found out that Unity 2D was removed with 12 10 . Now I want to install lighter DE LXDE or xfce and remove unity . how can I do that ..? Please guide me s...

Read RepliesRead Related

12.04 Unity 2D: Want to auto-hide the launcher but this is now broken

Posted on Jun 21, 2014 3:01 AM,

Somehow, my Unity desktop settings have gotten royally messed up, and I need help to restore them. I like to auto-hide the launcher/dock (left-hand panel). This is no longer working. I have re-enabled auto-hide in System Settings > Appearance > Behavior, no luck. I used CompizSettings...

Read RepliesRead Related

Screen Rendering in Unity 2D Android Build Glitch?

Posted on Jul 02, 2014 2:57 AM,

I have searched both Stack Overflow, and Unity Answers, but I can't find any information on this problem. I have asked a question on unity answers, still awaiting response. The problem I have is when I build to either Android, or Web, (haven't tried others), there is a black bar on the right...

Read RepliesRead Related

Unity game crashes on my android after some time

Posted on Jul 29, 2014 4:30 AM,

I have a nice Unity 2D game that I developed and installed on my android 4.4.2 device. I'm able to play the game for a couple of minutes, and then for no reason the game just crashes... I'm not able to see any exception or any error information. All I can see on my screen is "GameName has stopped"....

Read RepliesRead Related

Unity Game Deveopment - Looping background

Posted on Aug 14, 2014 2:06 AM,

I am currently learning C# with Unity 2D but I have come across an issue after following a tutorial. I am trying to get my camera to follow my player within the game but also to get my background looping so I dont have to have it miles long. I have added a boxcollider2D to outside left edge...

Read RepliesRead Related

IOS - Sprite Helper - Images are blurred on cocos2d v3

Posted on Sep 01, 2014 2:50 AM,

Usually I am using Sprite Helper in order to create Sprite Sheets. Couple of days ago, I upgraded Cocos2D from v2 to v3. Now all the sprites are blurred, same sprites that where OK before the upgrade. Example of my code: First: [[CCSpriteFrameCache ...

Read RepliesRead Related

Social board Game cross platform, suggestions?

Posted on Nov 14, 2013 6:22 AM,

For a turn based social board game like Words With Friends and Scrabble, which development strategy suits best? Cocos2d-x Cocos2d and Andengine UIKit and Android Native UI Unity 2d - No experience here but Unity 4.3 looks promising for 2d. I have...

Read RepliesRead Related
 
 
Email:

Username:

Password:


Register

Username:

Password:

Login