Search Unity

Gradient field in custom shader editor.

Discussion in 'Immediate Mode GUI (IMGUI)' started by Phantom_X, Feb 23, 2019.

  1. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    230
    Hi,
    I made a custom shader editor and I would like to expose a gradient field in it. The shader editor is similar to the standard shader one. It's using OnGUI()

    There is no exposed API for the gradient filed, but I've been told it's possible to get using System.Refelction.

    Thing is I have no knowledge about how Reflection works...

    Anybody can help me with that?

    Thanks!
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    3,411
  3. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    230
    No, it's not available for material inspectors.