This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// replace the content of the function with the one below: | |
[...] | |
bool CDasherMouseInput::GetScreenCoords(screenint &iX, screenint &iY, CDasherView *pView) | |
{ | |
POINT mousepos; | |
GetCursorPos(&mousepos); | |
ScreenToClient(m_hwnd, &mousepos); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) | |
{ Write-Host "No Adminrights. restart as Administrator" | |
$arguments = "& ‚" + $myinvocation.mycommand.definition + "‚" | |
Start-Process powershell -Verb runAs -ArgumentList $arguments | |
Break | |
} | |
$oldValue = (bcdedit | Select-String -Pattern "hypervisorlaunchtype").toString().split() | select -Last 1 | |
If ( $oldValue -eq "Off") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T> | |
bool LoadAsset(const FString& Path, T* & Result) | |
{ | |
ConstructorHelpers::FObjectFinder<T> Loader(*Path); | |
Result = Loader.Object; | |
if (!Loader.Succeeded()) UE_LOG(LogTemp, Error, TEXT("Could not find %s. Have you renamed it?"), *Path); | |
return Loader.Succeeded(); | |
} | |
AMyClass::AMyClass() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "CoreMinimal.h" | |
#include "Blueprint/UserWidget.h" | |
#include "TextBlock.h" | |
#include "Border.h" | |
#include "MySpecificUserWidget.generated.h" | |
/** | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Declare this in Header | |
TSubclassOf<class UUserWidget> Overlay_Class; | |
UUserWidget* Overlay; | |
// Do this in Constructor | |
ConstructorHelpers::FClassFinder<UUserWidget> WidgetClassFinder(TEXT("WidgetBlueprint'/MyPlugin/MyWidgetName'")); | |
if (WidgetClassFinder.Succeeded()) | |
{ | |
Overlay_Class = WidgetClassFinder.Class; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Open Configs/DefaultEngine.ini of your project and under [/Script/Engine.Engine] section add the below line: | |
+ActiveClassRedirects=(OldClassName="/Script/MyOldClassName",NewClassName="/Script/MyNewClassName") | |
# This can look like this in a plugin: | |
+ActiveClassRedirects=(OldClassName="/Script/MyPlugin.MyClass",NewClassName="/Script/MyPlugin.MyClass2") | |
# If you are not sure how the reference looks like, you can right click your C++ class in the editor and copy the reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Declare inside your Unreal Class | |
DECLARE_DELEGATE_OneParam(FMyActionDelegate, float); | |
//Do in function like BeginPlay or the StartupModule function of your Plugin | |
UInputSettings::GetInputSettings()->AddActionMapping(FInputActionKeyMapping(TEXT("MyTestAction"),EKeys::T)); | |
UInputSettings::GetInputSettings()->SaveKeyMappings(); | |
InputComponent->BindAction<FMyActionDelegate>(TEXT("MyTestAction"),EInputEvent::IE_Pressed,this,&MyClass::MyFunctionHandler,-0.1337f); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// All members of the GBuffer can be found here: | |
// https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Shaders/Private/DeferredShadingCommon.ush#L301 | |
#if SCENE_TEXTURES_DISABLED | |
return 0; | |
#endif | |
return GetScreenSpaceData(GetSceneTextureUV(Parameters), false).GBuffer.CustomStencil.x == 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = ""; Array.from(document.getElementsByClassName("tweet-text")).forEach(function(t) {if(t.getAttribute("lang") == "en") a += t.innerText.replace(/\n|\s\s+/g, " ").trim() + "\n"}); var input = document.createElement("textarea"); document.querySelectorAll('.AppContent-main, .AppContent')[0].prepend(input); input.value = a; |