Show / Hide Table of Contents

Class EditorProfile

The Editor Profile sets the Options' configuration when playing the project in the editor.

Inheritance
System.Object
UnityEngine.Object
UnityEngine.ScriptableObject
EditableProfile
EditorProfile
Inherited Members
EditableProfile.CopyAsIniFile()
EditableProfile.PasteFromIniFile()
Namespace: sttz.Trimmer.Editor
Assembly: Trimmer-Editor.dll
Syntax
[HelpURL("https://sttz.ch/trimmer/manual/using_trimmer.html")]
public class EditorProfile : EditableProfile
Remarks

There is only a single instance of the Editor Profile, use Instance to access it. If you want to use a Build Profile's configuration in the editor, you can set EditorSourceProfile to override the configuration.

The Editor Profile is saved on a per-project basis inside the project's Library folder. This means the configuration will be local to a project and won't get checked into version control (the Library folder should be ignored). Use BuildProfiles to create configurations that can be checked in.

The Editor Profile is also used to save other per-project settings like the ActiveProfile or tracking of the expanded state (IsExpanded(String) and SetExpanded(String, Boolean)).

Constructors

| Improve this Doc View Source

EditorProfile()

Declaration
public EditorProfile()

Fields

| Improve this Doc View Source

EDITOR_PROFILE_PATH

Path to the asset used to store the Editor Profile in.

Declaration
public const string EDITOR_PROFILE_PATH = "Library/TrimmerEditorProfile.asset"
Field Value
Type Description
System.String
Remarks

The path is relative to the project's folder.

Properties

| Improve this Doc View Source

ActiveProfile

The active profile, which is used for regular Unity builds.

Declaration
public BuildProfile ActiveProfile { get; set; }
Property Value
Type Description
BuildProfile
Remarks

The active profile is stored per-project in the editor profile asset in the project's Library.

| Improve this Doc View Source

ActiveProfileGUID

The asset GUID of the active Build Profile.

Declaration
public string ActiveProfileGUID { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

EditorSourceProfile

Profile providing the current configuration for the editor.

Declaration
public BuildProfile EditorSourceProfile { get; set; }
Property Value
Type Description
BuildProfile

null when using the editor's own configuration, otherwise the Build Profile whose configuration is used.

Remarks

Instead of using the editor's unique configuration, it's possible to use a Build Profile's configuration instead, allowing to quickly switch between sets of configuration values.

| Improve this Doc View Source

EditProfile

Declaration
public override RuntimeProfile EditProfile { get; }
Property Value
Type Description
RuntimeProfile
Overrides
EditableProfile.EditProfile
| Improve this Doc View Source

Instance

The Editor Profile singleton instance.

Declaration
public static EditorProfile Instance { get; }
Property Value
Type Description
EditorProfile
| Improve this Doc View Source

PlayModeStore

Store used when playing in the editor.

Declaration
public ValueStore PlayModeStore { get; }
Property Value
Type Description
ValueStore
| Improve this Doc View Source

Store

Declaration
public override ValueStore Store { get; }
Property Value
Type Description
ValueStore
Overrides
EditableProfile.Store

Methods

| Improve this Doc View Source

EditOption(Option)

Declaration
public override void EditOption(Option option)
Parameters
Type Name Description
Option option
Overrides
EditableProfile.EditOption(Option)
| Improve this Doc View Source

IsExpanded(String)

Return wether a given identifier is expanded.

Declaration
public bool IsExpanded(string identifier)
Parameters
Type Name Description
System.String identifier
Returns
Type Description
System.Boolean
| Improve this Doc View Source

OpenActiveProfile()

Menu to show the active Build Profile in the inspector.

Declaration
[MenuItem("Window/Trimmer/Active Build Profile %&a")]
public static void OpenActiveProfile()
| Improve this Doc View Source

OpenDocumentation()

Declaration
[MenuItem("Window/Trimmer/Open Documentation...")]
public static void OpenDocumentation()
| Improve this Doc View Source

OpenEditorProfile()

Menu item to show the Editor Profile in the inspector.

Declaration
[MenuItem("Window/Trimmer/Editor Profile %e")]
public static void OpenEditorProfile()
| Improve this Doc View Source

Save()

Save the editor profile.

Declaration
public void Save()
Remarks

The Editor Profile is saved in the Library folder like other Unity per-project configuration assets. It uses public but internal methods in UnityEditorInternal.InternalEditorUtility.

| Improve this Doc View Source

SaveIfNeeded()

Declaration
public override void SaveIfNeeded()
Overrides
EditableProfile.SaveIfNeeded()
| Improve this Doc View Source

SetExpanded(String, Boolean)

Mark an identifier to expanded or collapsed.

Declaration
public void SetExpanded(string identifier, bool isExpanded)
Parameters
Type Name Description
System.String identifier
System.Boolean isExpanded
Remarks

Only expanded identifiers are stored in a list of int hash codes. Setting an identifier to collapsed removes it from this list.

  • Improve this Doc
  • View Source
Back to top © 2017 Adrian Stutz