Search Unity

SM2 - 2D made easy and efficient!

Discussion in 'iOS and tvOS' started by Brady, Nov 4, 2009.

  1. Peter D

    Peter D

    Joined:
    May 3, 2009
    Posts:
    106
    :p

    Er is it just me or does the SM2 documentation tell you everything except what you need to actually do to get the sprite manager into Unity in the first place.

    I worked out the import package thing but, you might want to add that to the instructions for anyone not familiar with how unity does this sort of thing.

    A simply install section in the docs would do it.
     
  2. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    I believe it does say to import the package, but as you pointed out, it does not explain how to import packages in Unity. I'll put a note to add that. Thanks!
     
  3. tau

    tau

    Joined:
    Dec 15, 2008
    Posts:
    113
    Brady,

    I found a strange issue. I have a Trail Renderer on one of my sprites, a separate material attached to it. When I generate an atlas, it picks up the material from the Trail Renderer and not from the Mesh Renderer, weather the Trail Renderer is disabled or enabled.
     
  4. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Ahh yes, the atlas builder assumes that there is only one mesh renderer component on a given GO and so it uses the default material. See if it is fixed if you reverse the order of the materials on the GO. But I'll look into it.
     
  5. tau

    tau

    Joined:
    Dec 15, 2008
    Posts:
    113
    Found another interesting thing, started to get this when put sprite GO into a prefab, the prefab is made of few sprite GOs.
    If I create prefabs with sprite objects, it seems like initiated prefab sprite does not recalculate UVs correctly from time to time. Forcing SetCamera() forces UV calculation on PixelPerfect (Packed), but Non-PixelPerfect (Packed) do not get the UV recalculated and the sprite looks like it tries to put the whole atlas on the sprite mesh.
     
  6. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    I think this is probably because you did not apply changes to prefab when you rebuilt the atlas? When an atlas is rebuilt because of a change made to a PackedSprite, it makes the changes to instances in the current scene. So if those are instances of a prefab, you'll have to apply the changes to the prefab to ensure that the new UVs are set in the prefab as well as the instance.

    In a future (probably the next) release there will be an option in the atlas builder to automatically apply changes to prefabs to save you this step.

    Let me know if that's not the problem and if it is something else.
     
  7. tau

    tau

    Joined:
    Dec 15, 2008
    Posts:
    113
    Brady, that was it! I rebuilt the atlases and went manually through all of the prefab copies and applied changes back to the original prefabs, worked like a charm.

    Thanks for quick help!
    Happy Holidays!
     
  8. dcp468

    dcp468

    Joined:
    Aug 25, 2009
    Posts:
    129
    Hi Brady

    I'm still relatively new to Unity iPhone and SM2, however in the past couple of months I've been doing lots of prototyping to bring me up to speed with the essentials for game programming, (i.e. managing touches, accessing objects, components of objects, game sounds (sfx, and background) especially between scenes, saving game state etc etc), now at the moment I've been trying to design my scenes and I've noticed some interesting things (regarding memory allocation) which has lead me to do some experiments with SM2 (particularly with sprite material and atlas sizes i.e. 512x512 1024x104).

    My initial scenes were using one 1024x1024 material managed by SM2 per scene and I noticed that it crashed when loading in the next scene and I received a memory warning from XCODE.

    I therefore created several new scenes each one was basically striped bare of everything except for a single material in each a camera (Note: the scenes contained NO scripts except one that moved to the next scene after 15 seconds).

    Scenes:
    1) test-scene-256x256 (has only one 256x256 atlas associated material)
    2) test-scene-512x512 (has only one 512x512 atlas associated material)
    3) test-scene-1024x512 (has only one 1024x512 atlas associated material)
    4) test-scene-1024x1024 (has only one 1024x1024 atlas associated material)

    Now I used the INSTRUMENTS tool in XCODE and here was the memory allocation per scene

    - 256x256 scene was allocated 16.4MB Real Memory 77MB of Virtual Memory
    - 512x512 scene was allocated 22.5MB Real Memory 86MB of Virtual Memory
    - 1024x512 scene was allocated 29.88MB Real Memory 94MB of Virtual Memory
    - 1024x1024 scene was allocated 45MB Real Memory 110MB of Virtual Memory

    Note: a completely empty scene consumes 13.7MB

    Now I've read here: http://forum.unity3d.com/viewtopic.php?t=37455&highlight=memory+iphone that 40MB is the MAX and after 45 it will automatically shut your app down which keep happening to me.

    Are these values too high especially the 1024 one which seems to be at the MAX? Note: I'm not using "Compressed Textures" and Generate Mip Maps is currently checked.

    Now I would prefer particular for my menu section to have one big scene with one big material 1024x1024 so everything would move very quickly from one area to another when a user touches a button (i.e. main menu to the stats section) and that does help out with maintaining the same continuous background music as well.

    however I've noticed that I can load in basically an empty scene with a LOADING message as I move from one scene to another which stops its from using up too much memory and therefore crashing, ... Is this best practice? And I can't see how I can go from one scene to another without doing this!

    I.E. Scene 1 (1024x1024) --> Scene (Loading Msg) --> Scene 2 (1024x1024)


    Cheers
    Dean
     
  9. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Yes it is.
    Fact is that during the scene switch there is a time frame within which the old assets are "on the way out" while the new ones are "on the way in" which will cause a spike.

    also if you didn't remove the previous textures from your scene you actually have the atlas + the original textures in
     
  10. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Yes, dreamora is correct. Be sure to move your "source" textures (the ones that are used to build your atlases) outside of your atlas folder before doing your device build. I recommend keeping them all organized under a folder so that you can just drag that one folder out, and then back in when the build is done.

    In an up-coming release, there will be a custom build option that will take care of this for you. But for now, if you don't do this, then the source textures will be loaded as well, taking up memory unnecessarily.
     
  11. dcp468

    dcp468

    Joined:
    Aug 25, 2009
    Posts:
    129
    Thanks Dreamora Brady.

    Actually I experimented with the empty scene idea from your comment made here Dreamora: http://forum.unity3d.com/viewtopic.php?t=35577&highlight=memory+iphone. Thanks!

    Thank you both for your suggestions regarding moving out the source textures after making the Atlases but before making the build (I do remember reading this before), ... I noticed a massive improvement to the memory allocation using the Instruments tool.

    For everyone's reference:
    I re-ran a modified experiment with a build that comprised of simply one Scene that has one 1024 x 1024 Atlas + original source texture(s) that where used to create the Atlas. Then I made another build however I removed the original source textures and here are the results:

    BEFORE (1024 x 1024 Atlas source textures):
    Real Memory: 44.95MB
    Virtual Memory: 110.01MB


    AFTER (1024 x 1024 Atlas only):
    Real Memory: 19.62MB
    Virtual Memory: 83.39MB


    Pretty good improvement. So I'm assuming with the BEFORE experiment the scene is loading both the Atlas all the other textures that made up the atlas in at run time, ... is that right?

    Cheers
    Dean
     
  12. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Yes, that's right. That's why it's important to remove them before the build.
     
  13. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
    Can't work on iPhone 1.5.1? :cry:
     
  14. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    There is no problem that prevents SM2 working with Unity iPhone 1.5.1
     
  15. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    dreamora is correct, it was specifically designed to work with Unity iPhone (as well as Unity desktop). The "error" message I think you are referring to is a bug in Unity iPhone dealing with the editor GUI. This does not affect your built player in any way, and in fact, does not affect the SM2 timeline editor at all either. So it is nothing to worry about, it works just fine. And hopefully Unity will have that error message fixed in the next version.
     
  16. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
    Oh,So that.
    Who can provide a more detailed video tutorial explaining how to use it to develop games? :wink:
     
  17. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    The video tutorials currently available show how to use almost all of the features available in-editor. There is not currently a video tutorial on the various scripting features, but if you look at the demo script in the demo project package, you'll find lots of clear examples of how to use almost all of the scripting features.

    If anything is unclear, feel free to ask me about it.
     
  18. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    I just bought this, and I'm looking into the available options. I've been using SpriteManager 1 for Tumbledrop on iPhone, and SM2 seems like an improvement in every way.

    I love the Pixel Perfect option, but I would really prefer for there to be more options. Is it possible to make it pixel perfect for a specific resolution? So that my sprites stick to a 320x240 grid, or just so that they are pixel perfect at the preferred resolution but will scale up or down at alternative resolutions. Would it be possible to allow for that?
     
  19. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    To accomplish that, I would just initially set up the size of the sprite by turning pixelPerfect on at the desired "default" resolution, then once the size is set in-editor, disable pixelPerfect but leave "autoResize" on. The sprite will remain that world-size, but will still resize proportionately when animated.
     
  20. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    But is it possible to make it snap to a low resolution matrix? Does the pixel perfect option presently snap the sprite to the nearest pixel?
     
  21. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Actually, what it does is it looks at how many screen pixels there are per world space unit and scales the sprite accordingly. So a viewport that is 100x100 pixels in size and 10x10 worldspace units would scale a 10x10 pixel sprite to be 1x1 worldspace units in size. It is not like GUITexture where there is a one-to-one pixel *display* pairing, so that the texture gets "snapped". This means you can still do sub-pixel movement and rotation which results in much smoother animation.
     
  22. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    I see! In which case, I'd like to put it in as a feature request.

    Right now it's really tricky to do 'pixel doubled' games, and it would be really helpful if SpriteManager2 came with some support for that. Also, it would be useful for GUI items, as they are static and are better off snapping to the proper pixel matrix.
     
  23. jbury

    jbury

    Joined:
    Nov 7, 2008
    Posts:
    87
    Hey Brady! I spent some more time implementing SM2 into my game over christmas and its awesome

    However I have a small issue, for the bullets in my game I have 10 bullets instantiated with the packed sprite on, if a player fires it plays the "playerfire" animation so the bullet looks like the players bullet, I also have an "enemyfire" animation with the artwork looking different for the enemies

    however it seems that every now and then for the player and enemies, instead of the bullet looking correctly it seems to use the static graphic instead - we're talking about it happening maybe 5 times over the course of 2 minutes

    Any ideas what it could be? (my firing code moves the bullet into place, plays the PackedSprite animation and then moves it....)
     
  24. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    jbury:
    Nothing comes immediately to mind. I would double-check your code that calls the animation as it sounds like the animation may not be getting called by your code in time. Just a thought. If you can put together a sample project that reproduces the issue, I'd be happy to give it a look. But without more information, I don't have any behavioural issues in mind that might fit this description.
     
  25. tau

    tau

    Joined:
    Dec 15, 2008
    Posts:
    113
    jbury Brady:

    I think I was experiencing the same when I had same setup (2 different bullets on one atlas and one prefab GO). The way I fixed it was to set to create a method (C#) to play the correct animation like:
    Code (csharp):
    1.  
    2. private void SetAnim(int idx)
    3. {
    4.     sprite.defaultAnim = idx;
    5.     sprite.PlayAnim(idx);
    6. }
    7.  
    The animation block (#idx) has the setting OnAnimEnd=Play_Default_Anim, so if you have 1-2 frame animation, it loops when it's done and does not revert to static image.

    Brady, I think the confusion would be solved by adding a new option to the OnAnimEnd called "Loop" or similar which will force the current animation to loop indefinitely until changed. Currently, the option "Do_Nothing" reverts the sprite to the static image.
     
  26. jbury

    jbury

    Joined:
    Nov 7, 2008
    Posts:
    87
    Tau: this did indeed solve my issue - thanks!
     
  27. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Ahh yes, the OnAnimEnd could definitely be it. Sorry, I was up really late last night and I guess I was thinking clearly, but I should have thought of that one. However, Do_Nothing should not be reverting to static. It should just stop at the last frame. Only Revert_To_Static should do that. Can you confirm that Do_Nothing reverts to static? It's not doing that here on my end.
     
  28. dcp468

    dcp468

    Joined:
    Aug 25, 2009
    Posts:
    129
    Hey Brady, ... I've been using SM2 (i.e. packed sprites) with all of my game objects and prefabs with great success to date, however I'm trying to implement a progress bar which Is similar to the bar in the bejeweled 2 game where in the Action game the bar is always getting smaller (i.e. moving or shrinking to the left as time goes on) however if you make the correct choices the bar gets bigger (i.e. moves closer to the right). If the bar gets all the way to the left, it's game over or if the bar gets all the way to the right you move to the next level. I couldn't think of how I could use SM2 in a way to replicate this functionality so I created a packed sprite GO for my bar and gave it one default texture (i.e. the bar) and during the Update function I'm simply setting the packed sprites width using the SetSize(width: float, height : float) call either increasing or decreasing the width of the sprite. Now I've got it working the way I wont however I noticed when the texture gets smaller it does distort a little (I'm aware that I'm trying to squish a texture down to nothing so I was sort of expecting this side-effect). ... do you have any thought's on how to fix or improve the quality of the sprite?, ... or is this even possible to fix it with my approach.

    Cheers.
     
  29. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    You probably want expose SpriteBase's UV array ("uvs") in some way to your managing script, then you can call SetUVs() to adjust the portions of the texture that are getting displayed. So let's say you have a progress bar that goes from red on the left to green on the right, such that if the bar is shrink down way to the left, only red is visible, but if it is at 100%, then you can see the full transition from red to green. So to do this, your full red-green sweep would be your starting UV setup. Then to size it down, you'd multiply the right-most UV's right-hand coordinates to be whatever percentage of the total bar length you want. In other words, if the bar was to be at 50% width, then you'd take the original UV width and multiply it by 0.5. So you'd do something like the following (untested):

    Code (csharp):
    1.  
    2. Vector2 uvTopLeft = mySprite.uvs[0];
    3. Vector2 uvBottomLeft = mySprite.uvs[1];
    4. Vector2 uvTopRight = mySprite.uvs[3];
    5. Vector2 uvBottomRight = mySprite.uvs[2];
    6.  
    7. // barWidthPct is a value from 0-1 representing the percentage width of the bar:
    8. mySprite.SetUVs(new Rect(uvBottomLeft.x, uvBottomLeft.y, uvTopRight.x*barWidthPct, uvTopLeft.y-uvBottomLeft.y));
    9.  
    So whenever the bar is resized, update barWidthPct with a scalar value (0-1) representing what percentage of the bar is visible. Then call the above code (can be optimized, but is explicit for illustration's sake). This should make it so that if the bar is at, say, 50% width, then only the left half of the texture is visible.

    You could also accomplish this using the Sprite class using SetUVsFromPixelCoords() and that would keep you from having to expose the uv array. To do it this way, you'd just scale the x-axis pixel coordinates of the source graphic according to the current bar width like so:

    Code (csharp):
    1.  
    2. mySprite.SetUVsFromPixelCoords(new Rect(barSpriteLeftPixel, barSpriteBottomPixel, barSpriteWidth * barWidthPct, barSpriteHeight));
    3.  
    Let me know if you have any other questions.
     
  30. jbury

    jbury

    Joined:
    Nov 7, 2008
    Posts:
    87
    Hey Brady, I actually had mine set to Do_Nothing, however I had the loop cycles set to -1 to loop indefinitely as I figured it would never get to the end of the animation as it would keep looping

    It worked most of the time, it just sometimes would show the static image instead, all fixed now with Taus stuff though :D
     
  31. chrisError

    chrisError

    Joined:
    Jul 11, 2008
    Posts:
    26
    Hi brady,

    any ideas why my game would run fine in Unity, but occasionally when I am testing on device I get this error on start up

    NullReferenceException occured in:
    IP 0x74fafc at offset 0x2c of method SpriteBase:CalcSize () (0x74fad0 0x74fe10)[domain 0x14eae70 - UnityDomainLoad.exe]


    thanks,


    Chris
     
  32. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Since CalcSize() only handles value types, and therefore could not be generating a null reference exception from the code within it, I would suspect that the exception is being generated because CalcSize() itself is being called on a null sprite reference. The problem is probably that somehow your sprite is accidentally getting deleted by other code, or one of your sprite references is null.
     
  33. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    I have SM2 and I am making a 2D game in Unity by constraining the Game Objects to one plane. But the characters are 3D and for the character animation I would like to use 3D character animations that were generated in Maya. Is it possible to use 3D character animations in Sprite Manager 2? Or do I need to generate 2D character animations in Maya of the 3D characters for Sprite Manager 2?
     
  34. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    If by 3D character animations you mean skinned meshes, no, SM2 is a sprite-based graphics solution. However, depending on your target platform and the complexity you want to be able to display, you may want to render your character animations out to sprites. For instance, if you'll have lots of characters on-screen at a time and the poly-count would be too much for the iPhone, then you could render these animations out to sprites and SM2 will automatically build the sprite sheets for you. This would reduce a high-poly character down to only 2 polys (a single quad), saving TONS of performance for a device like iPhone.
     
  35. MellowClam

    MellowClam

    Joined:
    Aug 18, 2009
    Posts:
    15
    I've recently joined the SM2 bandwagon and I have to say I'm very impressed. The code is elegant and easy to understand. This has saved me a ton of work!

    I have a noob question, however. Is there a way to turn off a sprite's visibility? I can't seem to find a simple way to just switch it off without having to modify the code. I'd rather use what is in place if there is a simple solution.

    Thanks!
     
  36. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    There is not currently a "Hide()" method or ".hidden" property as in SM1, but you can hide it using SetColor() provided you are using a vertex colored shader such as the one provided with SM2. The other way is to simply set the sprite's GameObject's .active property to false.

    I have it on my list, however, to add a Hide() method.
     
  37. Fieldrin

    Fieldrin

    Joined:
    Dec 7, 2009
    Posts:
    3
    I am new to SM2 and not much of a programmer in any sense of the word. I have a problem that I don't know how to solve, or two problems that may be strongly related:

    I'm working on a sidescroller and I was planning on making a sort of tile prefab for the ground the character walks on. Unfortunately I keep getting some flickering between tiles.

    I'm basically just positioning packed sprite game objects next to each other: is there a better way to do this?

    My second problem is that the objects in my scene view are not the same distance away from each other when I try running the game.

    If any of that needs more detail let me know.
     
  38. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    I'm not sure what you mean by flickering. If you mean two tiles that overlap flicker between the two, you'll need to make sure one is somewhat nearer to the camera than the other so that there is no "Z-fighting". If you mean that there is a gap between the tiles, this would just be a placement precision issue which could possibly be solved by using tiles with exact, round numbered sizes and distances, or by programmatically placing the tiles at exact intervals.

    When you say that the objects are not the same distance, I presume you mean that the tiles aren't placed at precise regular intervals? If so, I'd recommend either using collider-based placement snapping in Unity 2.6, then just bring your project back into Unity iPhone after having built the levels, or use programmical placement.

    Over the next month or so I'm looking into supporting the tilemap format produced by the 3rd party tile mapper "Tiled". We'll see, no promises at the moment on that. But if it works out, it would probably be a great solution for your situation.

    Let me know if you have any questions.
     
  39. tau

    tau

    Joined:
    Dec 15, 2008
    Posts:
    113
    I'm glad you are looking into that. I recently needed it for an iPhone game, but went building my own map editor due to some specific game design requirements.
    I tested a tiled map rendering for a small map, it works acceptable, but I have a feeling that to have a big map, the sprites need to be combined into one big mesh with one common atlas.
     
  40. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
    I do not know how to use the sm develop games, who can probably talk about the development proces
     
  41. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    I'd love to help you however I can. But developing a game is a big and very broad thing. Are there specific things about how to use SM2 you'd like to know?
     
  42. jitsua

    jitsua

    Joined:
    Apr 1, 2009
    Posts:
    20
    Hi A&BSoft,

    Maybe it's a bug (though probably me). Using PackedSprite.
    With an anchor set to UPPER_LEFT, pixel perfect mode ON, autoresize ON.
    Sprite is on a 512x512 atlas
    The reported width variable I find needs to be doubled in order to get the actual screen space width of the sprite. I assume this is a bug no? Or am I wrong?
    Not sure about height yet as I am just using SM2 to make the main menu system at the moment.

    Using Unity iPhone Adv. 1.5.1 + SM2 RC5
     
  43. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    If you press 'Play' and run it, does the size double? I have observed this sometimes myself - when in edit mode, it is sometimes half the size, but once 'Play' is pressed, it is the correct size and remains so from then forward. I'm investigating this now, but want to be sure you are having the same issue that when 'Play' is pressed it appears correctly.
     
  44. jitsua

    jitsua

    Joined:
    Apr 1, 2009
    Posts:
    20
    Sadly the size issue happens during play. I will try a few things later today. E.g calling CalcSize() on Start() function for all PackedSprite GameObjects. If you can't reproduce I'll create a simple scene package and upload (minus SM2 scripts naturally).
     
  45. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Actually, just PM me with the sample project. That way you don't have to strip out the SM2 code.
     
  46. tau

    tau

    Joined:
    Dec 15, 2008
    Posts:
    113
    Not sure if AB helped you yet, but I can drop an idea that you probably need to explicitly set camera (SetCamera(), I think) on that sprite in Awake() or Start() instead of calling CalcSize(), it will recalculate the sprite size, another time, I just had to quit Unity and restart it :)
     
  47. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    Is it possible to get the knight_anim.png file used in the Sprite Timeline Editor tutorial video?
     
  48. jitsua

    jitsua

    Joined:
    Apr 1, 2009
    Posts:
    20
    tau: Nice idea, but it didn't work for me.
    My source OptionsBtnIdle.png sprite is 220 × 62 pixels
    but the game on start reports:
    Name: Options, screen pos: 16.88696, 85.21053, width: 137.5, height: 38.75
     
  49. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
  50. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    jitsua:
    I'm replying both privately and on the forum so that others on the forum can benefit from this information.

    It appears that your sprite is displaying correctly using the pixel perfect option. It is behaving as it is supposed to. I think the confusion is that the width and height are given in game world units but you were expecting them in screen pixels. If you want a 1:1 correlation between world units and screen pixels, you'll need to make your camera orthographic (as it is now), and set its orthographic size to half the pixel height of your display. So if this is for iPhone, that would be an orthographic size of 160 in landscape mode, or 240 in portrait mode. Bear in mind that the coordinate system will still be a bit different since screen pixels run from 0 to positive Y from top to bottom, whereas the world space coordinate system has Y running from 0 to positive Y from bottom to top. But you'll at least have a 1:1 correlation in terms of pixel sizes.

    Of course, there is no need to calibrate your coordinate system this way unless it is your preference. You can use any orthographic size you like, but just understand that the values reported in the inspector are in game world units.

    You can verify that your sprite is being displayed correctly by doing a screenshot and then using a paint program to measure the sprite as it appears. I did this and it is measuring out to exactly 220x62 - the pixel dimensions of the original sprite graphic.

    I hope this helps and be sure to let me know if you have any further questions.