Skip to content

ChartFileSourceResolver

ClassChartGuruChartGuru
public static class ChartFileSourceResolver

Helper used by ChartGuru.CsvChartDataSource and ChartGuru.JsonChartDataSource to resolve the configured source mode/path to raw text. Centralizing this keeps both inspectors consistent and avoids duplicated I/O code.

ReadText(ChartFileSourceMode, TextAsset, string, string, string, string)

Section titled “ReadText(ChartFileSourceMode, TextAsset, string, string, string, string)”
public static string ReadText(ChartFileSourceMode mode, TextAsset textAsset, string projectPath, string absolutePath, string streamingAssetsPath, string inlineText)

Reads text from the supplied mode, text asset, project path, absolute path, streaming assets path, and inline text, applying the configured source and path rules.

Parameters

Name Type
mode ChartGuru.ChartFileSourceMode
textAsset UnityEngine.TextAsset
projectPath System.String
absolutePath System.String
streamingAssetsPath System.String
inlineText System.String

Returns

System.String

public static string ResolveProjectPath(string relativePath)

Resolves project path from the supplied relative path, applying configured fallbacks when no explicit value is available.

Parameters

Name Type
relativePath System.String

Returns

System.String

public static string ResolveStreamingPath(string relativePath)

Resolves streaming path from the supplied relative path, applying configured fallbacks when no explicit value is available.

Parameters

Name Type
relativePath System.String

Returns

System.String