Hello Guest

Author Topic: tk2dIndex error  (Read 3966 times)

dmaz

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
tk2dIndex error
« on: January 24, 2014, 01:29:10 am »
Hello, I'm just trying to start with 2dtk and can't seem to make any sprites.  This is a new install of unity 4.3.3 and 2dtk 2.3.3 and I had the same with slightly earlier unity install as well.  when trying to create a sprite I get the following error and no sprite:

MissingReferenceException: The object of type 'tk2dIndex' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
tk2dEditorUtility.CreateIndex () (at Assets/TK2DROOT/tk2d/Editor/tk2dEditorUtility.cs:214)
tk2dEditorUtility.GetOrCreateIndex () (at Assets/TK2DROOT/tk2d/Editor/tk2dEditorUtility.cs:113)
tk2dSpriteEditor.DoCreateSpriteObject () (at Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteEditor.cs:197)

I've clicked the option to rebuild the index without any change.  I saw earlier posts with this error but a much lower version patch fixed it

any ideas?

thanks

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2dIndex error
« Reply #1 on: January 24, 2014, 10:59:14 am »
Is this in an empty project? Can you zip up and send me the project to look at if thats the case? This was fixed ages ago. support at unikronsoftware.com

dmaz

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: tk2dIndex error
« Reply #2 on: January 24, 2014, 06:20:27 pm »
ok, my bad I think...?   somehow I was getting an older version (I was wondering why the docs didn't match). 

If I create a new project and do NOT import from the "create new project" dialog but do Assets->Import Package->Custom Package and choose 2dtoolkit2.3.3.unitypackage from my download folder, it seems to work. 

I'm new to unity and I was under the impression that double clicking ".unitypackage"s will install them so they can be chosen from the import package dialogs... but doing this seems to get me an older version?

dmaz

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: tk2dIndex error
« Reply #3 on: January 24, 2014, 06:42:53 pm »
so it looks like if I'm updating a package manually instead of through the store I should replace
C:\Users\Dave\AppData\Roaming\Unity\Asset Store\Unikron Software Ltd\Editor Extensions\*.unitypackage
with the new one?

or just not use the asset store installs and import it manually for each project?  at least then I can just import the needed parts of 2dtoolkit.. is that what I should be doing?

thanks

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2dIndex error
« Reply #4 on: January 25, 2014, 09:49:20 am »
You can use the asset store install, but you will likely have to update the downloaded version from the asset store downloaded downloads page. Or you can download it from here and import that, the package file is labelled with the version number so you'll definitely know what you're installing.