Search Issue Tracker
Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.
Postponed
Votes
42
Found in
5.6.0f3
Issue ID
902995
Regression
No
Awake of NetworkBehaviour is not called at launch in standalone build, but is in the Editor
In Editor, Awake and Start functions are called as follows: Awake in Networked object, Awake in local object, Start in local object, Start in Networked object
In Player, Awake and Start functions are called as follows: Awake in local object, Start in local object, Awake in networked object, start in Networked object
To reproduce:
1. Open the project, attached by tester
2. Open "test" scene if not open
3. Press Play
4. Create Host
4. Observe the console
5. Stop the game
6. Build and run a standalone
8. After it has launched, create Host and close the game
9. Go to {standaloneName}_Data folder and open output_log.txt file
10. Observe the order of outputs from Awake and Start methods
Expected: Awake and Start methods are called in the same order on MonoBehaviour and NetworkBehaviour objects no matter if it is in Editor or in standalone build
Actual: the execution order of Awake and Start methods in Editor are diferrent than in standalone build when using NetworkBehaviour
Reproduced on 5.4.5p1, 5.5.3p1, 5.6.0p2, 2017.1.0b1
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- MouseButton(0) loses click state when using Device Simulator and enabling "Any iOS Device" in Unity Remote
- [Linux] "Sending message header failed (11)" Warning in Console when opening or closing Standalone Profiler
- [Backport] MacOS Targetsupport Installers for Linux overwrite their content
- [Backport] Scheduled items, asynchronous tasks, and Update() are not run when EditorWindow is opened using ShowModalUtility()
- [Backport] [UWP] Not adding NET_STANDARD_2_0 define
mayasarii876
Mar 08, 2022 10:19
http://103.56.148.201/
http://103.56.148.201/newmpo
http://103.56.148.201/mpo17
http://103.56.148.201/mpomm
http://103.56.148.201/mpotower
http://103.56.148.201/parisklub
http://103.56.148.201/juraganslot
http://103.56.148.201/mpo500
http://103.56.148.201/mpokick
http://103.56.148.201/mpoyes
http://103.56.148.201/xyzklub
http://103.56.148.201/betmpo
http://103.56.148.201/ogslot88
http://103.56.148.201/hoki777
http://103.56.148.201/mpojuta
http://103.56.148.201/299slot
http://103.56.148.201/mpo188
http://103.56.148.201/mpogacor
http://103.56.148.201/mpo300
http://103.56.148.201/rgo365
http://103.56.148.201/kingdom288
http://103.56.148.201/wigompo
http://103.56.148.201/mpo8899
http://103.56.148.201/mpopelangi
http://103.56.148.201/mpo555
http://103.56.148.201/dutampo
http://103.56.148.201/klik368
http://103.56.148.201/388hero
http://103.56.148.201/19dewa
http://103.56.148.201/mpoxl
http://103.56.148.201/mpoas
http://103.56.148.201/mposun
http://103.56.148.201/qqslot
http://103.56.148.201/mposport
http://103.56.148.201/dewa234
http://103.56.148.201/mesinmpo
spidermancy612
May 03, 2019 14:16
Quick update for anyone who finds themselves here like I did. The issue is still persistent in Unity 2018 1.0f2.
Also to add to it. Awake/Start cannot run on any class inheriting from NetworkBehavior as well as will not run on any object with a network component as far as I can tell. To get around this you can create a separate GameObject without any networking on it, then attach a Monobehavior class to it, you can then run the awake/start methods there.
romikula
Mar 11, 2018 20:11
Confirming the issue, neither Awake, Start nor Enable are working when inheriting NetworkBehaviour :(
RikuTheFuffs
Feb 13, 2018 09:52
Is it possible that this bug is still active after one year? I'm using 5.5.5p1 where this issue doesn't seem to appear, but I'd really like to update to 5.6 and can't do that.
Chikari
Jan 02, 2018 19:51
Still a problem for 2017.3.
Kailric
Aug 28, 2017 15:39
I just noticed this issue as well in 2017 build. I have been using the Unity created LobbyManager Asset and the NetworkBehavior objects start as they should. But when I created my own means to start a match the Start and Awake functions no longer work in standalone.
quenchless
Jul 02, 2017 15:28
This is very severe please fix.
flinter
Jun 30, 2017 02:35
In my case I have screen with buttons like Start Server, Start Client and etc.
I made script from PHAEM (because just call broadcast doesn't work.
public class ForceAwake : MonoBehaviour
{
public MyNetworkManager manager;
private void Awake()
{
manager.gameObject.SetActive(true);
}
}
I see in the log that component Awaked.
But in my method NetworkManager.singleton is equal NULL
When I pressed button, (just UI Button) it works normally.
It is so bad issue :(((
andyasj
May 12, 2017 16:59
I have a working editor project but in build awake not called AT ALL for one NetworkBehavior.
phaem
May 12, 2017 08:34
I solved those issues using this script on parent objects:
public class ForceAwake : MonoBehaviour
{
private void Awake()
{
BroadcastMessage("ForcedAwake");
}
}
This way it works in standalone exactly as in editor.