Skip to content

Instantly share code, notes, and snippets.

View Novack's full-sized avatar

Novack

View GitHub Profile
@Novack
Novack / EditorNote.cs
Created May 25, 2020 19:26 — forked from gekidoslair/EditorNote.cs
Add to any gameobject to provide scene-view annotations
using UnityEditor;
using UnityEngine;
namespace PixelWizards.Utilities
{
public class EditorNote : MonoBehaviour
{
[TextArea]
public string m_Text;
public Vector3 m_Offset;
@Novack
Novack / UnityLoader.js
Created April 23, 2020 18:22 — forked from kyptov/UnityLoader.js
without gzip and brotli decompressors
var UnityLoader = UnityLoader || {
Compression: {
identity: {
require: function() {
return {};
},
decompress: function(data) {
return data;
},
hasUnityMarker: function() {
@Novack
Novack / SmoothGameCameraMovement.cs
Created February 12, 2020 00:03 — forked from IRCSS/SmoothGameCameraMovement.cs
Unity Camera Movement in Game view like Scene View with filtering
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Moves Camera similar to how camera is moved in the Unity view port. Drop the scrip on the game object which has the camera and you wish to move.
public class SmoothGameCameraMovement : MonoBehaviour
{
public float lateralSpeed = 0.0015f;
@Novack
Novack / Deploy.ps1
Last active April 15, 2024 12:21
PowerShell script for updating and deploying the Playfab cloudscript from command line.
# Project and Dev Info. Fill it!
$devPlayfabId = ""
$titleId = ""
$secretKey = ""
# Concats all .js files on directory. This script is expected to be placed on the directory containing the javascript files. Otherwise, add the path(s).
$scriptContent = Get-Content *.js | out-string
# Script content as Playfab expects it.
$file = @{
@Novack
Novack / Code.gs
Created December 5, 2019 18:30 — forked from rheajt/Code.gs
google apps script to open a new website in a new window
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');
}
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
public class HideSceneToolbar
{
[MenuItem("Test/Hide the scene toolbar")]
static void Hide()
{
var sceneViews = Resources.FindObjectsOfTypeAll<SceneView>();
@Novack
Novack / PhysicsTool.cs
Created August 26, 2019 03:17 — forked from LotteMakesStuff/PhysicsTool.cs
In Unity 2019.1 Unity added a new custom EditorTool API, heres some example code showing some tools we could make with it!
// 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
@Novack
Novack / LookatTool.cs
Created August 26, 2019 03:17 — forked from LotteMakesStuff/LookatTool.cs
In Unity 2019.1 Unity added a new custom EditorTool API, heres some example code showing some tools we could make with it!
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,
@Novack
Novack / gist:211d8d08ed9913745798cdcec49d47a7
Created August 21, 2019 05:21 — forked from anonymous/gist:4169590
Get Google Spreadsheet as PDF with customizations
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");
@Novack
Novack / SelectionLog.cs
Last active August 21, 2019 03:12
Free tool for easily navigating between previously selected objects - https://www.powerhoof.com/unity-tool-selection-log/
//-----------------------------------------------------------------
// Selection Log - Keeps history of your selected objects in unity
//
// To use, stick this under a folder named "Editor"
// then select "Window->Selection Log" from toolbar
//
// Feel free to use/adapt however you want
//
// More info:
// http://tools.powerhoof.com