Posts
Showing posts from 2022
Destructors
- Get link
- X
- Other Apps
The first thing you do is dynamically allocate memory for the class. Create a pointer—that pointer exists on the stack. By using the new keyword, we dynamically allocate memory, return the pointer address to the variable on the stack. This way, we can access the memory on the heap. Constructor Dynamically allocates memory for variables. (On the heap.) After class is used, it can be deleted. Without destructor, dynamically created variables remain on the heap.
XBox One Controllers and Windows 11
- Get link
- X
- Other Apps
Seems like Windows 11 doesn't want to play with my old XBox One controller. Windows 11 will claim the device is paired but the controller itself continues to blink, indicating that it is indeed, not paired. There's undoubtedly a solution to the problem but I didn't bother to research further when I discovered that my new X|S controller works just fine. Not only that, I can also easily switch paired devices. Check out this link for more details: Connect and troubleshoot Bluetooth on your Xbox Wireless Controller | Xbox Support And in particular: The Xbox Wireless Controller that comes with Xbox Series X|S includes a feature that allows for quickly switching between a paired Bluetooth device and an Xbox console. If the controller is connected to a Bluetooth device, double-press the Pair button and the controller will immediately switch its connection to the last Xbox console it was paired to. Then, to switch back to the paired Bluetooth device, press and hold the Pair but...
UE_LOG and format specifiers
- Get link
- X
- Other Apps
UE_LOG ( LogTemp, Warning, TEXT ( "BeginPlay() called!" ) ) ; int myInt { 42 } ; UE_LOG ( LogTemp, Warning, TEXT ( "int myInt: %d" ) , myInt ) ; float myFloat { 3.14159f } ; UE_LOG ( LogTemp, Warning, TEXT ( "float myFloat: %f" ) , myFloat ) ; double myDouble { 0.000756 } ; UE_LOG ( LogTemp, Warning, TEXT ( "double myDouble: %lf" ) , myDouble ) ; char myChar { 'J' } ; UE_LOG ( LogTemp, Warning, TEXT ( "char myChar: %c" ) , myChar ) ; wchar_t wideChar { L 'J' } ; UE_LOG ( LogTemp, Warning, TEXT ( "wchar_t wideChar: %lc" ) , wideChar ) ; bool myBool { true } ; UE_LOG ( LogTemp, Warning, TEXT ( "bool myBool: %d" ) , myBool ) ; UE_LOG ( LogTemp, Warning, TEXT ( "int: %d, float: %f, bool: %d" ) , myInt, myFloat, myBool ) ; ...