Skip to content

Instantly share code, notes, and snippets.

View gekidoslair's full-sized avatar

Mike Wuetherick gekidoslair

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 / 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 / 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
PHP script that uses Unity Publisher API for PHP (https://github.com/LostPolygon/Unity-Publisher-API-PHP) to retrieve new asset sales, put them into a MySQL database, and notify about the sales via e-mail.
Data is inserted into `sales` table, which can be created from sales_table.sql file. Just set up the credentials and put this script on cron with whatever interval you want. Delete the email notification part if you don't need it.
Requires PHP 5.4, php_json extension, and remote socket access.
Also, I know it's ugly, but it does the job and served me well for over a year.
@gekidoslair
gekidoslair / SetShadowQuality.cs
Last active March 10, 2021 06:05 — forked from Nobuyuki-Kobayashi/SetShadowQuality.cs
Configure Unity's built in Shadow Settings from script at runtime QualitySettings.shadowCascade4Split
//
// QualitySettings/Shadows内のShadow Distance/Shadow Cascades/Cascade splitsをシーンから設定する.
//
//
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UnityChan
{
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:
@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 / UsingJsonDotNetInUnity.cs
Created April 15, 2019 02:15 — forked from onionmk2/UsingJsonDotNetInUnity.cs
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()
{
@gekidoslair
gekidoslair / ConsoleCallStackHelper.cs
Created May 28, 2018 19:09 — forked from sabresaurus/ConsoleCallStackHelper.cs
Jump to file/line in the Unity console window callstack via this helper window
// MIT License
//
// Copyright (c) 2018 Sabresaurus
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: