.enable = true; return an error

I have an issue right now that I really can’t understand and maybe someone can help me find reason why it could happen.

On a simple line this.gameObject.GetComponent<Light>().enabled = true;
i get this profiler error (and yes, the component exist on the gameobject):


Assertion failed: Assertion failed on expression: ‘GetSystemInterested(transform, system) != enable’
UnityEngine.Behaviour:set_enabled(Boolean)
c__Iterator0:MoveNext() (at Assets/2_SCRIPT/FlareSizeOverDistance.cs:108)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

finally found the error… the problem wasn’t link with that line, the problem was that the light had both a flare set in the light component and also a flare component and turning on/off the light return the error.

profiler wasn’t clear about it, but was finally able to solve the mystery.