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
// ScriptExecutionAssignment | |
// NoiseCrime | |
// 11.10.2016 | |
// 05.06.2016 | |
// | |
// | |
// Editor class that will automatically set the scriptExecutionOrder based on using a ScriptExecutionAttribute. | |
// See ScriptExecutionAttribute.cs Gist! | |
// The class is called automatically everytime Unity recompiles the project - see [InitializeOnLoad] | |
// |
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
// ScriptExecutionAttribute | |
// NoiseCrime | |
// 10.11.2016 | |
// 05.06.2016 | |
// | |
// Support Attribute class that works with the editor script 'ScriptExecutionAssignment' to automatically populate the ScriptExecutionOrder. | |
// Simply add [ScriptExecutionAttribute( value )] prior to your class declaration, where value indicates the script order you want ( -9999 to +9999 ) | |
// This script must NOT be placed in an Editor Folder. | |
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
cbuffer CB | |
{ | |
matrix View; | |
matrix Projection; | |
matrix ViewProjection; | |
float4 FrustumPlanes[6]; // view-frustum planes in world space (normals face out) | |
float2 ViewportSize; // Viewport Width and Height in pixels | |
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
float4 vTexels; | |
vTexels.x = LastMip.Load( nCoords ); | |
vTexels.y = LastMip.Load( nCoords, uint2(1,0) ); | |
vTexels.z = LastMip.Load( nCoords, uint2(0,1) ); | |
vTexels.w = LastMip.Load( nCoords, uint2(1,1) ); | |
float fMaxDepth = max( max( vTexels.x, vTexels.y ), max( vTexels.z, vTexels.w ) ); |
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; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
#if UNITY_5_5_OR_NEWER | |
using Profiler = UnityEngine.Profiling.Profiler; | |
#endif | |
public class StopWatchProfiler : MonoBehaviour |
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 Unity.Jobs; | |
using Unity.Collections; | |
using Unity.Mathematics; | |
public class WebcamProcessingTesting : MonoBehaviour | |
{ | |
[SerializeField] | |
[Tooltip("Which webcam to use")] | |
int m_WebcamIndex; |
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; | |
public class UpdateInspectorBehaviour : MonoBehaviour | |
{ | |
public class CustomValueClass | |
{ | |
public int _MyUpdatingValue; | |
} | |
public CustomValueClass _CustomValueClass; |
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
// Resource Checker | |
// (c) 2012 Simon Oliver / HandCircus / [email protected] | |
// (c) 2015 Brice Clocher / Mangatome / [email protected] | |
// Public domain, do with whatever you like, commercial or not | |
// This comes with no warranty, use at your own risk! | |
// https://github.com/handcircus/Unity-Resource-Checker | |
// (c) 2019 NoiseCrime | |
// Quick update to use native Unity methods to obtain the size of textures. | |
// Looking through the code much has changed since this class was first created | |
// as such it requires a full rewrite to fix various issues and robustly deal |
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; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Text; | |
using UnityEditor; | |
using UnityEditor.Compilation; | |
using UnityEngine; | |
/// <summary> | |
/// NoiseCrimeStudio OneShots are single scripts that provide specific funactionality. |
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 UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// NoiseCrimeStudio OneShots are single scripts that provide specific funactionality. | |
/// </summary> | |
namespace NoiseCrimeStudios.OneShot.Editor | |
{ | |
/// <summary> | |
/// Exposes the native Unity 'ScreenShotting' methods to Unity Menu & Shortcut keys. |