Unity's SerializedProperty not support custom type value setting. This extension use Reflection to get target instance of SerializedProperty in Custom Editor, made value setting of general type is posible.
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
#pragma kernel CSMain | |
#define THREAD_GROUP_SIZE_X 8 | |
#define THREAD_GROUP_SIZE_Y 8 | |
#define THREAD_GROUP_SIZE_Z 1 | |
// Buffers | |
RWTexture2D<float4> Result; | |
// Functions |
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
HRESULT CreateInputLayoutDescFromVertexShaderSignature( ID3DBlob* pShaderBlob, ID3D11Device* pD3DDevice, ID3D11InputLayout** pInputLayout ) | |
{ | |
// Reflect shader info | |
ID3D11ShaderReflection* pVertexShaderReflection = NULL; | |
if ( FAILED( D3DReflect( pShaderBlob->GetBufferPointer(), pShaderBlob->GetBufferSize(), IID_ID3D11ShaderReflection, (void**) &pVertexShaderReflection ) ) ) | |
{ | |
return S_FALSE; | |
} | |
// Get shader info |
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
//Function Creates an input layout from the vertex shader, after compilation. | |
//Input layout can be reused with any vertex shaders that use the same input layout. | |
HRESULT CreateInputLayoutDescFromVertexShaderSignature( ID3DBlob* pShaderBlob, ID3D11Device* pD3DDevice, ID3D11InputLayout** pInputLayout, int* inputLayoutByteLength ) | |
{ | |
// Reflect shader info | |
ID3D11ShaderReflection* pVertexShaderReflection = nullptr; | |
HRESULT hr = S_OK; | |
if ( FAILED( D3DReflect( pShaderBlob->GetBufferPointer(), pShaderBlob->GetBufferSize(), IID_ID3D11ShaderReflection, (void**) &pVertexShaderReflection ) ) ) | |
{ |
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 System.Linq; | |
using UnityEngine; | |
using UnityEngine.Playables; | |
using UnityEngine.Timeline; | |
public static class DirectorExtension { | |
/// <summary> | |
/// When 'trackName' is null or empty, this method will set all the tracks without name check. |
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 TEMPLETE_INCLUDED | |
#define TEMPLETE_INCLUDED | |
#include "UnityCG.cginc" | |
#include "AutoLight.cginc" | |
#include "UnityGlobalIllumination.cginc" | |
#include "UnityPBSLighting.cginc" | |
// ----------------------------- // | |
// material property and uniform // |
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 System; | |
using UnityEngine; | |
public interface IService {} | |
public abstract class InitialzeArgs {} | |
public interface IInitializable { | |
void Initialize (InitialzeArgs args); | |
} |