Skip to content

Instantly share code, notes, and snippets.

@baobao
baobao / PublicFields.cs
Last active December 7, 2018 03:38
publicフィールドとその値を取得する 途中
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
public class PublicVariables : MonoBehaviour
{
public TestClazz _testClazz;
void Start ()
@baobao
baobao / makedll.sh
Created February 15, 2015 09:17
Unityで使用するDLLコンパイルShellスクリプト カレントディレクトリ内のファイルをコンパイルします。 参考 : http://docs-jp.unity3d.com/Documentation/Manual/UsingDLL.html
#!/bin/bash
appPath=/Applications/Unity4_5_5/Unity4_5_5.app
mcs -r:$appPath/Contents/Frameworks/Managed/UnityEngine.dll -target:library -out:$1.dll *.cs
@baobao
baobao / bahaHL.html
Last active December 7, 2018 03:36
バハHL救援スプレッドシート自動オープンHTML
<html>
<title>バハHL救援スプレッドシート自動オープンHTML</title>
<head>
<script type="text/javascript">
var displayW = screen.width;
var displayH = screen.height;
var xx=3;
var yy=2;
// 横3つ縦2つ
var w = displayW/xx;
@baobao
baobao / Standard.shader
Created May 8, 2016 02:54
UnityのStandardシェーダ
# v5.3.4f1
Shader "Standard"
{
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex("Albedo", 2D) = "white" {}
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
Shader "Simple"
{
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
Shader "Simple"
{
SubShader
{
Pass
{
GpuProgramID 16286
Program "vp"
{
SubProgram "gles "
@baobao
baobao / Outline.shader
Created June 13, 2016 14:34
アウトラインシェーダ
Shader "Unlit/Outline"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_OutlineColor("Color", Color) = (1,0,0,1)
_LineLength ("OutlineLength", Float) = 0.3
}
SubShader
{
@baobao
baobao / Main.cs
Last active February 18, 2022 11:30
イントロ実装SoundManager
using UnityEngine;
using System.Collections;
public class Main : MonoBehaviour
{
public AudioClip clip;
private SoundManager _mng;
void Start ()
{
using UnityEngine;
using System.Collections;
/// <summary>
/// 頂点カラーとテクスチャ画像でで三角形を描画します
/// </summary>
[RequireComponent (typeof(MeshRenderer))]
[RequireComponent (typeof(MeshFilter))]
public class DynamicCreateMesh : MonoBehaviour
{
@baobao
baobao / AnimationClipRecoveryEditor.cs
Last active March 18, 2023 16:16
アニメーションクリップを少しリカバリーするEditorスクリプト
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
public class AnimationClipRecoveryEditor : EditorWindow
{
[MenuItem("Tools/AnimationClip Recover")]
static void Init ()
{