|
|
|
|
|
|
Add(middleContainer); |
|
|
|
} |
|
|
|
|
|
|
|
void OnScroll(float scrollValue) |
|
|
|
{ |
|
|
|
float rescaleAmount = -scrollValue * .03f; |
|
|
|
m_Graph.previewData.scale = Mathf.Clamp(m_Graph.previewData.scale + rescaleAmount, 0.2f, 5f); |
|
|
|
} |
|
|
|
|
|
|
|
void BuildContextualMenu(ContextualMenuPopulateEvent evt) |
|
|
|
{ |
|
|
|
foreach (var primitiveTypeName in Enum.GetNames(typeof(PrimitiveType))) |
|
|
|
|
|
|
|
|
|
|
m_PreviewRenderHandle.renderTexture.Release(); |
|
|
|
Object.DestroyImmediate(m_PreviewRenderHandle.renderTexture); |
|
|
|
m_PreviewRenderHandle.renderTexture = new RenderTexture(descriptor); |
|
|
|
m_PreviewRenderHandle.renderTexture = new RenderTexture(descriptor) { hideFlags = HideFlags.HideAndDontSave }; |
|
|
|
|
|
|
|
DirtyMasterNode(ModificationScope.Node); |
|
|
|
} |
|
|
|
|
|
|
|
public void UpdateRenderTextureOnNextLayoutChange() |
|
|
|
|
|
|
{ |
|
|
|
UnregisterCallback<PostLayoutEvent>(AdaptRenderTextureOnLayoutChange); |
|
|
|
RefreshRenderTextureSize(); |
|
|
|
} |
|
|
|
|
|
|
|
void OnScroll(float scrollValue) |
|
|
|
{ |
|
|
|
float rescaleAmount = -scrollValue * .03f; |
|
|
|
m_Graph.previewData.scale = Mathf.Clamp(m_Graph.previewData.scale + rescaleAmount, 0.2f, 5f); |
|
|
|
|
|
|
|
DirtyMasterNode(ModificationScope.Node); |
|
|
|
} |
|
|
|
|
|
|
|
void OnMouseDragPreviewMesh(Vector2 deltaMouse) |
|
|
|