1
Support / Re: How can I change the tk2dSprite's "Texture" in runtime?
« on: August 09, 2013, 02:59:42 am »
Thanks~
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
What are you trying to do here? Is there any reason you're not putting the asset bundle into the atlas itself?
GameObject nol = GameObject.Find( "normal" );
tk2dSprite script = (tk2dSprite)nol.GetComponent( "tk2dSprite" );
tk2dSpriteCollectionData col = script.Collection;
Material mat = col.material;
mat.SetTexture( "txt", loadTex );
//Texture tex = mat.mainTexture;
//tex = loadTex;