Hello Guest

Author Topic: 2DTK won't load in Unity 5?  (Read 6779 times)

ryf9059

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 41
    • View Profile
2DTK won't load in Unity 5?
« on: April 11, 2015, 12:30:20 am »
Today I updated my Unity to version 5. And it requires me to update the current project. After updating and re-importing all the assets I found my project not working. It turns out none of my 2DTK script gets loaded, it says I need to fix compile errors, however these errors are from the 2DTK script itself.

When I go to the 2DTK menu there are only two options: Advanced and SetupForJs, there is an Integrity Checker under advanced and if I run it it will say succeed. However none of the scripts is working. What's wrong?


There is one of the errors displayed that doesn't seem to be related to 2DTK, however it only shows up after the project is being upgraded.

Assets/Standard Assets/Scripts/MeshCombineUtility.cs(27,74): error CS1061: Type `UnityEngine.Mesh' does not contain a definition for `GetTriangleStrip' and no extension method `GetTriangleStrip' of type `UnityEngine.Mesh' could be found (are you missing a using directive or an assembly reference?)


Can someone help? Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2DTK won't load in Unity 5?
« Reply #1 on: April 11, 2015, 09:24:23 am »
You need to fix all compile errors before tk2d or indeed any of your scripts will work again. Tk2d 2.51 imports cleanly into unity 5 and definitely works in it.

ryf9059

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: 2DTK won't load in Unity 5?
« Reply #2 on: April 28, 2015, 11:24:01 am »
But the thing is 2dtk doesn't even load in menus. I have my code working in previous Unity and haven't touch it ever since. It's after several month that I've update this to Unity 5 and it stopped loading. Plus, the code that has compile errors are not even mine -- it's in the standard assets. Please see screenshot.



tk2d not loading (no detailed menu)


The scripts that has problem is under MeshCombineUtility which is not even my code.

Please help.


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2DTK won't load in Unity 5?
« Reply #3 on: April 28, 2015, 03:06:37 pm »
As I said before, its not gonna load anything until you fix the compile errors. It doesn't matter where they are and what its from - they need to be fixed / deleted.
Unity basically stops loading scripts once it encounters an error.

ryf9059

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: 2DTK won't load in Unity 5?
« Reply #4 on: April 29, 2015, 08:14:46 am »
I have deleted those bugged scripts and rebuilt it. This time it gives me error messages regarding to 2dtk itself. Mostly were namesspace already containing definition.


Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMap.cs(7,13): error CS0101: The namespace `global::' already contains a definition for `tk2dTileFlags'

Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs(8,29): error CS0101: The namespace `tk2dRuntime.TileMap' already contains a definition for `BuilderUtil'

There were 14 of these namespace error for tk2d and one more for something else (also namespace). Seemed like an easy fix. But where do I start?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2DTK won't load in Unity 5?
« Reply #5 on: April 29, 2015, 10:24:31 am »
It looks like there is a duplicate somewhere. Delete the TK2DROOT folder, reimport it - hopefully that will fix it.