Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cave Overlay Plugin
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
LuFG VR VIS
VR-Group
Unreal-Development
Plugins
Cave Overlay Plugin
Merge requests
!12
Feature/dynamic spawning of overlay
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Feature/dynamic spawning of overlay
feature/dynamic_spawning_of_overlay
into
develop
Overview
2
Commits
6
Pipelines
0
Changes
5
Merged
Jan Delember
requested to merge
feature/dynamic_spawning_of_overlay
into
develop
5 years ago
Overview
2
Commits
6
Pipelines
0
Changes
5
Eliminates the necessity of placing the overlay in the scene.
Decouples the overlay from the Map.
Adds an option to disable/enable the overlay on specific maps in project options.
Fixes some bugs introduced by head/hand attachment method
Needs testing in shipping builds.
Edited
5 years ago
by
Jan Delember
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
b63fcbf0
6 commits,
5 years ago
5 files
+
65
−
12
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Source/CAVEOverlay/Private/CAVEOverlay.cpp
+
27
−
1
View file @ b63fcbf0
Edit in single-file editor
Open in Web IDE
Show full file
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include
"CAVEOverlay.h"
#include
"CAVEOverlaySettings.h"
#include
"CAVEOverlayController.h"
#include
"Kismet/GameplayStatics.h"
#define LOCTEXT_NAMESPACE "FCAVEOverlayModule"
void
FCAVEOverlayModule
::
StartupModule
()
{
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
On_Post_World_Initialization_Delegate
.
BindRaw
(
this
,
&
FCAVEOverlayModule
::
OnSessionStart
);
FWorldDelegates
::
OnPostWorldInitialization
.
Add
(
On_Post_World_Initialization_Delegate
);
}
void
FCAVEOverlayModule
::
OnSessionStart
(
UWorld
*
World
,
const
UWorld
::
InitializationValues
)
{
if
(
!
World
->
IsGameWorld
())
return
;
const
UCAVEOverlaySettings
*
Settings
=
GetDefault
<
UCAVEOverlaySettings
>
();
//Test if already in
TArray
<
AActor
*>
Actors
;
UGameplayStatics
::
GetAllActorsOfClass
(
World
,
ACAVEOverlayController
::
StaticClass
(),
Actors
);
if
((
Settings
->
DefaultActivationType
==
DefaultActivationType_ON
!=
Settings
->
excludedMaps
.
ContainsByPredicate
(
[
World
](
const
FSoftObjectPath
&
Map
)
{
return
Map
.
GetAssetName
()
==
World
->
GetName
();}
))
&&
Actors
.
Num
()
==
0
){
World
->
SpawnActor
(
ACAVEOverlayController
::
StaticClass
());
}
}
void
FCAVEOverlayModule
::
ShutdownModule
()
{
// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
@@ -17,4 +43,4 @@ void FCAVEOverlayModule::ShutdownModule()
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE
(
FCAVEOverlayModule
,
CAVEOverlay
)
\ No newline at end of file
IMPLEMENT_MODULE
(
FCAVEOverlayModule
,
CAVEOverlay
)
Loading