Add suppressions for plugins.

This commit is contained in:
2023-09-25 09:33:10 +08:00
parent 9c034c0f7b
commit 84acb2c12d
12 changed files with 139 additions and 26 deletions

View File

@@ -0,0 +1,11 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Style", "IDE0031")]
[assembly: SuppressMessage("Style", "IDE0044")]
[assembly: SuppressMessage("Style", "IDE0074")]
[assembly: SuppressMessage("Style", "IDE1005")]

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 52fbd62acb1cbcc42802d608499fbdaa
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,10 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Style", "IDE0018")]
[assembly: SuppressMessage("Style", "IDE0044")]
[assembly: SuppressMessage("Style", "IDE0251")]

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6f9933749e17ccc40807c7be6f528a04
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Performance", "UNT0026")]
[assembly: SuppressMessage("Performance", "UNT0035")]
[assembly: SuppressMessage("Style", "IDE0017")]
[assembly: SuppressMessage("Style", "IDE0018")]
[assembly: SuppressMessage("Style", "IDE0031")]
[assembly: SuppressMessage("Style", "IDE0034")]
[assembly: SuppressMessage("Style", "IDE0044")]
[assembly: SuppressMessage("Style", "IDE0051")]
[assembly: SuppressMessage("Style", "IDE0052")]
[assembly: SuppressMessage("Style", "IDE0054")]
[assembly: SuppressMessage("Style", "IDE0057")]
[assembly: SuppressMessage("Style", "IDE0059")]
[assembly: SuppressMessage("Style", "IDE0060")]
[assembly: SuppressMessage("Style", "IDE0063")]
[assembly: SuppressMessage("Style", "IDE0066")]
[assembly: SuppressMessage("Style", "IDE0074")]
[assembly: SuppressMessage("Style", "IDE0075")]
[assembly: SuppressMessage("Style", "IDE0090")]
[assembly: SuppressMessage("Style", "IDE0180")]
[assembly: SuppressMessage("Style", "IDE0251")]
[assembly: SuppressMessage("Style", "IDE1005")]
[assembly: SuppressMessage("Style", "IDE1006")]
[assembly: SuppressMessage("Correctness", "UNT0008", Scope = "member", Target = "~M:TMPro.EditorUtilities.TMP_EditorPanel.OnEnable")]

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9e8aa96a139a7414cb4d2031a22588db
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -47,17 +47,17 @@ namespace TMPro.EditorUtilities
}
public void OnDisable()
{
// Destroy material editor if one exists
/*
if (m_materialEditor != null)
{
//Debug.Log("Destroying Inline Material Editor.");
DestroyImmediate(m_materialEditor);
}
*/
}
//public void OnDisable()
//{
// // Destroy material editor if one exists
// /*
// if (m_materialEditor != null)
// {
// //Debug.Log("Destroying Inline Material Editor.");
// DestroyImmediate(m_materialEditor);
// }
// */
//}

View File

@@ -0,0 +1,31 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Performance", "UNT0026")]
[assembly: SuppressMessage("Performance", "UNT0035")]
[assembly: SuppressMessage("Style", "IDE0017")]
[assembly: SuppressMessage("Style", "IDE0018")]
[assembly: SuppressMessage("Style", "IDE0031")]
[assembly: SuppressMessage("Style", "IDE0034")]
[assembly: SuppressMessage("Style", "IDE0044")]
[assembly: SuppressMessage("Style", "IDE0051")]
[assembly: SuppressMessage("Style", "IDE0052")]
[assembly: SuppressMessage("Style", "IDE0054")]
[assembly: SuppressMessage("Style", "IDE0056")]
[assembly: SuppressMessage("Style", "IDE0057")]
[assembly: SuppressMessage("Style", "IDE0059")]
[assembly: SuppressMessage("Style", "IDE0060")]
[assembly: SuppressMessage("Style", "IDE0063")]
[assembly: SuppressMessage("Style", "IDE0066")]
[assembly: SuppressMessage("Style", "IDE0074")]
[assembly: SuppressMessage("Style", "IDE0079")]
[assembly: SuppressMessage("Style", "IDE0083")]
[assembly: SuppressMessage("Style", "IDE0090")]
[assembly: SuppressMessage("Style", "IDE0180")]
[assembly: SuppressMessage("Style", "IDE0251")]
[assembly: SuppressMessage("Style", "IDE1005")]
[assembly: SuppressMessage("Style", "IDE1006")]

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b51b4f4c3bc4c0844b9eb517250fe406
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -21,18 +21,6 @@ namespace TMPro
}
void OnEnable()
{
//m_playAnimations = true;
}
void OnDisable()
{
//m_playAnimations = false;
}
public void StopAllAnimations()
{
StopAllCoroutines();

View File

@@ -240,8 +240,7 @@ namespace TMPro
TMP_SubMesh subMesh = go.GetComponent<TMP_SubMesh>();
go.transform.SetParent(textComponent.transform, false);
go.transform.localPosition = Vector3.zero;
go.transform.localRotation = Quaternion.identity;
go.transform.SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity);
go.transform.localScale = Vector3.one;
go.layer = textComponent.gameObject.layer;

View File

@@ -3752,7 +3752,7 @@ namespace TMPro
// Second Pass : Line Justification, UV Mapping, Character & Line Visibility & more.
// Variables used to handle Canvas Render Modes and SDF Scaling
bool isCameraAssigned = m_canvas.worldCamera == null ? false : true;
bool isCameraAssigned = m_canvas.worldCamera != null;
float lossyScale = m_previousLossyScaleY = this.transform.lossyScale.y;
RenderMode canvasRenderMode = m_canvas.renderMode;
float canvasScaleFactor = m_canvas.scaleFactor;