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
[ExecuteInEditMode] | |
public class YourComponent : MonoBehaviour | |
{ | |
[ContextMenu("remove missing script")] | |
public void RemoveMissingScript() | |
{ | |
var transforms = GetComponentsInChildren<Transform>(true); | |
foreach (var childTransform in transforms) | |
{ | |
var components = childTransform.GetComponents<Component>(); |
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
//sample code of custom shader that using unity's blit texture(from Blit.hlsl) so this shader is same as a posteffect shadergraph code. | |
//and can be use in the urp's built in Full Screen Pass Renderer Feature(unity 2022+) | |
Shader "ColorBlit" | |
{ | |
Properties | |
{ | |
_Intensity("_Intensity", Range(0,1)) = 0 | |
} | |
SubShader |
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.Collections.Generic; | |
using UnityEngine.Rendering.Universal; | |
using UnityEngine.Rendering; | |
using UnityEngine.Scripting.APIUpdating; | |
namespace UnityEngine.Experimental.Rendering.Universal | |
{ | |
[MovedFrom("UnityEngine.Experimental.Rendering.LWRP")] public class RenderObjectsPass : ScriptableRenderPass | |
{ | |
RenderQueueType renderQueueType; |
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.Collections; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
using Unity.Jobs; | |
using Unity.Collections; | |
using Unity.Profiling; | |
struct NumberIncrementJob : IJob | |
{ | |
public NativeArray<float> Numbers; |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using Unity.Mathematics; | |
using Unity.Burst; | |
using UnityEngine.Profiling; | |
using Unity.Collections; | |
using UnityEngine.UI; | |
using System.Threading.Tasks; |
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
#ifndef INSTANCED_INDIRECT_INCLUDED | |
#define INSTANCED_INDIRECT_INCLUDED | |
struct MeshTransformData | |
{ | |
float3 Position; | |
float4 Rotation; | |
float3 Scale; | |
float4 Color; | |
}; |
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 "URP/CustomLighting" | |
{ | |
Properties | |
{ | |
_BaseColor ("Base Color", Color) = (1, 1, 1, 1) | |
} | |
SubShader | |
{ | |
Tags { "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" "UniversalMaterialType" = "SimpleLit" "IgnoreProjector" = "True" "ShaderModel" = "4.5" } |
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 "URP/CustomLighting" | |
{ | |
Properties | |
{ | |
_BaseColor ("Base Color", Color) = (1, 1, 1, 1) | |
} | |
SubShader | |
{ | |
Tags { "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" "UniversalMaterialType" = "SimpleLit" "IgnoreProjector" = "True" "ShaderModel" = "4.5" } |
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
namespace UnityEngine.Rendering.Universal | |
{ | |
public enum BufferType | |
{ | |
CameraColor, | |
Custom | |
} | |
public class DrawFullScreenFeature : ScriptableRendererFeature | |
{ |