Advertisement
Guest User

unity3d Disable Grid

a guest
Mar 25th, 2015
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1.  using UnityEditor;
  2.  using System;
  3.  using System.Reflection;
  4.  
  5.  public class DisableGrid
  6.  {
  7.      [MenuItem("Window/Disable Grid")]
  8.      static void DisableGridMenu()
  9.      {
  10.          Type AnnotationUtility = Type.GetType("UnityEditor.AnnotationUtility, UnityEditor");
  11.          var showGrid = AnnotationUtility.GetProperty("showGrid",
  12.              BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static);
  13.          showGrid.SetValue(null, false, null);
  14.      }
  15.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement