This file contains 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
_ground_obj as GameObject = null | |
_ground as Ground = null | |
ground_obj: | |
get: | |
_ground_obj = GameObject.Find('Ground') if _ground_obj == null | |
return _ground_obj | |
ground: | |
get: | |
_ground = ground_obj.GetComponent[of Ground]() if _ground == null | |
return _ground |
This file contains 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
import UnityEngine | |
import System.IO | |
class VersionDisplay (MonoBehaviour): | |
static final _filename = 'version.txt' | |
_text as string = '' | |
def Start(): | |
StartCoroutine(reader()) | |
private def reader() as IEnumerator: | |
path = Application.streamingAssetsPath + "/${_filename}" |
This file contains 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
import UnityEngine | |
import System.Collections | |
import System.Collections.Generic | |
class ObjectPool (MonoBehaviour): | |
// プール本体 | |
class Pool (): | |
_prefab as GameObject = null | |
_maxCount = 10 | |
_prepareCount = 0 |
This file contains 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/sh | |
cd `dirname ${0}` | |
UNITY_APP=/Applications/Unity/Unity.app/Contents/MacOS/Unity | |
PWD=`pwd` | |
$UNITY_APP -projectPath $PWD & |
This file contains 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
import UnityEngine | |
class TestLWF (LWFObject): | |
def Start (): | |
set_loader() | |
Load( | |
'lwfdata/character', 'lwfdata/', '', 0.0f, 1.0f, 0, null as Camera, null as Camera, true, true, | |
null as System.Func[of LWF.Data, bool], | |
null as System.Action[of LWFObject], | |
null as System.Action[of LWFObject], |
This file contains 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 System.Collections; | |
using System.Collections.Generic; | |
using MiniJSON; | |
using KeyValue = System.Collections.Generic.Dictionary<string, string>; | |
public class CaptureSendSlack : MonoBehaviour { | |
private static string CAPTURE_DIRECTORY; | |
private static string CAPTURE_FILENAME = "slack_share.png"; | |
private static string CAPTURE_PATH; |
This file contains 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 System; | |
using System.Collections.Generic; | |
using System.Text; | |
using UnityEngine.EventSystems; | |
namespace UnityEngine.UI | |
{ | |
[AddComponentMenu("Event/Graphic Raycaster 2")] | |
[RequireComponent(typeof(Canvas))] | |
public class GraphicRaycaster2 : BaseRaycaster |
This file contains 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 UnityEditor; | |
using System.Linq; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class AtlasChecker : EditorWindow { | |
struct TexAsset { | |
public string path; | |
public string name; |
This file contains 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
public class EditorFieldBase { | |
protected static uint uid_ = 0; | |
protected string name_; | |
protected string name { get { return name_; } } | |
protected EditorFieldBase() { | |
name_ = (uid_++).ToString(); | |
} | |
} | |
public class EditorIntField : EditorFieldBase { | |
private GUIStyle style_; |
This file contains 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 UnityEditor; | |
using System; | |
using System.IO; | |
// Assetsフォルダ以下を見てファイルを取得する系 | |
public class AssetDir { | |
public static string[] GetFiles(string path) { | |
string[] rawfiles = Directory.GetFiles(MakePath(path)); | |
string[] files = new string[rawfiles.Length]; |
OlderNewer