Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

BitField32.GetBits

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

Declaration

public uint GetBits(int pos, int numBits);

Parameters

Parameter Description
pos Position in the bit field of the first bit to get (must be 0-31).
numBits Number of bits to get (must be 1-32).

Returns

uint The requested range of bits from the bit field stored in the least-significant bits of a uint. All other bits of the uint will be 0.

Description

Returns one or more contiguous bits from the bit field as the lower bits of a uint.