- Home /
Keyboard only working in Development Build. GUI Button only working in non-Development Build
I'm building a game prototype for iOS but when I create a non-development build, when typing into input fields on the iPad keyboard, seemingly random letters wont appear in the Input field!
However, when I make a development build, the keyboard works as expected, but instead my GUI buttons don't work. I think this issue may be caused by the fact that I am trying to use both the mobile camera and keyboard in the same scene but I'm not certain. This issue does not occur on Nexus tablet, only iPad. I am very perplexed by this, anyone have an idea of what could be causing this?
Here is the camera script I've made:
using UnityEngine; using System.Collections; using UnityEngine.UI;
public class Cam3 : $$anonymous$$onoBehaviour {
//Camera stuff
public $$anonymous$$eshRenderer[] UseWebcamTexture;
public WebCamTexture webcamTexture;
//setting device stuff
WebCamDevice[] devices = WebCamTexture.devices;
// read pixels
public bool grab;
// this renderer is being changed to image
public Renderer display;
//raw image stuff
public RawImage rawImage;
void Start () {
webcamTexture = new WebCamTexture();
//this sets which cam to use (0 for back cam, 1 for front cam)
rawImage.texture = webcamTexture;
rawImage.material.mainTexture = webcamTexture;
webcamTexture.deviceName = devices [1].name;
webcamTexture.Play();
}
IEnumerator OnPostRender() {
yield return new WaitForEndOfFrame ();
Texture2D tex = new Texture2D(290, 290);
tex.ReadPixels(new Rect(192, 236, 290,290), 0, 0); //(a,b,c,d)
//decreasing "a" captures more to left
//decreasing "b" captures lower
tex.Apply();
display.material.mainTexture = tex;
}
void Update () {
}
public void CamEnable(){
webcamTexture.Play();
StartCoroutine (OnPostRender ());
}
public void CamDisable(){
webcamTexture.Stop();
StartCoroutine (OnPostRender ());
}
}
Your answer
Follow this Question
Related Questions
Assign a hotkey to a GUI button 1 Answer
WebCamTexture conflicts with Facebook Audience Network - Unity SDK 0 Answers
Screenshot from camera 0 Answers