Skip to content

Instantly share code, notes, and snippets.

@mob-sakai
mob-sakai / RemoveEmptyFolders.cs
Last active September 22, 2023 18:33
Automatically remove empty folders in project for Unity.
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Linq;
using System;
/// <summary>
/// Remove empty folders automatically.
@mob-sakai
mob-sakai / CacheableDownloadHandler.cs
Created July 28, 2017 10:04
Etag-cacheable DownloadHandler for Unity.
using UnityEngine.Networking;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using UnityEngine;
using System;
namespace Mobcast.Coffee.AssetSystem
{
@mob-sakai
mob-sakai / ReactiveCollectionExtensionsEx.cs
Created August 1, 2017 01:46
ReactiveCollection拡張メソッド.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UniRx;
using System.Linq;
using System;
/// <summary>
/// ReactiveCollection拡張メソッド.
/// </summary>
@mob-sakai
mob-sakai / ComponentConverter.cs
Created November 29, 2017 02:19
Component converter for Unity
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
/// <summary>
/// Component converter for editor.
/// </summary>
public static class ComponentConverter
{
//%%%% v Context menu for editor v %%%%
@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">
@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 / 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 / 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
{
#!/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 / 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 >>