Skip to content

Instantly share code, notes, and snippets.

View wotakuro's full-sized avatar

Yusuke Kurokawa wotakuro

View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
namespace UTJ
{
// window
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEditor.UnityLinker;
using UnityEngine;
@wotakuro
wotakuro / ShaderParseWatcher.cs
Created November 24, 2020 05:28
ProfilerのShader.Parseをウォッチして、ファイルに書き込む君
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Profiling;
using System.IO;
using System.Text;
public class ShaderParseWatcher : MonoBehaviour
{
using UnityEngine;
public class CameraViewer : MonoBehaviour
{
// Update is called once per frame
void Update()
{
if (Application.isMobilePlatform)
{
@wotakuro
wotakuro / UnityEditor拡張便利群.txt
Last active September 27, 2022 08:09
UnityEditor拡張便利群
1.プロジェクトのアセットをザクっと見渡すツールです
https://github.com/wotakuro/AssetsReporter
2.300フレーム毎にProfilerログを保存することで300フレーム上限問題を回避します。
https://github.com/wotakuro/UnityProfilerIntervalSave
3.Profilerのログを分割する事で、300フレーム上限問題を回避します
https://github.com/wotakuro/ProfilerBinarylogSplit
4.ScreenShotをProfilerのログに埋め込みします
@wotakuro
wotakuro / PackageManagerAutoInstaller.cs
Last active May 29, 2020 15:42
PackageManagerを自動で入れる君
/**
MIT License
Copyright (c) 2019 Yusuke Kurokawa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@wotakuro
wotakuro / StrippingByVariantCollection.cs
Last active February 7, 2022 12:43
プロジェクト内にあるShaderVariantCollectionにないKeywordはビルドに含まないようにするEditor拡張です
/*
MIT License
Copyright (c) 2020 Yusuke Kurokawa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
#include "DigiKeyboard.h"
const int LED_PIN = 0;
const int LED_PIN2 = 1;
const int BTN_PIN = 2;
void setup() {
// don't need to set anything up to use DigiKeyboard
pinMode(LED_PIN,OUTPUT);
pinMode(LED_PIN2,OUTPUT);
pinMode(BTN_PIN,INPUT);
@wotakuro
wotakuro / VersionControlCLITips.cs
Created March 17, 2020 16:42
VersionControl tips
using UnityEngine;
using UnityEditor;
public class VersionControlCLITips
{
public class GitInfo
{
public string branch;
public long lastupdate;
public string hash;
@wotakuro
wotakuro / CustomAutoLight.cginc
Created May 30, 2018 15:31
[Unity] Creating my own shader with shadows for LightWeightRenderPipeline(LWRP)
sampler2D _ScreenSpaceShadowMap;
#define SHADOW_COORDS(idx1) float4 shadowCoord : TEXCOORD##idx1;
#define TRANSFER_SHADOW(a) a.shadowCoord = CustomCalculateScreenPos(a.pos)
#define SHADOW_ATTENUATION(i) tex2D(_ScreenSpaceShadowMap, i.shadowCoord.xy/i.shadowCoord.w).x
inline float4 CustomCalculateScreenPos(float4 pos) {
float4 o = pos * 0.5f;
o.xy = float2(o.x, o.y*_ProjectionParams.x) + o.w;
o.zw = pos.zw;