Skip to content

Instantly share code, notes, and snippets.

@stonstad
stonstad / AnimatorExtensions.cs
Last active November 6, 2022 17:52
Unity Animation State Start and Stop Notifications
using System;
using System.Reflection;
using UnityEngine;
public static class AnimatorExtensions
{
/// <summary>Gets an instance method with single argument of type <typeparamref
/// name="TArg0"/> and return type of <typeparamref name="TReturn"/> from <typeparamref
/// name="TThis"/> and compiles it into a fast open delegate.</summary>
/// <typeparam name="TThis">Type of the class owning the instance method.</typeparam>
{
"name": "proxypersisttest",
"description": "A little test app that uses JavaScript proxy to manage a persistent stats object.",
"author": "Dave Winer <[email protected]>",
"license": "MIT",
"version": "0.4.0",
"dependencies" : {
"daveutils": "*"
}
}
@punyaruchal
punyaruchal / Apache_Multiple_PHP_Versions_Setup:on_macOS_High_Sierra.md
Last active March 4, 2023 08:21
MacOS 10.13 High Sierra Apache Setup: Multiple PHP Versions

Warning: Due to Homebrew/php tap being deprecated at the end of March 2018, and the moving of all PHP formulas to Homebrew/core, the installation of PHP versions we currently use is going to change. Currently PHP 7.2 is available in the core, but we are waiting on previous versions to be made available and will update this guide as soon as we can. Thanks!

Part 1: macOS 10.13 High Sierra Web Development Environment

Note: This is an updated version of our prior OS X development series. The newly released macOS 10.13 High Sierra and the accompanying updates to Brew require significant changes compared to prior releases, necessitating a thorough revamp in the process. Since 10.12 we now use Homebrew's Apache, rather than the built-in version, but this new appraoch is more flexible and should continue to work on prior OS X versions.

Developing web applications on macOS is a real joy. There are plenty of options for setting up your develop

@douduck08
douduck08 / README.md
Last active August 18, 2024 14:03
The general GetValue extension of SerializedProperty in Unity Editor.

Unity's SerializedProperty not support custom type value setting. This extension use Reflection to get target instance of SerializedProperty in Custom Editor, made value setting of general type is posible.

using System;
using UnityEngine;
namespace UnityRest
{
public static class JsonHelper
{
public static T[] FromJson<T>(string jsonArray)
{
jsonArray = WrapArray (jsonArray);
@paraself
paraself / EditorPlayMode
Last active October 30, 2023 14:38
Unity Play Mode Detection
//originally adopted from
//http://answers.unity3d.com/questions/447701/event-for-unity-editor-pause-and-playstop-events.html
//with a few modifications which makes the event firing nicer and cleaner
//Usage Example :
//
//using UnityEditor;
//using UnityEngine;
//
//[InitializeOnLoad]
//public class SingleEntryPoint
@timofei7
timofei7 / TTMonoBehaviour.cs
Created March 15, 2015 20:08
monobehaviour extension that adds exception handling, aalue retrieval, and locking to Unity C# coroutines
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Extending MonoBehaviour to add some extra functionality
/// Exception handling from: http://twistedoakstudios.com/blog/Post83_coroutines-more-than-you-want-to-know
///
/// 2013 Tim Tregubov
@KalleMacD
KalleMacD / TwineiOS
Last active April 28, 2024 14:14
How to make a Twine game into an iOS web-app
//This quick guide will show you how add an optional web-app (iOS) view to your Twine game!
//First you'll need to open up your Twine (.tws) file.
1. Add a new passage to your story and name it "script"
2. Enter the tags section and add the word "script"
3. Now, in the main body, add the code:
document.addEventListener('touchmove', function(e) {
e.preventDefault();
}, false);
@WillzZz
WillzZz / AnimatedMaterial.cs
Created September 16, 2014 06:34
Unity3d Animated Material / Facial Animations
/*
* Copyright (c) 2014 William Corwin
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
furnished to do so, subject to the following conditions:
@jpsarda
jpsarda / FSpriteHolesShader.cs
Last active July 20, 2020 08:40
Holes with futile, see usage.cs
public class FSpriteHolesShader : FShader
{
private Texture _hole0Texture=null;
private Vector4 _hole0LocalToUVParams;
private Vector4 _hole0MatrixABCD;
private Vector4 _hole0MatrixTxTy;
private Vector4 _hole0UVRect;
private FSprite _hole0Sprite=null;
static private Vector4 _screenParams;