private static string GetExtension(CurveLibraryType curveLibraryType) { switch (curveLibraryType) { case CurveLibraryType.Unbounded: return(PresetLibraryLocations.GetCurveLibraryExtension(false)); case CurveLibraryType.NormalizedZeroToOne: return(PresetLibraryLocations.GetCurveLibraryExtension(true)); } Debug.LogError("Enum not handled!"); return("curves"); }
private static string GetExtension(CurveLibraryType curveLibraryType) { if (curveLibraryType == CurveLibraryType.Unbounded) { return(PresetLibraryLocations.GetCurveLibraryExtension(false)); } if (curveLibraryType != CurveLibraryType.NormalizedZeroToOne) { Debug.LogError("Enum not handled!"); return("curves"); } return(PresetLibraryLocations.GetCurveLibraryExtension(true)); }
private CurveLibraryType GetCurveLibraryTypeFromExtension(string extension) { string curveLibraryExtension = PresetLibraryLocations.GetCurveLibraryExtension(true); string str2 = PresetLibraryLocations.GetCurveLibraryExtension(false); if (!extension.Equals(curveLibraryExtension, StringComparison.OrdinalIgnoreCase)) { if (extension.Equals(str2, StringComparison.OrdinalIgnoreCase)) { return(CurveLibraryType.Unbounded); } Debug.LogError("Extension not recognized!"); } return(CurveLibraryType.NormalizedZeroToOne); }