Problem only when compiling
xandeck
✭
Hello,
Please, anyone got an error only after compiling to .exe?
I am testing a simple Instantiate over network, it works good in Editor, but when I compile, it crashs, apps keeps open but here is what I found in output_log:
==========================================
The file 'C:/Users/myuser/Desktop/MyCompany/Projects/MyGame/Compiled/MyGame_Data/level1' is corrupted! Remove it and launch unity again!
[Position out of bounds! 56100 > 56096]
==========================================
Of course, I changed user, company and game info for obvious reasons here, but the problem remains... anyone got this already?
I already tried changing the API compatibility level, etc.
Also, another time I got almost the same error, but instead of level 1 corrupted, it said "resources" corrupted...
EDIT: Using Unity 4.1.2f1 PRO in Windows 7
Simple method call:
int randomPos = Random.Range(0, spawnPoints.Length);
GameObject myPlayer = PhotonNetwork.Instantiate("characterhuman", spawnPoints[randomPos].position, Quaternion.identity, 0);
This error only happens when I click to Instantiate this prefab (it is in Resources folder)
Please, anyone got an error only after compiling to .exe?
I am testing a simple Instantiate over network, it works good in Editor, but when I compile, it crashs, apps keeps open but here is what I found in output_log:
==========================================
The file 'C:/Users/myuser/Desktop/MyCompany/Projects/MyGame/Compiled/MyGame_Data/level1' is corrupted! Remove it and launch unity again!
[Position out of bounds! 56100 > 56096]
==========================================
Of course, I changed user, company and game info for obvious reasons here, but the problem remains... anyone got this already?
I already tried changing the API compatibility level, etc.
Also, another time I got almost the same error, but instead of level 1 corrupted, it said "resources" corrupted...
EDIT: Using Unity 4.1.2f1 PRO in Windows 7
Simple method call:
int randomPos = Random.Range(0, spawnPoints.Length);
GameObject myPlayer = PhotonNetwork.Instantiate("characterhuman", spawnPoints[randomPos].position, Quaternion.identity, 0);
This error only happens when I click to Instantiate this prefab (it is in Resources folder)
0
Comments
-
Really? Noone?
I am a potential customer, I am right now choosing which backend I can continue... :P
I still dont know if I did anything wrong, but it is hard to say, because in Editor it works good...0 -
I never had this issue, so it's hard to help. This seems to be some exporting issue and it might be due to ... anything. It's not a PUN issue when you can build our demos fine.
If you're in a test project, I'd re-create some of the assets. I heard of a case where a prefab was broken and when they created another one, replacing the old, their project worked again.
There is also a newer Unity version out. Maybe something was fixed. Try to re-import everything, too.0 -
Thanks, Tobias. Sad and at same time, happy, to know noone got this error before.
Actually I already tried to mix with settings in Unity before compile, none did work.
I was saying it was maybe a PUN issue because the error occurs exacly when I "Photon.Instantiate", with the message I posted. I can connect with no problems and everything worked fine.
I am still in a test project, I will try to make the prefab again (did not try this yet) and see if it works. The prefab I am using was created already with PUN inside the project, but it was in another folder.
Also, I am using the lastest Unity version already.
I let you know here if it works.0 -
I'm sorry I couldn't help more. I cross my fingers that creating a replacement prefab does the trick. At least once, that solved a (vaguely) similar issue.
Let us know what happens. In worst case I might take a look at your project.0 -
No problem, thanks.
I will try some other ways here too...0