I'm new to tk2d and to unity in general, so bear with me...
I'm having a problem trying to get a Tex2D instance from a sprite collection
My code is
Collection.spriteCollection.textures[Collection.spriteCollection.GetSpriteIdByName(TextureName)] as Texture2D).GetPixels()
and the error i get is :
"Texture 'atlas0' is not readable, the texture memory cannot be accessed from scripts. You can make the texture readable in the Texture Import Settings"
I found a checkbox in the Texture Import Settings (Read/Write Enabled) that i set to True, but the problems seems to persist : maybe that wasn't the right option to change?
If you're feeling generous, i have an additional question: i'm not sure that my approach to the problem is the best one, so maybe someone can put me in the right direction. What i'm trying to accomplish is how many pixels of 2 textures are 'overlapping': my attempt was to create the pixelmaps of the 2 textures, then check one of them : if the alpha channel was above a threshold i would then check if the corresponding pixel of the other pixelmap had the alpha channel above the threshold too. English is not my native language and i understand that this stuff i wrote may not be understandable, so i'll put a mock-up code here:
map1=CreatePixelMap1();
map2=CreatePixelMap2();
Foreach (color col in map1){
if (col.a >something){
if(map2[Someindex].a>something) overlappingPixels++;
}
}