Showing posts with label TimeLine. Show all posts
Showing posts with label TimeLine. 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:

Sunday, November 30, 2014

Custom Time Line Multi Selection Slider Handles - Unity3d

Great news that Unity reveal the code of new UI. But why they didn't reveal source of Editor/Inspector Components?. At least why they not remove those fucken internal and sealed from code, so we can use , AvatarPreview, AnimationTimeLine .... without doing lot of Reflection mambo jumbo.????








Use it like this:
EditorGUILayoutEx.CustomTimeLine (ref eventTimeValues,ref eventTimeValuesPrev, ref displayNames, ref eventTimeValuesSelected,-1, onAdd,oDelete,onClose,onEdit,onDragEnd ); Source: