Hi,
Do you have any errors printed in the console, either in logcat when running on Android, or in the Xcode console for iOS?
The code that was posted assumes that the right GameObjects / Components were assigned in the inspector for this script. Can you please double-check that this was done correctly?
Thank you,
Alexandru
Hi Yovanni,
Please provide the following details:
- Which version of the SDK are you using?
- Confirm that you’re using the Unity extension?
- What device / OS does this happen with?
- is this happening also in the sample app?
Greetings
Nicola
Yovanni Emmanuel
Hi I am trying to use camera flash on my AR project.
i tried using the sample cs that came with the wikitude sample scene however i was not able to access any of my touch or button features with the codes i wrote. I tried separating the code from the sample code but still doesn't work. can anyone help me with this. (beginner programmer)
using UnityEngine;
using UnityEngine.UI;
using Wikitude;
using System.Collections;
public class CameraSettingsController : SampleController
{
public WikitudeCamera Camera;
public GameObject FlashModeLayout;
public Dropdown FlashModeDropdown;
public void OnCameraOpened() {
PositionDropdown.value = (int)Camera.DevicePosition;
if (Camera.IsFlashModeSupported(CaptureFlashMode.On)) {
FlashModeLayout.SetActive(true);
FlashModeDropdown.value = (int)Camera.FlashMode;
} else {
FlashModeLayout.SetActive(false);
}
}
public void OnCameraControlsButtonClicked() {
ControlsLayout.SetActive(!ControlsLayout.activeSelf);
}
public void OnPositionChanged(int newPosition) {
Camera.DevicePosition = (CaptureDevicePosition)newPosition;
}
public void OnFlashModeChanged(int newFlashMode) {
Camera.FlashMode = (CaptureFlashMode)newFlashMode;
}
}