Finds a single volume of the specified type at the given position. If no volume is found at the specified position, the method returns null
.
Finds a single volume of the specified type at the given position. If no volume is found at the specified position, the method returns null
.
Use this method when you need to locate a specific volume at a certain position within the scene. This is useful for scenarios where you need to interact with or query a volume based on its spatial location.
// Example usage of the FindSingle method Vector3 position = new Vector3(10, 20, 30); var volume = VolumeSystem.FindSingle<MyVolumeType>(position); if (volume != null) { // Interact with the volume volume.DoSomething(); } else { // Handle the case where no volume is found Console.WriteLine("No volume found at the specified position."); }