(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// The contents of this file is free and unencumbered software released into the | |
// public domain. For more information, please refer to <http://unlicense.org/> | |
using System; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
using UnityEngine; | |
using UnityEngine.Assertions; | |
public class SpatialHash<T> |
//SPDX-License-Identifier: Unlicense OR CC0-1.0+ | |
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
// ReSharper disable MemberCanBePrivate.Global | |
namespace Loggers | |
{ | |
/// <summary> |
/* | |
MIT License | |
Copyright (c) 2021 Noé Charron | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
public class MaterialGradientDrawer : MaterialPropertyDrawer { | |
private int resolution; |
// NOTE DONT put in an editor folder! | |
using UnityEngine; | |
public class AutohookAttribute : PropertyAttribute | |
{ | |
} |
Shader "Custom/StencilMask" { | |
Properties { | |
_StencilMask("Stencil mask", Int) = 0 | |
} | |
SubShader { | |
Tags { | |
"RenderType" = "Opaque" | |
"Queue" = "Geometry-100" | |
} |
// This file is in the public domain. Where | |
// a public domain declaration is not recognized, you are granted | |
// a license to freely use, modify, and redistribute this file in | |
// any way you choose. | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// Unity remake of a fake volumetric light glow effect |
//int vesioncode = context().getPackageManager().getPackageInfo(context().getPackageName(), 0).versionCode; | |
public static int GetVersionCode() { | |
AndroidJavaClass contextCls = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | |
AndroidJavaObject context = contextCls.GetStatic<AndroidJavaObject>("currentActivity"); | |
AndroidJavaObject packageMngr = context.Call<AndroidJavaObject>("getPackageManager"); | |
string packageName = context.Call<string>("getPackageName"); | |
AndroidJavaObject packageInfo = packageMngr.Call<AndroidJavaObject>("getPackageInfo", packageName, 0); | |
return packageInfo.Get<int>("versionCode"); | |
} | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import struct | |
import SocketServer | |
from base64 import b64encode | |
from hashlib import sha1 | |
from mimetools import Message | |
from StringIO import StringIO | |
# import threading | |
class WebSocketsHandler(SocketServer.StreamRequestHandler): |