DevelopmentConsole

Namespace: WellFired.Command.Unity.Runtime

Description

Console is a MonoBehaviour that opens an in game .:ref:Command<namespacewellfired_command>, this console can call any Property / Method that is marked up with the ConsoleCommandAttribute.

Properties

int InputBlockerSortingOrder { get; set; }
string ShowDotCommandButtonMessage { get; set; }
DevelopmentConsole Instance { get; set; }
bool IsMaximized { get; set; }
bool DrawShowDotCommandButton { get; set; }
bool ForceMinimize { get; set; }
DisplayCorner DisplayCorner { get; set; }
bool JustMadeVisible { get; set; }
bool EmailLogSupportEnabled { get; set; }
bool IsVisible { get; set; }
ISkinData SkinData { get; set; }
bool AutoScroll { get; set; }

Public Properties

Action< bool > VisibleStateChange
bool ShouldAcceptGameInput
IEnumerable< string > RecentCommands

public-static-attrib

float ScreenWidth

Public Methods

void AddCustomFilters ( Type customFilterProvider )
void DisableAutoOpen ( )
void EnableAutoOpen ( bool openOnException = true, bool openOnError = false )
void HideAllOpenPopups ( )
void ClearTypedInput ( )
void SetCommandInputTextAsIfUserHadTyped ( string text )
string CheckInputForTilde ( string input )
void InspectLogEntry ( LogEntry logEntry )
void Clear ( )

Public Static Methods

void Load ( bool clearConsoleCommandEnabled = true, bool deviceIdCommandEnabled = true, bool inspectCommandEnabled = true, bool emailLogSupportEnabled = true, bool autoScrollEnabled = true, Type customFilterType = null )

Breakdown

  • DisplayCorner DisplayCorner { get; set; }

    Description

    Set this if you would like to change corner of the screen the ‘open .:ref:Command<namespacewellfired_command>’ button is located.

  • int InputBlockerSortingOrder { get; set; }

    Description

    Since .:ref:Command<namespacewellfired_command> is based on Unity legacy GUI, we use the new UI system to block input behind the console. This property allows to set the sorting order of the canvas used to block input. It is by default in front of everyting.

  • DevelopmentConsole Instance { get; set; }

    Description

    Gets or sets the singleton instance of .:ref:Command<namespacewellfired_command>.

  • bool IsMaximized { get; set; }

    Description

    Is the console maximised

  • bool DrawShowDotCommandButton { get; set; }

    Description

    Should we draw the ‘open .:ref:Command<namespacewellfired_command>’ button or not.

  • bool ForceMinimize { get; set; }

    Description

    Has the user clicked on the Force Hide button. If so, they can re-open the console with the ~ key or by setting this value to false.

  • string ShowDotCommandButtonMessage { get; set; }

    Description

    Set this if you would like to change the message displayed on the ‘open .:ref:Command<namespacewellfired_command>’ button.

  • bool JustMadeVisible { get; set; }
  • bool EmailLogSupportEnabled { get; set; }
  • bool IsVisible { get; set; }
  • bool AutoScroll { get; set; }

    Description

    Scroll to last entry and auto scroll.

  • Action< bool > VisibleStateChange

    Description

    This Action will be triggered when the visible state of .:ref:Command<namespacewellfired_command> changes. If it’s called with true, it means .:ref:Command<namespacewellfired_command> became visible, if it’s called with false, it means .:ref:Command<namespacewellfired_command> was hidden

  • bool ShouldAcceptGameInput

    Description

    You can query this in your game, to see if the game should accept Input. This will return false if the console is showing for any reason.

  • IEnumerable< string > RecentCommands
  • float ScreenWidth
  • void AddCustomFilters ( Type customFilterProvider )

    Description

    This method allows you to add more filters to the consol at runtime, .:ref:Command<namespacewellfired_command> calls this internally when you pass filters to load, but you can additionally call this if you need to append more. (I.E.) you load modules at runtime and can’t be sure of which enums will be needed at load time.

    Parameters

    customFilterProvider This type should be an enum, which holds the types you’d like to use when filtering.
  • void DisableAutoOpen ( )

    Description

    This method will stop .:ref:Command<namespacewellfired_command> from auto opening if an error is fired, you can still open it manually.

  • void EnableAutoOpen ( bool openOnException = true, bool openOnError = false )

    Description

    This method will make sure .:ref:Command<namespacewellfired_command> auto opens if an error is fired.

    Parameters

    openOnException Should .:ref:Command<namespacewellfired_command> auto open on exception
    openOnError Should .:ref:Command<namespacewellfired_command> auto open on error
  • void HideAllOpenPopups ( )

    Description

    This method will hide all open popups.

  • void ClearTypedInput ( )
  • void SetCommandInputTextAsIfUserHadTyped ( string text )

    Description

    You can call this method if you’d like to set input in .:ref:Command<namespacewellfired_command> as though the user had typed it.

    Parameters

    text The text to enter into .:ref:Command<namespacewellfired_command>
  • string CheckInputForTilde ( string input )

    Description

    Checks the input for the close key and Closes the Development console if it is found.

    Parameters

    input The Input.
  • void InspectLogEntry ( LogEntry logEntry )

    Description

    Opens a the history of a specific Item.

    Parameters

    logEntry Log Entry.
  • void Clear ( )

    Description

    Clears all output in .Commands Log History.

  • void Load ( bool clearConsoleCommandEnabled = true, bool deviceIdCommandEnabled = true, bool inspectCommandEnabled = true, bool emailLogSupportEnabled = true, bool autoScrollEnabled = true, Type customFilterType = null )

    Description

    Call this method to load a single instance of .:ref:Command<namespacewellfired_command>. You can then access the instance through the Instance property.