Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Change variable color in inspector

Discussion in 'Scripting' started by OutDoorsScene, Jul 13, 2023.

  1. OutDoorsScene

    OutDoorsScene

    Joined:
    Sep 9, 2022
    Posts:
    140
    How would I change a color for random variables?
    Capture.PNG
    I want to change the color of a variable in the inspector to red if its null.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    That's actually probably one of the most-useful ideas I've ever heard for the Unity inspector. Wow...

    I think that today you woudl need a custom inspector to do it, but it almost should be suggested as a "unity needs this" feature!!
     
  3. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    449
    Kurt-Dekker likes this.