Skip to content

Instantly share code, notes, and snippets.

@mathiassoeholm
Created October 31, 2013 13:16
Show Gist options
  • Save mathiassoeholm/7249504 to your computer and use it in GitHub Desktop.
Save mathiassoeholm/7249504 to your computer and use it in GitHub Desktop.
Resize collider
using UnityEditor;
using UnityEngine;
public static class NGUIResizeCollider
{
[MenuItem("Kiloo/NGUI Tools/Resize Collider")]
private static void ResizeCollider()
{
if (Selection.activeGameObject != null && (Selection.activeGameObject.collider as BoxCollider) != null)
{
NGUITools.UpdateWidgetCollider(Selection.activeGameObject.collider as BoxCollider, true, true);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment