Skip to content

Instantly share code, notes, and snippets.

View monry's full-sized avatar

Tetsuya Mori monry

View GitHub Profile
#!/bin/bash
set -ue
if [ ! -e "Packages/manifest.json" ]; then
cat << __VALIDATE_MANIFEST__
ERROR: Could not find Packages/manifest.json
Make sure current directory
__VALIDATE_MANIFEST__
exit 1
#!/bin/bash
set -ue
if [ ! -e "${HOME}/.npmrc" ]; then
cat << __VALIDATE_NPMRC__
ERROR: Could not find ${HOME}/.npmrc
Please login to upm registry with 'npm login'
__VALIDATE_NPMRC__
exit 1
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
#!/bin/bash
set -ue
if [ ! -e "${HOME}/.npmrc" ]; then
cat << __VALIDATE_NPMRC__
ERROR: Could not find ${HOME}/.npmrc
Please login to upm registry with 'npm login'
__VALIDATE_NPMRC__
exit 1
@monry
monry / SampleInstaller.cs
Created May 16, 2019 08:04
Reproduce code that `IInitializable.Initialize()` has not been invoked even if use `WithKernel()` when bind `FromSubContainerResolve()`.
using UnityEngine;
using Zenject;
public class SampleInstaller : MonoInstaller<SampleInstaller>
{
public override void InstallBindings()
{
Container
.Bind(typeof(IMain))
.FromSubContainerResolve()
@monry
monry / participations_formatter.js
Last active September 16, 2018 15:36
Copy workshop participations
var rows = 10;
var useDisplayName = true;
var typeMaps = [
{ type: '参加者', priority: 1, className: 'participation_table_area' },
{ type: '補欠者', priority: 2, className: 'waitlist_table_area' },
{ type: 'キャンセル', priority: 3, className: 'cancelled_table_area' },
];
var list = [];
for (let typeMap of typeMaps) {
$(`div.${typeMap.className} p.user_info`)
@monry
monry / CollectAssetImporters.cs
Created September 5, 2018 09:05
Method to return AssetImporter instance of all selected Asset in Unity Project View
public static IEnumerable<AssetImporter> CollectAssetImporters()
{
if (Selection.objects.Length == 0)
{
throw new InvalidOperationException("Please select target assets or directories.");
}
return Selection
.objects
// 選択済要素をパスに変換
@monry
monry / umm-create.sh
Created July 25, 2018 03:31 — forked from mattak/umm-create.sh
Create empty umm project
#!/bin/sh
set -ue
if [ ! -e $HOME/.umm-config.json ]; then
cat <<__CHECK__
ERROR: Cannot find umm-config.json
Make sure the file exists on $HOME/.umm-config.json
__CHECK__
exit 0
@monry
monry / SampleInstaller.cs
Created July 12, 2018 06:49
Sample installer to occur ZenjectException
using Zenject;
namespace Sample
{
public interface IFoo {}
public interface IBar {}
public class Foo : IFoo {}
@monry
monry / KidsStar.DotSettings
Created May 23, 2018 01:54
Rider settings for KidsStar
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeEditing/ContextActionTable/DisabledContextActions/=JetBrains_002EReSharper_002EIntentions_002ECSharp_002EContextActions_002EMisc_002ESurroundWithQuotesAction/@EntryIndexedValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/CacheImportCompletion/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeEditing/TypingAssist/VirtualSpaceOnEnter/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=CheckNamespace/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Constructor/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Constructor/Optio