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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
[ExecuteAlways] | |
public class ImagePreferredSizeScaler : MonoBehaviour, ILayoutElement | |
{ | |
Image image; | |
public float scale = 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
#include <Windows.h> | |
#include <iostream> | |
#include "stdio.h" | |
#include <vector> | |
#include <set> | |
using namespace std; | |
// This is the time in ms when the program waits before taking a new screen shot | |
const int turnTime = 50; |
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
#include <Windows.h> | |
#include <iostream> | |
#include "stdio.h" | |
#include <vector> | |
using namespace std; | |
int main() | |
{ | |
// Windows only! | |
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
#include <Windows.h> | |
#include <iostream> | |
#include <vector> | |
#include "stdio.h" | |
using namespace std; | |
int main() | |
{ | |
// for the memory game, colors | |
COLORREF background_color = 13731627; |
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
#if UNITY_EDITOR | |
/// <summary> | |
/// Float field with NAN button so you can use optional floats in your Unity components | |
/// </summary> | |
public sealed class NaNField : PropertyAttribute {} | |
[CustomPropertyDrawer(typeof(NaNField))] | |
public sealed class NaNFloatField : PropertyDrawer | |
{ | |
const int buttonWidth = 40; |
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
/* A RawInput implementation with HWND_MESSAGE window and Device State detection. Uses separate thread and accumulates deltas */ | |
/* You need to compile this single cpp to "LibRawInput.dll" using C++ compiler of choice and Windows SDK. */ | |
/* Then add the DLL to your Unity project as a native plugin. */ | |
#include <atomic> | |
#include <Windows.h> | |
#include "stdafx.h" | |
#include <iostream> | |
#include <vector> | |
#include <mutex> |
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
// 1. GO TO SteamWorks, into the Query CD Key page, here: https://partner.steamgames.com/querycdkey/ | |
// 2. Fill in your keys below: | |
// 3. Go to DevTools, Console, and paste all of this here there! | |
// 4. Report will be printed to the console. | |
keys = ` | |
0ZQR4-N0H7K-AEJ77 | |
D05V5-P47AP-4ET3Q | |
GGJZ5-ZN0BR-F74C5 | |
FWZP4-2IXHB-GYV3A |