diff --git a/CCL_GameScripts/Editor/TrainCarValidator.cs b/CCL_GameScripts/Editor/TrainCarValidator.cs index 3cf237d6..2113ad31 100644 --- a/CCL_GameScripts/Editor/TrainCarValidator.cs +++ b/CCL_GameScripts/Editor/TrainCarValidator.cs @@ -299,6 +299,17 @@ private IEnumerator CheckBogies() { yield return Result.Failed($"Missing {CarPartNames.BOGIE_CAR} child for custom front bogie"); } + foreach (MeshFilter filter in bogieCar.GetComponentsInChildren(true)) + { + if (filter.sharedMesh == null) + { + yield return Result.Warning($"{filter.name} is missing a mesh"); + } + else if (!filter.sharedMesh.isReadable) + { + yield return Result.Warning($"Mesh {filter.sharedMesh.name} on {filter.name} doesn't have Read/Write enabled"); + } + } } } @@ -321,6 +332,17 @@ private IEnumerator CheckBogies() { yield return Result.Failed($"Missing {CarPartNames.BOGIE_CAR} child for custom rear bogie"); } + foreach (MeshFilter filter in bogieCar.GetComponentsInChildren(true)) + { + if (filter.sharedMesh == null) + { + yield return Result.Warning($"{filter.name} is missing a mesh"); + } + else if (!filter.sharedMesh.isReadable) + { + yield return Result.Warning($"Mesh {filter.sharedMesh.name} on {filter.name} doesn't have Read/Write enabled"); + } + } } } }