[feature][API] add SaveAsImage()

This commit is contained in:
monitor1394
2022-09-22 08:37:56 +08:00
parent eba8986f18
commit bd9a0df52b
8 changed files with 147 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
@@ -741,5 +742,11 @@ namespace XCharts.Runtime
InitComponentHandlers();
InitSerieHandlers();
}
private IEnumerator SaveAsImageSync(string imageType, string path)
{
yield return new WaitForEndOfFrame();
ChartHelper.SaveAsImage(rectTransform, canvas, imageType, path);
}
}
}