프로그래밍/유니티2017. 12. 8. 18:49

http://akaisun.tistory.com/17

'프로그래밍 > 유니티' 카테고리의 다른 글

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
Posted by JinFluenza
프로그래밍/유니티2017. 3. 21. 21:10

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
Posted by JinFluenza
프로그래밍/유니티2017. 3. 21. 00:58

IEnumerable , IEnumerator는 둘다 인터페이스다.

데이터를 순환해서 검색할 필요가 있을때 상속받아 적절히 구현해서 사용하면 된다.


근데 IEnumerable인터페이스의 GetEnumerator() 메소드가 보통 return new ???Enumerator 이런식으로 값을 반환하는데 가비지가 쌓이지 않을까 싶기도 하다.


Posted by JinFluenza
프로그래밍/유니티2017. 3. 18. 03:40

http://rapapa.net/?p=2472

Posted by JinFluenza
프로그래밍/유니티2017. 3. 18. 03:17

sendmessage , broadcastmessage

두함수는 모두 편리하다.

하지만 둘다 내부적으로는 리플렉션에 의존한다.

너무 자주 호출하면 성능상 좋지 않을 수 있다.




자세한내용 : http://rapapa.net/?p=2550



Posted by JinFluenza
프로그래밍/유니티2017. 3. 17. 20:39

해결법


  1.           Same error has today in Eclipse and now in Unity.
    Found great solution from distributor:

    1) just open https://developer.android.com/studio/index.html

    2) scrolldown to the bottom of that page

    3) find Windows "tools_r25.2.3-windows.zip"
    download and unzip it

    4) remove and replace your folder "SDK" + "/tools"

    5) Enjoy!

    6) By "SDK Manager" do upgrade to 25.2.5

    7) Now works all: Eclipse, Android Studio, Unity.
    Enjoy again! 


mac


https://dark0946.tistory.com/351

Posted by JinFluenza
프로그래밍/유니티2017. 3. 17. 17:12

https://www.youtube.com/watch?v=Q_xcVqhk-8o&list=PLReL099Y5nRfseAg0k1SJOlpqdcsDs8Em&index=5



Posted by JinFluenza
프로그래밍/유니티2017. 3. 17. 01:38

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 경로에 오류 내용을 기록.

빌드후 버그를 확인할때 사용하면 좋음


참고 


Application.logMessageReceived

Description

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.


Posted by JinFluenza
프로그래밍/유니티2017. 3. 14. 23:43

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
Posted by JinFluenza
프로그래밍/유니티2017. 1. 4. 07:29

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
Posted by JinFluenza