mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-16 12:58:27 +00:00
use all MapObjects when exporting assets
This commit is contained in:
parent
566a2bd6a3
commit
b1c9d38e3a
2 changed files with 16 additions and 6 deletions
|
@ -158,6 +158,16 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
return $"{inst.ObjectId}_{inst.Position}_{inst.Rotation}";
|
||||
}
|
||||
|
||||
public void InitAll()
|
||||
{
|
||||
this.CreateStaticGeometry();
|
||||
this.InitStaticGeometry();
|
||||
this.LoadParkedVehicles();
|
||||
this.CreateEnexes();
|
||||
this.LoadWater();
|
||||
this.FinalizeLoad();
|
||||
}
|
||||
|
||||
public void CreateStaticGeometry ()
|
||||
{
|
||||
|
||||
|
|
|
@ -237,13 +237,13 @@ namespace SanAndreasUnity.Editor
|
|||
|
||||
EditorUtilityEx.MarkActiveSceneAsDirty();
|
||||
|
||||
EditorUtility.DisplayProgressBar("", "Creating static geometry...", 0f);
|
||||
cell.CreateStaticGeometry();
|
||||
EditorUtility.DisplayProgressBar("", "Initializing static geometry...", 0f);
|
||||
cell.InitStaticGeometry();
|
||||
EditorUtility.DisplayProgressBar("", "Initializing world...", 0f);
|
||||
cell.InitAll();
|
||||
|
||||
objectsToExport = cell.StaticGeometries
|
||||
.Select(_ => _.Value.transform)
|
||||
yield return null;
|
||||
|
||||
objectsToExport = cell.gameObject.GetFirstLevelChildrenSingleComponent<MapObject>()
|
||||
.Select(_ => _.transform)
|
||||
.AppendIf(cell.Water != null, cell.Water.GetTransformOrNull())
|
||||
.ToArray();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue