Unity Community |

Hi,
I have Ex2d v1.2.5 (120510), I created a new scene, animation worked at first, after some further development and I did not pay attention to the animation, but now, it is not working anymore. the reason is during game running, the ExSpriteAnimation is deactivated automatically, if I pause and activate again and then run it, again it will be deactivated. it happens to all animation with ex2d. it happened before, what I did to fix was to delete all the ex2d generated files and start from beginning, luckyly it was still small work. I need to know where to look and how to fix. I checked all my scripts, there is nothing about disabling the exSpriteAnimation component.
I did also sync and build all, atlas as well as animation. In the old scene where it copied from, the animation still working.
Is it possible it is due to frequent crash of unity ?
Thankyou for reply.
I found a way that is to put exSpriteObject in Hierarchy by tool and duplicates it.
I can make the 10 Sprites now.
However , I am having a issue yet.
if possible, please teach me following questions.
I'm using exSprite and using textures in it.
However, I want to use a part of texture.
For exsample.
ExSprite is setting a 1204x1024 texture.
I want to draw it to clip the texture to cut (32,32,48,32).
I tried it.
For exsample.
1:change the elements[0].trimRect
2:exSprite[i].trimTexture = true;
exSprite[i].trimUV=new Rect(0,032,32);
However, It draw the all area of texture.
How should i change the parameters?
Best regards.
Last edited by Sinichi; 06-09-2012 at 02:11 AM.
Hi.
Don't you know about this tutorials?
http://www.ex-dev.com/ex2d/wiki/doku.php
I hope this one would be helpful for you
http://www.ex-dev.com/ex2d/wiki/doku...eate_soft_clip
Regards.
Hi everyone, i'm having a hard time using the setframe feature. I have the latest version of Unity and ex2d.
First I start my animation playing....
then when I want it to stop, I want it to display a certain frame from the animation so i use this code:
spAnim.SetFrame(top, 1);
spAnim.Stop();
However, for a split second the original default sprite will flash and then it will display the one I set in the SetFrame...am I doing this completely wrong?
thank you!
Hi lix,Hi,
I have Ex2d v1.2.5 (120510), I created a new scene, animation worked at first, after some further development and I did not pay attention to the animation, but now, it is not working anymore. the reason is during game running, the ExSpriteAnimation is deactivated automatically, if I pause and activate again and then run it, again it will be deactivated. it happens to all animation with ex2d. it happened before, what I did to fix was to delete all the ex2d generated files and start from beginning, luckyly it was still small work. I need to know where to look and how to fix. I checked all my scripts, there is nothing about disabling the exSpriteAnimation component.
I did also sync and build all, atlas as well as animation. In the old scene where it copied from, the animation still working.
Is it possible it is due to frequent crash of unity ?
It depends on your wrap mode and the stop function. Basically, if you stop the animation, the animation component will turn to disable. You can use exSprite.spAnim get this animation back instead of use GetComponent<exSpirteAnimation>() which is slower.
Hi Sinichi,Thankyou for reply.
I found a way that is to put exSpriteObject in Hierarchy by tool and duplicates it.
I can make the 10 Sprites now.
However , I am having a issue yet.
if possible, please teach me following questions.
I'm using exSprite and using textures in it.
However, I want to use a part of texture.
For exsample.
ExSprite is setting a 1204x1024 texture.
I want to draw it to clip the texture to cut (32,32,48,32).
I tried it.
For exsample.
1:change the elements[0].trimRect
2:exSprite[i].trimTexture = true;
exSprite[i].trimUV=new Rect(0,032,32);
However, It draw the all area of texture.
How should i change the parameters?
Best regards.
Like zafod said, you can use exSoftClip. Recently we developing exClipping for our new GUI framework. The exClipping is almost the same as exSoftClip but it use shader process clipping which allow you rotate the sprite in the clipping rect.
Hi trothmaster,Hi everyone, i'm having a hard time using the setframe feature. I have the latest version of Unity and ex2d.
First I start my animation playing....
then when I want it to stop, I want it to display a certain frame from the animation so i use this code:
spAnim.SetFrame(top, 1);
spAnim.Stop();
However, for a split second the original default sprite will flash and then it will display the one I set in the SetFrame...am I doing this completely wrong?
thank you!
You should stop the animation first, then set the frame. Other wise the stop function will reset the animation if the StopAction is DefaultSprite. So your script will looks like this:
Question please:
How do I set the Anchor dynamically on a sprite?
Tried: newParticle.sprite.anchor = Anchor.botCenter;
but anchor isn't a property of exSprite even though its exposed and everything in the editor..
About Simian Squared Recent The Other Brothers Physynth Recommended Shaders+Framework
@jwu
Can i use the uv mapping of ex2D, without using the ex2D Component? I have been using Batching Tools to make sprite of 3D Objects and reduce drawcalls, but he generate many Mesh and I animate some 3D objects textures, by change the mesh in real time.
What i want to know is: Can i get the tilling of one sprite frame?
Hi, I was wondering if anyone had the problem I have. I create an animation and attach it to a game object > I test the game > game object only animates if it's selected in the Hierarchy window AND in the Inspector window, the Ex Sprite (Script) section is visible. If I hide this section, the game object won't animate. If I spawn the game object during game play, this isn't a problem, but if it's in the Inspector window by default, nothing.![]()
My company: Amaranth Games
My games: Aveyond Series | Grimm's Hatchery | Gypsy's Tale | Curse at Twilight.
Hi hippocoder,
Can you send me the problem package, I test this and it works perfect here.
Hi badawe,@jwu
Can i use the uv mapping of ex2D, without using the ex2D Component? I have been using Batching Tools to make sprite of 3D Objects and reduce drawcalls, but he generate many Mesh and I animate some 3D objects textures, by change the mesh in real time.
What i want to know is: Can i get the tilling of one sprite frame?
Yes you can. It is saved in exAtlas.elements[i].trimRect. So if you have exSpriteAnimClip, and get the frame, you will know the atlas and index that frame used, then use it get the trimRect. The trimRect will including the uv information that you need.
Hi amaranth,Hi, I was wondering if anyone had the problem I have. I create an animation and attach it to a game object > I test the game > game object only animates if it's selected in the Hierarchy window AND in the Inspector window, the Ex Sprite (Script) section is visible. If I hide this section, the game object won't animate. If I spawn the game object during game play, this isn't a problem, but if it's in the Inspector window by default, nothing.
Can you give me more details. The animation you create is it a Unity animation or exSpriteAnimation ? If this is an Unity animation, you need to enable animation helper in exSprite inspector. If other problem, can you send me a package or give me some snap shot ? Thanks in advance.
Hi jwu, could the problem be I am using unity js? I have too many deadlines to spare much time to create example, so I try this weekend to get something to you.
Error was Unknown identifier 'Anchor'. (meaning the enum couldn't be found, which is fairly impossible to achieve unless it doesn't exist on js).
About Simian Squared Recent The Other Brothers Physynth Recommended Shaders+Framework
Hi jwu, thank you again for helping with my problem the other day, I have another question maybe you can help with...
I am using a perspective camera. I have "use pixel Perfect" checked on my sprites.
i'm "looking down the y axis" to sprites that are rotated 90 degrees so they face the camera.
objects move on the xz axis.
What I want to do is this:
give the illusion of depth with a 2d background image. LIke old adventure games.
Like in this picture: http://agsarchives.com/gamecard/882/...quest-iv-5.jpg
If the character walks "below" the other characters his sprite will render in front of them, if the character walks "above" the other characters his sprite will render behind them.
Here is my attempt to do this by moving the object on its Y axis. It works GREAT with the orthographic camera, but I want to use the perspective camera to add 3d effects that don't work in orthographic. Any suggestions? Thank you!
Code:
transform.position.y = baselineobjectY + 1; //move this object Y position + 1 above the object1 y position } { }
Never Mind I figured out how to do it!
set all the 2d objects to a new layer called "2dObjects" and then add a 2nd camera that is orthographic and set its culling mask to the new layer of 2dObjects. then set its "clear flags" to depth only and it will project the 2d objects onto a 3d perspective background!
EDIT *** I also seem to need to add a 3rd camera for another layer "ontop" or in front of the 2d layer....hmm is this the best approach to this???
Last edited by trothmaster; 06-12-2012 at 04:22 PM.
Yes, if you are using the javascript, please put the ex2D Core in the Plugins folder, that will make sure your javascript compile after it.Hi jwu, could the problem be I am using unity js? I have too many deadlines to spare much time to create example, so I try this weekend to get something to you.
Error was Unknown identifier 'Anchor'. (meaning the enum couldn't be found, which is fairly impossible to achieve unless it doesn't exist on js).
Well, it depends on your game. If this is a pure 2D game, I would use exLayerMng and allocate a dynamic layer block. In your case, the 3D environment only affect in background. So nothing bad here.Never Mind I figured out how to do it!
set all the 2d objects to a new layer called "2dObjects" and then add a 2nd camera that is orthographic and set its culling mask to the new layer of 2dObjects. then set its "clear flags" to depth only and it will project the 2d objects onto a 3d perspective background!
EDIT *** I also seem to need to add a 3rd camera for another layer "ontop" or in front of the 2d layer....hmm is this the best approach to this???