Problem enabling camera

Hi,

I got a camera attached to a disabled game object.
When the root object is instantiated I enable the game object, but the camera is disabled.
There is only 3 references to the camera.
The first one is the declaration and here are the to others :

	public void OnEnable()
	{
		Debug.Log("OnEnable " + transform.root.gameObject.name);
		m_Camera.enabled = true;
		MeshRenderer renderer = m_HudMesh.GetComponent<MeshRenderer>();
		renderer.enabled = true;
	}

	public void OnDisable()
	{
		Debug.Log("OnDisable " + transform.root.gameObject.name);
		m_Camera.enabled = false;
		MeshRenderer renderer = m_HudMesh.GetComponent<MeshRenderer>();
		renderer.enabled = false;
	}

Defaut inspector (not ingame)

Ingame inspector (the camera is disabled):


Do you get any error messages? How are you setting up the camera reference?

No error.
I dragged the component in a objectfield :

I tried with this but there is no change :

public Camera Camera
{
	get
	{
		if (m_Camera == null)
		{
			m_Camera = gameObject.camera;

			if (m_Camera == null)
			{
				Debug.LogError("no camera found in HeadsUpDisplay3D : " + transform.root.gameObject.name);
				m_Camera = gameObject.AddComponent<Camera>();
			}
		}
		return m_Camera;
	}
}

Only Camera is used and it return m_camera or gameobject.camera (RequireComponent) or create a new one.

Ok, I found why.
It’s my fault, the camera was disabled in an other script.