添加插件基础结构

This commit is contained in:
顾宏 2026-02-25 18:11:37 +08:00
parent f62f97ba4c
commit 872ab77972
11 changed files with 171 additions and 15 deletions

View File

@ -17,6 +17,10 @@
"TargetAllowList": [
"Editor"
]
}
},
{
"Name": "CameraCapture",
"Enabled": true
}
]
}

54
Plugins/CameraCapture/.gitignore vendored Normal file
View File

@ -0,0 +1,54 @@
# Ignore all files by default, but scan all directories.
*
!*/
# Do not ignore git files in the root of the repo.
!/.git*
# Do not ignore current project's `.uproject`.
!/*.uproject
# Do not ignore source, config and plugins dirs.
!/Source/**
!/Config/**
!/Plugins/**
# Only allow .uasset and .umap files from /Content dir.
# They're tracked by git-lfs, don't forget to track other
# files if adding them here.
!/Content/**/*.uasset
!/Content/**/*.umap
# Allow any files from /RawContent dir.
# Any file in /RawContent dir will be managed by git lfs.
!/RawContent/**/*
# OS/platform generated files.
# Windows
ehthumbs.db
Thumbs.db
# Mac OS X
.DS_Store
.DS_Store?
.AppleDouble
.LSOverride
._*
# Linux
*~
.directory
# vim
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
# Visual Studio
.vs
Intermediate
Saved
Binaries

View File

@ -0,0 +1,8 @@
[FilterPlugin]
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
;
; Examples:
; /README.txt
; /Extras/...
; /Binaries/ThirdParty/*.dll

View File

@ -0,0 +1,58 @@
// Copyright 2026 (c) Jupiter. All Rights Reserved.
using UnrealBuildTool;
using System;
using System.IO;
public class CameraCapture : ModuleRules
{
public CameraCapture(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
if (Target.Configuration != UnrealTargetConfiguration.Shipping)
{
OptimizeCode = CodeOptimization.Never;
}
PublicIncludePaths.AddRange(
new string[] {
// ... add public include paths required here ...
ModuleDirectory,
}
);
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine"
// ... add other public dependencies that you statically link with here ...
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"UMG",
"RenderCore",
"RHI",
"ImageWrapper"
// ... add private dependencies that you statically link with here ...
}
);
DynamicallyLoadedModuleNames.AddRange(
new string[]
{
// ... add any modules that your module loads dynamically here ...
}
);
}
}

View File

@ -0,0 +1,19 @@
// Copyright 2026 (c) Jupiter. All Rights Reserved.
#include "CameraCaptureModule.h"
#define LOCTEXT_NAMESPACE "FCameraCaptureModule"
DEFINE_LOG_CATEGORY(LogCameraCapture)
void FCameraCaptureModule::StartupModule()
{
}
void FCameraCaptureModule::ShutdownModule()
{
}
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE(FCameraCaptureModule, CameraCapture)

View File

@ -0,0 +1,17 @@
// Copyright 2026 (c) Jupiter. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
DECLARE_LOG_CATEGORY_EXTERN(LogCameraCapture, All, All);
class CAMERACAPTURE_API FCameraCaptureModule : public IModuleInterface
{
public:
/** IModuleInterface implementation */
virtual void StartupModule() override;
virtual void ShutdownModule() override;
};

View File

@ -1,4 +1,4 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright 2026 (c) Jupiter. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;

View File

@ -1,4 +1,4 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright 2026 (c) Jupiter. All Rights Reserved.
using UnrealBuildTool;
@ -10,14 +10,10 @@ public class CameraCaptureDemo : ModuleRules
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput" });
PrivateDependencyModuleNames.AddRange(new string[] { });
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
PrivateDependencyModuleNames.AddRange(new string[]
{
"CameraCapture"
});
}
}

View File

@ -1,4 +1,4 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright 2026 (c) Jupiter. All Rights Reserved.
#include "CameraCaptureDemo.h"
#include "Modules/ModuleManager.h"

View File

@ -1,4 +1,4 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright 2026 (c) Jupiter. All Rights Reserved.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright 2026 (c) Jupiter. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;