ドキュメント

Unity Engine

Unity Engine

TryResize(int, NativeArrayOptions)

Attempts to set the length in bytes. Does nothing if the new length is invalid.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule
public bool TryResize(int newLength, NativeArrayOptions clearOptions = NativeArrayOptions.ClearMemory)

Parameters

newLength

The desired length.

clearOptions

Whether added or removed bytes should be cleared (zeroed). (Increasing the length adds bytes; decreasing the length removes bytes.)

Returns

Type

Description

boolTrue if the new length is valid.