- Home /
Question by
stormfighter123 · Feb 05, 2017 at 10:06 PM ·
inspectorrequirecomponent
Require Component not showing in inspeector
The require component option is not showing up in the inspect. I have tried deleting git then adding it. using UnityEngine; using System.Collections;
[DisallowMultipleComponent]
[RequireComponent(typeof(Animator))]
public class Movement : MonoBehaviour{
Animator anim;
void Awake(){
anim = GetComponent<Animator>();
}
void Update(){
//turning
//jumping
Move();
}
void Move(){
anim.SetFloat("Forward", Input.GetAxisRaw("Vertical"));
}
}
Comment
Have you tried removing the script and adding it again? If you add RequireComponent
on a script already attached it won't update and add the component before you re-add it in the inspector.
Your answer
![](https://koobas.hobune.stream/wayback/20220612110337im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Require inspector assignment? 5 Answers
How does one inspect static vars? 3 Answers
Editor: multiple Inspectors 3 Answers
Getting the selected enum value set in the Inspector 2 Answers