Hi,
This is my first attempt at 2DToolkit but I did go through the brief documentation... so I decided to use the tk2dCamera with the goal of simplifying deployment to different iOS screen resolutions.
This is what I did/got so far, I must be doing something wrong.
1) Imported 2DToolkit on a brand new project
2) Deleted demo folder as I forgot to untick it before importing
3)
Created a tk2dCamera with the following settings
- In the tk2dCamera Inspector
--- Camera panel: I didn't change default settings which have Orthographic and Size 480 (unless it changed to 480 after I set the Resolution override
--- tc 2d Camera (Script) section of the same panel:
------------- Resoluiton overrides is TICKED
------------- Native Resolution I set to : Width 960 and Height 640 (I want to work a 2x iPhone 5 resolution with my main background sprite being 960x640
------------- Overrides set to: Widlcard Override, Width-1 and Height-1 Also: AutoScale:Fit Visible and FitMode:Center. This is because what I understtod from the documentation is that using these Widlcard Override settings tk2dToolkit will automatically try to fit the 960x480 screen size on to other screen resolutions
Camera Resolution seciton of same panel:
--- Force Editor Resolution is TICKED
--- Preset iPhone 5 which gives of course a 1136x640 wide setting (then I went to the Unity GAME window and iPhone 5 Wide (16:9) 1136x640 (this should match the settings and show things properly)
Then I created a new Sprite Collection and added just one image which is my background image for the game. In the Sprite Collection Settings I have
- Use tk2dCamera TICKED (
DO I NEED TO SET ADD PLATFORM SUPPORT AT THIS STAGE?)
I created a Sprite in the Hierarchy which defaulted to my only sprite collection and background sprite
- Position and Scale both set to 0,0,0 by default
- Scale to 1,1,1 by default
PROBLEM:
in the Scene view whcn I select the tk2dCamera I can see my backround image centered in the Scene screen and it also appear centered in the CAMER PREVIEW although here the background image does not cover the whole Camera Preview, there is plenty of empty blu camera border. Problem, the tk2dCamera Preview only shows my Background Image in the left bottom quarter of the screen... Same in the actual Game window
Of course I have done something wrong int he settings
The BackgroundSpriteCollection prefab created by the Sprite Collection (same folder with atlas0, atlas0 material) shows these settings among others
- Sprite Definitions -> Size 1
- Textures.... -> Inv Ortho Size 1
- Textures.... -> Half Target Height 320
What was I supposed to do differently so that I can use 960x480 background and overall game scene size with all scene elements to show correctly centered in the game screen?
Sorry for the long post, but I guess without mentioning the settings above you won't be able to see what I ddi wrong
Thanks!