Hello Guest

Author Topic: 2D Toolkit 2.0 final  (Read 52923 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #15 on: June 03, 2013, 11:10:35 am »
Are you using Create > tk2d > Sprite, or creating an empty gameobject, and then adding a component?
Edit: I've found the issue - only happened when adding a sprite component to an empty gameobject. Fixed and reposted 2.0 with this fix in. It was small enough that it didn't warrant being its own release. Redownload the unitypackage and import, and it should fix the issue.
« Last Edit: June 03, 2013, 12:26:39 pm by unikronsoftware »

Dajuice

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #16 on: June 03, 2013, 01:17:06 pm »
Nice! Hey I wonder, is the memory management/ manual atlas unloading still a work in progress?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #17 on: June 03, 2013, 01:23:27 pm »
There is a tk2dSpriteCollectionData.UnloadTextures you can use... YMMV with this though.

vitosflash

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #18 on: June 03, 2013, 03:40:47 pm »
Hi, thanks for fast fix! Now it works perfect.
One more issue with the last package - I got this error on import of tk2d into empty project with the only default Main Camera object:

> PPtr cast failed when dereferencing! Casting from Shader to Camera!
> UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[], String)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #19 on: June 03, 2013, 04:04:32 pm »
I can't say I've ever seen that error.
Could be something to do with the package import stuff in Unity, I've had it do some pretty dodgy things :(

I take it it only happens once and then stops?

collectivemass

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #20 on: June 04, 2013, 12:13:59 am »
Thanks so much for the quick turn around from purchase to download access, much appreciated!

jacky

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #21 on: June 04, 2013, 12:43:41 am »
FYI, I had the same error (PPtr cast failed...) and it did in fact only happen once.

vitosflash

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #22 on: June 04, 2013, 04:28:16 am »
I tried to import the package several times - every time I see this error only once. It seems that all other things is ok after that, but I`m not sure.

vitosflash

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #23 on: June 04, 2013, 09:57:13 am »
I got one more error.

I`ve just added a tk2dSprite (manually, as a component) on an empty Game Object. And I got this one:

> Destroying assets is not permitted to avoid data loss.
> If you really want to remove an asset use DestroyImmediate (theObject, true);
> UnityEngine.Object:DestroyImmediate(Object)
> tk2dSpriteFromTexture:DestroyInternal() (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSpriteFromTexture.cs:92)
> tk2dSpriteFromTexture:Create(tk2dSpriteCollectionSize, Texture, Anchor) (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSpriteFromTexture.cs:47)
> tk2dSpriteFromTexture:Awake() (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSpriteFromTexture.cs:28)

I`ve removed the sprite, but the error message is still there.

There are two scenes in the project, I`m switching between them and get the message every time I`m in the scene with that sprite (or where that sprite was before I deleted it).

Could you please look into this also?

vitosflash

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #24 on: June 04, 2013, 10:25:27 am »
One remark. I see that the error itself relates to tk2dSpriteFromTexture (I have a separate backgrounds as a tk2dSpriteFromTexture in each scene). But it started to appear when I added empty Game Object and tk2dSprite on it. All was alright with tk2dSpriteFromTexture components before, there was no any errors. Hope it could help.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #25 on: June 04, 2013, 10:54:39 am »
Do you have exact steps to reproduce it? It looks very much like your SpriteFromTexture object isn't set up correctly, and has a link to an asset. If you saved the scene after it complained, it should fix it.

We normally just use the GameObject > Create Other > tk2d > Sprite to create a sprite. Any particular reason you prefer to add components instead?

vitosflash

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #26 on: June 04, 2013, 11:56:24 am »
I just recreated objects with tk2dSpriteFromTexture and all seems to be ok now. Perhaps it was related to previous reimport of the package or something like this.

> We normally just use the GameObject > Create Other > tk2d > Sprite to create a sprite. Any particular reason you prefer to add components instead?

It`s quite useful when prototyping. At some point I can have a Game Object with some other scripts and don`t want to recreate it from scratch or create a separate child for Sprite.
Anyway it should work this way I think :) As it was in 1.xx

I`m starting a project from scratch and was worried a little as I never saw any errors from 1.xx . But I definitely want to start with 2.00 at least just not to have migration issues in future, when the project will be much bigger. And of course as it have some new great features.

Btw, great product, great support. Good luck in development!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #27 on: June 04, 2013, 12:02:59 pm »
Fair enough. Just wanted to know what that's all :)
I suggest creating a thread in the support forum if you find any bugs relating to this so it doesn't get lost in the mix. Its not how we use it here, but just report anything you find and we'll fix it :)

DannyB

  • 2D Toolkit
  • Hero Member
  • *
  • Posts: 609
    • View Profile
    • Chicks Ahead
Re: 2D Toolkit 2.0 final
« Reply #28 on: June 04, 2013, 05:28:01 pm »
I saw someone mentioning the same earlier in this thread, but didn't catch a solution.

After importing, I have these empty folders
tk2dTileMap
tk2dTileMap \ Code
tk2dTileMap \ Editor
tk2dTileMap_demo

Is there a problem with the package?

And also - I like the fact that subsystems are now separated - can I delete the TileMap and UI folders, if I am not using them?



unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.0 final
« Reply #29 on: June 04, 2013, 05:39:55 pm »
tk2dTileMap is empty? The usual reason for that is Unity doesn't move files which already exist in your project.
The demo folder is sadly empty, as the tilemap project hasn't been merged yet :)

Yup, the reason behind separating these out is to make it easier to delete if you're not using em.