2D Toolkit Forum

2D Toolkit => Support => Topic started by: Jefemcownage on October 18, 2012, 03:06:01 am

Title: Error: The name "AssetDatabase" does not exist
Post by: Jefemcownage 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?
Title: Re: Error: The name "AssetDatabase" does not exist
Post by: unikronsoftware 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?
Title: Re: Error: The name "AssetDatabase" does not exist
Post by: Newton 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#
Title: Re: Error: The name "AssetDatabase" does not exist
Post by: unikronsoftware 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.
Title: Re: Error: The name "AssetDatabase" does not exist
Post by: Newton 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
Title: Re: Error: The name "AssetDatabase" does not exist
Post by: unikronsoftware 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.
Title: Re: Error: The name "AssetDatabase" does not exist
Post by: vinnie035 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.
Title: Re: Error: The name "AssetDatabase" does not exist
Post by: unikronsoftware 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...
Title: Re: Error: The name "AssetDatabase" does not exist
Post by: vinnie035 on October 22, 2012, 02:47:02 pm
yep, I did it.