Good afternoon.
Sorry for wrong writing.
My language is not English and that’s why I already have difficulties understanding several things, I’m not a professional in the area, but I’ve been developing an independent project alone and so far I’ve been successful, but I’m having problems compiling the game.
USING:
Windows 10
Unity 2022.3.20f1
Visual Studio 2022
EXPLANATION:
I’m creating a game that is working correctly within unity (playmode), but it doesn’t work the same way in the build game (compiling for standalone windows).
PROBLEM:
When I test the game in playmode it works correctly.
When I copy it into build and run, it doesn’t work correctly.
I noticed that when I edit a script or model or anything, unity does not recreate the compilation with the new information and only shows the first one that was made.
ATTEMPTS:
I’ve already searched on Google and only things come up regarding online or Android data updates, but I want to talk about building the game and not about data or about online and other platforms.
I have already turned off and turned on the PC again.
I already deleted the libraries folder.
I’ve already created a new project and it always only creates the first build I generate and doesn’t even assign a new change when I edit something and recompile. It always goes back to the first one.
If there is a bug, what should I do?
If it is configuration, where and how should I configure, I need instructions in this case.
Note that in old versions, all you had to do was click on build and run which generated a compilation of the current project and in this new version of unity I have this problem.
As mentioned, the changes are not updating, and therefore there is no error to report in the console.
I appreciate everyone’s attention for solutions.
Exemple code:
//This method is a fist method create
private void GetDate(string data){
GameObject objUI = GameObject.Find("ObjUI");
TextMeshProUGUI textUI = objUI.GetComponent<TextMeshProUGUI>();
textUIEndereco.text = data;
//Is working alright.
}
//This method is a method update and not read in copilation
private void GetDate(string data){
GameObject objUI = GameObject.Find("ObjUI");
TextMeshProUGUI textUI = objUI.GetComponent<TextMeshProUGUI>();
if(data.Equals("")){
textUIEndereco.text = "Not data";
}else{
textUIEndereco.text = data;
}
//Not owrking. No read 'if' and 'else'.
}