Skip to content

Instantly share code, notes, and snippets.

View Ludomancer's full-sized avatar

Erdin Kacan Ludomancer

View GitHub Profile
@Ludomancer
Ludomancer / CreateDefaultFolders.cs
Last active August 29, 2015 14:19
Unity Create Default Folders
using UnityEngine;
using System.Collections.Generic;
using UnityEditor;
using System.IO;
internal class CreateDefaultFolders
{
[MenuItem("Custom/Create Default Folders")]
private static void CreateFolders()
{
@Ludomancer
Ludomancer / ColliderExtensions.cs
Last active April 20, 2024 06:42
Unity Extensions
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);
}