Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions ExtendingTheEditor/ExtendingTheEditor.uproject
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"FileVersion": 3,
"EngineAssociation": "4.10",
"Category": "",
"Description": "",
"Modules": [
{
"Name": "ExtendingTheEditor",
"Type": "Runtime",
"LoadingPhase": "Default"
}
]
{
"FileVersion": 3,
"EngineAssociation": "4.22",
"Category": "",
"Description": "",
"Modules": [
{
"Name": "ExtendingTheEditor",
"Type": "Runtime",
"LoadingPhase": "Default"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"VersionName" : "1.0",
"CreatedBy" : "Epic Games, Inc.",
"CreatedByURL" : "http://epicgames.com",
"EngineVersion" : "4.7.0",
"Description" : "A demo of Editor Extensions",
"Category" : "Examples",
"EnabledByDefault" : true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

public class DemoEditorExtensionsEditor : ModuleRules
{
public DemoEditorExtensionsEditor(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(
public DemoEditorExtensionsEditor(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

PublicDependencyModuleNames.AddRange(
new string[] {
"Core",
"CoreUObject",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#include "DemoEditorExtensionsEditorPrivatePCH.h"
#include "BaseEditorTool.h"
#include "DemoEditorExtensionsEditorPrivatePCH.h"

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "DemoEditorExtensionsEditorPrivatePCH.h"
#include "BaseEditorToolCustomization.h"
#include "DemoEditorExtensionsEditorPrivatePCH.h"
#include "PropertyEditing.h"

#define LOCTEXT_NAMESPACE "BaseToolEditor"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "DemoEditorExtensionsEditorPrivatePCH.h"
#include "DemoCommands.h"
#include "DemoEditorExtensionsEditorPrivatePCH.h"

#define LOCTEXT_NAMESPACE "DemoTools"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "DemoEditorExtensionsEditorPrivatePCH.h"
#include "DemoStyle.h"
#include "DemoEditorExtensionsEditorPrivatePCH.h"

void FDemoStyle::Initialize()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#include "MirrorTool2.h"
#include "DemoEditorExtensionsEditorPrivatePCH.h"
#include "MirrorTool.h"
#include "ScopedTransaction.h"

#define LOCTEXT_NAMESPACE "DemoTools"

UMirrorTool::UMirrorTool()
UMirrorTool2::UMirrorTool2()
: Super(FObjectInitializer::Get())
{
MirrorPlane = FPlane(1.0, 0.0f, 0.0f, 0.0f);
}

void UMirrorTool::MirrorSelectedObjects()
void UMirrorTool2::MirrorSelectedObjects()
{
FScopedTransaction Transaction(LOCTEXT("MirrorAboutPlane", "Mirror about plane"));
for (FSelectionIterator It(GEditor->GetSelectedActorIterator()); It; ++It)
Expand All @@ -26,4 +26,4 @@ void UMirrorTool::MirrorSelectedObjects()
}
}

#undef LOCTEXT_NAMESPACE
#undef LOCTEXT_NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#pragma once

#include "BaseEditorTool.h"
#include "MirrorTool.generated.h"
#include "MirrorTool2.generated.h"

UCLASS(Blueprintable)
class UMirrorTool : public UBaseEditorTool
class UMirrorTool2 : public UBaseEditorTool
{
GENERATED_BODY()

public:
UMirrorTool();
UMirrorTool2();

public:
UPROPERTY(EditAnywhere, Category = "Settings")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

public class DemoEditorExtensionsRuntime : ModuleRules
{
public DemoEditorExtensionsRuntime(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(
public DemoEditorExtensionsRuntime(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

PublicDependencyModuleNames.AddRange(
new string[] {
"Core",
"CoreUObject",
Expand Down
17 changes: 3 additions & 14 deletions ExtendingTheEditor/Source/ExtendingTheEditor.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,10 @@

public class ExtendingTheEditorTarget : TargetRules
{
public ExtendingTheEditorTarget(TargetInfo Target)
public ExtendingTheEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
}

//
// TargetRules interface.
//

public override void SetupBinaries(
TargetInfo Target,
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
ref List<string> OutExtraModuleNames
)
{
OutExtraModuleNames.Add("ExtendingTheEditor");

ExtraModuleNames.AddRange( new string[] {"ExtendingTheEditor"} );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

public class ExtendingTheEditor : ModuleRules
{
public ExtendingTheEditor(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
public ExtendingTheEditor(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#ifndef __EXTENDINGTHEEDITOR_H__
#define __EXTENDINGTHEEDITOR_H__

#include "EngineMinimal.h"
#include "CoreMinimal.h"
#include "Engine.h"


#endif
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "ExtendingTheEditor.h"
#include "ExtendingTheEditorCharacter.h"
#include "ExtendingTheEditorProjectile.h"
#include "ExtendingTheEditor.h"
//#include "ExtendingTheEditorProjectile.h"
#include "Animation/AnimInstance.h"
#include "GameFramework/InputSettings.h"

Expand All @@ -22,14 +22,14 @@ AExtendingTheEditorCharacter::AExtendingTheEditorCharacter()

// Create a CameraComponent
FirstPersonCameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("FirstPersonCamera"));
FirstPersonCameraComponent->AttachParent = GetCapsuleComponent();
FirstPersonCameraComponent->RelativeLocation = FVector(0, 0, 64.f); // Position the camera
FirstPersonCameraComponent->AttachToComponent( GetCapsuleComponent(), FAttachmentTransformRules::KeepRelativeTransform);
FirstPersonCameraComponent->SetRelativeLocation(FVector(0, 0, 64.0)); // Position the camera
FirstPersonCameraComponent->bUsePawnControlRotation = true;

// Create a mesh component that will be used when being viewed from a '1st person' view (when controlling this pawn)
Mesh1P = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("CharacterMesh1P"));
Mesh1P->SetOnlyOwnerSee(true);
Mesh1P->AttachParent = FirstPersonCameraComponent;
Mesh1P->AttachToComponent( FirstPersonCameraComponent, FAttachmentTransformRules::KeepRelativeTransform);
Mesh1P->bCastDynamicShadow = false;
Mesh1P->CastShadow = false;

Expand All @@ -38,7 +38,7 @@ AExtendingTheEditorCharacter::AExtendingTheEditorCharacter()
FP_Gun->SetOnlyOwnerSee(true); // only the owning player will see this mesh
FP_Gun->bCastDynamicShadow = false;
FP_Gun->CastShadow = false;
FP_Gun->AttachTo(Mesh1P, TEXT("GripPoint"), EAttachLocation::SnapToTargetIncludingScale, true);
FP_Gun->AttachToComponent(Mesh1P, FAttachmentTransformRules::KeepRelativeTransform);


// Default offset from the character location for projectiles to spawn
Expand Down Expand Up @@ -80,19 +80,19 @@ void AExtendingTheEditorCharacter::SetupPlayerInputComponent(class UInputCompone
void AExtendingTheEditorCharacter::OnFire()
{
// try and fire a projectile
if (ProjectileClass != NULL)
{
const FRotator SpawnRotation = GetControlRotation();
// MuzzleOffset is in camera space, so transform it to world space before offsetting from the character location to find the final muzzle position
const FVector SpawnLocation = GetActorLocation() + SpawnRotation.RotateVector(GunOffset);

UWorld* const World = GetWorld();
if (World != NULL)
{
// spawn the projectile at the muzzle
World->SpawnActor<AExtendingTheEditorProjectile>(ProjectileClass, SpawnLocation, SpawnRotation);
}
}
// if (ProjectileClass != NULL)
// {
// const FRotator SpawnRotation = GetControlRotation();
// // MuzzleOffset is in camera space, so transform it to world space before offsetting from the character location to find the final muzzle position
// const FVector SpawnLocation = GetActorLocation() + SpawnRotation.RotateVector(GunOffset);
//
// UWorld* const World = GetWorld();
// if (World != NULL)
// {
// // spawn the projectile at the muzzle
// World->SpawnActor<AExtendingTheEditorProjectile>(ProjectileClass, SpawnLocation, SpawnRotation);
// }
// }

// try and play the sound if specified
if (FireSound != NULL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class AExtendingTheEditorCharacter : public ACharacter
FVector GunOffset;

/** Projectile class to spawn */
UPROPERTY(EditDefaultsOnly, Category=Projectile)
TSubclassOf<class AExtendingTheEditorProjectile> ProjectileClass;
// UPROPERTY(EditDefaultsOnly, Category=Projectile)
// TSubclassOf<class AExtendingTheEditorProjectile> ProjectileClass;

/** Sound to play each time we fire */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Gameplay)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "ExtendingTheEditor.h"
#include "ExtendingTheEditorGameMode.h"
#include "ExtendingTheEditor.h"
#include "ExtendingTheEditorHUD.h"
#include "ExtendingTheEditorCharacter.h"

AExtendingTheEditorGameMode::AExtendingTheEditorGameMode()
: Super()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "ExtendingTheEditor.h"
#include "ExtendingTheEditorHUD.h"
#include "ExtendingTheEditor.h"
#include "Engine/Canvas.h"
#include "TextureResource.h"
#include "CanvasItem.h"
Expand Down

This file was deleted.

This file was deleted.

17 changes: 3 additions & 14 deletions ExtendingTheEditor/Source/ExtendingTheEditorEditor.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,10 @@

public class ExtendingTheEditorEditorTarget : TargetRules
{
public ExtendingTheEditorEditorTarget(TargetInfo Target)
public ExtendingTheEditorEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
}

//
// TargetRules interface.
//

public override void SetupBinaries(
TargetInfo Target,
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
ref List<string> OutExtraModuleNames
)
{
OutExtraModuleNames.Add("ExtendingTheEditor");

ExtraModuleNames.AddRange( new string[] { "ExtendingTheEditor" } );
}
}