44 lines
1.0 KiB
C#
44 lines
1.0 KiB
C#
namespace VoxelLabs.UltimateThumbnails.Lib
|
|
{
|
|
public static class Utils
|
|
{
|
|
public static int GetEditorVersionIdentifier()
|
|
{
|
|
#if UNITY_2022_2_OR_NEWER
|
|
return 2022_2;
|
|
#elif UNITY_2021_3_OR_NEWER
|
|
return 2021_3;
|
|
#elif UNITY_2021_1_OR_NEWER
|
|
return 2021_1;
|
|
#elif UNITY_2018_4_OR_NEWER
|
|
return 2018_4;
|
|
#endif
|
|
}
|
|
|
|
public static bool GetVerbosity()
|
|
{
|
|
#if ULTIMATE_PREVIEW_VERBOSE
|
|
return true;
|
|
#else
|
|
return false;
|
|
#endif
|
|
}
|
|
|
|
public static int GetIconSize(IconSize iconSize)
|
|
{
|
|
switch (iconSize)
|
|
{
|
|
case IconSize.X64:
|
|
return 64;
|
|
case IconSize.X128:
|
|
return 128;
|
|
case IconSize.X256:
|
|
return 256;
|
|
case IconSize.X512:
|
|
return 512;
|
|
default:
|
|
return 128;
|
|
}
|
|
}
|
|
}
|
|
} |