Version: 2021.2
LanguageEnglish
  • C#

UnsafeUtility.ArrayElementAsRef<T>(void* ptr, int index)

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Parameters

ptr The pointer to beginning of array of struct to reference.
index Index of element in array.

Returns

void A reference to a value of type T.

Description

Gets a reference to the array element at its current location in memory.