Skip to content

Instantly share code, notes, and snippets.

View tanwarrohit825's full-sized avatar
💭
I may be slow to respond😅😅.

Rohit Tanwar tanwarrohit825

💭
I may be slow to respond😅😅.
View GitHub Profile
@tanwarrohit825
tanwarrohit825 / Load Editor Utility Widget PluginButtonClicked.md
Created May 10, 2024 06:41
Function to handle the click event of a plugin button in an integrated module

Load Editor Utility Widget PluginButtonClicked

Preview:
#include "EditorUtilitySubsystem.h"
#include "EditorUtilityWidget.h"
#include "EditorUtilityWidgetBlueprint.h"


@tanwarrohit825
tanwarrohit825 / Get Full Path for Blutility Editor Source.md
Created May 6, 2024 09:50
Retrieve the full path for the Blutility Editor source files using System.IO.Path in C#.

Get Full Path for Blutility Editor Source

Preview:
System.IO.Path.GetFullPath(Target.RelativeEnginePath) + "/Source/Editor/Blutility/Private"
Associated Context
Type Code Snippet ( .bat )
Associated Tags System IO Path GetFullPath Target RelativeEnginePath Source Editor Blutility Private SDKs Frameworks Use Cases Software Development Framework: .NET Framework IO Path GetFullPath Blutility
💡 Smart Description This code snippet retrieves the full path of a specific file in Blutility editor to be used.Retrieve the full path for the Blutility Editor source files using System.IO.Path in C#.
@tanwarrohit825
tanwarrohit825 / UPROPERTY and UFUNCTION for Volume Scattering Intensity in Blueprint.md
Created May 6, 2024 09:50
Defines a float property NewIntensity with UPROPERTY and a function VolumeScatteringIntensity with UFUNCTION for Blueprint use.

UPROPERTY and UFUNCTION for Volume Scattering Intensity in Blueprint

Preview:
#pragma region test

 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Test")
 float NewIntensity;

 UFUNCTION(BlueprintCallable, Category = "Test")
 virtual void VolumeScatteringIntensity();
@tanwarrohit825
tanwarrohit825 / UCLASS with Blueprint capabilities.md
Created January 23, 2024 12:58
This code snippet defines a custom class that can be spawned as a blueprint component in Unreal Engine.

UCLASS with Blueprint capabilities

Preview:
// call actor componet reparent object
// Use Blueprintable in UClass Function

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent),Blueprintable )
Associated Context
@tanwarrohit825
tanwarrohit825 / Logging Warning for OurUndo Function.md
Created January 23, 2024 12:57
This code snippet logs a warning message to the output console, indicating that the "OurUndo" functionality is working.

Logging Warning for OurUndo Function

Preview:
// Print Log 
UE_LOG(LogTemp, Warning, TEXT("Some warning message") );


// print string
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::White, TEXT("rohtithtit"));
@tanwarrohit825
tanwarrohit825 / Find Last Index and Count in String in Unreal.md
Created January 23, 2024 12:54
This code snippet finds the last index of a specified character in a given string and counts the number of occurrences of that character. It returns the last index and updates the count through a reference parameter.

Find Last Index and Count in String in Unreal

Preview:
int32 UCppActorComponent::FindLastIndexAndCount(const FString& InString, const FString& Character, int32& OutCount)
{
    // Initialize variables
    OutCount = 0;
    int32 LastIndex = -1;

    // Iterate through the string
@tanwarrohit825
tanwarrohit825 / FakeProgressBarActor - Simulate Slow Task Progress.md
Created January 23, 2024 12:52
This code defines a class called "AFakeProgressBarActor" that simulates a slow task with a progress bar. The "SimulateSlowTask" function takes in a total amount of work and updates the progress bar until the work is completed. The

FakeProgressBarActor - Simulate Slow Task Progress

Preview:
// Fill out your copyright notice in the Description page of Project Settings.


#include "FakeProgressBarActor.h"
#include "LevelEditorViewport.h"
#include "HAL/PlatformProcess.h"
#include "Misc/SlowTask.h"