Skip to content

Instantly share code, notes, and snippets.

View Novack's full-sized avatar

Novack

View GitHub Profile
@Novack
Novack / README.md
Created January 5, 2021 14:47 — forked from JohannesDeml/README.md
Remove Unity Mobile Notification Warning for WebGL builds

Remove warning

Unity has a warning when running a webgl build on mobile (iOS, Android). In order to remove it, just add this file to an editor folder.

Live example

To see live examples see Unity Web GL Loading Test

Logic

The script will run after the build has completed and replace the checks from all generated javascript files.

Support

@Novack
Novack / UnityProjectJunctionTool.cs
Created September 2, 2020 02:41 — forked from IronWarrior/UnityProjectJunctionTool.cs
Unity editor tool to create dummy Unity projects to allow a single project to be open in multiple editor instances.
// CONTRIBUTIONS:
// Mac and Linux support added by Creature Coding: https://creaturecoding.com/
//
// PURPOSE:
// Unity does not permit a project to be open in two different editor instances.
// This can be frustrating when building projects with multiplayer networking,
// as it would require you to create a build every time you wish you test your netcode.
// A workaround would be to duplicate the project, but this would require the duplicated
// project to be updated each time a change is made.
//
using UnityEditor;
using UnityEngine.LowLevel;
using UnityEngine.UIElements;
public class ShowPlayerLoopWindow : EditorWindow
{
[MenuItem("Window/Player Loop")]
static void ShowWindow()
{
var wind = GetWindow<ShowPlayerLoopWindow>(false, "Player Loop");
using UnityEngine;
using UnityEngine.LowLevel;
using UnityEngine.PlayerLoop;
public static class AddPlayerLoopCallback
{
// Add a callback to the PreUpdate phase
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void Setup()
{
@Novack
Novack / GizmosExtensions.cs
Created August 1, 2020 21:28 — forked from luisparravicini/GizmosExtensions.cs
Method to draw an arc with Unity's Gizmos
using UnityEngine;
public class GizmosExtensions
{
private GizmosExtensions() { }
/// <summary>
/// Draws a wire arc.
/// </summary>
/// <param name="position"></param>
@Novack
Novack / v9-voice-receive.js
Created July 29, 2020 18:31
Discord.js V9 Voice Recorder
const Discord = require("discord.js");
const fs = require('fs');
const client = new Discord.Client();
const config = require('./auth.json');
// make a new stream for each time someone starts to talk
function generateOutputFile(channel, member) {
// use IDs instead of username cause some people have stupid emojis in their name
using System;
using UnityEditor;
using UnityEngine;
public class CopyPasteValues
{
static string copyBuffer;
static Type copyType;
[MenuItem("CONTEXT/Component/Copy Values With Json")]
@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;