コード例 #1
0
        void drawReceiver(Rect rect, int index, bool active, bool focused)
        {
            ReceiverLogLine line = lastEvent.receivers[index];

            GUI.Label(getRect(ref rect, 90), new GUIContent(string.Format("{0:##.000}", line.time), "Время приема события"));
            GUI.Label(getRect(ref rect, 90), new GUIContent(string.Format("{0:##.000}", line.time), "Время завершения обработки события"));
            GUI.Label(getRect(ref rect, 100), new GUIContent(line.Name, "Получатель события"));
            GUI.Label(getRect(ref rect, 20), new GUIContent(string.Format("{0}", line.Priority), "Приоритет события"));
            GUI.Label(getRect(ref rect, 100), new GUIContent(string.Format("{0}", line.Stage), "Состояние"));
        }
コード例 #2
0
ファイル: EventLogLine.cs プロジェクト: KingPeas/SimpleEvent
    public EventLogLine(EventCheckArgs args)
    {
        object target = args.Event.target;

        SourceType = target != null?target.GetType() : null;

        Source     = target as UnityEngine.Object;
        SourceName = Source != null ? Source.name : "";
        Component component = target as Component;

        SourceTag       = component != null ? component.tag : "";
        SourceLayerMask = component != null ? component.gameObject.layer: -1;
        EventName       = args.Event.eventName;
        Event           = args.Event;
        receivers       = new List <ReceiverLogLine>();
        ReceiverLogLine receiver = new ReceiverLogLine(args);

        time = Time.time;
        receivers.Add(receiver);
    }