Showing posts with label Animation. Show all posts
Showing posts with label Animation. Show all posts

Tuesday, July 28, 2015

Custom TimeArea Ruller Unity3d

How to create TimeArea the same as seen in Animation Window? Few reflections and voila.



  
    if (__timeAreaW == null) {
                                __timeAreaW = new TimeAreaW (false);

                                
                                __timeAreaW.hSlider = true;
                                __timeAreaW.vSlider = false;
                                __timeAreaW.vRangeLocked = true;
                                __timeAreaW.hRangeMin = 0f;
                                //__timeAreaW.hRangeMax=3f;

                                __timeAreaW.margin = 0f;
                                
                                __timeAreaW.scaleWithWindow = true;
                            
                                //__timeAreaW.ignoreScrollWheelUntilClicked = false;
                                if(__sequence!=null)
                                    __timeAreaW.hTicks.SetTickModulosForFrameRate (__sequence.frameRate);
                                else
                                    __timeAreaW.hTicks.SetTickModulosForFrameRate (30);

                                this.Repaint ();
            
                                
            
                        }
Source: