'분류 전체보기'에 해당되는 글 495건
- 2014.01.19 c# 기본서 추천(c# IN DEPTH)
- 2014.01.18 Animation Parameters
- 2014.01.17 MS Word 당구장 표시
- 2014.01.17 맥에서 스크린샷 캡쳐하기
- 2014.01.16 [펌] 유니티 디바이스 화면에 디버깅 콘솔 찍기
- 2014.01.16 [펌] 유니티3D Conditional Attribute 사용
- 2014.01.16 [펌] 유니티 엔진 - 텍스트 파일을 이용하여 에셋 번들 한꺼번에 생성 하기
- 2014.01.16 [펌] 유니티엔진 - 유니티 스키닝 설정.
- 2014.01.16 [펌] 유니티 안드로이드 빌링 api3 적용 팁입니다.
- 2014.01.16 [펌] 유니티 엔진 팁 - 광고 모듈 붙이기
이 책이 얼마나 좋은지에 대해서 더 떠들어봤자 입만 아플 것이고(아니, 손가락이 아프겠군요), 번역서에 서문으로 적은 내용을 일부 인용하는 것으로 이 책의 소개를 대신할까 합니다.
정말 좋은 책이라고 c# 을 하시는 분들은 많이 추천해 주시더라고요.
뭐 가장 큰 단점은 번역이라고 할정도로 책 내용은 좋다.
천천히 읽어봅시다.
자꾸 책만 사날리는게 아닌가 싶기도 하지만 c# 책은 한권도 사지 않아서 일단 질러놨습니다.
'보고싶은책' 카테고리의 다른 글
| php와 mysql 관련 사고 싶은 책 (0) | 2014.10.05 |
|---|---|
| 사고 싶은 책 (0) | 2014.08.21 |
| c# 기본서 추천(c# IN DEPTH) (0) | 2014.01.19 |
| 열혈강의 cocos2d-x (0) | 2014.01.16 |
| 안드로이드 NDK 책 (0) | 2014.01.15 |
| “Game Programming Gems 1권 – 3.3 A* 길찾기 알고리즘의 기초” (0) | 2014.01.14 |
Animation Parameters
Animation Parameters are variables that are defined within the animation system but can also be accessed and assigned values from scripts. For example, the value of a parameter can be updated by an animation curve and then accessed from a script so that, say, the pitch of a sound effect can be varied as if it were a piece of animation. Likewise, a script can set parameter values to be picked up by Mecanim. For example, a script can set a parameter to control a Blend Tree.
Default parameter values can be set up using the Parameters widget in the bottom left corner of the Animator window. They can be of four basic types:
- Vector - a point in space
- Int - an integer (whole number)
- Float - a number with a fractional part
- Bool - true or false value

Parameters can be assigned values from a script using functions in the Animator class: SetFloat, SetInt, and SetBool.
Here's an example of a script that modifies parameters based on user input
using UnityEngine;
using System.Collections;
public class AvatarCtrl : MonoBehaviour {
protected Animator animator;
public float DirectionDampTime = .25f;
void Start ()
{
animator = GetComponent<Animator>();
}
void Update ()
{
if(animator)
{
//get the current state
AnimatorStateInfo stateInfo = animator.GetCurrentAnimatorStateInfo(0);
//if we're in "Run" mode, respond to input for jump, and set the Jump parameter accordingly.
if(stateInfo.nameHash == Animator.StringToHash("Base Layer.RunBT"))
{
if(Input.GetButton("Fire1"))
animator.SetBool("Jump", true );
}
else
{
animator.SetBool("Jump", false);
}
float h = Input.GetAxis("Horizontal");
float v = Input.GetAxis("Vertical");
//set event parameters based on user input
animator.SetFloat("Speed", h*h+v*v);
animator.SetFloat("Direction", h, DirectionDampTime, Time.deltaTime);
}
}
}'잡다한것들전부 > 팁' 카테고리의 다른 글
| 레벨 단위 기획 (0) | 2014.01.21 |
|---|---|
| 유니티 스크립트 에디터ㄱ (0) | 2014.01.21 |
| Animation Parameters (0) | 2014.01.18 |
| [펌] 유니티 디바이스 화면에 디버깅 콘솔 찍기 (0) | 2014.01.16 |
| [펌] 유니티3D Conditional Attribute 사용 (0) | 2014.01.16 |
| [펌] 유니티 엔진 - 텍스트 파일을 이용하여 에셋 번들 한꺼번에 생성 하기 (0) | 2014.01.16 |
'잡다한것들전부 > 기타' 카테고리의 다른 글
| [펌]Sublime Text 유용한 기능과 단축키 (0) | 2014.01.21 |
|---|---|
| 프로토 타입 (0) | 2014.01.21 |
| MS Word 당구장 표시 (0) | 2014.01.17 |
| 맥에서 스크린샷 캡쳐하기 (0) | 2014.01.17 |
| [펌][자료구조] 연결리스트 (Linked List) - 개념과 구현 (0) | 2014.01.13 |
| [펌] A* 알고리즘 (A Star Algorithm ) (0) | 2014.01.13 |
= 스크린샷 단축키 =
화면의 그림을 파일로 저장 shift + command + 3
화면의 그림을 클립보드에 복사 control + shift + command + 3
선택한 영역의 그림을 파일로 저장 shift + command + 4
선택한 영억의 그림을 클립보드에 복사 control + shift + command + 4
'잡다한것들전부 > 기타' 카테고리의 다른 글
| 프로토 타입 (0) | 2014.01.21 |
|---|---|
| MS Word 당구장 표시 (0) | 2014.01.17 |
| 맥에서 스크린샷 캡쳐하기 (0) | 2014.01.17 |
| [펌][자료구조] 연결리스트 (Linked List) - 개념과 구현 (0) | 2014.01.13 |
| [펌] A* 알고리즘 (A Star Algorithm ) (0) | 2014.01.13 |
| 길찾기 알고리즘 소스들 (0) | 2014.01.13 |
using UnityEngine;using System;using System.Collections.Generic;/// <summary>/// A console that displays the contents of Unity's debug log./// </summary>/// <remarks>/// Developed by Matthew Miner (www.matthewminer.com)/// Permission is given to use this script however you please with absolutely no restrictions./// </remarks>public class Console : MonoBehaviour{public static readonly Version version = new Version(1, 0);struct ConsoleMessage{public readonly string message;public readonly string stackTrace;public readonly LogType type;public ConsoleMessage (string message, string stackTrace, LogType type){this.message = message;this.stackTrace = stackTrace;this.type = type;}}public KeyCode toggleKey = KeyCode.BackQuote;List<ConsoleMessage> entries = new List<ConsoleMessage>();Vector2 scrollPos;bool show;bool collapse;// Visual elements:const int margin = 20;Rect windowRect = new Rect(margin, margin, Screen.width - (2 * margin), Screen.height - (2 * margin));GUIContent clearLabel = new GUIContent("Clear", "Clear the contents of the console.");GUIContent collapseLabel = new GUIContent("Collapse", "Hide repeated messages.");void OnEnable () { Application.RegisterLogCallback(HandleLog); }void OnDisable () { Application.RegisterLogCallback(null); }void Update (){if (Input.GetKeyDown(toggleKey)) {show = !show;}}void OnGUI (){if (!show) {return;}windowRect = GUILayout.Window(123456, windowRect, ConsoleWindow, "Console");}/// <summary>/// A window displaying the logged messages./// </summary>/// <param name="windowID">The window's ID.</param>void ConsoleWindow (int windowID){scrollPos = GUILayout.BeginScrollView(scrollPos);// Go through each logged entryfor (int i = 0; i < entries.Count; i++) {ConsoleMessage entry = entries[i];// If this message is the same as the last one and the collapse feature is chosen, skip itif (collapse && i > 0 && entry.message == entries[i - 1].message) {continue;}// Change the text colour according to the log typeswitch (entry.type) {case LogType.Error:case LogType.Exception:GUI.contentColor = Color.red;break;case LogType.Warning:GUI.contentColor = Color.yellow;break;default:GUI.contentColor = Color.white;break;}GUILayout.Label(entry.message);}GUI.contentColor = Color.white;GUILayout.EndScrollView();GUILayout.BeginHorizontal();// Clear buttonif (GUILayout.Button(clearLabel)) {entries.Clear();}// Collapse togglecollapse = GUILayout.Toggle(collapse, collapseLabel, GUILayout.ExpandWidth(false));GUILayout.EndHorizontal();// Set the window to be draggable by the top title barGUI.DragWindow(new Rect(0, 0, 10000, 20));}/// <summary>/// Logged messages are sent through this callback function./// </summary>/// <param name="message">The message itself.</param>/// <param name="stackTrace">A trace of where the message came from.</param>/// <param name="type">The type of message: error/exception, warning, or assert.</param>void HandleLog (string message, string stackTrace, LogType type){ConsoleMessage entry = new ConsoleMessage(message, stackTrace, type);entries.Add(entry);}}
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 유니티 스크립트 에디터ㄱ (0) | 2014.01.21 |
|---|---|
| Animation Parameters (0) | 2014.01.18 |
| [펌] 유니티 디바이스 화면에 디버깅 콘솔 찍기 (0) | 2014.01.16 |
| [펌] 유니티3D Conditional Attribute 사용 (0) | 2014.01.16 |
| [펌] 유니티 엔진 - 텍스트 파일을 이용하여 에셋 번들 한꺼번에 생성 하기 (0) | 2014.01.16 |
| [펌] 유니티엔진 - 유니티 스키닝 설정. (0) | 2014.01.16 |
출처 : http://lab.gamecodi.com/board/zboard.php?id=GAMECODILAB_Lecture&page=1&sn1=&divpage=1&sn=on&ss=on&sc=on&keyword=%C0%AF%B4%CF%C6%BC&select_arrange=last_comment&desc=desc&no=315
·미리보기 | 소스복사·
·미리보기 | 소스복사·
|
'잡다한것들전부 > 팁' 카테고리의 다른 글
| Animation Parameters (0) | 2014.01.18 |
|---|---|
| [펌] 유니티 디바이스 화면에 디버깅 콘솔 찍기 (0) | 2014.01.16 |
| [펌] 유니티3D Conditional Attribute 사용 (0) | 2014.01.16 |
| [펌] 유니티 엔진 - 텍스트 파일을 이용하여 에셋 번들 한꺼번에 생성 하기 (0) | 2014.01.16 |
| [펌] 유니티엔진 - 유니티 스키닝 설정. (0) | 2014.01.16 |
| [펌] 유니티 안드로이드 빌링 api3 적용 팁입니다. (0) | 2014.01.16 |
출처 : http://lab.gamecodi.com/board/zboard.php?id=GAMECODILAB_Lecture&page=1&sn1=&divpage=1&sn=on&ss=on&sc=on&keyword=%C0%AF%B4%CF%C6%BC&select_arrange=last_comment&desc=desc&no=309
에셋 번들을 만들어야 하는데 파일 하나하나 찍어서 만들기가 너무 귀찮았습니다.
- [MenuItem("Assets/Generate All from file(Windows)")] // 메뉴가 들어갈 위치입니다. Assets메뉴 하위.
- static void GenerateAll()
- {
- // 빌드 타겟은 적절하게 맞춰주면 되겠죠.
- ExportAll(BuildTarget.StandaloneWindows);
- }
- static void ExportAll(BuildTarget target)
- {
- // 리스트를 읽어와서 줄 단위로 분리 해 줍니다.
- TextAsset filelist_obj = Resources.Load("patch_list", typeof(TextAsset)) as TextAsset;
- string[] filelist = filelist_obj.text.Split('\n');
- foreach (string original_path in filelist)
- {
- // *중요함! 개행 문자를 제거 해 줍니다.
- string path = original_path.Trim('\n');
- path = path.Trim('\r');
- if (path.Length <= 0)
- {
- continue;
- }
- // 확장자, 경로 다 빼고 파일 이름만 쏙 빼옵니다.
- int last_split_pos = path.LastIndexOf('/') + 1;
- int extend_length = path.Length - path.LastIndexOf('.');
- string filename = path.Substring(last_split_pos, (path.Length - last_split_pos) - extend_length);
- // 번들 파일이 생성될 경로 입니다.
- // 프로젝트 상위 폴더에 "patch/(플랫폼명)" 형태의 폴더를 미리 만들어 놓아야 합니다.
- // 예)
- // d:/project/patch/Android <- 번들 파일이 생성될 폴더
- // d:/project/gamecodi <- 프로젝트 폴더
- // d:/project/gamecodi/Assets
- string output_path = string.Format("../patch/{0}/{1}.unity3d", target.ToString(), filename);
- // 리스트에 기입된 경로에서 오브젝트를 로드합니다.
- string included_path = "Assets/" + path;
- UnityEngine.Object obj = Resources.LoadAssetAtPath(included_path, typeof(UnityEngine.Object));
- if (obj == null)
- {
- Debug.LogError("Cannot find the resource. " + included_path);
- continue;
- }
- // 생성!
- BuildPipeline.BuildAssetBundle(obj, null, output_path,
- BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets,
- target);
- Debug.Log("completed... : " + included_path);
- }
- }
'잡다한것들전부 > 팁' 카테고리의 다른 글
| [펌] 유니티 디바이스 화면에 디버깅 콘솔 찍기 (0) | 2014.01.16 |
|---|---|
| [펌] 유니티3D Conditional Attribute 사용 (0) | 2014.01.16 |
| [펌] 유니티 엔진 - 텍스트 파일을 이용하여 에셋 번들 한꺼번에 생성 하기 (0) | 2014.01.16 |
| [펌] 유니티엔진 - 유니티 스키닝 설정. (0) | 2014.01.16 |
| [펌] 유니티 안드로이드 빌링 api3 적용 팁입니다. (0) | 2014.01.16 |
| [펌] 유니티 엔진 팁 - 광고 모듈 붙이기 (0) | 2014.01.16 |
출처 : http://lab.gamecodi.com/board/zboard.php?id=GAMECODILAB_Lecture&page=1&sn1=&divpage=1&sn=on&ss=on&sc=on&keyword=%C0%AF%B4%CF%C6%BC&select_arrange=last_comment&desc=desc&no=311
안녕하세요.
'잡다한것들전부 > 팁' 카테고리의 다른 글
| [펌] 유니티3D Conditional Attribute 사용 (0) | 2014.01.16 |
|---|---|
| [펌] 유니티 엔진 - 텍스트 파일을 이용하여 에셋 번들 한꺼번에 생성 하기 (0) | 2014.01.16 |
| [펌] 유니티엔진 - 유니티 스키닝 설정. (0) | 2014.01.16 |
| [펌] 유니티 안드로이드 빌링 api3 적용 팁입니다. (0) | 2014.01.16 |
| [펌] 유니티 엔진 팁 - 광고 모듈 붙이기 (0) | 2014.01.16 |
| [펌] 유니티 엔진 - 오브젝트 풀 시스템 (0) | 2014.01.16 |
출처 : http://lab.gamecodi.com/board/zboard.php?id=GAMECODILAB_Lecture&page=1&sn1=&divpage=1&sn=on&ss=on&sc=on&keyword=%C0%AF%B4%CF%C6%BC&select_arrange=last_comment&desc=desc&no=291
안녕하세요.
'잡다한것들전부 > 팁' 카테고리의 다른 글
| [펌] 유니티 엔진 - 텍스트 파일을 이용하여 에셋 번들 한꺼번에 생성 하기 (0) | 2014.01.16 |
|---|---|
| [펌] 유니티엔진 - 유니티 스키닝 설정. (0) | 2014.01.16 |
| [펌] 유니티 안드로이드 빌링 api3 적용 팁입니다. (0) | 2014.01.16 |
| [펌] 유니티 엔진 팁 - 광고 모듈 붙이기 (0) | 2014.01.16 |
| [펌] 유니티 엔진 - 오브젝트 풀 시스템 (0) | 2014.01.16 |
| [펌] 유니티 엔진 팁 - 로딩시간 최적화에 대해서 (0) | 2014.01.16 |
[유니티 엔진 팁 - 광고 모듈 붙이기] 외부 광고모듈 적용. - IOS : 해외버전은 apple의 iAD / 국내버전은 MezzoMedia라는 광고업체의 모듈을 사용하였습니다. iAD는 자료찾기가 비교적 쉬웠고요, 국내업체의 광고모듈은 유니티엔진을 따로 지원하지는 않더군요. - 삽질한부분... xcode <-> 유니티 연동을 처음 하는거라 생각처럼 쉽게는 안되었음. 초기 프로젝트 설정할때는 수십개의 링크에러가 발생하여 멘붕상태가 되었는데요, 어떤 경우에는 xcode를 재시작하니 빌드오류가 싹 사라지는 경우도 있더군요. 그리고 유니티에서 빌드를 할때 xcode프로젝트가 다시 생성되면서 기존 파일들을 싹 지워버리는 경우도 있었습니다. - 광고모듈이 계속 무한루프를 도는 현상. 처음에 광고를 딱 붙이고 올려보니 viewDidLoad함수가 끊임없이 호출되는 문제 발생했습니다. 구글링으로 해결방법을 찾아내어 loadView라는 빈 함수를 제거해주는것으로 해결했습니다. - 불편했던점 xcode와 유니티를 전환해 가며 코딩해야하는 불편함이 있었습니다. 생소한 개발환경(visual studio처럼 익숙하지 않아서 빌드설정값 하나 찾는데도 애먹음). 개발/배포 인증서, 프로파일, 프로비저닝등 개념정립이 안되어서 재발급 받고 세팅하는것만 5~6번 반복하였음. 빌드 결과물인 .app파일이 순수 xcode native로 작업했을때 생기는 경로와 다른것도 걸림돌이었네요. 게다가 mac os업그레이드를 하고 나면 "라이브러리"폴더가 숨김설정 되어있기 때문에 이것을 풀어줘야 아웃풋 파일을 확인할 수 있습니다. (실제 경로는 "라이브러리\Developer\..." 어딘가에 있음) 이런 사소한것 하나도 구글링해야 했기 때문에 시간도 지체되고 몸도 지쳐갔음.ㅠ_ㅠ - Android : T-store의 T-ad를 사용하였음. 유니티용 모듈이 올라와 있지만 꼭 이걸 써야만 하는것은 아닙니다. 그냥 eclipse에 라이브러리 링크시켜 놓고 유니티와 연동하면 가능하거든요. - 불편했던점 유니티에서 스크립트 작업만으로는 불가능하기 때문에 유니티activity소스를 긁어다가 eclipse에 붙여넣는등 번거로운 작업을 해야만 했습니다. 정보들이 인터넷 여기저기에 흩어져 있기 때문에 괜한 삽질을 한 적이 많았네요. - 팁 adb logcat을 활용하여 디버깅 하면 도움이 많이 됩니다. (폰 환경에서 돌렸을때 logcat이라는 프로그램을 통해서 PC화면에서 로그를 볼 수 있음) activity가 따운되는 현상 및 클래스를 찾지 못하는 문제들이 자주 발생하였는데 대부분 라이브러리가 실행파일에 포함(?)되지 않아서 그런것입니다. (포함이라는 용어가 맞는지는 모르겠지만 개념상 비슷하다고 했을때). eclipse 빌드 설정에서 해당 라이브러리들을 아웃풋 파일에 넣어주는 옵션이 있습니다. 광고업체에서 보여줄 광고가 없을때는 아무것도 나오지 않기 때문에 광고출력 위치에 땜빵할 UI를 넣어놓는것이 좋습니다. apple은 이것때문에 리젝걸기도 하더군요. |
'잡다한것들전부 > 팁' 카테고리의 다른 글
| [펌] 유니티엔진 - 유니티 스키닝 설정. (0) | 2014.01.16 |
|---|---|
| [펌] 유니티 안드로이드 빌링 api3 적용 팁입니다. (0) | 2014.01.16 |
| [펌] 유니티 엔진 팁 - 광고 모듈 붙이기 (0) | 2014.01.16 |
| [펌] 유니티 엔진 - 오브젝트 풀 시스템 (0) | 2014.01.16 |
| [펌] 유니티 엔진 팁 - 로딩시간 최적화에 대해서 (0) | 2014.01.16 |
| [펌] 유니티 엔진 팁 - 비동기 로딩 흉내내기 (0) | 2014.01.16 |


