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.Diagnostics.CodeAnalysis; | |
| using UnityEngine; | |
| // Dont forget to add "using RDG;" to the top of your script! | |
| namespace RDG | |
| { | |
| /// <summary> | |
| /// Class for controlling Vibration. Automatically initializes before scene is loaded. | |
| /// </summary> | |
| public static class Vibration |
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
| /* | |
| * Internationalization | |
| * | |
| * Author: Daniel Erdmann | |
| * | |
| * 1. Add this File to you Project | |
| * | |
| * 2. Add the language files to the folder Assets/Resources/I18n. (Filesnames: en.txt, es.txt, pt.txt, de.txt, and so on) | |
| * Format: en.txt: es.txt: | |
| * =============== ================= |
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
| # Credit to Ryan Porter (yantor3d) | |
| from maya import cmds | |
| for jnt in cmds.ls(sl=True, type="joint"): | |
| matrixPlugs = cmds.listConnections(jnt + ".worldMatrix", type="skinCluster", p=True) or [] | |
| for mp in matrixPlugs: | |
| bindPreMatrixPlug = mp.replace('matrix', 'bindPreMatrix') | |
| if cmds.listConnections(bindPreMatrixPlug, s=True, d=False): |
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
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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; | |
| /// <summary> | |
| /// Mono singleton Class. Extend this class to make singleton component. | |
| /// Example: | |
| /// <code> | |
| /// public class Foo : MonoSingleton<Foo> | |
| /// </code>. To get the instance of Foo class, use <code>Foo.instance</code> |
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
| #include <Python.h> // Must be first | |
| #include <vector> | |
| #include <stdexcept> | |
| #include "PyUtils.h" | |
| using namespace std; | |
| // ===== | |
| // LISTS | |
| // ===== |