Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  3. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Custom Editor draw a texture with custom material?

Discussion in 'Extensions & OnGUI' started by kdkd, Nov 17, 2018.

  1. kdkd

    kdkd

    Joined:
    Nov 21, 2017
    Posts:
    24
    So I wish to extend Unity's toolbox by adding a Texture view window. The catch is I wish to use a custom shader to do some postprocessing (like masking channels, swizzle or biasing) on it so that debugging can be much more smoother.

    But I didn't see any suitable functions for this task.
    I tried Handles.DrawCamera, GUI.DrawTexture, EditorGUI.drawPreviewTexture etc, all of them dont allow for material customization.

    Is there a way to achieve this simple task?
     

    Attached Files:

    Last edited: Nov 17, 2018
  2. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    535
  3. kdkd

    kdkd

    Joined:
    Nov 21, 2017
    Posts:
    24
    my bad. Thanks for pointing out.