Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

CaptureScreenshotAsTexture and print screen

Discussion in 'Windows' started by Sadowski, Jul 19, 2019.

  1. Sadowski


    Jan 20, 2017
    I have a big request. i`m a graphic designer using Playmaker and never write a line of code. and I have a problem. I have an asset and I do not know how to implement
    "LCPrinter plugin allows you to print a Texture2D to your printer.
    It only requires one line of code to print an image."

    LCPrinter.Print.PrintTexture(texture2D.EncodeToPNG(), copies, printerName);

    That functions just returns the Texture2D then you jus need to pass it to our print funciton.
    public static Texture2D CaptureScreenshotAsTexture(int superSize);

    I need a procedure called by "call method" which prints the whole screen multiplied by (2 or 3)

    example script
    using UnityEngine;
    using System.Collections;
    using System.Diagnostics;
    using System;
    using System.IO;
    using LCPrinter;
    using UnityEngine.UI;

    public class LCExampleScript : MonoBehaviour {

    public Texture2D texture2D;
    public string printerName = "";
    public int copies = 1;

    public InputField inputField;

    public void printSmileButton()
    Print.PrintTexture(texture2D.EncodeToPNG(), copies, printerName);

    public void printByPathButton()
    Print.PrintTextureByPath(inputField.text.Trim(), copies, printerName);

    I got stuck and I would be grateful for any help. Please, keep in mind that I'm not a coder.
    Rafał Sadowski