Welcome,
Guest
. Please
login
or
register
.
May 20, 2025, 10:27:38 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How to make scene loading ?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to make scene loading ? (Read 3588 times)
mimmog
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 32
How to make scene loading ?
«
on:
October 05, 2014, 12:48:46 PM »
Is possibile to create a loading screen for scenes with NGUI ? I would like also only the text "Loading..." without progress bar...I have not Unity Pro and I can't use Application.LoadLevelAsync and similar.
PS: It's enough also only a loading screen when the game start and to load all game's assets.
Thank you
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: How to make scene loading ?
«
Reply #1 on:
October 06, 2014, 08:44:25 AM »
Make a UI window that says "loading". Instead of just doing Application.LoadLevel, open that window first, yield until next frame, then do Application.LoadLevel.
Logged
mimmog
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 32
Re: How to make scene loading ?
«
Reply #2 on:
November 29, 2014, 09:19:42 PM »
Like this?
VisualLoadingScreen
(
)
;
yield
WaitForEndOfFrame
(
)
;
Application
.
LoadLevel
(
"1level"
)
;
DisableLoadingScreen
(
)
;
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: How to make scene loading ?
«
Reply #3 on:
November 30, 2014, 05:50:57 AM »
WaitForEndOfFrame() is still the same frame. "yield return null;" would wait for the next one.
Logged
mimmog
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 32
Re: How to make scene loading ?
«
Reply #4 on:
November 30, 2014, 11:59:39 AM »
No, not work fine...
this is the code :
public
void
loadLevel
(
int
numL
)
{
string
levelName
=
"Level_"
+
numL
;
setLevelInfo
(
numL
)
;
StartCoroutine
(
waitLoading
(
levelName
)
)
;
}
IEnumerator waitLoading
(
string
levelName
)
{
NGUITools
.
SetActive
(
menuLoading,
true
)
;
yield
return
null
;
Application
.
LoadLevel
(
levelName
)
;
NGUITools
.
SetActive
(
menuLoading,
false
)
;
}
The problem is that It not show the menuLoading but if I delete the row NGUITools.SetActive(menuLoading,false); the menu is showed..why it not wait for NGUITools.SetActive(menuLoading,false); ?
«
Last Edit: November 30, 2014, 01:40:23 PM by mimmog
»
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: How to make scene loading ?
«
Reply #5 on:
December 02, 2014, 11:16:05 AM »
You would need to wait for the level to load instead of executing the code right away. Check Unity's documentation for Application.LoadLevel, this isn't an NGUI question at this point.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How to make scene loading ?