public override void OnEnable() { base.OnEnable(); //Debug.Log("New Instance of SDF Material Editor with ID " + this.GetInstanceID()); // Get the UI Skin and Styles for the various Editors TMP_UIStyleManager.GetUIStyles(); // Get a reference to the TextMeshPro or TextMeshProUGUI object if possible //if (Selection.activeGameObject != null) //{ // if (Selection.activeGameObject.GetComponent<TextMeshPro>() != null) // { // m_textMeshPro = Selection.activeGameObject.GetComponent<TextMeshPro>(); // } // else // { // m_textMeshProUGUI = Selection.activeGameObject.GetComponent<TextMeshProUGUI>(); // } //} // Initialize the Event Listener for Undo Events. Undo.undoRedoPerformed += OnUndoRedo; //Undo.postprocessModifications += OnUndoRedoEvent; }
void OnEnable() { // Set Editor Window Size SetEditorWindowSize(); // Get the UI Skin and Styles for the various Editors TMP_UIStyleManager.GetUIStyles(); }
void OnEnable() { // Set Editor Window Size SetEditorWindowSize(); // Get the UI Skin and Styles for the various Editors TMP_UIStyleManager.GetUIStyles(); m_ProjectScanResults = k_ProjectScanReportDefaultText; }
public override void OnEnable() { base.OnEnable(); TMP_UIStyleManager.GetUIStyles(); ShaderUtilities.GetShaderPropertyIDs(); Undo.undoRedoPerformed = (Undo.UndoRedoCallback)Delegate.Combine(Undo.undoRedoPerformed, new Undo.UndoRedoCallback(OnUndoRedo)); if (Selection.activeGameObject != null) { m_textComponent = Selection.activeGameObject.GetComponent <TMP_Text>(); } }
public override void OnEnable() { base.OnEnable(); //Debug.Log("New Instance of SDF Material Editor with ID " + this.GetInstanceID()); // Get the UI Skin and Styles for the various Editors TMP_UIStyleManager.GetUIStyles(); // Initialize the Event Listener for Undo Events. Undo.undoRedoPerformed += OnUndoRedo; //Undo.postprocessModifications += OnUndoRedoEvent; // Check for Font Asset and Shader assignment mismatch //if (Selection.activeGameObject != null) //{ // GameObject activeGameObject = Selection.activeGameObject; // if (activeGameObject.GetComponent<TextMeshPro>() != null) // m_fontAsset = activeGameObject.GetComponent<TextMeshPro>().font; // else // m_fontAsset = activeGameObject.GetComponent<TextMeshProUGUI>().font; //} }
private void OnEnable() { SetEditorWindowSize(); TMP_UIStyleManager.GetUIStyles(); }