블로그 이미지
Every unexpected event is a path to learning for you. blueasa

카테고리

분류 전체보기 (2817)
Unity3D (870)
Programming (479)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (236)
협업 (61)
3DS Max (3)
Game (12)
Utility (68)
Etc (98)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (55)
Android (16)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (19)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday

나(me)같은 초보를 위해 사용법(?) 추가..;


1. C# 스크립트 생성.

2. 생성한 스크립트에 아래 소스 추가/저장.

3. 생성한 스크립트를 Main Camera에 드래그&드랍..

4. Scene창의 Gizmos에 보면 추가한 스크립트가 추가된 게 보이고, 토글이 가능하다.

------------------------------------------------------------------------------------------

NGUI(무료버전) 레이아웃 작업 중....


현재 화면에서 GUI배치하기가 너무 어려워서 현재 화면 크기를 카메라를 선택하지 않아도 계속 유지하고 싶었다.


역시나 나 같은 생각을 가진 사람이 있었다. 아래 링크를 참고하자.

http://answers.unity3d.com/questions/291467/scene-view-stretches-camera-frustum-gizmo.html


링크를 가고 싶지 않은 사람은 아래 코드를 가져다가 쓰면 된다.


    public static Vector2 GetMainGameViewSize()

{ System.Type T = System.Type.GetType("UnityEditor.GameView,UnityEditor"); System.Reflection.MethodInfo GetSizeOfMainGameView = T.GetMethod("GetSizeOfMainGameView",System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static); System.Object Res = GetSizeOfMainGameView.Invoke(null,null); return (Vector2)Res; } void OnDrawGizmos() { Camera cam = this.camera; // Top left Vector3 tlN = cam.ScreenToWorldPoint(new Vector3(Screen.width*0, Screen.height, cam.nearClipPlane)); Vector3 tlF = cam.ScreenToWorldPoint(new Vector3(Screen.width*0, Screen.height, cam.farClipPlane)); // Top right Vector3 trN = cam.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height, cam.nearClipPlane)); Vector3 trF = cam.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height, cam.farClipPlane)); // Bottom left Vector3 blN = cam.ScreenToWorldPoint(new Vector3(0.0f, 0.0f, cam.nearClipPlane)); Vector3 blF = cam.ScreenToWorldPoint(new Vector3(0.0f, 0.0f, cam.farClipPlane)); // Bottom right Vector3 brN = cam.ScreenToWorldPoint(new Vector3(Screen.width, 0.0f, cam.nearClipPlane)); Vector3 brF = cam.ScreenToWorldPoint(new Vector3(Screen.width, 0.0f, cam.farClipPlane)); // Scale for aspect ratio Vector2 gameViewsize = GetMainGameViewSize(); // float gameViewAspect = gameViewsize.x / gameViewsize.y;

 // 화면 비율에 맞추기 위해서 수정[blueasa]

float gameViewAspect = Screen.width / Screen.height; float s = gameViewAspect / cam.aspect; tlN.x *= s; tlF.x *= s; trN.x *= s; trF.x *= s; blN.x *= s; blF.x *= s; brN.x *= s; brF.x *= s; Gizmos.color = Color.white; // Near Gizmos.DrawLine(tlN, trN); Gizmos.DrawLine(trN, brN); Gizmos.DrawLine(brN, blN); Gizmos.DrawLine(blN, tlN); // Far Gizmos.DrawLine(tlF, trF); Gizmos.DrawLine(trF, brF); Gizmos.DrawLine(brF, blF); Gizmos.DrawLine(blF, tlF); // Sides Gizmos.DrawLine(tlN, tlF); Gizmos.DrawLine(trN, trF); Gizmos.DrawLine(brN, brF); Gizmos.DrawLine(blN, blF); }


[출처] 유니티. Gizmos로 카메라 프러스텀 보이게 하기.|작성자 괴발자

반응형

'Unity3D' 카테고리의 다른 글

유니티 관련  (0) 2012.10.17
Transform Custom Editor  (0) 2012.10.15
유니티에 툴바 만들기..  (0) 2012.10.15
유니티에서 툴 만들기  (0) 2012.10.12
[링크] 유니티 관련 사이트  (0) 2012.10.12
Posted by blueasa
, |
using UnityEngine;
using UnityEditor;

public class MyToolbar : EditorWindow  
{
    // Add menu named "My Window" to the Window menu
    [MenuItem ("Window/Toolbar")]
    static void Init () {
        // Get existing open window or if none, make a new one:
        MyToolbar window = EditorWindow.GetWindow (typeof (MyToolbar)) as MyToolbar;
		//window.minSize = new Vector2(34f, 34f);
		//window.maxSize = new Vector2(1024f, 70f);
		window.position = new Rect(0,0,200,34);
    }
	
    void OnGUI()
	{
		// GUILayout, EditorGUILayout 둘 다 되는데 무슨 차이일까..
        //EditorGUILayout.BeginHorizontal ("Toolbar");
		GUILayout.BeginHorizontal ("Toolbar");

		// 텍스트이름 버튼
		if(GUILayout.Button ("AS", GUILayout.Width( 32f ), GUILayout.Height( 32f )))
		{
			// 유니티 메뉴에서 실행할 메뉴선택
			EditorApplication.ExecuteMenuItem( "Window/Asset Store" );	
		}
		
		GUILayout.Button ("Pop up", GUILayout.Width( 32f ), GUILayout.Height( 32f ));
		GUILayout.Space (10f);        // 표준 에디터 간격을 넣는다.
		GUILayout.Button ("Drop me down", GUILayout.Width( 32f ), GUILayout.Height( 32f ));
		
		// 이미지 버튼 넣기(이미지 없으면 텍스트로)
		string TPath = string.Format( "Assets/Room/Bluesky Up.jpg" ); 
        Texture tex = Resources.LoadAssetAtPath( TPath, typeof(Texture) ) as Texture; 
        if( tex != null ) 
        { 
            if( GUILayout.Button( tex, GUILayout.Width( 32f ), GUILayout.Height( 32f ) ) )
			{
                EditorApplication.ExecuteMenuItem( "Window/Asset Server" ); 
			}
        }
		else
		{
			if( GUILayout.Button( "Asset Server", GUILayout.Width( 32f ), GUILayout.Height( 32f ) ) )
			{
                EditorApplication.ExecuteMenuItem( "Window/Asset Server" ); 
			}
		}

		//EditorGUILayout.EndHorizontal ();
		GUILayout.EndHorizontal ();
    }
}



소스에 주석이 달려 있으므로 별로 설명은 필요 없을 것 같지만..


기본적으로 해야는 것 같은(?)건..


1. 툴바도 우선 메뉴는 필요한 듯..메뉴 포함 윈도우를 만듬.(크기 조절은 좀 필요할 듯 하다.)

2. 필요한 버튼을 만든다.(이미지로 처리된다면 Assets/아래 리소스를 첨부해야 될 듯)

3. 툴바 버튼 눌렀을 때 실행할 메뉴를 링크해 준다.(외부 프로그램도 실행방법이 있겠지? 나중에 확인해야지..)



P.s. 괴발자님의 블로그 글을 보고 이리저리 삽질하면서 만들었다.

       유니티는 아직 초보라 잘 설명해준 글도 삽질은 별 수 없나보다..

       정보 공유해주신 괴발자님 감사합니다. :)


참조 : http://blog.naver.com/clater11/80167664654

반응형

'Unity3D' 카테고리의 다른 글

Transform Custom Editor  (0) 2012.10.15
Gizmos로 카메라 프러스텀 보이게 하기  (0) 2012.10.15
유니티에서 툴 만들기  (0) 2012.10.12
[링크] 유니티 관련 사이트  (0) 2012.10.12
Visual Studio C# Integration  (0) 2012.10.05
Posted by blueasa
, |

유니티에서 툴 만들기

Unity3D / 2012. 10. 12. 17:04

유니티에서 툴을 만들려면 어째야 되는지 이리저리 알아보니 맥스 비슷하게 툴자체에 추가하는 형식 같다.


EditorWindow 라는 클래스를 사용해서 제작 되는 것 같다.


확인한 커스텀 에디터 제작 순서는 아래와 같다.


1. EditorWindow 를 상속한 클래스를 하나 만든다.(아래 출처의 소스 참조)

   (※ 난 C#이므로 using UnityEditor; 추가)


2. 만들어진 스크립트 파일을 넣고 싶은 프로젝트의 'Assets/Editor' 폴더에 넣는다.(Editor 폴더 없으면 생성)


3. 해당 프로젝트를 켜보면 'Project' 패널에 Editor가 추가 돼 있는게 보인다.


4. 위 메뉴에서 'Window' 메뉴에 보면 추가했던 윈도우(소스대로 했으면 My Window)가 보인다.


5. 클릭해보면 창이 뜬다. 원하는 곳에 붙이고 레이아웃을 저장하면 끝..



출처 : http://www.devkorea.co.kr/reference/Documentation/ScriptReference/EditorWindow.html



반응형

'Unity3D' 카테고리의 다른 글

Gizmos로 카메라 프러스텀 보이게 하기  (0) 2012.10.15
유니티에 툴바 만들기..  (0) 2012.10.15
[링크] 유니티 관련 사이트  (0) 2012.10.12
Visual Studio C# Integration  (0) 2012.10.05
유니티 강좌  (0) 2012.10.03
Posted by blueasa
, |



링크 : http://blog.naver.com/clater11/


반응형

'Unity3D' 카테고리의 다른 글

유니티에 툴바 만들기..  (0) 2012.10.15
유니티에서 툴 만들기  (0) 2012.10.12
Visual Studio C# Integration  (0) 2012.10.05
유니티 강좌  (0) 2012.10.03
유니티 코리아 공식 홈페이지  (0) 2012.08.21
Posted by blueasa
, |

MeleeWeaponTrail

Unity3D/Effect / 2012. 10. 11. 16:47

MeleeWeaponTrail


Author: user:AnomalousUnderdog

Contents

 [hide

Description

A smoothed TrailRenderer meant for melee weapons of animated 3d models. Based on TimeBasedTrailRenderer by Forest Johnson (Yoggy) and xyber.

The MeleeWeaponTrail in action.


Usage

Attach the MeleeWeaponTrail script to the bone of your 3d model where the weapon is mounted. Add a child game object to that which designates the tip of the weapon, and assign the values in the inspector. I've included a helper script to tell when the MeleeWeaponTrail should emit or not based on the animation's frames.

Uncomment "#define USE_INTERPOLATION" to smooth out the trail but note you need the Interpolate script present in your project to use it.


Without smoothing


With smoothing


Use this texture as a template:

Swoosh01.png


C# - MeleeWeaponTrail.cs

//#define USE_INTERPOLATION
 
//
// By Anomalous Underdog, 2011
//
// Based on code made by Forest Johnson (Yoggy) and xyber
//
 
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
 
 
public class MeleeWeaponTrail : MonoBehaviour
{
	[SerializeField]
	bool _emit = true;
	public bool Emit { set{_emit = value;} }
 
	[SerializeField]
	float _emitTime = 0.00f;
 
	[SerializeField]
	Material _material;
 
	[SerializeField]
	float _lifeTime = 1.00f;
 
	[SerializeField]
	Color[] _colors;
 
	[SerializeField]
	float[] _sizes;
 
	[SerializeField]
	float _minVertexDistance = 0.10f;
	[SerializeField]
	float _maxVertexDistance = 10.00f;
 
	[SerializeField]
	float _maxAngle = 3.00f;
 
	[SerializeField]
	bool _autoDestruct = false;
 
#if USE_INTERPOLATION
	[SerializeField]
	int subdivisions = 4;
#endif
 
	[SerializeField]
	Transform _base;
	[SerializeField]
	Transform _tip;
 
	List<Point> _points = new List<Point>();
#if USE_INTERPOLATION
	List<Point> _smoothedPoints = new List<Point>();
#endif
	GameObject _o;
	Mesh _trailMesh;
	Vector3 _lastPosition;
	Vector3 _lastCameraPosition1;
	Vector3 _lastCameraPosition2;
	bool _lastFrameEmit = true;
 
 
	public class Point
	{
		public float timeCreated = 0.00f;
		public Vector3 basePosition;
		public Vector3 tipPosition;
		public bool lineBreak = false;
	}
 
	void Start()
	{
		_lastPosition = transform.position;
		_o = new GameObject("Trail");
		_o.transform.parent = null;
		_o.transform.position = Vector3.zero;
		_o.transform.rotation = Quaternion.identity;
		_o.transform.localScale = Vector3.one;
		_o.AddComponent(typeof(MeshFilter));
		_o.AddComponent(typeof(MeshRenderer));
		_o.renderer.material = _material;
 
		_trailMesh = new Mesh();
		_trailMesh.name = name + "TrailMesh";
		_o.GetComponent<MeshFilter>().mesh = _trailMesh;
	}
 
	void OnDisable()
	{
		Destroy(_o);
	}
 
	void Update()
	{
		if (_emit && _emitTime != 0)
		{
			_emitTime -= Time.deltaTime;
			if (_emitTime == 0) _emitTime = -1;
			if (_emitTime < 0) _emit = false;
		}
 
		if (!_emit && _points.Count == 0 && _autoDestruct)
		{
			Destroy(_o);
			Destroy(gameObject);
		}
 
		// early out if there is no camera
		if (!Camera.main) return;
 
		// if we have moved enough, create a new vertex and make sure we rebuild the mesh
		float theDistance = (_lastPosition - transform.position).magnitude;
		if (_emit)
		{
			if (theDistance > _minVertexDistance)
			{
				bool make = false;
				if (_points.Count < 3)
				{
					make = true;
				}
				else
				{
					//Vector3 l1 = _points[_points.Count - 2].basePosition - _points[_points.Count - 3].basePosition;
					//Vector3 l2 = _points[_points.Count - 1].basePosition - _points[_points.Count - 2].basePosition;
					Vector3 l1 = _points[_points.Count - 2].tipPosition - _points[_points.Count - 3].tipPosition;
					Vector3 l2 = _points[_points.Count - 1].tipPosition - _points[_points.Count - 2].tipPosition;
					if (Vector3.Angle(l1, l2) > _maxAngle || theDistance > _maxVertexDistance) make = true;
				}
 
				if (make)
				{
					Point p = new Point();
					p.basePosition = _base.position;
					p.tipPosition = _tip.position;
					p.timeCreated = Time.time;
					_points.Add(p);
					_lastPosition = transform.position;
 
 
#if USE_INTERPOLATION
					if (_points.Count == 1)
					{
						_smoothedPoints.Add(p);
					}
					else if (_points.Count > 1)
					{
						// add 1+subdivisions for every possible pair in the _points
						for (int n = 0; n < 1+subdivisions; ++n)
							_smoothedPoints.Add(p);
					}
 
					// we use 4 control points for the smoothing
					if (_points.Count >= 4)
					{
						Vector3[] tipPoints = new Vector3[4];
						tipPoints[0] = _points[_points.Count - 4].tipPosition;
						tipPoints[1] = _points[_points.Count - 3].tipPosition;
						tipPoints[2] = _points[_points.Count - 2].tipPosition;
						tipPoints[3] = _points[_points.Count - 1].tipPosition;
 
						//IEnumerable<Vector3> smoothTip = Interpolate.NewBezier(Interpolate.Ease(Interpolate.EaseType.Linear), tipPoints, subdivisions);
						IEnumerable<Vector3> smoothTip = Interpolate.NewCatmullRom(tipPoints, subdivisions, false);
 
						Vector3[] basePoints = new Vector3[4];
						basePoints[0] = _points[_points.Count - 4].basePosition;
						basePoints[1] = _points[_points.Count - 3].basePosition;
						basePoints[2] = _points[_points.Count - 2].basePosition;
						basePoints[3] = _points[_points.Count - 1].basePosition;
 
						//IEnumerable<Vector3> smoothBase = Interpolate.NewBezier(Interpolate.Ease(Interpolate.EaseType.Linear), basePoints, subdivisions);
						IEnumerable<Vector3> smoothBase = Interpolate.NewCatmullRom(basePoints, subdivisions, false);
 
						List<Vector3> smoothTipList = new List<Vector3>(smoothTip);
						List<Vector3> smoothBaseList = new List<Vector3>(smoothBase);
 
						float firstTime = _points[_points.Count - 4].timeCreated;
						float secondTime = _points[_points.Count - 1].timeCreated;
 
						//Debug.Log(" smoothTipList.Count: " + smoothTipList.Count);
 
						for (int n = 0; n < smoothTipList.Count; ++n)
						{
 
							int idx = _smoothedPoints.Count - (smoothTipList.Count-n);
							// there are moments when the _smoothedPoints are lesser
							// than what is required, when elements from it are removed
							if (idx > -1 && idx < _smoothedPoints.Count)
							{
								Point sp = new Point();
								sp.basePosition = smoothBaseList[n];
								sp.tipPosition = smoothTipList[n];
								sp.timeCreated = Mathf.Lerp(firstTime, secondTime, (float)n/smoothTipList.Count);
								_smoothedPoints[idx] = sp;
							}
							//else
							//{
							//	Debug.LogError(idx + "/" + _smoothedPoints.Count);
							//}
						}
					}
#endif
				}
				else
				{
					_points[_points.Count - 1].basePosition = _base.position;
					_points[_points.Count - 1].tipPosition = _tip.position;
					//_points[_points.Count - 1].timeCreated = Time.time;
 
#if USE_INTERPOLATION
					_smoothedPoints[_smoothedPoints.Count - 1].basePosition = _base.position;
					_smoothedPoints[_smoothedPoints.Count - 1].tipPosition = _tip.position;
#endif
				}
			}
			else
			{
				if (_points.Count > 0)
				{
					_points[_points.Count - 1].basePosition = _base.position;
					_points[_points.Count - 1].tipPosition = _tip.position;
					//_points[_points.Count - 1].timeCreated = Time.time;
				}
 
#if USE_INTERPOLATION
				if (_smoothedPoints.Count > 0)
				{
					_smoothedPoints[_smoothedPoints.Count - 1].basePosition = _base.position;
					_smoothedPoints[_smoothedPoints.Count - 1].tipPosition = _tip.position;
				}
#endif
			}
		}
 
		if (!_emit && _lastFrameEmit && _points.Count > 0)
			_points[_points.Count - 1].lineBreak = true;
 
		_lastFrameEmit = _emit;
 
 
 
 
		List<Point> remove = new List<Point>();
		foreach (Point p in _points)
		{
			// cull old points first
			if (Time.time - p.timeCreated > _lifeTime)
			{
				remove.Add(p);
			}
		}
		foreach (Point p in remove)
		{
			_points.Remove(p);
		}
 
#if USE_INTERPOLATION
		remove = new List<Point>();
		foreach (Point p in _smoothedPoints)
		{
			// cull old points first
			if (Time.time - p.timeCreated > _lifeTime)
			{
				remove.Add(p);
			}
		}
		foreach (Point p in remove)
		{
			_smoothedPoints.Remove(p);
		}
#endif
 
 
#if USE_INTERPOLATION
		List<Point> pointsToUse = _smoothedPoints;
#else
		List<Point> pointsToUse = _points;
#endif
 
		if (pointsToUse.Count > 1)
		{
			Vector3[] newVertices = new Vector3[pointsToUse.Count * 2];
			Vector2[] newUV = new Vector2[pointsToUse.Count * 2];
			int[] newTriangles = new int[(pointsToUse.Count - 1) * 6];
			Color[] newColors = new Color[pointsToUse.Count * 2];
 
			for (int n = 0; n < pointsToUse.Count; ++n)
			{
				Point p = pointsToUse[n];
				float time = (Time.time - p.timeCreated) / _lifeTime;
 
				Color color = Color.Lerp(Color.white, Color.clear, time);
				if (_colors != null && _colors.Length > 0)
				{
					float colorTime = time * (_colors.Length - 1);
					float min = Mathf.Floor(colorTime);
					float max = Mathf.Clamp(Mathf.Ceil(colorTime), 1, _colors.Length - 1);
					float lerp = Mathf.InverseLerp(min, max, colorTime);
					if (min >= _colors.Length) min = _colors.Length - 1; if (min < 0) min = 0;
					if (max >= _colors.Length) max = _colors.Length - 1; if (max < 0) max = 0;
					color = Color.Lerp(_colors[(int)min], _colors[(int)max], lerp);
				}
 
				float size = 0f;
				if (_sizes != null && _sizes.Length > 0)
				{
					float sizeTime = time * (_sizes.Length - 1);
					float min = Mathf.Floor(sizeTime);
					float max = Mathf.Clamp(Mathf.Ceil(sizeTime), 1, _sizes.Length - 1);
					float lerp = Mathf.InverseLerp(min, max, sizeTime);
					if (min >= _sizes.Length) min = _sizes.Length - 1; if (min < 0) min = 0;
					if (max >= _sizes.Length) max = _sizes.Length - 1; if (max < 0) max = 0;
					size = Mathf.Lerp(_sizes[(int)min], _sizes[(int)max], lerp);
				}
 
				Vector3 lineDirection = p.tipPosition - p.basePosition;
 
				newVertices[n * 2] = p.basePosition - (lineDirection * (size * 0.5f));
				newVertices[(n * 2) + 1] = p.tipPosition + (lineDirection * (size * 0.5f));
 
				newColors[n * 2] = newColors[(n * 2) + 1] = color;
 
				float uvRatio = (float)n/pointsToUse.Count;
				newUV[n * 2] = new Vector2(uvRatio, 0);
				newUV[(n * 2) + 1] = new Vector2(uvRatio, 1);
 
				if (n > 0 /*&& !pointsToUse[n - 1].lineBreak*/)
				{
					newTriangles[(n - 1) * 6] = (n * 2) - 2;
					newTriangles[((n - 1) * 6) + 1] = (n * 2) - 1;
					newTriangles[((n - 1) * 6) + 2] = n * 2;
 
					newTriangles[((n - 1) * 6) + 3] = (n * 2) + 1;
					newTriangles[((n - 1) * 6) + 4] = n * 2;
					newTriangles[((n - 1) * 6) + 5] = (n * 2) - 1;
				}
			}
 
			_trailMesh.Clear();
			_trailMesh.vertices = newVertices;
			_trailMesh.colors = newColors;
			_trailMesh.uv = newUV;
			_trailMesh.triangles = newTriangles;
 
		}else{
                    _trailMesh.Clear();
 
		}
	}
}


C# - SwooshTest.cs

A sample helper script to make MeleeWeaponTrail start and stop emitting automatically based on an animation being played. Attach this script to where your 3d model's animation component is. Assign which attack animation is used, specify the start and end frames, and attach the MeleeWeaponTrail that you created earlier.

using UnityEngine;
using System.Collections;
 
public class SwooshTest : MonoBehaviour
{
	[SerializeField]
	AnimationClip _animation;
	AnimationState _animationState;
 
	[SerializeField]
	int _start = 0;
 
	[SerializeField]
	int _end = 0;
 
	float _startN = 0.0f;
	float _endN = 0.0f;
 
	float _time = 0.0f;
	float _prevTime = 0.0f;
	float _prevAnimTime = 0.0f;
 
	[SerializeField]
	MeleeWeaponTrail _trail;
 
	bool _firstFrame = true;
 
	void Start()
	{
		float frames = _animation.frameRate * _animation.length;
		_startN = _start/frames;
		_endN = _end/frames;
		_animationState = animation[_animation.name];
		_trail.Emit = false;
	}
 
	void Update()
	{
		_time += _animationState.normalizedTime - _prevAnimTime;
		if (_time > 1.0f || _firstFrame)
		{
			if (!_firstFrame)
			{
				_time -= 1.0f;
			}
			_firstFrame = false;
		}
 
		if (_prevTime < _startN && _time >= _startN)
		{
			_trail.Emit = true;
		}
		else if (_prevTime < _endN && _time >= _endN)
		{
			_trail.Emit = false;
		}
 
		_prevTime = _time;
		_prevAnimTime = _animationState.normalizedTime;
	}
}


출처 : http://wiki.unity3d.com/index.php/MeleeWeaponTrail

반응형

'Unity3D > Effect' 카테고리의 다른 글

파티클 한 번만 사용하고 종료하기  (0) 2012.11.08
Scrolling UVs  (0) 2012.11.08
Posted by blueasa
, |

Visual Studio C# Integration

Unity3D / 2012. 10. 5. 05:13

Unity3D 버전 : 3.5.6f4

O/S : Win7 x64


유니티에 Visual Studio 연동해보려고 이리저리 찾아봤다.


우선 셋팅할 건 아래 한가지..


Edit-Preferences..-External Tools로 가서 External Script Editor를 Visual Studio로 바꾼다.

유니티위키의 설명으로보면 더블클릭으로 스크립트가 VS에서 열릴려면 VS를 Pro 이상 버전을 사용해야 된다.


유니티위키(http://unitykoreawiki.com/index.php?n=KrMain.VisualStudioIntegration)에서 참조해서 따라해보면 되긴한데..


- 유니티 메뉴에서 Assets->Sync VisualStudio Project를 선택합니다.


라고 적혀있는데, 현재 사용하는 버전인 3.5.6f4에서는 Sync MonoDevelop Project라고만 뜬다.


혹시나 해서 눌러보니 VisualStudio용 프로젝트가 생성된다.


셋팅 후에 메뉴가 변경 안되는 버그인지..


아무튼 넘어가자..


[Sync MonoDevelop Project] 를 실행하고 해당 폴더를 찾아가보니 아래와같이 파일들이 생성돼 있다.


실행해보니 새로 빈 프로젝트를 만들어서 해본거라 빈 솔루션만 있었다.


우선 이래 된다는거 보고 만족..



찾아보다 다른 분 글을 보니 코딩은 VS에서 하고, 디버깅(VS에서 브레이크 포인트는 안걸려서 MonoDevelop도 같이 켜서 브레이크 포인트는 MonoDevelop에서 한다고 한다.)하는걸 봐서 링크 걸어 둠.


링크 : http://kongpill.tistory.com/entry/unity-3d-visual-studio-2010

반응형

'Unity3D' 카테고리의 다른 글

유니티에서 툴 만들기  (0) 2012.10.12
[링크] 유니티 관련 사이트  (0) 2012.10.12
유니티 강좌  (0) 2012.10.03
유니티 코리아 공식 홈페이지  (0) 2012.08.21
[삽질] Unity3D 설치  (0) 2012.06.30
Posted by blueasa
, |


링크 : http://stnzone.com/gboard/blog/?id=1763


반응형
Posted by blueasa
, |

유니티 강좌

Unity3D / 2012. 10. 3. 03:42

링크 : http://www.unity3dstudy.com/

반응형

'Unity3D' 카테고리의 다른 글

유니티에서 툴 만들기  (0) 2012.10.12
[링크] 유니티 관련 사이트  (0) 2012.10.12
Visual Studio C# Integration  (0) 2012.10.05
유니티 코리아 공식 홈페이지  (0) 2012.08.21
[삽질] Unity3D 설치  (0) 2012.06.30
Posted by blueasa
, |

http://korea.unity3d.com/

반응형

'Unity3D' 카테고리의 다른 글

유니티에서 툴 만들기  (0) 2012.10.12
[링크] 유니티 관련 사이트  (0) 2012.10.12
Visual Studio C# Integration  (0) 2012.10.05
유니티 강좌  (0) 2012.10.03
[삽질] Unity3D 설치  (0) 2012.06.30
Posted by blueasa
, |

[삽질] Unity3D 설치

Unity3D / 2012. 6. 30. 23:05

전에 아이폰/안드로이드 포팅 엔진 공짜로 받은 게 있어서 이참에 깔아볼려고 유니티를 받았다.


설치를 하고 라이센스 등록을 하려는 데 '인터넷 활성화(Internet Activation)'가 아래 스샷과 같이 인증서 날짜 만료 어쩌고 하면서 진행이 되지 않았다.

(인터넷 활성화 설치 방법 설명 링크 : http://www.masque.kr/free/50300)



                          [인터넷 활성화 시도 했는데 에러남..뭘까..-_-;]


그래서 '수동 활성화(Manual Activation)'를 하려하니..


뭐시기 파일 어쩌고 하면서 잘 모르겠다..


그래서 찾아보니


http://korea.unity3d.com/board/?db=licensefaq 에 '유니티 라이센스 수동 등록하는 방법 (Manual Activation)' 이 떡하니 있다.


설명대로 진행해서 깔았다.


인터넷에 이리저리 좀 뒤져봐도 '인터넷 활성화'로만 설명이 돼 있는것 같다.


잠시 삽질해서 기록 남기기..




[설치 끝내고 첫화면 스샷..]


P.s. 인증서 날짜 만료 어쩌고는 자료를 못찾겠다. 짜증나지만 그냥 넘어가야지..

반응형

'Unity3D' 카테고리의 다른 글

유니티에서 툴 만들기  (0) 2012.10.12
[링크] 유니티 관련 사이트  (0) 2012.10.12
Visual Studio C# Integration  (0) 2012.10.05
유니티 강좌  (0) 2012.10.03
유니티 코리아 공식 홈페이지  (0) 2012.08.21
Posted by blueasa
, |