|
|
|
|
|
|
PreviewRenderData m_PreviewRenderHandle; |
|
|
|
Image m_PreviewTextureView; |
|
|
|
|
|
|
|
public Image previewTextureView |
|
|
|
{ |
|
|
|
get { return m_PreviewTextureView; } |
|
|
|
} |
|
|
|
|
|
|
|
Vector2 m_PreviewScrollPosition; |
|
|
|
ObjectField m_PreviewMeshPicker; |
|
|
|
|
|
|
|
|
|
|
VisualElement m_Preview; |
|
|
|
|
|
|
|
public VisualElement preview |
|
|
|
{ |
|
|
|
get { return m_Preview; } |
|
|
|
} |
|
|
|
|
|
|
|
List<string> m_DoNotShowPrimitives = new List<string>( new string[] {PrimitiveType.Plane.ToString()}); |
|
|
|
|
|
|
|
static Type s_ContextualMenuManipulator = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypesOrNothing()).FirstOrDefault(t => t.FullName == "UnityEngine.Experimental.UIElements.ContextualMenuManipulator"); |
|
|
|
|
|
|
} |
|
|
|
Add(topContainer); |
|
|
|
|
|
|
|
var middleContainer = new VisualElement {name = "middle"}; |
|
|
|
m_Preview = new VisualElement {name = "middle"}; |
|
|
|
middleContainer.Add(m_PreviewTextureView); |
|
|
|
middleContainer.AddManipulator(new Scrollable(OnScroll)); |
|
|
|
preview.Add(m_PreviewTextureView); |
|
|
|
preview.AddManipulator(new Scrollable(OnScroll)); |
|
|
|
Add(middleContainer); |
|
|
|
Add(preview); |
|
|
|
} |
|
|
|
|
|
|
|
Image CreatePreview(Texture texture) |
|
|
|