Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

LoadScene and LoadSceneAdditively - Blocking Operations?

$
0
0
I'm currently testing my scene manager in Unity Basic 3.5.7 for Windows, and I've always been under the impression that LoadScene and LoadSceneAdditively were operations that 'freeze' Unity until they're completed - nothing else goes on until they're completed. That's what I'm getting from this posting here, though it is indeed quite old: [http://forum.unity3d.com/threads/22366-Application-GetStreamProgressForLevel-for-iPhone][1] However, in my scene manager this doesn't appear to be the case. Now I'm wondering if there's a flaw in my code - which very well could be - or that the style of operation varies based on the machine Unity is on. My question: Are LoadLevel and LoadLevelAdditive "blocking operations" for *just* iOS? That perhaps the reason why my code doesn't seem to work is because it's on PC? I do have Unity for Mac and iOS, it's just that my Developer's License for iOS lapsed and I'm in no hurry to shell out cash to renew it (and test it out). As for my code, here's the script I made. // Add scenes (string sceneName, string reference to refer to internally) 9: AddScene(nowLoading, nowLoadingTest) 10: AddSceneAdditively(gbSpawnTest00, gbSpawnTest00Test) 20: AddSceneAdditively(joystickButtonGUIScreen, joystickButtonGUIScreenTest) // Remove scenes (string reference to refer to internally) 30: RemoveScene(nowLoadingTest) I made an interpreter (that does not get destroyed on load) that parses and does one line of code for each frame, progresses onward, and the 'Now Loading' scene is rendered at a higher depth than everything else (courtesy of NGUI). In my mind it should work, but in reality it doesn't. :P I can tell it's not working at least on PC because the 'Now Loading' scene appears but somehow gets destroyed before the Joystick GUI renders on screen. The nowLoading scene blacks everything out if I don't delete it however ;) **EDIT: Yes it is indeed a blocking operation. The errors I was seeing was that although I had the correct depth for NGUI objects, I failed to have the correct depth for the Unity Camera. Setting a higher depth for the 2D Camera caused this to work.** [1]: http://forum.unity3d.com/threads/22366-Application-GetStreamProgressForLevel-for-iPhone

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>