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
#define GETSCREENMATRIX GLdouble m[16],l;glGetDoublev(GL_MODELVIEW_MATRIX,m);m[0] = m[5] = m[10] = 1.0;m[1] = m[2] = m[4] = m[6] = m[8] = m[9] = 0.0;glLoadMatrixd(m); |
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
void OnPreRender() { | |
GL.wireframe = true; | |
} | |
void OnPostRender() { | |
GL.wireframe = false; | |
} |
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 void SetLayerRecursively(GameObject go, int layerNumber) | |
{ | |
foreach (Transform trans in go.GetComponentsInChildren<Transform>(true)) | |
{ | |
trans.gameObject.layer = layerNumber; | |
} | |
} |
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; | |
public class attractorFlag : MonoBehaviour { | |
public enum FlagColor { Green, Red, Blue } | |
public FlagColor flagColor = FlagColor.Green; | |
public float speed = 0.0f; | |
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; | |
[RequireComponent (typeof (NavMeshAgent))] | |
public class agentLocomotion : MonoBehaviour { | |
private string locoState_ = "Locomotion_Stand"; | |
private NavMeshAgent agent_; | |
private Animation anim_; | |
private Vector3 linkStart_; |
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; | |
/// <summary> | |
/// Riftが動いたら何かするコンポーネント。OculusUnityIntegrationに含まれる、OVRDevice.csもAddComponentされている必要があります。 | |
/// </summary> | |
public class OVRMoveCheckAndDoSomething : MonoBehaviour { | |
#region parameters | |
float preRotX; | |
Quaternion ovrRot; |
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; | |
public class ParamPrefsSetter : MonoBehaviour { | |
#region singleton | |
static ParamPrefsSetter instance; | |
public static ParamPrefsSetter Instance | |
{ |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
/* | |
MAKE A 3D OBJECT DRAGGABLE | |
Riccardo Stecca | |
http://www.riccardostecca.net |
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.Linq; | |
List<Transform> targetList; | |
Transform nearestTrans = targetList.OrderBy( x => (x.position - this.position).magnitude).First(); |
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
namespace com.etc.utility | |
{ | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class ImageNumViewUnit : MonoBehaviour | |
{ | |
[SerializeField] | |
private Sprite[] numSprites; | |
[SerializeField] |
OlderNewer