Hello Guest

Author Topic: Error: The name "AssetDatabase" does not exist  (Read 13795 times)

Jefemcownage

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
Error: The name "AssetDatabase" does not exist
« on: October 18, 2012, 03:06:01 am »
Just upgraded a project to the latest and I get this when trying to build. Anybody else seen this?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Error: The name "AssetDatabase" does not exist
« Reply #1 on: October 18, 2012, 10:14:28 am »
I'll need a bit more info to work out what could've gone wrong. It does work fine on a fresh install, so probably some file somewhere hasn't updated properly.
1. What platform are you building to?
2. Do you use JS?
3. What file do you get this error in? There must be a specific line it is complaining about.
4. Do you have any script erorrs otherwise?

Newton

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Error: The name "AssetDatabase" does not exist
« Reply #2 on: October 18, 2012, 05:49:27 pm »
Have the same problem...dont know where it comes from and i updated the toolkit  :-[

this is the line:   Assets/TK2DROOT/tk2d/tk2dIndex.cs(151,48): error CS0103: The name `AssetDatabase' does not exist in the current context
and i use C#

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Error: The name "AssetDatabase" does not exist
« Reply #3 on: October 18, 2012, 06:05:57 pm »
How bizzare. Is either of your projects small enough that you could send me a copy? I mean you could delete almost everything in there apart from whats required to demonstrate the issue.

Newton

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Error: The name "AssetDatabase" does not exist
« Reply #4 on: October 19, 2012, 11:10:44 am »
Ill try and create a small project to recreate the problem because the project im currently working on is to big to send

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Error: The name "AssetDatabase" does not exist
« Reply #5 on: October 19, 2012, 12:51:43 pm »
Worked out the issue here:

tk2dIndex used to exist in TK2DROOT/tk2d in the past, but was moved into TK2DROOT/tk2d/Editor. Unity doesn't automatically move moved files, so it has to be done by hand.

I've added a "fix" for the next version, but for now, just move the file into the Editor folder and that should fix it.

vinnie035

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Error: The name "AssetDatabase" does not exist
« Reply #6 on: October 22, 2012, 01:22:43 pm »
I just found other errors when using javascript:
tk2RuntimeSpriteCollection, tk2dResource and tk2dSystem should be moved to the Plugins folder.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Error: The name "AssetDatabase" does not exist
« Reply #7 on: October 22, 2012, 01:52:02 pm »
Did you run Setup for JavaScript after restarting? It should have moved all those files to appropriate locations...

vinnie035

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Error: The name "AssetDatabase" does not exist
« Reply #8 on: October 22, 2012, 02:47:02 pm »
yep, I did it.