private void ContextMenuClick(object userData, string[] options, int selected)
{
if (((bool) userData) && (selected == 0))
{
selected = 1;
}
if (selected != 0)
{
if (selected == 1)
{
ASEditorBackend.DoAS();
ASEditorBackend.ASWin.ShowHistory();
}
else if (selected == 2)
{
if (!ASEditorBackend.SettingsIfNeeded())
{
Debug.Log("Asset Server connection for current project is not set up");
}
if (EditorUtility.DisplayDialog("Discard changes", "Are you sure you want to discard local changes of selected asset?", "Discard", "Cancel"))
{
string[] guids = new string[] { this.GetGUID() };
AssetServer.DoUpdateWithoutConflictResolutionOnNextTick(guids);
}
}
}
else
{
this.DoShowDiff(this.GetGUID());
}
}