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
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://7bvxnk5n5imx"] | |
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h42l"] | |
content_margin_left = 10.5 | |
content_margin_top = 8.75 | |
content_margin_right = 10.5 | |
content_margin_bottom = 8.75 | |
bg_color = Color(0.117647, 0.117647, 0.117647, 1) | |
draw_center = false | |
border_color = Color(1, 1, 1, 0.137255) |
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
Shader "Unlit/OutlineShader" { | |
Properties { | |
[HDR] _OutlineColor ("Outline Color", Color) = (1,1,1,1) | |
_OutlineRadius ("Outline Radius", Float) = 0.1 | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
LOD 100 | |
Pass { |
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 UnityEngine.LowLevel; | |
using UnityEngine.PlayerLoop; | |
public static class AddPlayerLoopCallback | |
{ | |
// Add a callback to the PreUpdate phase | |
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] | |
static void Setup() | |
{ |
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.LowLevel; | |
using UnityEngine.UIElements; | |
public class ShowPlayerLoopWindow : EditorWindow | |
{ | |
[MenuItem("Window/Player Loop")] | |
static void ShowWindow() | |
{ | |
var wind = GetWindow<ShowPlayerLoopWindow>(false, "Player Loop"); |
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
// example of how to move a current value towards a target value at a constant speed | |
// without going over the target value | |
// formula is the same for vectors of any dimension | |
Vector3 Seek(Vector3 currentValue, Vector3 targetValue, float maxSpeed, float dt) | |
{ | |
// delta/difference from current value to target value | |
Vector3 delta = targetValue - currentValue; | |
// don't take the square root of magnitude yet | |
// so we can potentially early out on degenerate case of currenvValue ~= targetValue |
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> | |
/// The script gives you choice to whether to build addressable bundles when clicking the build button. | |
/// For custom build script, call PreExport method yourself. | |
/// For cloud build, put BuildAddressablesProcessor.PreExport as PreExport command. | |
/// Discussion: https://forum.unity.com/threads/how-to-trigger-build-player-content-when-build-unity-project.689602/ | |
/// | |
/// License: The MIT License https://opensource.org/licenses/MIT | |
/// </summary> | |
using UnityEditor; | |
using UnityEditor.AddressableAssets; |
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
Shader "AR Proxy" | |
{ | |
Properties | |
{ | |
} | |
SubShader | |
{ | |
Tags | |
{ |
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
Shader "Name" { | |
Properties { | |
_Name ("display name", Range (min, max)) = number | |
_Name ("display name", Float) = number | |
_Name ("display name", Int) = number | |
_Name ("display name", Color) = (number,number,number,number) | |
_Name ("display name", Vector) = (number,number,number,number) |
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 Newtonsoft.Json; | |
using System; | |
public class Vec4Conv : JsonConverter | |
{ | |
public override bool CanConvert(Type objectType) | |
{ | |
if (objectType == typeof(Vector4)) |
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
// https://github.com/keijiro/NoiseShader | |
#include "HLSL/SimplexNoise3D.hlsl" | |
#pragma kernel CSParticle | |
// Particle's data | |
struct Particle | |
{ | |
float3 position; | |
float3 velocity; |
NewerOlder