Skip to content

Instantly share code, notes, and snippets.

View gekidoslair's full-sized avatar
💭
Surfin the Chaos

Mike Wuetherick gekidoslair

💭
Surfin the Chaos
View GitHub Profile
@yasirkula
yasirkula / BatchExtractMaterials.cs
Last active May 9, 2024 21:44
Batch extract materials from 3D model assets in Unity
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.IO;
public class BatchExtractMaterials : EditorWindow
{
private enum ExtractMode { Extract = 0, Remap = 1, Ignore = 2 };
[System.Serializable]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
/// <summary>
/// A simple free camera to be added to a Unity game object.
///
/// Keys:
@ssshake
ssshake / isWrit
Last active September 29, 2023 06:15
Photon PUN Cheat Sheet
## Photon Methods
**public class Blank : Photon.PunBehaviour**
instead of mono behavior, use this to receive photon callbacks in your script.
**public override void OnLeftRoom()**
An example of overriding a punbehavior callback
@Demkeys
Demkeys / MuteTimelineTracksScript.cs
Created June 29, 2018 13:59
Example code showing how to mute Tracks in a Timeline asset.
/// <summary>
/// Instructions
/// - Create a Timeline asset. Add 3 tracks to it.
/// - Create empty GameObject in scene. Attach this script to the GameObject. Then attach a PlayableDirector component to it.
/// Drag and drop the Timeline asset you created into the Playable field of the PlayableDirector.
/// - Hit Play. The 1, 2 and 3 keys on your keyboard mute the first, second and third tracks respectively.
/// </summary>
using System.Collections;
using System.Collections.Generic;
@Nobuyuki-Kobayashi
Nobuyuki-Kobayashi / SetShadowQuality.cs
Last active February 22, 2024 02:53
Unity:QualitySettings/Shadows内のShadow Distance/Shadow Cascades/Cascade splitsなどをシーンから設定する.
//
// QualitySettings/Shadows内のShadow Distance/Shadow Cascades/Cascade splitsをシーンから設定する.
//
//
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UnityChan
{
@onionmk2
onionmk2 / UsingJsonDotNetInUnity.cs
Last active August 17, 2022 20:08
Json.Net ( Newtonsoft.Json ) in Unity
using System;
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;
using UnityEngine;
public class UsingJsonDotNetInUnity : MonoBehaviour
{
private void Awake()
{
@radiatoryang
radiatoryang / BuildRadiator.cs
Last active April 14, 2024 22:33
This is my Unity Editor build script that I use for my games, to automatically build out players and package them in ZIP files.
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.IO.Compression;
using Ionic.Zip; // this uses the Unity port of DotNetZip https://github.com/r2d2rigo/dotnetzip-for-unity
///
/// Simple pooling for Unity.
/// Author: Martin "quill18" Glaude (quill18@quill18.com)
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
/// UPDATES:
/// 2015-04-16: Changed Pool to use a Stack generic.
///
/// Usage:
///
@ZimM-LostPolygon
ZimM-LostPolygon / UnityGuidRegenerator.cs
Last active February 8, 2024 10:10
Unity asset GUIDs regenerator
// Drop into Assets/Editor, use "Tools/Regenerate asset GUIDs"
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
namespace UnityGuidRegenerator {
public class UnityGuidRegeneratorMenu {
@chilversc
chilversc / gist:5575617
Created May 14, 2013 12:47
Connection to MySql from .net over an SSH tunnel, using http://nuget.org/packages/SSH.NET/
void Test()
{
var ci = new ConnectionInfo ("remoteserver", "remoteuser", new PasswordAuthenticationMethod ("remoteuser", "password"));
var cs = new MySqlConnectionStringBuilder ();
cs.AllowBatch = true;
cs.Server = "127.0.0.1";
cs.Database = "database";
cs.UserID = "dbuser";
cs.Password = "dbpassword";