|
|
|
|
|
|
void Awake() |
|
|
|
{ |
|
|
|
m_Dropdown = GetComponent<Dropdown>(); |
|
|
|
m_Dropdown.ClearOptions(); |
|
|
|
void Update() |
|
|
|
void PopulateDropdown() |
|
|
|
m_Dropdown.ClearOptions(); |
|
|
|
|
|
|
|
var cameraSubsystem = ARSubsystemManager.cameraSubsystem; |
|
|
|
if (cameraSubsystem == null) |
|
|
|
return; |
|
|
|
|
|
|
if (configurations.count == 0) |
|
|
|
return; |
|
|
|
|
|
|
|
// Here we demonstrate the two ways to enumerate the camera configurations.
|
|
|
|
// Typically, you would do this once, perhaps at the start of the AR app
|
|
|
|
// rather than every frame.
|
|
|
|
// There are two ways to enumerate the camera configurations.
|
|
|
|
// Here, we use a foreach to iterate over all the available configurations
|
|
|
|
m_ConfigurationNames.Clear(); |
|
|
|
// 1. Use a foreach to iterate over all the available configurations
|
|
|
|
// We can also use a normal for...loop
|
|
|
|
// 2. Use a normal for...loop
|
|
|
|
var currentConfig = cameraSubsystem.GetCurrentConfiguration(); |
|
|
|
for (int i = 0; i < configurations.count; i++) |
|
|
|
{ |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void Update() |
|
|
|
{ |
|
|
|
if (m_ConfigurationNames.Count == 0) |
|
|
|
PopulateDropdown(); |
|
|
|
} |
|
|
|
} |