summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.timeline@1.2.13/Editor/UnityEditorInternals.cs
blob: 90ca72222d4ed5e0f985e1aa950ddefb1fbb317d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System;
using UnityEngine;
using Object = UnityEngine.Object;

namespace UnityEditor.Timeline
{
    static class UnityEditorInternals
    {
        public static Object DoObjectField(Rect position, Object obj, Type type, int controlId, bool allowScene)
        {
#if UNITY_2020_1_OR_NEWER
            var newObject = EditorGUI.DoObjectField(position, position, controlId, obj, null, type, null, allowScene, EditorStyles.objectField);
#else
            var newObject = EditorGUI.DoObjectField(position, position, controlId, obj, type, null, null, allowScene, EditorStyles.objectField);
#endif
            return newObject;
        }
    }
}