Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
Loading...
Searching...
No Matches
MoreMountains.Tools.MMPlatformActivation Class Reference

Add this class to a gameobject, and it'll enable/disable it based on platform context, using conditional defintions to do so. More...

Inheritance diagram for MoreMountains.Tools.MMPlatformActivation:

Public Types

enum  ExecutionTimes { Awake , Start , OnEnable }
 the possible times at which this script can run More...
enum  PlatformActions { DoNothing , Disable }

Public Attributes

ExecutionTimes ExecutionTime = ExecutionTimes.Awake
 the selected execution time
bool DebugToTheConsole = false
 whether or not this should output a debug line in the console
PlatformActions UNITY_STANDALONE_WIN = PlatformActions.DoNothing
 whether or not this gameobject should be active on Windows
PlatformActions UNITY_STANDALONE_OSX = PlatformActions.DoNothing
 whether or not this gameobject should be active on OSX
PlatformActions UNITY_STANDALONE_LINUX = PlatformActions.DoNothing
 whether or not this gameobject should be active on Linux
PlatformActions UNITY_STANDALONE = PlatformActions.DoNothing
 whether or not this gameobject should be active on standalone
PlatformActions UNITY_IOS = PlatformActions.DoNothing
 whether or not this gameobject should be active on iOS
PlatformActions UNITY_IPHONE = PlatformActions.DoNothing
 whether or not this gameobject should be active on iPhone
PlatformActions UNITY_ANDROID = PlatformActions.DoNothing
 whether or not this gameobject should be active on Android
PlatformActions UNITY_TIZEN = PlatformActions.DoNothing
 whether or not this gameobject should be active on Tizen
PlatformActions UNITY_WII = PlatformActions.DoNothing
 whether or not this gameobject should be active on Wii
PlatformActions UNITY_PS4 = PlatformActions.DoNothing
 whether or not this gameobject should be active on PS4
PlatformActions UNITY_XBOXONE = PlatformActions.DoNothing
 whether or not this gameobject should be active on XBoxOne
PlatformActions UNITY_WEBGL = PlatformActions.DoNothing
 whether or not this gameobject should be active on WebGL
PlatformActions UNITY_LUMIN = PlatformActions.DoNothing
 whether or not this gameobject should be active on Lumin
PlatformActions UNITY_TVOS = PlatformActions.DoNothing
 whether or not this gameobject should be active on TVOS
PlatformActions UNITY_WSA = PlatformActions.DoNothing
 whether or not this gameobject should be active on WSA
PlatformActions UNITY_FACEBOOK = PlatformActions.DoNothing
 whether or not this gameobject should be active on Facebook
PlatformActions UNITY_ADS = PlatformActions.DoNothing
 whether or not this gameobject should be active on Ads
PlatformActions UNITY_ANALYTICS = PlatformActions.DoNothing
 whether or not this gameobject should be active on Analytics
PlatformActions UNITY_EDITOR = PlatformActions.DoNothing
 whether or not this gameobject should be active in Editor
PlatformActions UNITY_EDITOR_WIN = PlatformActions.DoNothing
 whether or not this gameobject should be active in Editor on Windows
PlatformActions UNITY_EDITOR_OSX = PlatformActions.DoNothing
 whether or not this gameobject should be active in Editor on OSX
PlatformActions UNITY_EDITOR_LINUX = PlatformActions.DoNothing
 whether or not this gameobject should be active in Editor on Linux

Protected Member Functions

virtual void OnEnable ()
 On Enable, processes the state if needed.
virtual void Awake ()
 On Awake, processes the state if needed.
virtual void Start ()
 On Start, processes the state if needed.
virtual void Process ()
 Enables or disables the object based on current platform.
virtual void DisableIfNeeded (PlatformActions platform, string platformName)
 Disables the object if needed, and outputs a debug log if requested.

Detailed Description

Add this class to a gameobject, and it'll enable/disable it based on platform context, using conditional defintions to do so.

Member Enumeration Documentation

◆ ExecutionTimes

the possible times at which this script can run

Enumerator
Awake 
Start 
OnEnable 

◆ PlatformActions

Enumerator
DoNothing 
Disable 

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Tools.MMPlatformActivation.Awake ( )
protectedvirtual

On Awake, processes the state if needed.

◆ DisableIfNeeded()

virtual void MoreMountains.Tools.MMPlatformActivation.DisableIfNeeded ( PlatformActions platform,
string platformName )
protectedvirtual

Disables the object if needed, and outputs a debug log if requested.

Parameters
platform
platformName

◆ OnEnable()

virtual void MoreMountains.Tools.MMPlatformActivation.OnEnable ( )
protectedvirtual

On Enable, processes the state if needed.

◆ Process()

virtual void MoreMountains.Tools.MMPlatformActivation.Process ( )
protectedvirtual

Enables or disables the object based on current platform.

◆ Start()

virtual void MoreMountains.Tools.MMPlatformActivation.Start ( )
protectedvirtual

On Start, processes the state if needed.

Member Data Documentation

◆ DebugToTheConsole

bool MoreMountains.Tools.MMPlatformActivation.DebugToTheConsole = false

whether or not this should output a debug line in the console

◆ ExecutionTime

ExecutionTimes MoreMountains.Tools.MMPlatformActivation.ExecutionTime = ExecutionTimes.Awake

the selected execution time

◆ UNITY_ADS

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_ADS = PlatformActions.DoNothing

whether or not this gameobject should be active on Ads

◆ UNITY_ANALYTICS

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_ANALYTICS = PlatformActions.DoNothing

whether or not this gameobject should be active on Analytics

◆ UNITY_ANDROID

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_ANDROID = PlatformActions.DoNothing

whether or not this gameobject should be active on Android

◆ UNITY_EDITOR

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_EDITOR = PlatformActions.DoNothing

whether or not this gameobject should be active in Editor

◆ UNITY_EDITOR_LINUX

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_EDITOR_LINUX = PlatformActions.DoNothing

whether or not this gameobject should be active in Editor on Linux

◆ UNITY_EDITOR_OSX

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_EDITOR_OSX = PlatformActions.DoNothing

whether or not this gameobject should be active in Editor on OSX

◆ UNITY_EDITOR_WIN

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_EDITOR_WIN = PlatformActions.DoNothing

whether or not this gameobject should be active in Editor on Windows

◆ UNITY_FACEBOOK

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_FACEBOOK = PlatformActions.DoNothing

whether or not this gameobject should be active on Facebook

◆ UNITY_IOS

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_IOS = PlatformActions.DoNothing

whether or not this gameobject should be active on iOS

◆ UNITY_IPHONE

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_IPHONE = PlatformActions.DoNothing

whether or not this gameobject should be active on iPhone

◆ UNITY_LUMIN

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_LUMIN = PlatformActions.DoNothing

whether or not this gameobject should be active on Lumin

◆ UNITY_PS4

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_PS4 = PlatformActions.DoNothing

whether or not this gameobject should be active on PS4

◆ UNITY_STANDALONE

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_STANDALONE = PlatformActions.DoNothing

whether or not this gameobject should be active on standalone

◆ UNITY_STANDALONE_LINUX

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_STANDALONE_LINUX = PlatformActions.DoNothing

whether or not this gameobject should be active on Linux

◆ UNITY_STANDALONE_OSX

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_STANDALONE_OSX = PlatformActions.DoNothing

whether or not this gameobject should be active on OSX

◆ UNITY_STANDALONE_WIN

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_STANDALONE_WIN = PlatformActions.DoNothing

whether or not this gameobject should be active on Windows

◆ UNITY_TIZEN

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_TIZEN = PlatformActions.DoNothing

whether or not this gameobject should be active on Tizen

◆ UNITY_TVOS

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_TVOS = PlatformActions.DoNothing

whether or not this gameobject should be active on TVOS

◆ UNITY_WEBGL

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_WEBGL = PlatformActions.DoNothing

whether or not this gameobject should be active on WebGL

◆ UNITY_WII

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_WII = PlatformActions.DoNothing

whether or not this gameobject should be active on Wii

◆ UNITY_WSA

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_WSA = PlatformActions.DoNothing

whether or not this gameobject should be active on WSA

◆ UNITY_XBOXONE

PlatformActions MoreMountains.Tools.MMPlatformActivation.UNITY_XBOXONE = PlatformActions.DoNothing

whether or not this gameobject should be active on XBoxOne


The documentation for this class was generated from the following file: