- Verify the Microsoft account.
- Uninstall unused apps like OneDrive.
- Install Unity Hub.
- Enable WSL2 and install Ubuntu.
wsl --install
- Open Terminal and copy-paste the custom profile.
sudo apt update && sudo apt upgrade
.- Sign in to GitHub and add a new SSH key.
ssh-keygen -t rsa -b 4096 -C "keijiro@gmail.com"
- Clone dotfiles and run
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
:: Trim from 2″ for 3 seconds, and encode into a "Twitter friendly" format. | |
ffmpeg -i source.mp4 -pix_fmt yuv420p -an -ss 2 -t 3 temp.mp4 | |
:: Make a palette for GIF. | |
ffmpeg -i temp.mp4 -vf palettegen=max_colors=24 palette.png | |
:: Make a GIF with the palette. | |
ffmpeg -i temp.mp4 -i palette.png -filter_complex "scale=400:-1:flags=lanczos[x];[x][1:v]paletteuse" -r 30 out.gif |
- Install Ubuntu using rufus and a USB stick.
- Install the NVIDIA dirver from "Software & Updates" - "Additional Drivers".
- Install Mozc input method from "Region & Language" - "Input Sources".
- Modify the keymap to switch IME with ctrl + space.
- Install Unity Hub by following these steps.
- Install Git, Vim and Vulkan.
sudo apt install git vim vulkan-tools
- Sign in to GitHub and add a new SSH key.
ssh-keygen -t rsa -b 4096 -C "keijiro@gmail.com"
- Clone dotfiles and run
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
#version 150 | |
uniform float time; | |
uniform vec2 mouse; | |
uniform vec2 resolution; | |
uniform vec3 spectrum; | |
uniform sampler2D texture0; | |
uniform sampler2D texture1; | |
uniform sampler2D texture2; | |
uniform sampler2D texture3; |
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
// Simplified Additive Particle shader. Differences from regular Additive Particle one: | |
// - no Tint color | |
// - no Smooth particle support | |
// - no AlphaTest | |
// - no ColorMask | |
Shader "Mobile/Particles/Additive" { | |
Properties { | |
_MainTex ("Particle Texture", 2D) = "white" {} | |
} |
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; | |
sealed class Test : MonoBehaviour | |
{ | |
float life; | |
void Test1() | |
{ | |
(float, int) attack = (3.5f, 8); | |
life -= attack.Item1 * attack.Item2; |
Unity のアニメーションのインポート設定(下画像)には様々な項目がありますが、これを手動でひとつひとつ設定していくのは、かなりしんどいです。お決まりの設定がある場合には、スクリプトで自動化してしまうのがよいでしょう。この文書では、その自動化の方法を紹介します。
これらのインポート設定は ModelImporter.clipAnimations に ModelImporterClipAnimation の配列として格納されています。これを舐める形で変更していけば、一括でお好みの設定を適用できます。