VR GEAR and PHOTON NETWORK

Hi everyBody,

I created my raycast for when you look you active objects and descriptions…

The problem Need appear inside a Texmesh a button for this:

foreach (RoomInfo sala in PhotonNetwork.GetRoomList()){
TextMesh t = Room1.GetComponent() ;
string maxJugadores = sala.playerCount+ “/” +sala.maxPlayers;
t.text="sala: "+sala.name+“jugadores:”+ maxJugadores;

GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
//GameObject myGameObject = new GameObject(“Test Object”); // Make a new GO.
Rigidbody gameObjectsRigidBody = cube.AddComponent(); // Add the rigidbody.
gameObjectsRigidBody.mass = 0; // Set the GO’s mass to 5 via the Rigidbody.
gameObjectsRigidBody.useGravity=false;
//Collision col = cube.AddComponent();

BoxCollider _bc = (BoxCollider)cube.gameObject.AddComponent(typeof(BoxCollider));
_bc.center = Vector3.zero;
//cube.addComponent(‘collision’, { type: ‘box’, halfExtents: new pc.Vec3(sx * 0.5, sy * 0.5, sz * 0.5) });
// cube.addComponent(‘rigidbody’, { type: ‘dynamic’, mass: 1.0, enabled: true, restitution: 1.0 });
//cube.transform.position = new Vector3(0, 0.5F, 0);

//casi funcionando
GUI.Label (new Rect (100, 250+(cntSalas30), 200, 30),sala.name);
GUI.Label (new Rect (400, 250+(cntSalas
30), 200, 30)," "+maxJugadores);
if (GUI.Button (new Rect (600, 250+(cntSalas*30), 160, 30), “Entrada sala”)) {
PhotonNetwork.JoinRoom(sala.name);

}
//casi funcionando

cntSalas++;
}

Because I need a list of the rooms in this salas have this atributes:
sala,name+sala.Playescount and the button.

OnGUI all good in PC but with my VR GEAR with a S6 EDGE can not use this menu.

and other in English:
I chage the letters

cube.transform.position = Vector3 (0, 0,5, 0);

How to use this numbers in the Vector3??¿

I tri but I don’t know if a created well the cube “Button” with the colider and parameters

cube.transform.position = Vector3 ( 230.74,103.98,-434.05); csharp doesn’t work

in js works well transform.position=Vector3(-2.57,7.24,-32.89);

cube.transform.position= new Vector3 (230.74,103.98,-434.05);

Why I can’t not use double here?¿

I’,m thiking the same but with cube and text mesh

You need to specify those numbers as floats:

cube.transform.position = new Vector3 (230.74f, 103.98f, -434.05f);

ok. thanks triying because I can’t create the cube if I has not created before the cube

foreach (RoomInfo sala in PhotonNetwork.GetRoomList()){
TextMesh t = Room1.GetComponent() ;

Debug.Log(sala.name);

// I’m thinking with this sentences create a cube for every room read but I don’t know If I need created a cube in unity for this.I’m thinking create a room dinamics not static
// Quiero crear un cubo para cada sala
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);

cube.transform.position = new Vector3 (230.74f, 103.98f, -434.05f);

//I’m thinking create rigidbody for this cube
//El rigidbody sino no lee cuando tocas para el cubito que me tiene…
Rigidbody gameObjectsRigidBody = cube.AddComponent(); // Add the rigidbody.
gameObjectsRigidBody.mass = 0; // Set the GO’s mass to 5 via the Rigidbody.
gameObjectsRigidBody.useGravity=false;

//I’m thinking create TEXT MESH para el nombre se sala for the cube
// nombre de sala por texto para la sala
TextMesh T= (TextMesh)cube.gameObject.AddComponent(typeof(TextMesh));
T.text="sala: "+sala.name;

//I’m thinking create Collider for the cube
BoxCollider _bc = (BoxCollider)cube.gameObject.AddComponent(typeof(BoxCollider));

if( _bc.gameObject.Equals(GameObject.Find (“Midisparo”).GetComponent ().isTrigger = true)){

PhotonNetwork.JoinRoom(sala.name);

}

cntSalas++;
}

The cube didn’t create a create the static cube yet.

el cubo no se crea y lo cree para estatico tambien

close thread I can