This is a very simple HTTP server for Unix, using fork(). It's very easy to use
- include header
httpd.h
- write your route method, handling requests.
- call
serve_forever("12913")
to start serving on port 12913
using System; | |
using System.IO; | |
using System.Runtime.Serialization; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using UnityEngine; | |
namespace Utility { | |
public static class BinaryDataStream { | |
private static readonly string Path = Application.persistentDataPath + "/saves/"; | |
private const string Ext = ".dat"; |
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | |
Shader "Custom/GrabPassBlur" | |
{ | |
Properties | |
{ | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_BumpAmt ("Distortion", Range (0,128)) = 10 | |
_MainTex ("Tint Color (RGB)", 2D) = "white" {} | |
_BumpMap ("Normalmap", 2D) = "bump" {} |
// RGB_TO_HEX.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
#include <string> | |
#define CHECK_FOR_RANGE(channel) \ | |
if (channel > 255) { \ | |
std::cerr << "Invalid " << #channel << " channel" << std::endl; \ | |
exit(0); \ |
public enum DeviceType { | |
Tablet, | |
Phone | |
} |
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
public class CheckPixelColor : MonoBehaviour { | |
private void Update() { | |
if (Input.GetMouseButtonDown(0)) { | |
if (EventSystem.current.IsPointerOverGameObject(-1) || EventSystem.current.IsPointerOverGameObject(0) || | |
EventSystem.current.IsPointerOverGameObject(1)) { | |
return; |
using System; | |
using UnityEngine; | |
public static class DailyRewards { | |
private const int RewardValue = 100; | |
public static int Coins; | |
private static DateTime LastRewardTime { | |
get { | |
long time = long.Parse(PlayerPrefs.GetString(nameof(LastRewardTime), "0")); |
using UnityEngine; | |
public class GameManager : MonoBehaviour { } |
using UnityEngine; | |
/** | |
* As my understanding is for each MonoBehaviour in your assembly, | |
* Unity looks for an associated icon with the name "<className> Icon" | |
* under the "Gizmos" folder, but the hierarchy must match the namespace. | |
* So you can add your icon in Assets/Gizmos/Enemy Icon.png | |
*/ | |
public class Enemy : MonoBehaviour { } |
@font-face { | |
font-family: "Crimson"; | |
src: url("font/crimson-roman.woff") format("woff"); | |
} | |
@font-face { | |
font-family: "Crimson"; | |
src: url("font/crimson-italic.woff") format("woff"); | |
font-style: italic; | |
} |