UnityEditorInternals.cs 646 B

12345678910111213141516171819
  1. using System;
  2. using UnityEngine;
  3. using Object = UnityEngine.Object;
  4. namespace UnityEditor.Timeline
  5. {
  6. static class UnityEditorInternals
  7. {
  8. public static Object DoObjectField(Rect position, Object obj, Type type, int controlId, bool allowScene)
  9. {
  10. #if UNITY_2020_1_OR_NEWER
  11. var newObject = EditorGUI.DoObjectField(position, position, controlId, obj, null, type, null, allowScene, EditorStyles.objectField);
  12. #else
  13. var newObject = EditorGUI.DoObjectField(position, position, controlId, obj, type, null, null, allowScene, EditorStyles.objectField);
  14. #endif
  15. return newObject;
  16. }
  17. }
  18. }