'프로그래밍 > 유니티' 카테고리의 다른 글
Unity Editor 확장 기능 (0) | 2018.04.14 |
---|---|
unity sprite outlineShader (0) | 2017.12.14 |
LINQ (0) | 2017.03.21 |
IEnumerable , IEnumerator (0) | 2017.03.21 |
드로우콜 (0) | 2017.03.18 |
Unity Editor 확장 기능 (0) | 2018.04.14 |
---|---|
unity sprite outlineShader (0) | 2017.12.14 |
LINQ (0) | 2017.03.21 |
IEnumerable , IEnumerator (0) | 2017.03.21 |
드로우콜 (0) | 2017.03.18 |
LINQ 는 데이터 세트에 쿼리를 실행하기 위한 고수준의 특화된 언어.
데이터 덩어리에서 특정 조건을 갖춘 데이터를 뽑거나 하는 등의 일에 사용하며.
성능이 비교적 좋다고 한다.
개념 : http://blog.eairship.kr/262
unity sprite outlineShader (0) | 2017.12.14 |
---|---|
안드로이드 인증서 지문 구하는법 (0) | 2017.12.08 |
IEnumerable , IEnumerator (0) | 2017.03.21 |
드로우콜 (0) | 2017.03.18 |
sendmessage , broadcastmessage 성능 (0) | 2017.03.18 |
IEnumerable , IEnumerator는 둘다 인터페이스다.
데이터를 순환해서 검색할 필요가 있을때 상속받아 적절히 구현해서 사용하면 된다.
근데 IEnumerable인터페이스의 GetEnumerator() 메소드가 보통 return new ???Enumerator 이런식으로 값을 반환하는데 가비지가 쌓이지 않을까 싶기도 하다.
안드로이드 인증서 지문 구하는법 (0) | 2017.12.08 |
---|---|
LINQ (0) | 2017.03.21 |
드로우콜 (0) | 2017.03.18 |
sendmessage , broadcastmessage 성능 (0) | 2017.03.18 |
안드로이드 sdk 경로문제 해결방법(Unable to list target platforms.Please make sure the android sdk path is correct) (0) | 2017.03.17 |
http://rapapa.net/?p=2472
LINQ (0) | 2017.03.21 |
---|---|
IEnumerable , IEnumerator (0) | 2017.03.21 |
sendmessage , broadcastmessage 성능 (0) | 2017.03.18 |
안드로이드 sdk 경로문제 해결방법(Unable to list target platforms.Please make sure the android sdk path is correct) (0) | 2017.03.17 |
유니티 비주얼스튜디오로 그래픽 디버그 하는법 (0) | 2017.03.17 |
sendmessage , broadcastmessage
두함수는 모두 편리하다.
하지만 둘다 내부적으로는 리플렉션에 의존한다.
너무 자주 호출하면 성능상 좋지 않을 수 있다.
자세한내용 : http://rapapa.net/?p=2550
IEnumerable , IEnumerator (0) | 2017.03.21 |
---|---|
드로우콜 (0) | 2017.03.18 |
안드로이드 sdk 경로문제 해결방법(Unable to list target platforms.Please make sure the android sdk path is correct) (0) | 2017.03.17 |
유니티 비주얼스튜디오로 그래픽 디버그 하는법 (0) | 2017.03.17 |
예외 로그 기록 (0) | 2017.03.17 |
해결법
mac
https://dark0946.tistory.com/351
드로우콜 (0) | 2017.03.18 |
---|---|
sendmessage , broadcastmessage 성능 (0) | 2017.03.18 |
유니티 비주얼스튜디오로 그래픽 디버그 하는법 (0) | 2017.03.17 |
예외 로그 기록 (0) | 2017.03.17 |
유니티 비주얼스튜디오 ctrl + ' 단축키 설정법 (0) | 2017.03.14 |
https://www.youtube.com/watch?v=Q_xcVqhk-8o&list=PLReL099Y5nRfseAg0k1SJOlpqdcsDs8Em&index=5
sendmessage , broadcastmessage 성능 (0) | 2017.03.18 |
---|---|
안드로이드 sdk 경로문제 해결방법(Unable to list target platforms.Please make sure the android sdk path is correct) (0) | 2017.03.17 |
예외 로그 기록 (0) | 2017.03.17 |
유니티 비주얼스튜디오 ctrl + ' 단축키 설정법 (0) | 2017.03.14 |
다이나믹 메시 (0) | 2017.01.04 |
public class ExceptionLog : MonoBehaviour
{
private System.IO.StreamWriter SW;
private string LogFileNmae = "PYJ.txt";
// Use this for initialization
void Start ()
{
SW = new System.IO.StreamWriter(Application.persistentDataPath + "/" + LogFileNmae);
}
private void OnEnable()
{
Application.logMessageReceived+=HandleLog;
}
// Update is called once per frame
void Update()
{
//예외 의도적 발생 (0으로 나눔)
if (Input.GetKeyDown(KeyCode.Return))
{
int x = 10;
int z = 0;
int k = x / z;
Destroy(this.gameObject, 1.0f);
}
}
private void OnDisable()
{
Application.logMessageReceived += null;
}
void HandleLog(string logString,string stackTrace,LogType type)
{
if (type == LogType.Exception || type == LogType.Error)
{
SW.WriteLine("Logged at : " + System.DateTime.Now.ToString()
+ " - Log Desc: " + logString
+ " - Trace: " + stackTrace
+ " - Type: " + type.ToString()
);
}
}
private void OnDestroy()
{
Debug.Log("기록완료");
SW.Close();
}
}
핵심 : HandleLog,딜리게이트를 이용해 예외가 발생했을 경우 Application.persistentDataPath 경로에 오류 내용을 기록.
빌드후 버그를 확인할때 사용하면 좋음
참고
Event that is fired if a log message is received.
This event only ever triggers on the main thread. Use it if your handler requires accessing parts of the Unity API that restricted to the main thread or if for other reasons your handler is not thread-safe.
안드로이드 sdk 경로문제 해결방법(Unable to list target platforms.Please make sure the android sdk path is correct) (0) | 2017.03.17 |
---|---|
유니티 비주얼스튜디오로 그래픽 디버그 하는법 (0) | 2017.03.17 |
유니티 비주얼스튜디오 ctrl + ' 단축키 설정법 (0) | 2017.03.14 |
다이나믹 메시 (0) | 2017.01.04 |
이벤트 활용 (0) | 2016.11.11 |
https://forum.unity3d.com/threads/getting-ctrl-to-work-within-vs.372584/
유니티 비주얼스튜디오로 그래픽 디버그 하는법 (0) | 2017.03.17 |
---|---|
예외 로그 기록 (0) | 2017.03.17 |
다이나믹 메시 (0) | 2017.01.04 |
이벤트 활용 (0) | 2016.11.11 |
유니티 기본 이벤트 함수 (0) | 2016.11.11 |
http://devoduck.tistory.com/entry/Unity-Dynamic-Mesh-%EB%A7%8C%EB%93%A4%EA%B8%B0-1
예외 로그 기록 (0) | 2017.03.17 |
---|---|
유니티 비주얼스튜디오 ctrl + ' 단축키 설정법 (0) | 2017.03.14 |
이벤트 활용 (0) | 2016.11.11 |
유니티 기본 이벤트 함수 (0) | 2016.11.11 |
Physics.OverlapSphere,Quaternion.Lerp (0) | 2016.11.10 |