cohtml.Editor.EditorUtils

Public Functions

Name
stringStringifyPlatform(BuildTarget platform)
stringStringifyBackend(GraphicsDeviceType backend)
stringGetAppExtension(BuildTarget platform)
stringFindBrowserExecutablePath()
voidCopyFolder(string sourceFolder, string destinationFolder, params string [] fileExtensionsForExclude)
voidDeleteFolderRecursively(string directory, bool removeDirectoryMetaFile =true)
objectGetEditorPref(string key, Type type)
Gets a value from EditorPrefs for the specified type. Supports int, float, bool, string, enums, and serializable objects. Returns null if the stored value was previously set to null.
voidSetEditorPref(string key, object value)
Sets a value in EditorPrefs. Supports int, float, bool, string, enums, and serializable objects. For reference types will be stored as Json string.

Public Attributes

Name
const stringAssetsDir
The project’s root directory.
const stringSamplesDir
The default sample directory where the UPM Samples are imported.
const stringUPMSamplesDir
The Cohtml package sample folder.
const stringStreamingAssetsDir
The Streaming Assets directory. The folder is inside the Assets folder.
const stringCohtmlDir
The Cohtml directory name. It’s part of sample’s resources, assets or package directories.
const stringUIResourcesDir
The directory where the front-end lies.
const stringSampleHubDir
The Sample Hub directory.
const stringHelloSampleDir
The Hello template directory.
const stringFrontendSamplesDir
The directory where the front end uiresources folder will import.
const stringSceneExtension
The scene extension
readonly stringExcludeMetaFiles
Represent a collection with exclude to copy files.

Public Functions Documentation

function StringifyPlatform

static string StringifyPlatform(
    BuildTarget platform
)

function StringifyBackend

static string StringifyBackend(
    GraphicsDeviceType backend
)

function GetAppExtension

static string GetAppExtension(
    BuildTarget platform
)

function FindBrowserExecutablePath

static string FindBrowserExecutablePath()

function CopyFolder

static void CopyFolder(
    string sourceFolder,
    string destinationFolder,
    params string [] fileExtensionsForExclude
)

function DeleteFolderRecursively

static void DeleteFolderRecursively(
    string directory,
    bool removeDirectoryMetaFile =true
)

function GetEditorPref

static object GetEditorPref(
    string key,
    Type type
)

Gets a value from EditorPrefs for the specified type. Supports int, float, bool, string, enums, and serializable objects. Returns null if the stored value was previously set to null.

Parameters:

  • key The key of the value to retrieve.
  • type The type of the value to retrieve.

Return: The stored value, or the default value if not found. Null for stored nulls.

function SetEditorPref

static void SetEditorPref(
    string key,
    object value
)

Sets a value in EditorPrefs. Supports int, float, bool, string, enums, and serializable objects. For reference types will be stored as Json string.

Parameters:

  • key The key to store the value under.
  • value The value to store. If the value is null the key will be deleted!

Public Attributes Documentation

variable AssetsDir

const string AssetsDir = "Assets";

The project’s root directory.

variable SamplesDir

const string SamplesDir = "Samples";

The default sample directory where the UPM Samples are imported.

variable UPMSamplesDir

const string UPMSamplesDir = SamplesDir + "~";

The Cohtml package sample folder.

variable StreamingAssetsDir

const string StreamingAssetsDir = "StreamingAssets";

The Streaming Assets directory. The folder is inside the Assets folder.

variable CohtmlDir

const string CohtmlDir = "Cohtml";

The Cohtml directory name. It’s part of sample’s resources, assets or package directories.

variable UIResourcesDir

const string UIResourcesDir = "UIResources";

The directory where the front-end lies.

variable SampleHubDir

const string SampleHubDir = "SampleHub";

The Sample Hub directory.

variable HelloSampleDir

const string HelloSampleDir = "Hello";

The Hello template directory.

variable FrontendSamplesDir

const string FrontendSamplesDir = "FrontendSamples";

The directory where the front end uiresources folder will import.

variable SceneExtension

const string SceneExtension = ".unity";

The scene extension

variable ExcludeMetaFiles

static readonly string ExcludeMetaFiles = ".meta";

Represent a collection with exclude to copy files.