This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 自分を含めたリストが返る | |
| var arr = transform.GetComponentsInChildren<Transform> (); | |
| for (int i = 0; i < arr.Length; i++) { | |
| Debug.Log (arr [i]); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var str:String = " hoge hoge "; | |
| var reg:RegExp = /^[ ]+|[ ]+$/g; | |
| var result:String = str.replace(reg, ""); | |
| trace("|" + result + "|"); //ourpur::hoge hoge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| mb_language("Japanese"); | |
| mb_internal_encoding("UTF-8"); | |
| $mail_to = 'sample@gmail.com'; | |
| $subject = 'test'; | |
| $mail_text = 'テストメール'; | |
| $reply_to = 'From: no-reply@hoge.com'; | |
| $result = mb_send_mail($mail_to, $subject, $mail_text, $reply_to); | |
| if ($result) { | |
| echo 'success'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function checkFlg(keta:uint, value:uint):Boolean | |
| { | |
| if (keta == 0) throw new Error("error"); | |
| var checkNum:int = keta > 2 ? Math.pow(2, keta) : keta; | |
| value /= checkNum; | |
| value *= 128; | |
| if (value >= 256) | |
| { | |
| // 8ビットなので256以上は巻き戻る | |
| while (value >= 256) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Scene List Editor Window | |
| /// @author Shunsuke Ohba | |
| /// </summary> | |
| using UnityEngine; | |
| using UnityEditor; | |
| using System.IO; | |
| using System.Collections; | |
| using System.Collections.Generic; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Simple" | |
| { | |
| SubShader | |
| { | |
| Pass | |
| { | |
| GpuProgramID 16286 | |
| Program "vp" | |
| { | |
| SubProgram "gles " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEngine.UI; | |
| [ExecuteInEditMode ()] | |
| [RequireComponent (typeof(RectTransform))] | |
| /// <summary> | |
| /// アタッチしたRectTransformを画面にフィットさせます | |
| /// </summary> | |
| public class UGUIBgFit : MonoBehaviour | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "UI/Default" | |
| { | |
| Properties | |
| { | |
| [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
| _Color ("Tint", Color) = (1,1,1,1) | |
| _StencilComp ("Stencil Comparison", Float) = 8 | |
| _Stencil ("Stencil ID", Float) = 0 | |
| _StencilOp ("Stencil Operation", Float) = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %YAML 1.1 | |
| %TAG !u! tag:unity3d.com,2011: | |
| --- !u!29 &1 | |
| SceneSettings: | |
| m_ObjectHideFlags: 0 | |
| m_PVSData: | |
| m_PVSObjectsArray: [] | |
| m_PVSPortalsArray: [] | |
| m_OcclusionBakeSettings: | |
| smallestOccluder: 5 |
OlderNewer