Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Virtual Acoustics 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
Show more breadcrumbs
LuFG VR VIS
VR-Group
Unreal-Development
Plugins
Virtual Acoustics Plugin
Commits
782de501
Commit
782de501
authored
Mar 25, 2021
by
Philipp Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
If a new source component is created, now the signal source is also created accordingly
parent
f1f9c8af
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/VAPlugin/Private/VASourceComponent.cpp
+7
-2
7 additions, 2 deletions
Source/VAPlugin/Private/VASourceComponent.cpp
Source/VAPlugin/Public/VASourceComponent.h
+5
-2
5 additions, 2 deletions
Source/VAPlugin/Public/VASourceComponent.h
with
12 additions
and
4 deletions
Source/VAPlugin/Private/VASourceComponent.cpp
+
7
−
2
View file @
782de501
...
@@ -29,6 +29,11 @@ UVASourceComponent::UVASourceComponent()
...
@@ -29,6 +29,11 @@ UVASourceComponent::UVASourceComponent()
}
}
}
}
void
UVASourceComponent
::
OnComponentCreated
()
{
ForceUpdateSignalSourceType
(
SignalSourceType
);
}
// Called when the game starts
// Called when the game starts
void
UVASourceComponent
::
BeginPlay
()
void
UVASourceComponent
::
BeginPlay
()
{
{
...
@@ -183,7 +188,7 @@ void UVASourceComponent::Initialize()
...
@@ -183,7 +188,7 @@ void UVASourceComponent::Initialize()
bInitialized
=
true
;
bInitialized
=
true
;
}
}
bool
UVASourceComponent
::
UpdateSignalSourceType
(
TSubclassOf
<
UVAAbstractSignalSource
>
SignalSourceTypeN
)
bool
UVASourceComponent
::
Force
UpdateSignalSourceType
(
TSubclassOf
<
UVAAbstractSignalSource
>
SignalSourceTypeN
)
{
{
SignalSourceType
=
nullptr
;
SignalSourceType
=
nullptr
;
return
SetSignalSourceType
(
SignalSourceTypeN
);
return
SetSignalSourceType
(
SignalSourceTypeN
);
...
@@ -671,7 +676,7 @@ void UVASourceComponent::PostEditChangeProperty(FPropertyChangedEvent& PropertyC
...
@@ -671,7 +676,7 @@ void UVASourceComponent::PostEditChangeProperty(FPropertyChangedEvent& PropertyC
if
(
PropertyChangedEvent
.
GetPropertyName
()
!=
GET_MEMBER_NAME_CHECKED
(
UVASourceComponent
,
SignalSourceType
))
if
(
PropertyChangedEvent
.
GetPropertyName
()
!=
GET_MEMBER_NAME_CHECKED
(
UVASourceComponent
,
SignalSourceType
))
return
;
return
;
UpdateSignalSourceType
(
SignalSourceType
);
Force
UpdateSignalSourceType
(
SignalSourceType
);
Super
::
PostEditChangeProperty
(
PropertyChangedEvent
);
Super
::
PostEditChangeProperty
(
PropertyChangedEvent
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Source/VAPlugin/Public/VASourceComponent.h
+
5
−
2
View file @
782de501
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include
"VAEnums.h"
// EDir, EPlayAction, EMovement
#include
"VAEnums.h"
// EDir, EPlayAction, EMovement
#include
"SignalSources/VAAbstractSignalSource.h"
#include
"SignalSources/VAAbstractSignalSource.h"
#include
"SignalSources/VAAudiofileSignalSource.h"
#include
"GameFramework/Actor.h"
#include
"GameFramework/Actor.h"
#include
"SharedPointer.h"
#include
"SharedPointer.h"
...
@@ -39,7 +40,7 @@ protected:
...
@@ -39,7 +40,7 @@ protected:
// Select the class of the signal source
// Select the class of the signal source
UPROPERTY
(
EditAnywhere
,
BlueprintReadOnly
,
meta
=
(
DisplayName
=
"Signal Type"
,
Category
=
"Signal Source"
,
AllowAbstract
=
"false"
))
UPROPERTY
(
EditAnywhere
,
BlueprintReadOnly
,
meta
=
(
DisplayName
=
"Signal Type"
,
Category
=
"Signal Source"
,
AllowAbstract
=
"false"
))
TSubclassOf
<
UVAAbstractSignalSource
>
SignalSourceType
=
nullptr
;
TSubclassOf
<
UVAAbstractSignalSource
>
SignalSourceType
=
UVAAudiofileSignalSource
::
StaticClass
()
;
// Select the type of the signal source
// Select the type of the signal source
UPROPERTY
(
EditAnywhere
,
Instanced
,
meta
=
(
DisplayName
=
"Signal Source"
,
Category
=
"Signal Source"
,
AllowAbstract
=
"false"
))
UPROPERTY
(
EditAnywhere
,
Instanced
,
meta
=
(
DisplayName
=
"Signal Source"
,
Category
=
"Signal Source"
,
AllowAbstract
=
"false"
))
...
@@ -103,6 +104,8 @@ public:
...
@@ -103,6 +104,8 @@ public:
// Sets default values for this component's properties
// Sets default values for this component's properties
UVASourceComponent
();
UVASourceComponent
();
void
OnComponentCreated
()
override
;
// Called every frame
// Called every frame
void
TickComponent
(
float
DeltaTime
,
ELevelTick
TickType
,
FActorComponentTickFunction
*
ThisTickFunction
)
override
;
void
TickComponent
(
float
DeltaTime
,
ELevelTick
TickType
,
FActorComponentTickFunction
*
ThisTickFunction
)
override
;
...
@@ -252,7 +255,7 @@ protected:
...
@@ -252,7 +255,7 @@ protected:
// initialize Sound Source with the settings set //
// initialize Sound Source with the settings set //
void
Initialize
();
void
Initialize
();
bool
UpdateSignalSourceType
(
TSubclassOf
<
UVAAbstractSignalSource
>
SignalSourceTypeN
);
bool
Force
UpdateSignalSourceType
(
TSubclassOf
<
UVAAbstractSignalSource
>
SignalSourceTypeN
);
AVAReceiverActor
*
CurrentReceiverActor
;
AVAReceiverActor
*
CurrentReceiverActor
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment