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
function openTab() { | |
var selection = SpreadsheetApp.getActiveSheet().getActiveCell().getValue(); | |
var html = "<script>window.open('" + selection + "');google.script.host.close();</script>"; | |
var userInterface = HtmlService.createHtmlOutput(html); | |
SpreadsheetApp.getUi().showModalDialog(userInterface, 'Open Tab'); | |
} |
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 UnityEditor; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
public class HideSceneToolbar | |
{ | |
[MenuItem("Test/Hide the scene toolbar")] | |
static void Hide() | |
{ | |
var sceneViews = Resources.FindObjectsOfTypeAll<SceneView>(); |
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
// Put me in an editor folder! | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
using UnityEditor; | |
using UnityEditor.EditorTools; | |
using UnityEngine; | |
[EditorTool("PhysicsDrop Tool", typeof(Rigidbody))] | |
public class PhysicsTool : EditorTool |
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 UnityEditor; | |
using UnityEditor.EditorTools; | |
using UnityEngine; | |
[EditorTool("LookAt Tool")] | |
public class LookatTool : EditorTool | |
{ | |
GUIContent cachedIcon; | |
// NOTE: as were caching this, unity will serialize it between compiles! so if we want to test out new looks, |
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
function spreadsheetToPDF(key) { | |
var oauthConfig = UrlFetchApp.addOAuthService("spreadsheets"); | |
var scope = "https://spreadsheets.google.com/feeds" | |
oauthConfig.setConsumerKey("anonymous"); | |
oauthConfig.setConsumerSecret("anonymous"); | |
oauthConfig.setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken?scope="+scope); | |
oauthConfig.setAuthorizationUrl("https://accounts.google.com/OAuthAuthorizeToken"); | |
oauthConfig.setAccessTokenUrl("https://www.google.com/accounts/OAuthGetAccessToken"); |
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 UnityEditor; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Reflection; | |
public static class InspectorShortcuts | |
{ | |
public static BindingFlags FullBinding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static; |
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 System; | |
using System.ComponentModel; | |
using UnityEngine; | |
public class EnumDescription : MonoBehaviour | |
{ | |
public enum PlayerState | |
{ | |
Unknown, | |
[Description("Alive and kicking")] |
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
// C# example | |
using UnityEditor; | |
using System.IO; | |
using System.Collections; | |
using UnityEngine; | |
using System.Collections.Generic; | |
class PerformBuild | |
{ | |
static string[] GetBuildScenes() |
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 UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// Hierarchy window game object icon. | |
/// http://diegogiacomelli.com.br/unitytips-hierarchy-window-gameobject-icon/ | |
/// </summary> | |
[InitializeOnLoad] | |
public static class HierarchyWindowGameObjectIcon | |
{ |
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 System; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Text.RegularExpressions; | |
using UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// Gist importer. |