I’m sure it’s possible somehow, but I can’t find it. I love using the GUILayout for button placement, but is there a way I can have any control over the buttons’ height and width? They’re looking rather long and thin right now. =P
This is probably not needed in this case, but here’s a code snippet:
var showMenu : String = "Main";
var buttonWidth : int = 250;
var buttonHeight : int = 50;
var spacing = 25;
function OnGUI(){
GUILayout.BeginArea(Rect(Screen.width/4, 70, Screen.width/2, Screen.height/1.5));
GUILayout.BeginVertical();
switch(showMenu){
case "Main":
if(GUILayout.Button("Start Game")){
Debug.Log("Main Button clicked!");
}
GUILayout.Space(spacing);
if(GUILayout.Button("Customize Robot")){
Debug.Log("Main Button clicked!");
}
}
GUILayout.EndVertical();
GUILayout.EndArea();
}
options : An optional list of layout options that specify extra layouting properties. Any values passed in here will override settings defined by the style. See Also: GUILayout.Width, GUILayout.Height, GUILayout.MinWidth, GUILayout.MaxWidth, GUILayout.MinHeight, GUILayout.MaxHeight, GUILayout.ExpandWidth, GUILayout.ExpandHeight
int camID = 0;
camera1 = cameraClass.CallStatic(“open”, camID);
if (camera1 != null)
{
AndroidJavaObject cameraParameters = camera1.Call(“getParameters”);
cameraParameters.Call(“setFlashMode”, “torch”);
camera1.Call(“setParameters”, cameraParameters);
///FIX/////
camera1.Call(“startPreview”);
Active = true;
}
else
{
Debug.LogError(“[CameraParametersAndroid] Camera not available”);
}
}
void OnDestroy()
{
FL_Stop();
}
void FL_Stop()
{
if (camera1 != null)
{
camera1.Call(“stopPreview”);
camera1.Call(“release”);
Active = false;
}
else
{
Debug.LogError(“[CameraParametersAndroid] Camera not available”);
}