This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public static class ColliderExtensions { | |
public static bool IsVisibleFrom(this Collider collider, Camera camera) | |
{ | |
Plane[] planes = GeometryUtility.CalculateFrustumPlanes(camera); | |
return GeometryUtility.TestPlanesAABB(planes, collider.bounds); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections.Generic; | |
using UnityEditor; | |
using System.IO; | |
internal class CreateDefaultFolders | |
{ | |
[MenuItem("Custom/Create Default Folders")] | |
private static void CreateFolders() | |
{ |