Skip to content

Instantly share code, notes, and snippets.

View matsuyoro's full-sized avatar

matsu matsuyoro

  • japan
View GitHub Profile
@darktable
darktable / MiniJSON.cs
Created November 30, 2011 23:08
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining
@hideyukisaito
hideyukisaito / google_csharp_style_guide_ja.md
Last active April 16, 2024 06:46
C# at Google Style Guide 日本語訳

C# at Google Style Guide を日本語訳したものです。一部こなれていない箇所もあるので、お気づきの点があれば気軽にコメントでご指摘頂ければ幸いです。

C# at Google Style Guide 日本語訳

このスタイルガイドは Google 社内で開発された C# コード用であり、Google の C# コードのデフォルトのスタイルです。 Google C++ スタイルや Google Java スタイルなど、Google の他の言語に準拠した文体の選択を行います。

フォーマットについてのガイドライン

命名規則

@rngtm
rngtm / HexagonNode.cs
Last active February 8, 2024 03:19
六角形タイルを作るShaderGraphカスタムノード
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor.ShaderGraph;
using System.Reflection;
[Title("Distance", "Hexagon")]
public class HexagonNode : CodeFunctionNode
{
public HexagonNode()
using UnityEngine;
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
public class LSystemGenerator : MonoBehaviour
{
[Serializable]
@tsubaki
tsubaki / LogTest.cs
Last active May 19, 2023 02:45
ログの出力を停止する
using UnityEngine;
using System.Collections;
public class LogTest : MonoBehaviour
{
// ゲーム開始前に呼び出す
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void Init () {
Debug.logger.logEnabled = false; // ←ログを止める
}
@sanukin39
sanukin39 / BatchBuildSample.cs
Created June 27, 2016 14:55
Unity BuildPipeline.BuildPlayer sample
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Linq;
using System.Collections;
public class BatchBuild {
// Android ビルド
[MenuItem("Build/Android")]
@yaeda
yaeda / AssetBundleSample.cs
Created April 18, 2013 07:30
Unity AssetBundle Examples.
using System;
using UnityEngine;
using System.Collections;
public class AssetBundleSample : MonoBehaviour {
public GUIText guitext;
// Use this for initialization
void Start () {
%%[
VAR @ts, @tsDef, @ts_extkey, @ts_email, @ts_sub, @ts_statusCode, @ts_statusMsg, @errorCode
SET @ts = CreateObject("TriggeredSend")
SET @tsDef = CreateObject("TriggeredSendDefinition")
SET @ts_extkey = "ExternalKey" /* use the external key of the interaction for example SET @ts_extkey = "49078" */
SET @ts_email = "email@example.com" /* provide recipient's email address */
SetObjectProperty(@tsDef, "CustomerKey", @ts_extkey)
SetObjectProperty(@ts, "TriggeredSendDefinition", @tsDef)
@tsubaki
tsubaki / Liner.cs
Last active May 31, 2021 09:53
Unityで座標を等速直線的に動かすやつ。コメントアウト解除するとカーブエディタで他の移動パターンも作れる
using UnityEngine;
using System.Collections;
public class Liner : MonoBehaviour
{
[SerializeField, Range(0, 10)]
float time = 1;
[SerializeField]
@noahcampbell
noahcampbell / squid.bash
Created April 14, 2011 00:01
Collectd script for squid
# Steps for turning on squid monitoring (until I have an rpm)
cat > /etc/collectd.d/squid << EOF
LoadPlugin exec
<Plugin exec>
Exec deploy "/var/lib/releng/monitoring/squid"
</Plugin>
EOF
mkdir -p /var/lib/releng/monitoring