Vulkan is a low-overhead, cross-platform 3D graphics and compute API.
Vulkan targets high-performance realtime 3D graphics applications such as games and interactive media across multiple platforms providing higher performance and lower CPU usage.
// NOTE: For an actively-maintained version of this script, see https://github.com/mminer/consolation. | |
using System.Collections.Generic; | |
using UnityEngine; | |
/// <summary> | |
/// A console to display Unity's debug logs in-game. | |
/// </summary> | |
public class Console : MonoBehaviour | |
{ |
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.IO; | |
using System.IO.Compression; | |
using Ionic.Zip; // this uses the Unity port of DotNetZip https://github.com/r2d2rigo/dotnetzip-for-unity |
using UnityEngine; | |
using System.Collections; | |
// based on http://unitytipsandtricks.blogspot.com/2013/05/camera-shake.html | |
public class PerlinShake : MonoBehaviour | |
{ | |
public float duration = 2f; | |
public float speed = 20f; | |
public float magnitude = 2f; | |
public AnimationCurve damper = new AnimationCurve(new Keyframe(0f, 1f), new Keyframe(0.9f, .33f, -2f, -2f), new Keyframe(1f, 0f, -5.65f, -5.65f)); |
public class MyBehavior : MonoBehaviour { | |
// This will store the string value | |
[StringInList("Cat", "Dog")] public string Animal; | |
// This will store the index of the array value | |
[StringInList("John", "Jack", "Jim")] public int PersonID; | |
// Showing a list of loaded scenes | |
[StringInList(typeof(PropertyDrawersHelper), "AllSceneNames")] public string SceneName; | |
} |
// 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 |
using UnityEngine; | |
using UnityEditor; | |
using System.Collections.Generic; | |
using System.IO; | |
//https://answers.unity.com/questions/510945/find-materials-that-use-a-certain-shader.html | |
public class ShaderOccurenceWindow : EditorWindow { | |
[MenuItem ("Tools/Shader Occurence")] | |
public static void Open () { |
#ifdef PSXDTH | |
#else | |
#define PSXDTH | |
//PS1 Hardware Dithering & Color Precision Truncation Function | |
//by ompu co | Sam Blye (c) 2020 | |
//PS1 dither table from PSYDEV SDK documentation |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
public class MaterialGradientDrawer : MaterialPropertyDrawer { | |
private int resolution; |
// Allows you to change the up vector in the scene view to the Z axis. | |
// Y-up mode uses Unity's default implementation. | |
// | |
// Original code from Akulist on the Unity forums, modified by Freya Holmér: | |
// • Fixed orbit+RMB zoom not working | |
// • Toggling will now align the camera immediately to the new up vector | |
// • When the camera is upside down in Z axis mode, left/right orbit will no longer be mirrored (pls fix this too Unity~) | |
// • Moved toggle buttons to under the gizmo | |
// • Fixed broken rotation state when focusing a different window in Unity and coming back to the scene view | |
// |