mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed warnings/messages reported by Microsoft's Analyzers for Unity. Closes #1753.
This commit is contained in:
parent
40d738d8b8
commit
977133fc38
@ -70,7 +70,7 @@ namespace Spine.Unity.Examples {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Apply (SkeletonRenderer skeletonRenderer) {
|
void Apply (SkeletonRenderer skeletonRenderer) {
|
||||||
StartCoroutine("Blink");
|
StartCoroutine(Blink());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update () {
|
void Update () {
|
||||||
|
|||||||
@ -108,7 +108,7 @@ namespace Spine.Unity.Editor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
serializedObject.Update();
|
serializedObject.Update();
|
||||||
atlasAsset = atlasAsset ?? (SpineAtlasAsset)target;
|
atlasAsset = (atlasAsset == null) ? (SpineAtlasAsset)target : atlasAsset;
|
||||||
EditorGUI.BeginChangeCheck();
|
EditorGUI.BeginChangeCheck();
|
||||||
EditorGUILayout.PropertyField(atlasFile);
|
EditorGUILayout.PropertyField(atlasFile);
|
||||||
EditorGUILayout.PropertyField(materials, true);
|
EditorGUILayout.PropertyField(materials, true);
|
||||||
|
|||||||
@ -71,7 +71,7 @@ namespace Spine.Unity.Editor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
serializedObject.Update();
|
serializedObject.Update();
|
||||||
atlasAsset = atlasAsset ?? (SpineSpriteAtlasAsset)target;
|
atlasAsset = (atlasAsset == null) ? (SpineSpriteAtlasAsset)target : atlasAsset;
|
||||||
|
|
||||||
if (atlasAsset.RegionsNeedLoading) {
|
if (atlasAsset.RegionsNeedLoading) {
|
||||||
if (GUILayout.Button(SpineInspectorUtility.TempContent("Load regions by entering Play mode"), GUILayout.Height(20))) {
|
if (GUILayout.Button(SpineInspectorUtility.TempContent("Load regions by entering Play mode"), GUILayout.Height(20))) {
|
||||||
|
|||||||
@ -621,7 +621,7 @@ namespace Spine.Unity.Editor {
|
|||||||
int[] triangles = attachment.Triangles;
|
int[] triangles = attachment.Triangles;
|
||||||
Color color = new Color(attachment.R, attachment.G, attachment.B, attachment.A);
|
Color color = new Color(attachment.R, attachment.G, attachment.B, attachment.A);
|
||||||
|
|
||||||
mesh = mesh ?? new Mesh();
|
mesh = (mesh == null) ? new Mesh() : mesh;
|
||||||
|
|
||||||
mesh.triangles = new int[0];
|
mesh.triangles = new int[0];
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,9 @@ namespace Spine.Unity.Playables {
|
|||||||
public bool customDuration = false;
|
public bool customDuration = false;
|
||||||
public bool useBlendDuration = true;
|
public bool useBlendDuration = true;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
|
#pragma warning disable 414
|
||||||
private bool isInitialized = false; // required to read preferences values from editor side.
|
private bool isInitialized = false; // required to read preferences values from editor side.
|
||||||
|
#pragma warning restore 414
|
||||||
public float mixDuration = 0.1f;
|
public float mixDuration = 0.1f;
|
||||||
|
|
||||||
[Range(0, 1f)]
|
[Range(0, 1f)]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user