兼容unity5.6

This commit is contained in:
monitor1394
2021-04-13 09:57:33 +08:00
parent 5aa90274dc
commit ce08b0f81e
3 changed files with 10 additions and 10 deletions

View File

@@ -147,9 +147,9 @@ namespace XCharts
{
if (component.anyDirty)
{
if (component.componentDirty)
if (component.componentDirty && component.refreshComponent != null)
{
component.refreshComponent?.Invoke();
component.refreshComponent.Invoke();
}
if (component.vertsDirty)
{

View File

@@ -265,7 +265,7 @@ namespace XCharts
}
chart.RefreshBasePainter();
};
radar.refreshComponent?.Invoke();
radar.refreshComponent.Invoke();
}
private void DrawMutipleRadar(VertexHelper vh, Serie serie, int i)

View File

@@ -242,7 +242,7 @@ namespace XCharts
public bool IsWebRequestError(UnityWebRequest request)
{
#if UNITY_5
return request.isError && ! request.responseCode >= 400;
return request.isError && request.responseCode < 400;
#elif UNITY_2017_1
return request.isError && !request.isHttpError;
#elif UNITY_2020_2
@@ -426,7 +426,7 @@ namespace XCharts
var tmpName = "\"Unity.TextMeshPro\"";
foreach (var line in lines)
{
if (string.IsNullOrWhiteSpace(line)) continue;
if (string.IsNullOrEmpty(line)) continue;
if (line.Contains("\"references\": ["))
{
dest.Add(line);
@@ -472,7 +472,7 @@ namespace XCharts
dest.Add(line);
}
}
if (addedTMP || removedTMP) File.WriteAllText(asmdefPath, string.Join("\n", dest));
if (addedTMP || removedTMP) File.WriteAllText(asmdefPath, string.Join("\n", dest.ToArray()));
return true;
}
catch (System.Exception e)