public void Draw(Rect rect, bool selected, AssetIconsCompiledStyle style) { var drawRect = AssetIconsGUIUtility.AreaToIconRect(rect, style.MaxSize); if (currentValue != null) { var col = AssetIconsGUI.BackgroundColor; col = new Color(col.r, col.g, col.b, 0); var setup = new AssetIconsCameraSetup() { BackgroundColor = col, TransparentBackground = true, Orthographic = style.Projection == IconProjection.Orthographic, PreviewDirection = new Vector3(-1.0f, -1.0f, -1.0f) }; var thumbnail = AssetIconsRenderCache.GetTexture(setup, currentValue); AssetIconsGUI.DrawTexture(rect, thumbnail, style, selected); } }
private static void ClearCacheCallback() { AssetIconsRenderCache.ClearCache(); SaveChangesCallback(); }