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; | |
| public class FastLookup : MonoBehaviour | |
| { | |
| [SerializeField] | |
| public static int LookupListSize = 1597;//547; //!< Size of static data arrays. Prime numbers are best, in theory. | |
| public const uint FlagAllocated = 1 << 0; //!< This index has been reserved for use. | |
| public uint Idx; //!< Per-instance index into the static data arrays. |
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/usr/perl | |
| use strict; | |
| use File::Basename; | |
| chdir (File::Spec->rel2abs (dirname($0)."/..")); # Modify for location of perl script | |
| my $monoPath = "External/Mono/builds/monodistribution"; | |
| my @sourceDirs = ( | |
| "Path/To/Source/*.cs", | |
| "Path/To/More/Source/*.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
| function OnGUI() { | |
| var screenScale: float = Screen.width / 480.0; | |
| var scaledMatrix: Matrix4x4 = Matrix4x4.identity.Scale(Vector3(screenScale,screenScale,screenScale)); | |
| GUI.matrix = scaledMatrix; | |
| // then do the rest of your GUI as per normal, using the 480x320 screen size you had for your standard res iPhone app | |
| } |
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
| <Ascendion> tmpvar -- a.gettype().GetConstructors(); will get you a list of constructor methods -- look for the one that takes no parameters and invoke it | |
| [00:50] * dock ([email protected]) has joined #unity3d | |
| [00:52] <Ascendion> you will need "using System.Reflection" to get the ConstructorInfo data type that GetConstructors returns |
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
| //Return the full hierarchy string of a gameObject, ready for use in GameObject.Find method later... | |
| static public string GetHierarchy(GameObject g) | |
| { | |
| if (!g || g == null) | |
| { | |
| return ""; | |
| } | |
| string hierarchy = null; |
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
| echo "JOB: $JOB_NAME" > version.txt | |
| echo "BUILD NUMBER: $BUILD_NUMBER" >> version.txt | |
| echo "GIT REVISION:" >> version.txt | |
| git log -n 1 >> version.txt |
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
| #!/usr/bin/env python | |
| import sys, os.path | |
| install_path = sys.argv[1] | |
| target_platform = sys.argv[2] | |
| if target_platform != "iPhone": sys.exit() | |
| info_plist_path = os.path.join(install_path, 'Info.plist') |
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
| #in older versions of Xcode4 you may need to set PRODUCT_NAME manually | |
| DIST_LIST=<TestFlight Distribution List name here> | |
| API_TOKEN=<TestFlight API token here> | |
| TEAM_TOKEN=<TestFlight team token here> | |
| SIGNING_IDENTITY="iPhone Distribution: Development Seed" | |
| PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision" | |
| LOG="/tmp/testflight.log" | |
| DATE=$( /bin/date +"%Y-%m-%d" ) |
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 "FX/Water" { | |
| Properties { | |
| _WaveScale ("Wave scale", Range (0.02,0.15)) = 0.063 | |
| _ReflDistort ("Reflection distort", Range (0,1.5)) = 0.44 | |
| _RefrDistort ("Refraction distort", Range (0,1.5)) = 0.40 | |
| _RefrColor ("Refraction color", COLOR) = ( .34, .85, .92, 1) | |
| _Fresnel ("Fresnel (A) ", 2D) = "gray" {} | |
| _BumpMap ("Bumpmap (RGB) ", 2D) = "bump" {} | |
| WaveSpeed ("Wave speed (map1 x,y; map2 x,y)", Vector) = (19,9,-16,-7) | |
| _ReflectiveColor ("Reflective color (RGB) fresnel (A) ", 2D) = "" {} |
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 UnityEditor; | |
| public static class CodeUtilUnity { | |
| [MenuItem("Tools/Test: CreateCopyMethod (Transform)")] | |
| public static void TestCreateCopyMethod () { | |
| Debug.Log (CreateCopyMethod (typeof(Transform), true)); | |
| } | |
| } |