mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkScene: syntax improvements to simplify code
This commit is contained in:
parent
a9d87b512e
commit
de1cadc709
@ -144,17 +144,12 @@ static internal void RegisterPrefab(GameObject prefab)
|
||||
|
||||
static internal bool GetPrefab(NetworkHash128 assetId, out GameObject prefab)
|
||||
{
|
||||
if (!assetId.IsValid())
|
||||
prefab = null;
|
||||
if (assetId.IsValid() && guidToPrefab.ContainsKey(assetId) && guidToPrefab[assetId] != null)
|
||||
{
|
||||
prefab = null;
|
||||
return false;
|
||||
}
|
||||
if (s_GuidToPrefab.ContainsKey(assetId) && s_GuidToPrefab[assetId] != null)
|
||||
{
|
||||
prefab = s_GuidToPrefab[assetId];
|
||||
prefab = guidToPrefab[assetId];
|
||||
return true;
|
||||
}
|
||||
prefab = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user