ClientServer/Client/Assets/Scripts/World/WorldBoundryBlockers.cs

23 lines
626 B
C#
Raw Normal View History

2025-09-06 17:17:39 +04:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//thomas09
//script to disable mesh renderer on world blockers on start. easier to keep them enabled while editing.
public class WorldBoundryBlockers : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
MeshRenderer renderer = GetComponent<MeshRenderer>();
if(renderer == null)
{
Debug.LogError($"There is no mesh renderer on {gameObject.name}. Are you sure you put this on the right object?");
return;
}
renderer.enabled = false;
}
}