1
Support / can not get sprite collection data problem.
« on: January 10, 2013, 01:44:12 pm »
Hello.
I found there are some threads about the topic, but I couldn't solve my errors. I'm using unity 4 and 1.80 + patch 3.
I'm trying to create a sprite dynamically in Javascript but I couldn't get valid sprite collection data by Resource.Load("name").
Here is my code.
var collectionData : tk2dSpriteCollectionData = Resources.Load("MySpriteCollection2") as tk2dSpriteCollectionData;
I created a "sprite collection" named MySpriteCollection, and I noticed the file generated a "sprite collection data" with the same name in a new folder. So I changed the file's name as MySpriteCollection2 and moved the file into the resources folder. Actually I'm not quite sure if I should use the default resources folder or is it okay to create another folder in different place with the same name.
But still it returns NULL. What should I do now?
Thanks
I found there are some threads about the topic, but I couldn't solve my errors. I'm using unity 4 and 1.80 + patch 3.
I'm trying to create a sprite dynamically in Javascript but I couldn't get valid sprite collection data by Resource.Load("name").
Here is my code.
var collectionData : tk2dSpriteCollectionData = Resources.Load("MySpriteCollection2") as tk2dSpriteCollectionData;
I created a "sprite collection" named MySpriteCollection, and I noticed the file generated a "sprite collection data" with the same name in a new folder. So I changed the file's name as MySpriteCollection2 and moved the file into the resources folder. Actually I'm not quite sure if I should use the default resources folder or is it okay to create another folder in different place with the same name.
But still it returns NULL. What should I do now?
Thanks