This file contains 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 UnityEditor; | |
namespace XboxCtrlrInput.Editor | |
{ | |
/// <summary> | |
/// Clones Unity's Input Manager into a new file at /Assets/Plugins/InputManagerClone.asset | |
/// </summary> | |
/// <remarks> | |
/// Do NOT modify!!! |
This file contains 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
//================================================================== | |
/// <#Insert description of new class here#> | |
class <#NewClassName#> | |
{ | |
public: | |
// | |
// Essentials | |
// |
This file contains 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
const char* ReadShaderFileToMemory(const char* filePath) | |
{ | |
const char * shaderFileBuffer = NULL; | |
std::ifstream inSdrFileStream(filePath); | |
if(inSdrFileStream) | |
{ | |
// Get length of shader file by seeking and telling (offset of 0) | |
inSdrFileStream.seekg(0, inSdrFileStream.end); | |
unsigned long fileLength = (unsigned long) inSdrFileStream.tellg() + 1; |
This file contains 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 damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement | |
// for using the mouse displacement for calculating the amount of camera movement and panning code. | |
using UnityEngine; | |
using System.Collections; | |
public class MoveCamera : MonoBehaviour | |
{ | |
// |
This file contains 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
// gradually_turn.gml | |
// -------- | |
// Gradually turns an object towards its target | |
// | |
// FORMAT: | |
// gradually_turn(objToTurn, target, turnSpeed, accuracy); | |
// | |
// <objToTurn> takes an object | |
// <target> takes an object |
This file contains 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 damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement | |
// for using the mouse displacement for calculating the amount of camera movement and panning code. | |
using UnityEngine; | |
using System.Collections; | |
public class MoveCamera : MonoBehaviour | |
{ | |
// | |
// VARIABLES |