Cómo llamar al portapapeles de iOS a través de Unity
Y dentro de int OpenEAGL_UnityCallback(UIWindow** window, int* screenWidth, int* screenHeight, int* openglesVersion)
en este método
devuelve verdadero antes; Agregado
//Crear ventana de pantalla completa
CGRect rect=CGRectMake(0, 0, *screenWidth, *screenHeight
*window=[[); UIWindow alloc] initWithFrame:rect];
[*window makeKeyAndVisible];
GLView * view=[[GLView alloc] initWithFrame:rect]; * ventana addSubview:view];
[ver versión];
MyViewController *myView=[[MyViewController] alloc init]
[*window addSubview. myView .view];
[lanzamiento de myView];
Entre ellos: MyViewController es una nueva clase creada manualmente después de exportar el proyecto. en este ViewController Movimiento y otras acciones.
Paso 2: Cree MyViewController y agregue el botón para iniciar u3d
- (void)viewDidLoad {
[super viewDidLoad]
; //Crear vista de etiquetas
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 40)]
//Establecer contenido de visualización
label.text = @"El mundo de la programación de Amatsu MOMO";
//Establecer color de fondo
label.text = @"El mundo de la programación de Amsu MOMO"
//Establecer el color de fondo
label.font = [UIFont fontWithName:[[UIFont familyNames] objectAtIndex:10] size :20]
//Crear botón;
UIButton *button0 = [UIButton buttonWithType:1]
//Establecer rango de botones
button0.frame = CGRectMake(0, 40, 100, 30 ); <
//Establece el contenido mostrado por el botón
[button0 setTitle:@"Rectangle LeftRotate" forState:UIControlStateNormal]
//Set; los métodos de respuesta vinculados a los cambios del botón
[button0 addTarget: self action:@selector(LeftButtonPressed) forControlEvents:UIControlEventTouchUpInside]
//Creando el botón
; UIButton *button1 = [UIButton buttonWithType:1];
//Establecer el rango del botón
button1.frame = CGRectMake(0, 100, 100, 30);
//Establece lo que muestra el botón
[button1 setTitle:@"RectangleRightRotation" forState:UIControlStateNormal]
// Establece el método para vincular la respuesta cuando cambia el botón
p>[botón1 addTarget:self action:@selector(RightButtonPressed) forControlEvents:UIControlEventTouchUpInside];
o