weird problems in unity

so I was actually having these problems from the last month but since i spent most of it without even opening my project…but it’s really problematic now…

the problem is that -

  1. anchors (in the scene view) and anchor options(in the inspector) no longer show up
  2. attributes like header and range have stopped working although they did work before and i haven’t changed the scripts…an example 187278-shadowrite-uitests-pc-mac-linux-standalone-unity-2.png

the script on this one is just

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AttributesNotWorking : MonoBehaviour
{
  [Header("test")]
  public string test;
  [Range(0, 5)]
  public int testnum;
}

i have no idea why this is happening, and i basically can’t properly set anchors for the ui in my game

Any and all help is appreciated…Thank you!

1 Answer

1

You may have switched your inspector mode to “debug”. In debug mode none of the custom property drawers or inspectors are run and the inspector additionally shows private and internal variables.

So right-click the top right in your inspector window and switch back to normal mode.

whoops, that was the problem, i don't know how it accidentally switched to debug (since it's too much to accidentally happen), but it could have been me, since i sometimes use debug inspector to track private variables, so it was very stupid of me to not figure it out. Thank you so much!