public void SetSelection(EditorObjectSelection selection, EditorObject gizmoObject)
{
this.ClearSelectionState();
this.m_selection.Dispose();
this.m_selection = selection;
this.m_selection.ComputeCenter();
if (!this.m_selection.Contains(gizmoObject))
{
gizmoObject = EditorObject.Null;
}
if (!gizmoObject.IsValid && this.m_selection.Count > 0)
{
gizmoObject = this.m_selection[0];
}
if (gizmoObject.IsValid)
{
this.SetupGizmo(gizmoObject);
}
else
{
this.ClearGizmo();
}
this.UpdateSelectionState();
this.UpdateSelection();
this.m_paramObjectSelection.Value = -1;
}