This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A collection of useful C# extension methods for the Unity engine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Unity C# reference source | |
// Copyright (c) Unity Technologies. For terms of use, see | |
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License | |
using System; | |
using System.Runtime.InteropServices; | |
using UnityEngine.Scripting; | |
namespace UnityEngine | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public static class MeshSaverEditor { | |
[MenuItem("Tools/MeshFilter/Save Mesh...")] | |
public static void SaveMeshInPlace (MenuCommand menuCommand) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class Dungeon : MonoSingleton<Dungeon> | |
{ | |
[System.Serializable] | |
public class Position | |
{ | |
public int x = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) | |
// Modifications by David Leon. Copyright (c) 2017 Lince Works SL. MIT license (see license.txt) | |
Shader "ToonDeferredShading2017" { | |
Properties { | |
_LightTexture0 ("", any) = "" {} | |
_LightTextureB0 ("", 2D) = "" {} | |
_ShadowMapTexture ("", any) = "" {} | |
_SrcBlend ("", Float) = 1 | |
_DstBlend ("", Float) = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get dnspy https://github.com/0xd4d/dnSpy/releases | |
I used https://github.com/dnSpy/dnSpy/releases/download/v6.1.8/dnSpy-net-win64.zip | |
* run it, and drop your Assembly-CSharp dll on it | |
* usually in "c:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll" | |
* expand the tree Assembly-Csharp (1.2.7705.251110) -> {} Rimworld -> LordJob_PrisonBreak | |
* right click the "CanOpenAnyDoor" method name in th code on the right hand side pane and choose -> Edit method |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class SimpleSoundManager:MonoBehaviour { | |
// Audio source | |
private AudioSource musicSrc; | |
private AudioSource effectSrc; | |
// Instance variable | |
private static SimpleSoundManager instance; | |
// Instance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class TransformWithStoredPositions { | |
public Vector3 intendedLocationForTransform { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class OnClickManageBuilding : MonoBehaviour { | |
public GameObject buildingPrefab; | |
public Material selectedMaterial; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class MeshCut | |
{ | |
private static Plane blade; | |
private static Transform victim_transform; | |
private static Mesh victim_mesh; |