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
@gekidoslair
gekidoslair / BatchExtractMaterials.cs
Created April 24, 2024 20:41 — forked from yasirkula/BatchExtractMaterials.cs
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]
@gekidoslair
gekidoslair / BatchExtractMaterials.cs
Created April 24, 2024 20:41 — forked from yasirkula/BatchExtractMaterials.cs
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]
@gekidoslair
gekidoslair / ClickToMoveController.cs
Created April 1, 2024 17:59
A simple Click to Move player controller using a Unity Navmesh Agent.
using UnityEngine;
using UnityEngine.AI;
namespace MegaCrush.NavmeshBaker.Sample
{
/// <summary>
/// A very simple click to move player controller
/// </summary>
[RequireComponent(typeof(NavMeshAgent))]
public class ClickToMoveController : MonoBehaviour
@gekidoslair
gekidoslair / DoSomethingOnDungeonComplete.cs
Last active March 3, 2024 14:41 — forked from AG-Dan/DoSomethingOnDungeonComplete.cs
Listener script for DunGen: This script would be attached to the same object as our RuntimeDungeon component.
using UnityEngine;
using DunGen;
[RequireComponent(typeof(RuntimeDungeon))]
public class DoSomethingOnDungeonComplete : MonoBehaviour
{
private RuntimeDungeon runtimeDungeon;
private void Awake()
@gekidoslair
gekidoslair / DamageHandler.cs
Last active January 28, 2024 22:52
Blaze AI and Opsive UCC integration
using System;
using Opsive.UltimateCharacterController.Traits;
using UnityEngine;
namespace PixelWizards.GameSystem
{
/// <summary>
/// Quick tutorial for anyone that's using Opsive UCC and want to integrate it with Blaze, it's super simple:
/// 1) setup your AI with Blaze
/// 2) Add a Rigidbody
@gekidoslair
gekidoslair / BuildSystem.cs
Last active October 17, 2023 20:36
Unity Build Script
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.Build.Reporting;
using UnityEngine;
public class BuildSystem
{
public enum BuildType
{
@gekidoslair
gekidoslair / BuildRadiator.cs
Created September 29, 2023 03:35 — forked from radiatoryang/BuildRadiator.cs
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
@gekidoslair
gekidoslair / photon-pun-cheatsheet.md
Created July 3, 2020 17:51 — forked from ssshake/isWrit
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

@gekidoslair
gekidoslair / GenericTrigger.cs
Created April 30, 2018 16:59
Activate a Unity Timeline from a trigger
using UnityEngine;
using UnityEngine.Playables;
public class GenericTrigger : MonoBehaviour
{
public PlayableDirector timeline;
// Use this for initialization
void Start()
{
@gekidoslair
gekidoslair / CharController.cs
Last active July 12, 2023 03:50
Camera-relative character movement controller. Does not handle animation, but has some comments where you'd want to add the hooks
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace PixelWizards.GameSystem.Controllers
{
// the data model for the character controller. I like to keep vars like this in a separate class to organize them
// and keep the main controller script as clean as possible.
// because it is set to be serializable, these vars are exposed in the editor (except where noted) when you attach
// the CharController component to your character