mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-16 12:58:27 +00:00
performance optimization for edit-mode: don't deactivate world objects during initialization
This commit is contained in:
parent
eb091f11d0
commit
e31d937b4a
2 changed files with 4 additions and 2 deletions
|
@ -44,7 +44,8 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
info.TargetInterior),
|
||||
Quaternion.identity);
|
||||
|
||||
gameObject.SetActive(false);
|
||||
if (!F.IsAppInEditTime)
|
||||
gameObject.SetActive(false);
|
||||
gameObject.isStatic = true;
|
||||
|
||||
// collider
|
||||
|
|
|
@ -138,7 +138,8 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
|
||||
this.SetDrawDistance(ObjectDefinition?.DrawDist ?? 0);
|
||||
|
||||
gameObject.SetActive(false);
|
||||
if (!F.IsAppInEditTime)
|
||||
gameObject.SetActive(false);
|
||||
gameObject.isStatic = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue