コード例 #1
0
        public void Draw(FrameDebugProviderInfo providerInfo, IFrameAggregate aggregate, TimelineWidget.DrawInfo drawInfo)
        {
            if (!enabled)
            {
                return;
            }

            DrawCostTimeline(providerInfo, aggregate, drawInfo);
            DisplayOptions(drawInfo);
            DisplayYAxis(drawInfo);
            DisplayMouseCost(drawInfo);
        }
コード例 #2
0
    public void Draw(FrameDebugProviderInfo providerInfo, IFrameAggregate aggregate, TimelineWidget.DrawInfo drawInfo)
    {
        AbilityFrameAggregate abilityAggregate = (AbilityFrameAggregate)aggregate;

        foreach (AbilityState state in abilityAggregate.States)
        {
            float startPosition = drawInfo.GetPixelPosition(state.startTime);
            float endPosition   = drawInfo.GetPixelPosition(state.endTime);
            Rect  abilityRect   = new Rect(startPosition, drawInfo.timeline.drawRect.y, endPosition - startPosition, kAbilityRectHeight);

            TimelineWidget.DrawRectangleWithDetour(abilityRect, kAbilityWidgetBackgroundColor, kAbilityWidgetDetourColor);
            TimelineWidget.DrawLabelInsideRectangle(abilityRect, state.abilityType.FullName, kAbilityWidgetTextColor);
        }
    }
コード例 #3
0
 public float GetDrawHeight(IFrameAggregate aggregate)
 {
     return(kTimelineHeight);
 }
コード例 #4
0
        public void Draw(FrameDebugProviderInfo providerInfo, IFrameAggregate aggregate, TimelineWidget.DrawInfo drawInfo)
        {
            AnimationDebugRecord animDebugRecord = (AnimationDebugRecord)aggregate;

            DrawAnimationTimeline(providerInfo, animDebugRecord, drawInfo);
        }
コード例 #5
0
 public float GetDrawHeight(IFrameAggregate aggregate)
 {
     return(GetAnimStateTimelineHeight((AnimationDebugRecord)aggregate));
 }
コード例 #6
0
        void DrawCostTimeline(FrameDebugProviderInfo providerInfo, IFrameAggregate aggregate, TimelineWidget.DrawInfo drawInfo)
        {
            Rect selectedRect = drawInfo.timeline.drawRect;
            int  width        = (int)selectedRect.width;
            int  height       = (int)selectedRect.height;

            if (width * height == 0)
            {
                return;
            }

            if (aggregate.IsEmpty)
            {
                return;
            }

            IMotionSynthesizerProvider synthesizerProvider = providerInfo.provider as IMotionSynthesizerProvider;

            if (synthesizerProvider == null || !synthesizerProvider.IsSynthesizerInitialized)
            {
                return;
            }

            DebugMemory debugMemory = synthesizerProvider.Synthesizer.Ref.ReadDebugMemory;

            foreach (SelectedFrameDebugProvider selected in Debugger.frameDebugger.Selection)
            {
                if (selected.providerInfo.uniqueIdentifier == providerInfo.uniqueIdentifier)
                {
                    CreateAndClearTexture(width, height);

                    if (selected.metadata != null)
                    {
                        DebugIdentifier selectedIdentifier = (DebugIdentifier)selected.metadata;
                        DebugReference  reference          = debugMemory.FindObjectReference(selectedIdentifier);

                        if (reference.IsValid)
                        {
                            object selectedObject = debugMemory.ReadObjectGeneric(reference);

                            if (selectedObject is IMotionMatchingQuery query)
                            {
                                DrawCostTimeline(query.DebugName.GetHashCode(), (DebugCostAggregate)aggregate, drawInfo);
                            }

                            if (selectedObject is IDisposable disposable)
                            {
                                disposable.Dispose();
                            }
                        }
                    }

                    m_CacheTexture.SetPixels(m_CachePixels);
                    m_CacheTexture.Apply();

                    GUI.DrawTexture(selectedRect, m_CacheTexture);

                    return;
                }
            }
        }
コード例 #7
0
 public float GetDrawHeight(IFrameAggregate aggregate)
 {
     return(enabled ? kPixelHeight : 0.0f);
 }