This commit is contained in:
CortexCore
2024-04-16 04:06:46 +08:00
parent 37e7fcea51
commit c798b224be
67 changed files with 1305 additions and 425 deletions

View File

@@ -3,7 +3,9 @@ using System.Collections;
using System.Collections.Generic;
using MeshCombineStudio;
using NGS.AdvancedCullingSystem.Dynamic;
using UnityEditor.Build;
using UnityEngine;
using UnityEngine.Events;
#if UNITY_EDITOR
using UnityEditor;
#endif
@@ -12,15 +14,21 @@ namespace BITKit.OpenWorld
public class OpenWorldCombiner : MonoBehaviour
{
[SerializeField] private MeshCombiner meshCombiner;
[SerializeField] private UnityEvent onCombiningReady;
[SerializeField]
private bool allowCullingSource = true;
private void Start()
{
meshCombiner.onCombiningReady +=x=> onCombiningReady.Invoke();
meshCombiner.onCombiningReady += AddCullingSource;
}
private void AddCullingSource(MeshCombiner meshcombiner)
{
if (enabled)
if (allowCullingSource)
AddCullingSource();
}