1
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user