IPlatformProvider

Namespace: WellFired.Guacamole

Description

Provides some platform specific implementations of certain functionalities.

Properties

string ProjectPath { get; set; }
string AssetPath { get; set; }
bool PlatformHasFocus { get; set; }

Public Methods

IDataStorageService GetPersonalDataStorage ( )
IDataStorageService GetTeamSharedDataStorage ( )
string OpenFolderPicker ( string title, string folder, string defaultName )
string PathToSharedData ( string file )
string PathToPersonalData ( string file )
string[] FindAssets ( string search )
void SelectAsset ( string assetPath )
void ShowLocation ( string path )

Breakdown

  • string ProjectPath { get; set; }

    Description

    Path where the project is saved.

  • string AssetPath { get; set; }

    Description

    Path where the project assets are saved.

  • bool PlatformHasFocus { get; set; }

    Description

    Indicate if the platform application is focused or not.

  • IDataStorageService GetPersonalDataStorage ( )

    Description

    With this, you can get some persistent data storage, you should be able to store strings of data in here. Think of it as a Key Value Store. This storage is personal because only used by a specific user/machine

  • IDataStorageService GetTeamSharedDataStorage ( )

    Description

    With this, you can get some persistent data storage, you should be able to store strings of data in here. Think of it as a Key Value Store. This storage is team shared because can be shared with the whole team through a vcs for example.

  • string OpenFolderPicker ( string title, string folder, string defaultName )

    Description

    Allow you to open a folder picker. Since it involves UI, for most platform this function should be called on the UI thread.

    Parameters

    title Title display on top of the popup window
    folder The folder that should be opened when the folder opens
    defaultName The default folder to return if no folder is selected
  • string PathToSharedData ( string file )

    Description

    Call this method to be returned the full path to a relative team-shared file. If your team-shared data is located at /path/to/your/shared/data, then calling the function with “Images/Doges.jpeg” will return /path/to/your/shared/data/Images/Doge.jpg.

    Parameters

    file
  • string PathToPersonalData ( string file )

    Description

    Call this method to be returned the full path to a relative personal file. If your personal data is located at /path/to/your/personal/data, then calling the function with “Images/Doges.jpeg” will return /path/to/your/personal/data/Images/Doge.jpg.

    Parameters

    file
  • string[] FindAssets ( string search )

    Description

    This method allows to search through the assets of the project.

    Parameters

    search String specifying how to filter the result. On some platforms such as Unity, it’s possible to specify the type and the label of the asset. For example, “co l:concrete l:architecture t:texture2D” will return all the textures containing “co” in their name and with labels concrete and architecture.
  • void SelectAsset ( string assetPath )

    Description

    This method allows to select a specific asset in the project.

    Parameters

    assetPath
  • void ShowLocation ( string path )

    Description

    Opens the explorer and displays the file or folder located at indicated absolute path.

    Parameters

    path The path of the file or folder