- Home /
The question is answered, right answer was accepted
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 -
anchors (in the scene view) and anchor options(in the inspector) no longer show up
attributes like header and range have stopped working although they did work before and i haven't changed the scripts....an example
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!
Answer by Bunny83 · Oct 09, 2021 at 02:17 PM
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!
Follow this Question
Related Questions
Fit application to any device resolution 1 Answer
Anchor doesn't affect objects inside of another object 0 Answers
Keeping relative size of UI elements without moving them 0 Answers
Quest Log functional - how? 0 Answers
Questions about UGUI Rect Transform Anchors. How to make UI objects scale, correctly, with screen? 1 Answer