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 2D : How to support multi platform and different aspect ratio devices in Unity 2D?
  7. How to create Sprite shattering and falling effect in cocos2d v3?
  8. Unity 3D Compositing Broken on Two Different Systems, Have To Use 2D
  9. How do I create a white rectangle in Unity 2D?
  10. Unity 2D touch code destorying all objects?
  11. Devoloping 2d games using unity game engine
  12. Is there any ways to optimize transparent objects on iOS? Our framerate is horrible!
  13. Learn Unity 2d game development for Android
  14. 2D massive stutters on iOS device caused by swapping Overhead and Device.Present
  15. Changing Sprite Spawns
  16. How to create sprite surface like in "cham cham"
  17. Computer running too slow help me to remove Unity and install lighter DE
  18. 12.04 Unity 2D: Want to auto-hide the launcher but this is now broken
  19. Screen Rendering in Unity 2D Android Build Glitch?

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....

(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...

(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...

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...

(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...

Unity 2D : How to support multi platform and different aspect ratio devices in Unity 2D?

Posted on Sep 29, 2014 12:54 PM,

I am newbie to Unity 2D and creating a game in it. I wanted run that game on almost all Android, iOS devices as well as desktops(Mac,Windows) and web browsers. I am bit curious to see how Unity2D will handle this scenario and gives same user experience on various devices? Also I...

How to create Sprite shattering and falling effect in cocos2d v3?

Posted on Nov 29, 2014 9:05 AM,

I am new in cocos2d iPhone Development.My Question is How we can create Sprite shattering and falling effect(blast effect/glass break effect) in cocos2d v3? In cocos2d v2 the library is available but how we can create in cocos2d v3. Is their any source code available in cocos2dv3? Thank You....

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 -...

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: ...

Unity 2D touch code destorying all objects?

Posted on Sep 06, 2014 3:21 AM,

So, after spending a couple of hours looking for solutions to handle touch controls in Unity I found a solution that seems to work. Problem is, when a touch is detected, every single object with a 2D collider is destroyed. I only want the object that was touched to be destroyed. Every Game...

Devoloping 2d games using unity game engine

Posted on Oct 13, 2014 12:22 PM,

I want to devolope an game but I have some query please help me. For devoloping any simple 2d game using unity what basic knowledge is needed? I'm beginner so please suggest me and animation knowledge is nedded for that? And what type of knowledge is needed for expert in unity 2d games....

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...

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...

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 ...

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...

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...

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...

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...

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...

 
 
Email:

Username:

Password:


Register

Username:

Password:

Login