.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)
Answer by Unplug · Nov 19, 2019 at 01:40 AM
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.
Your answer
Follow this Question
Related Questions
Unity3d 2017.4 android performance 0 Answers
Unity Interface Keeps Breaking 2 Answers
How to locate bug that keeps occuring on and off? 0 Answers
Can't enable Unity Ray Tracing 0 Answers
not working Grip pose or pointing pose position and rotaion 0 Answers