Skip to main content

Meetem Performance Blog

Tag: IL2CPP

.NET(s) Fields and their offsets

September 10, 2023January 20, 2024 meetem Leave a comment

Field offsets can help you in numerous ways, first what comes in mind is that you can set fields of the struct or class instance without using TypedReference (doesn’t work in IL2CPP) and without GC allocs which comes with boxing when either instance or a value is a struct. Second, it could help you with unmanaged access to the class/struct for custom binary serialization, etc.

Read More

The cost of Unity’s forgiveness

January 16, 2023May 19, 2023 meetem Leave a comment

Short overview of the costs you are paying by using extremely safe single-threaded Unity API (which is basically every call to the engine, including properties like Transform.localPosition) and how to avoid paying them.

Spoiler: these costs are huge.

Read More

Recent Posts

  • Unity LockBufferForWrite: When You Should Prefer Them and Why Your Choice Matters
  • Using Vulkan in Unity shaders
  • Managed primitives Part I
  • Is .NET 8 performant enough?
  • Detecting .NET runtime at compile time

Archives

  • January 2025
  • June 2024
  • September 2023
  • March 2023
  • January 2023

Categories

  • Programming
  • Uncategorized
sparkling Theme by Colorlib Powered by WordPress