Class PackageSourceDetector
Detects an install from a store or channel that is not on the allow list, on Android, iOS, and desktop.
Implements
Inherited Members
Namespace: GUPS.AntiCheat.Detector.InstallSource
Assembly: cs.temp.dll.dll
Syntax
public class PackageSourceDetector : ADetector<IPackageSourceDetectionStatus>
Remarks
Subscribes on awake to whichever of
Android and iOS compare the operating-system installer with the allow list on that platform's settings tab.
A monitor that cannot read the installer is reported, with a higher false-positive chance. Desktop compares the
local store markers (Steam, Epic, GOG on Windows, macOS, and Linux; Microsoft Store on Windows only) with the
desktop allow list. A desktop read that throws is not reported.
Allow-all is the default on every platform, so nothing is reported until that platform's list is turned on.
In the editor and in development builds the check runs only when that platform's Verify development builds
switch is on. The desktop monitor still does not classify inside the editor.
Fields
OnCheatingDetectionEvent
Unity event raised on every detection. Useful to wire up reactions through the inspector without writing an
Declaration
public CheatingDetectionEvent<PackageSourceDetectionStatus> OnCheatingDetectionEvent
Field Value
| Type | Description |
|---|---|
| CheatingDetectionEvent<PackageSourceDetectionStatus> |
Properties
IsSupported
Gets a value indicating whether the detector is supported on the current platform.
Declaration
public override bool IsSupported { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
Name
Gets the human-readable name of the detector.
Declaration
public override String Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
Overrides
PossibleCheatingDetected
Gets a value indicating whether the detector has observed possible cheating activity.
Declaration
public override bool PossibleCheatingDetected { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
ThreatRating
Gets the threat rating reported with every detection. Higher values denote greater perceived threats.
Declaration
public override uint ThreatRating { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
Overrides
Methods
Awake()
Subscribes to the install-source monitors on the same
Declaration
protected override void Awake()
Overrides
OnCompleted()
Called when an observed subject signals completion.
Declaration
public override void OnCompleted()
Overrides
OnDestroy()
Unsubscribes from the install-source monitors, so a destroyed detector receives no more notifications.
Declaration
protected virtual void OnDestroy()
OnError(Exception)
Called when an observed subject reports an error.
Declaration
public override void OnError(Exception _Error)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | _Error | The error reported by the observed subject. |
Overrides
OnNext(IWatchedSubject)
Receives an install-source status from one of the three monitors and validates it against that platform's allow list.
Declaration
public override void OnNext(IWatchedSubject _Subject)
Parameters
| Type | Name | Description |
|---|---|---|
| IWatchedSubject | _Subject | The status published by the source monitor. |