Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    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:
    26
    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:
    547
  3. kdkd

    kdkd

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