hii, there is one option project hierarchy, create->Animation.
it creates a blank animation file with .anim format. whts the use of this file, how we can open it.
Is there any tutorial available for that.
Any help will be useful?
Thanks,
edit
Moved from comments:
public void SpreadOpen()
{
if (animRoot)
{
currentAnimation = animRoot["spread open"];
animRoot["spread open"].speed = Mathf.Abs(openCloseSpeed);
animRoot.CrossFade("spread open");
}
} // added missing bracket
public void SpreadClose()
{
if (animRoot)
{
animRoot["spread close"].speed = Mathf.Abs(openCloseSpeed);
animRoot.CrossFade("spread close");
}
}
Maybe you've a script that turns it off or you added an animation curve that turns the rendere off. You can animate "every" public variable. A boolean like renderer.enabled needs a curve between 0 and 1. If you don't want to animate it just remove the animationcurve from renderer.enabled.
– Bunny83i have a script which actually start and close the animation. and also there is some animation added to each fbx, i need to use it. but why it turns off at the time of rendering?
– anon62947158It never turns off automatically. As I said you have either a script or an animation that turns it off. Can you post some related code or upload a package containing the related object somewhere? I can't tell you much more since i don't have your project ...
– Bunny83i am trying to make a story book, first page will open on click. for that first of all i have created a script called pagecontrollscript.cs in which i have declared this-: public GameObject[] spreadPrefabs; so now i can add number of prefabs in inspector view, and that will be act as my story book pages. then to open that pages,
– anon62947158i have created a script, public void SpreadOpen() { if (animRoot) { currentAnimation = animRoot["spread open"]; animRoot["spread open"].speed = Mathf.Abs(openCloseSpeed); animRoot.CrossFade("spread open"); } public void SpreadClose() { if (animRoot) { animRoot["spread close"].speed = Mathf.Abs(openCloseSpeed); animRoot.CrossFade("spread close"); } }
– anon62947158