mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Revert "fix: SetupIDs() now detects if Editor is running. fixes a bug where changing any NetworkIdentity setting at runtime would clear the NetworkIdentity.assetId, causing respawn bugs where client would receive an empty assetId (forceHidden -> not forceHidden)."
=> this broke two of the runtime tests previously
This commit is contained in:
parent
ae5875203e
commit
dd29d99be2
@ -610,17 +610,6 @@ public void SetSceneIdSceneHashPartInternal()
|
|||||||
|
|
||||||
void SetupIDs()
|
void SetupIDs()
|
||||||
{
|
{
|
||||||
// IMPORTANT: DO NOT EVER try to change ids at runtime!
|
|
||||||
// fixes a bug where changing any NetworkIdentity setting
|
|
||||||
// at runtime would clear the NetworkIdentity.assetId,
|
|
||||||
// causing respawn bugs where client would receive an
|
|
||||||
// empty assetId (forceHidden -> not forceHidden).
|
|
||||||
// => changing any setting would call OnValidate
|
|
||||||
// => OnValidate calls SetupIDs which would not find the
|
|
||||||
// prefab connection at runtime and reset the assetId!
|
|
||||||
if (EditorApplication.isPlaying)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (ThisIsAPrefab())
|
if (ThisIsAPrefab())
|
||||||
{
|
{
|
||||||
// force 0 for prefabs
|
// force 0 for prefabs
|
||||||
|
Loading…
Reference in New Issue
Block a user