necesitoNecesito enviar datos desde c# a java y viceversa. utilizoUtilizo la funcionfunción android java object, ya. Ya se identificoidentificó que el momento donde se detiene es cuando se realiza la llamada a java con el .Call()
.Call(), les anexo el codigo java, y el codigo en c# con el que lo estoy llamando por si pueden ayudarme
claseClase java package cicese.mooding.brain.data.interaction;
public class Communication {
private int id;
private String type;
private String[] value;
public Communication() {}
public int GetID()
{
package cicese.mooding.brain.data.interaction;
public class Communication
{
private int id;
private String type;
private String[] value;
public Communication() {}
public int GetID()
{
return id;
}
public void SetID(int value) {
}
public void SetID(int value)
{
id = value;
}
public String GetType() {
}
public String GetType()
{
return type;
}
public void SetType(String value) {
type = value;
}
public String[] GetValue() {
return value; }
}
public void SetValue(String[] value) {
this.value = value;
}
}
Codigo c# en unity, queremos llamar a la funcion SetValue
public void Response() {
AndroidJavaObject manager = new AndroidJavaObject("cicese.mooding.brain.BrainManager");
AndroidJavaObject response = new AndroidJavaObject("cicese.mooding.brain.data.interaction.Communication");
string stringParameter = EventSystem.current.currentSelectedGameObject.name;
public void SetType(String value)
{
object[] argstype = newvalue;
object[] {}
stringParameter };
public String[] GetValue()
{
return value;
}
public void SetValue(String[] value)
{
responsethis.Callvalue = value;
}
}
Codigo c# en unity (queremos llamar a la función SetValue
)
public void Response("SetValue",args);
{
AndroidJavaObject manager = new AndroidJavaObject("cicese.mooding.brain.BrainManager");
AndroidJavaObject
response = new AndroidJavaObject("cicese.mooding.brain.data.interaction.Communication");
string stringParameter = EventSystem.current.currentSelectedGameObject.name;
object[] args = new object[] { responsestringParameter };
response.Call("SetValue",args);
args = new object[] { response };
AndroidJavaObject data = manager.Call<AndroidJavaObject>("receiveDataFromGUI", args);
inter = Interaction.AndroidJavaToCSharp(data);
}
}