- Home /
Create OTSpriteAtlas in Runtime.
I have been working for creating OTSpriteAtlasCocos2D in Runtime. Does somebody know how to do??? If I create OTSpriteAtlasCocos2D in runtime and add to spriteContainer on OTSprite, it works in my Unity but not works in android or web-player. If I create OTSpriteAtlasCocos2D by using Hierarchy view,it works.
public OTSpriteAtlasCocos2D otatlastmpl;
OTSpriteAtlasCocos2D otc1;
OTSprite sp;
void Start () {
sp = Utils.getSprite();
this.otc1 = Instantiate(this.otatlastmpl) as OTSpriteAtlasCocos2D;
string name = "menu2_top";
this.otc1.name = name;
this.ta = Resources.Load("xml_" + name) as TextAsset;
this.tu = Resources.Load(name) as Texture;
this.otc1.atlasDataFile = this.ta;
this.otc1.texture = this.tu;
sp.position = new Vector2(-80,180);
sp.name = "fromcode";
sp.spriteContainer = this.otc1;
sp.frameName = "header_sukin01";
sp.depth = 800;
}
Answer by marimurotani · Jan 16, 2014 at 04:16 AM
This way to do is not supported. http://forum.unity3d.com/threads/95827-Orthello-2D-Framework-100-FREE/page22
The requested feature is not implemented.
Your answer
Follow this Question
Related Questions
OnCollision using Orthello2D Framework is causing NullReferenceException 1 Answer
Playing an animation when press left mouse key - Using Orthello JavaScript 1 Answer
Animating sprite resets its transform position after being moved 1 Answer
Diagonal collision script not working (Unity + Orthello, C#) 1 Answer
is there any orthello tutrioals 1 Answer