using TMPro;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
using UnityEditor.Presets;
using UnityEngine.EventSystems;
using UnityEditor.SceneManagement;
namespace RTLTMPro
{
public class ContextMenu : Editor
{
private const string kUILayerName = "UI";
private const string kStandardSpritePath = "UI/Skin/UISprite.psd";
private const string kBackgroundSpritePath = "UI/Skin/Background.psd";
private const string kInputFieldBackgroundPath = "UI/Skin/InputFieldBackground.psd";
private const string kKnobPath = "UI/Skin/Knob.psd";
private const string kCheckmarkPath = "UI/Skin/Checkmark.psd";
private const string kDropdownArrowPath = "UI/Skin/DropdownArrow.psd";
private const string kMaskPath = "UI/Skin/UIMask.psd";
private static RTLDefaultControls.Resources s_StandardResources;
///
/// Create a TextMeshPro object that works with the CanvasRenderer
///
///
[MenuItem("GameObject/UI/Text - RTLTMP", false, 2001)]
private static void CreateTextMeshProGuiObjectPerform(MenuCommand command)
{
// Check if there is a Canvas in the scene
var canvas = FindObjectOfType