Class EditorProfile
The Editor Profile sets the Options' configuration when playing the project in the editor.
Inheritance
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 SourceEditorProfile()
Declaration
public EditorProfile()
Fields
| Improve this Doc View SourceEDITOR_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 SourceActiveProfile
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.
ActiveProfileGUID
The asset GUID of the active Build Profile.
Declaration
public string ActiveProfileGUID { get; }
Property Value
Type | Description |
---|---|
System.String |
EditorSourceProfile
Profile providing the current configuration for the editor.
Declaration
public BuildProfile EditorSourceProfile { get; set; }
Property Value
Type | Description |
---|---|
BuildProfile |
|
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.
EditProfile
Declaration
public override RuntimeProfile EditProfile { get; }
Property Value
Type | Description |
---|---|
RuntimeProfile |
Overrides
| Improve this Doc View SourceInstance
The Editor Profile singleton instance.
Declaration
public static EditorProfile Instance { get; }
Property Value
Type | Description |
---|---|
EditorProfile |
PlayModeStore
Store used when playing in the editor.
Declaration
public ValueStore PlayModeStore { get; }
Property Value
Type | Description |
---|---|
ValueStore |
Store
Declaration
public override ValueStore Store { get; }
Property Value
Type | Description |
---|---|
ValueStore |
Overrides
Methods
| Improve this Doc View SourceEditOption(Option)
Declaration
public override void EditOption(Option option)
Parameters
Type | Name | Description |
---|---|---|
Option | option |
Overrides
| Improve this Doc View SourceIsExpanded(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 |
OpenActiveProfile()
Menu to show the active Build Profile in the inspector.
Declaration
[MenuItem("Window/Trimmer/Active Build Profile %&a")]
public static void OpenActiveProfile()
OpenDocumentation()
Declaration
[MenuItem("Window/Trimmer/Open Documentation...")]
public static void OpenDocumentation()
OpenEditorProfile()
Menu item to show the Editor Profile in the inspector.
Declaration
[MenuItem("Window/Trimmer/Editor Profile %e")]
public static void OpenEditorProfile()
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
.
SaveIfNeeded()
Declaration
public override void SaveIfNeeded()
Overrides
| Improve this Doc View SourceSetExpanded(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.