Hi,
i'm trying to setup collider programatically but so far i didn't succeed. I've tried this:
tk2dSpriteCollectionSize sz2 = tk2dSpriteCollectionSize.Default();
_sprite = tk2dSprite.CreateFromTexture(texture, sz2, new Rect(0,0,texture.width, texture.height), new Vector2(0,0));
GameObject go = new GameObject();
MeshCollider collider = go.AddComponent<MeshCollider>();
collider.bounds = new Bounds(new Vector3(0,0,0), new Vector3(10,10,1));
_sprite.collider = collider;
However this doesn't work because _sprite.collider is read only. How can i attach the collider to _sprite? Thanks in advance.