Example #1
0
    void Start()
    {
        texture = ConvertTexture(texture, TextureFormat.BGRA32);
        WindowIconTools.SetOverlayIcon(texture);
        WindowIconTools.SetIcon(texture, WindowIconKind.Small);
        WindowIconTools.SetIcon(texture, WindowIconKind.Big);
        var rtx = iconCamera.targetTexture;

        texture = new Texture2D(rtx.width, rtx.height, TextureFormat.BGRA32, false);
    }
Example #2
0
    private void Update()
    {
        var rtx = iconCamera.targetTexture;
        var tex = texture;

        RenderTexture.active = rtx;
        tex.ReadPixels(new Rect(0, 0, rtx.width, rtx.height), 0, 0);
        tex.Apply();
        WindowIconTools.SetIcon(tex, WindowIconKind.Small);
        WindowIconTools.SetIcon(tex, WindowIconKind.Big);
    }
Example #3
0
 private void OnDisable()
 {
     WindowIconTools.SetOverlayIcon(null);
     WindowIconTools.SetIcon(null, WindowIconKind.Big);
     WindowIconTools.SetIcon(null, WindowIconKind.Small);
 }