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
// 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 |
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; | |
using System; | |
using System.Collections; | |
[CustomPreview(typeof(YourCustomScriptableObject))] // THIS IS VERY IMPORTANT, this is so the editor knows what this is supposed to be previewing at all | |
public class SkinnedMeshObjectPreviewExample : ObjectPreview { | |
PreviewRenderUtility m_PreviewUtility; |
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
/// <summary> | |
/// UNet LLAPI Hello World | |
/// This will establish a connection to a server socket from a client socket, then send serialized data and deserialize it. | |
/// </summary> | |
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.Networking; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using System.IO; |
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
/* OpenSimplex Noise in C# | |
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19 | |
* and heavily refactored to improve performance. */ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
namespace NoiseTest |
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
/* | |
* OpenSimplex (Simplectic) Noise Test for Unity (C#) | |
* This file is in the Public Domain. | |
* | |
* This file is intended to test the functionality of OpenSimplexNoise.cs | |
* Attach this script to a GameObject with mesh (eg a Quad prefab). | |
* Texture is updated every frame to assist profiling for performance. | |
* Using a RenderTexture should perform better, however using a Texture2D | |
* as an example makes this compatible with the free version of Unity. | |
* |
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
''' this Command fires a ray down the +Z axis of a locator at a mesh | |
and selects any poly that the ray intersects | |
does not yet handle animated positions | |
Command format: | |
shootRay LocatorName MeshName ''' | |
NAME_CMD_SHOOTRAY = "shootRay" | |
NAME_ARG_LOCATOR = "StrLocatorName" | |
NAME_ARG_MESH = "StrMeshName" |
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 System.Collections; | |
public class NetworkInterpolatedTransform : MonoBehaviour | |
{ | |
public double interpolationBackTime = 0.1; | |
internal struct State | |
{ | |
internal double timestamp; |