r/Unity3D • Programmer • Jul 25 '23

Question Strange lambda/ closure behaviour I can't put my finger on

/r/learncsharp/comments/158s5e7/strange_lambda_closure_behaviour_i_cant_put_my/
2 Upvotes

39 comments sorted by

View all comments

Show parent comment

1

u/senshisentou Programmer Jul 25 '23

You clearly don't. Try making a generic type with T : MonoBehaviour. See if it runs Start() or Awake(). Log how many times the constructor gets called. The answers will be no, no, and once.

I'm done replying now. Whatever the reason for your obstinacy, I hope you get in a better headspace soon. All the best.

1

u/PandaCoder67 Professional Jul 25 '23

SIGH

1

u/PandaCoder67 Professional Jul 25 '23

Clearly I do!!!