How to add a disabled Component

I want to add a component in its disabled state. When you add a component using addComponent the component is added and runs. I want to add a component and not have it enabled until later.

In TestStart’s Awake function put:

this.enabled = false;

This is old, but the way I dealt with it was to add a new GameObject, then Disable it, then add my components and finally Enable it, this way all of the scripts get executed in the order you would expect and you can set whatever variables you need before Awake.

GameObject _RuntimeComponents = new GameObject(); = "_RuntimeComponents";

fsmAnimator = _RuntimeComponents.AddComponent<FsmAnimator>();
fsmAnimator.animator = animator;

Thanks to @Narmer for only working solution expanding on it this is what i did :
The component below is designed to work with manual initialization and normal mode in editor.
Manual means the component will be added and will be disabled, awaiting the “config” to be provided,
then enabled.
This is achieved by @Narmer s tip in awake.
However because you disable the object in awake it calls OnDisable, so you have to make sure you skip that call by using “initialized” boolean that is set true in OnEnabled.
This allows for component to have manual and auto initialization.

/// <summary>
/// Component has to be enabled from outside, because it starts disabled for delayed initialization
/// </summary>
public class InputBlockerComponent : MonoBehaviour {

    public InputBlockerConfig config;
    /// <summary>
    /// Component will work normally if this is active, otherwise it will be disabled in awake
    /// </summary>
    public bool StartByMyself = false;
    bool initialized;
    void Awake()
            enabled = false;

	void OnEnable()
        initialized = true;

    void OnDisable()
        if (!initialized)

this simple trick works

using UnityEngine;

public abstract class AddComponentAbleMonoBehaviour : MonoBehaviour
    protected void Awake() {
        enabled = _startEnable;
        if (enabled)
    protected abstract void Awake2();

    protected void OnEnable() {
        _isOnceEnabled = true;
    protected abstract void OnEnable2();

    protected void OnDisable() {
        if (_isOnceEnabled == false)
    protected abstract void OnDisable2();

    protected void Reset() {
        _startEnable = true;
    protected abstract void Reset2();

    private bool _isOnceEnabled;
    [SerializeField, HideInInspector] bool _startEnable = false;

You can set the the enabled flag of the component to false right after you add the component:

TestStart ts = (TestStart)gameObject.AddComponent<TestStart>();
ts.enabled = false;

Awake() will be called, but the Start() call will be put off until the component is enabled. So you can put logic that you want to wait to execute in Start().