Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JyriKilpelainen

Pages: [1]
1
Support / Re: Fatal errors with Unity 4.3.1f1 + 2D Toolkit 2.3.0
« on: December 04, 2013, 05:02:40 am »
THANK YOU!
That solved the problem completely :-)

2
Support / Fatal errors with Unity 4.3.1f1 + 2D Toolkit 2.3.0
« on: December 03, 2013, 08:51:35 pm »
Hi,

I just updated Unity and 2D Toolkit and now I have 36 fatal errors :-(
Here's a screenshot. Any ideas how to fix this?

I went from:
Unity 4.1 > 4.3.1f1
2D Toolkit 2.0 > 2.3.0

For example the first error points to the last line of this:


Code: [Select]
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

[AddComponentMenu("2D Toolkit/Camera/tk2dCamera")]
[ExecuteInEditMode]
/// <summary>
/// Maintains a screen resolution camera.
/// Whole number increments seen through this camera represent one pixel.
/// For example, setting an object to 300, 300 will position it at exactly that pixel position.
/// </summary>
public class tk2dCamera : MonoBehaviour
{
static int CURRENT_VERSION = 1;
public int version = 0;

[SerializeField] private tk2dCameraSettings cameraSettings = new tk2dCameraSettings();

3
Support / Re: Problem with platform specific sprites and scale
« on: November 07, 2012, 09:22:27 am »
Aha! If I replace the first code with this:

Code: [Select]
Debug.Log("tk2dSystem.CurrentPlatform: " + tk2dSystem.CurrentPlatform);
tk2dSystem.CurrentPlatform = "4x";
Debug.Log("tk2dSystem.CurrentPlatform: " + tk2dSystem.CurrentPlatform);
Application.LoadLevel("1player");

it works! So I need to ask first the CurrentPlatform variable's value and then override it. I can't just go and say tk2dSystem.CurrentPlatform = "2x"; straight away without getting the variable's value first.
Is this some kind of bug?

4
Support / Re: Problem with platform specific sprites and scale
« on: November 07, 2012, 08:55:15 am »
It only changes when reloaded, ie if you load a scene after setting current platform. Not in current scene. In editor, use the preferences page to switch. In game set this before starting the first scene.

For some reason it doesn't work even if I set the variable in previous scene.
I have two scenes: "Menu" and "1player".

In "Menu" scene if do this after hitting "Play" button:

Code: [Select]
tk2dSystem.CurrentPlatform = "4x";
Debug.Log("tk2dSystem.CurrentPlatform: " + tk2dSystem.CurrentPlatform);
Application.LoadLevel("1player");

Then in "1player" scene I do this:

Code: [Select]
void Awake(){
Debug.Log("platform AWAKE: " + tk2dSystem.CurrentPlatform);
}

void Start(){
Debug.Log("platform START: " + tk2dSystem.CurrentPlatform);
}

EVERY debug says "1x", even the first one right after I have set it up to 4x.

5
Support / Re: Problem with platform specific sprites and scale
« on: November 07, 2012, 07:15:48 am »
Now that I'm looking at the sprites, shouldn't the sprite atlas material change after calling "tk2dSystem.CurrentPlatform = "2x"; ?
I mean, I have everything setup with 1x. When I hit "Play", shouldn't the atlas change to the 2x automatically?
Now it's not changing.

6
Support / Re: Problem with platform specific sprites and scale
« on: November 07, 2012, 06:47:30 am »
Do you use tk2dCamera or just a plain ortho camera?

I'm using tk2dCamera. Should I use the camera resolutions overrides for this one?

7
Support / Re: Problem with platform specific sprites and scale
« on: November 06, 2012, 08:10:35 pm »
Yes, the idea is the sprites stay exactly the same size so you don't have to reposition anything.
The camera change is only in one place as opposed to all instances of everything.

Ok, so what do I need to change in the camera settings then?

8
Support / Problem with platform specific sprites and scale
« on: November 06, 2012, 07:03:13 pm »
I just installed the latest version of 2D Toolkit (1.80 + patch 1) and started making my scene. The game will have three sets of spritesheets: 1x, 2x and 4x. I setup the 1x spritesheet and made sure that 2x and 4x sprites were in place. After pressing commit all three atlases were created so everything should be ok.

When I create a sprite (say 100x100 in position 0,0), it's correctly positioned in 1x resolution (which is 320x480). But when I increase the Game view size to 640x960, the sprite is not changed or scaled. The gameobject should be scaled to 200x200 and the sprite should be changed to 2x version, right?

I have the "tk2dSystem.CurrentPlatform = "2x";" if else statement in Start function and it correctly prints SD, HD and UD depending on the screen width and height.

Any advices? Does the camera need to be changed?

Pages: [1]