Documentation: optimizing scripts - I think there's an error.


under: How to Avoid Allocating Memory

there are two identical code examples and two opposite explanations for them. Am I missing something here? Which one is correct?

First example is a class, second is a struct.

So you just missed the tiny detail, which I agree is not ideal. Consider lodging a suggestion: Unity QA - Bug Reporting - Unity