Skip to content

Instantly share code, notes, and snippets.

Unity CLI Tools (macOS)

Installation

curl -sL https://gist.githubusercontent.com/mob-sakai/c6e1a5362bc6237cfc9caafaf02e1de4/raw/unity.sh >> ~/.zprofile

Usage

@mob-sakai
mob-sakai / _README.md
Last active February 20, 2024 00:29
Run shell script on gist

Run shell script on gist

Shells that support process substitution such as bash and zsh allow to run shell script on gist as follows.

# With curl:
bash <(curl -sL ${GIST_URL}) args...

# With wget:
@mob-sakai
mob-sakai / .releaserc.json
Last active December 23, 2020 08:14
semantic-release-upm
{
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"master",
"main",
{
"name": "preview",
"prerelease": true
}
],
Shader "Unlit/VectorGradient (SoftMaskable)"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
[HideInInspector] _RendererColor ("RendererColor", Color) = (1,1,1,1)
// vvvv ADD FOR SOFTMASKABLE vvvv
_StencilComp ("Stencil Comparison", Float) = 8
@mob-sakai
mob-sakai / unity_release.sh
Last active February 15, 2019 12:31
UnityアセットをGithubへリリースするスクリプト(UPM対応版)。要github_changelog_generator&gh-release。実行するにはコメント参照
#!/bin/bash -e
# NOTE: Run the following command at the prompt
# bash <(curl -sL 'https://gist.github.com/mob-sakai/e281baa04e1a47148b62387f9c7967df/raw/unity_release.sh')
# NOTE: Set an environment variable `CHANGELOG_GITHUB_TOKEN` by running the following command at the prompt, or by adding it to your shell profile (e.g., ~/.bash_profile or ~/.zshrc):
# export CHANGELOG_GITHUB_TOKEN="«your-40-digit-github-token»"
# 1. << Input release version >>
#!/bin/bash -ex
while getopts "e" OPT
do
case $OPT in
e) EDITOR_ONLY="true";;
\?) echo "[ERROR] Undefined options.";;
esac
done
@mob-sakai
mob-sakai / DeprecatedRemover.cs
Last active September 5, 2018 00:55
古い.unitypackageでインポートしたファイルを削除する(GUID指定)
using System.Collections;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEngine;
namespace Coffee.UIExtensions.UIEffectDepricated
{
@mob-sakai
mob-sakai / ChangeDissolveTexture.cs
Created June 1, 2018 08:09
Change texture for UIDissolve
using UnityEngine;
using UnityEngine.UI;
using Coffee.UIExtensions;
[RequireComponent(typeof(UIDissolve))]
public class ChangeDissolveTexture : MonoBehaviour, IMaterialModifier
{
//################################
// Serialize Members.
//################################
@mob-sakai
mob-sakai / unity_release.sh
Last active September 26, 2018 13:39
UnityアセットをGithubへリリースするスクリプト。要github_changelog_generator&gh-release。実行するにはコメント参照
#!/bin/bash -e
# NOTE: Run the following command at the prompt
# bash <(curl -sL 'https://gist.github.com/mob-sakai/a883999a32dd8b1927639e46b3cd6801/raw/unity_release.sh')
# NOTE: Set an environment variable `CHANGELOG_GITHUB_TOKEN` by running the following command at the prompt, or by adding it to your shell profile (e.g., ~/.bash_profile or ~/.zshrc):
# export CHANGELOG_GITHUB_TOKEN="«your-40-digit-github-token»"
# 1. << Input release version >>
@mob-sakai
mob-sakai / Settings.StyleCop
Created April 22, 2018 15:06
stylecop for coffee
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">