분류 전체보기 (59) 썸네일형 리스트형 GetTypeHash의 구현 size_t GetTypeHash() const { static size_t UniquePointer; return reinterpret_cast(&UniquePointer); } 타입마다 스태틱 변수를 선언하고 이 값의 주소값을 반환하는 방식으로 짜여져 있다. FPrimitiveSceneProxy에 순수가상함수로 선언되어있어 구현 클래스에서 이를 구현해주어야 한다. 예제 코드 #include #define DECLARE_TYPEHASH \ size_t GetTypeHash() const \ { \ static size_t UniquePointer; \ return reinterpret_cast(&UniquePointer); \ } class A { public: DECLARE_TYPEHASH }; cl.. Rider의 Delegate subtractions warning public sealed class SomeViewClass { public void BindEvent() { GetModel()?.UpdateEvent += OnModelUpdated; } public void ReleaseEvent() { GetModel()?.UpdateEvent -= OnModelUpdated; } } 위와 같이 코드를 짜면 ReleaseEvent 부분에서 Rider의 경고가 뜬다. Delegate subtraction을 주의하라는 경고인데, 이게 왜 주의해야할 대상인지 몰라 Rider 도큐먼트를 찾아보았다. 찾아본 결과 당연히 저런식으로 사용하는 것 자체는 문제가 없고, Rider에서 경고하고 싶었던 것은 delegate subtraction에서 발생할 수 있는 미묘한 문제들이었.. Observable C++ 간단한 예시 SlideShare : Observable c++ expressions using the observable library 이근원 (slideshare.net) Observable c++ expressions using the observable library 이근원 Observable C++ expressions using Observable Library - NHN NEXT 이근원 www.slideshare.net 2017년에 간단히 조사한 Observable 라이브러리에 관한 발표 자료입니다. Github : ddinu/observable: Generic observable objects and reactive expressions for C++ (github.com) ddinu/observable.. TEnableIf Reference : TEnableIf | Unreal Engine Documentation TEnableIf Includes a function in an overload set if the predicate is true. docs.unrealengine.com template class TEnableIf { } template class TEnableIf { public : typedef Result type; } Unreal 코드 내부를 보다보면 종종 마주치는 TEnableIf std::enable_if와 동일한 역할을 한다. std::enable_if - cppreference.com std::enable_if - cppreference.com template< bool B, class T = .. Unreal Engine의 저작권 언리얼 소스 코드를 계속 보고 있는데, 블로그에 추려서 올려도 되는지 궁금해서 찾아봤다. 올리면 안될 것 같다 ^^; 언리얼 엔진 관련해서는 사용 예제나 두서 없는 짤막짤막한 정리들을 쓸 생각이다. Welcome to C# 9.0 - Init-only properties & record https://devblogs.microsoft.com/dotnet/welcome-to-c-9-0/ Welcome to C# 9.0 | .NET Blog C# 9.0 is taking shape, and I’d like to share our thinking on some of the major features we’re adding to this next version of the language. With every new version of C# we strive for greater clarity and simplicity in common coding scenarios, devblogs.microsoft.com Init-only properties property에 "init" 키워드를 지정할 .. Unity - StateMachineBehaviour를 얻는법 https://docs.unity3d.com/kr/530/ScriptReference/StateMachineBehaviour.html Unity - 스크립팅 API: StateMachineBehaviour docs.unity3d.com 유니티에서 제공하는 StateMachineBehaviour는 알고 있었지만, 이를 적극적으로 사용해본적이 없었다. 애니메이션 transition시에 해당 gameObject를 destroy 해주는 정도로 밖에 사용하지 않았었는데, 이를 Layer에다 붙여놓고 animator를 사용하는 곳에서 쓸 수 있다는 걸 오늘 알았다. using System; using UnityEngine; public sealed class InvokeOnStateExit : StateMachin.. C# 9.0이 공개되었습니다. https://devblogs.microsoft.com/dotnet/welcome-to-c-9-0/ Welcome to C# 9.0 | .NET Blog C# 9.0 is taking shape, and I’d like to share our thinking on some of the major features we’re adding to this next version of the language. With every new version of C# we strive for greater clarity and simplicity in common coding scenarios, devblogs.microsoft.com 분명 C# 처음 공부할 때 6.0이었는데... 이전 1 2 3 4 5 6 7 8 다음