Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FutureTech Shared
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MOVES
FutureTech Shared
Merge requests
!3
Merge Request for Issue/3 Added game event loggers for the four types of basic value game events.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Merge Request for Issue/3 Added game event loggers for the four types of basic value game events.
issue/3-event-loggers
into
master
Overview
0
Commits
1
Pipelines
0
Changes
9
Merged
Heine, Eric R
requested to merge
issue/3-event-loggers
into
master
5 years ago
Overview
0
Commits
1
Pipelines
0
Changes
9
Expand
Closes
#3 (closed)
Boolean, Float, Int, and String Game Events have matching loggers now
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
951ec3cc
1 commit,
5 years ago
9 files
+
145
−
1
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
9
Search (e.g. *.vue) (Ctrl+P)
Event Logger/Scriptable Variables/BooleanGameEventLogger.cs
0 → 100644
+
22
−
0
Options
using
UnityEngine
;
using
Shared.ScriptableVariables
;
namespace
Shared.EventLog
{
// Logs a boolean game event when it is raised
// Depends on ScriptableVariable package
public
class
BooleanGameEventLogger
:
BooleanGameEventListener
{
[
Tooltip
(
"The event log to add the event trigger log to"
)]
public
EventLog
eventLog
;
[
Tooltip
(
"The custom key to use in the event log (if not set, the key will be the event name itself)"
)]
public
string
customKey
;
[
Tooltip
(
"The custom format of the event value output (if not set, the value will be the ToString() of the value)"
)]
public
string
customValueFormat
;
//---------------------------------------------------------------------------
// Overridden event listening function to add the event to the event log
public
override
void
OnEventRaised
(
bool
value
)
{
eventLog
.
Add
(
string
.
IsNullOrEmpty
(
customKey
)
?
$"
{
eventToListenTo
.
name
}
Triggered"
:
customKey
,
!
string
.
IsNullOrEmpty
(
customValueFormat
)
?
string
.
Format
(
customValueFormat
,
value
)
:
value
.
ToString
());
base
.
OnEventRaised
(
value
);
}
}
}
Loading