UnityEssentials
Small but useful tools and features for Unity
Adjustment.cs
Go to the documentation of this file.
1 using UnityEngine;
2 
4 {
8  public abstract class Adjustment : IAdjustment
9  {
10 
14  public abstract string title { get; }
15 
19  public abstract void Apply();
20 
24  public abstract void Revert();
25 
30  public virtual string applyAdjustmentShortExplanation { get => title + " (apply)"; }
34  public virtual string revertAdjustmentShortExplanation { get => title + " (revert)"; }
35 
39  public abstract string applyButtonText { get; }
43  public abstract string revertButtonText { get; }
44 
48  public string infoButtonText => "Info";
52  public abstract string infoURL { get; }
53 
57  public virtual bool showInSettingsWindow => true;
58 
62  public void OpenInfoURL() { Application.OpenURL(infoURL); }
63 
64  }
65 }
Basic functionality for any adjustment that can be managed in the "Essentials Settings Window"
Definition: Adjustment.cs:9
abstract void Revert()
Reverts the modification leaving the state of the platform as it was before applying it.
virtual bool showInSettingsWindow
If the modification should be displayed or not in the Essentials' settings window
Definition: Adjustment.cs:57
void OpenInfoURL()
Opens the URL containing the information of the modification
Definition: Adjustment.cs:62
virtual string applyAdjustmentShortExplanation
Short explanation of what will be the actions done while applying the modification
Definition: Adjustment.cs:30
abstract string title
Title or short definition of the configuration modification
Definition: Adjustment.cs:14
abstract string revertButtonText
Text displayed on the button to revert the modification
Definition: Adjustment.cs:43
abstract void Apply()
Applies the desired modification.
abstract string applyButtonText
Text displayed on the button to apply the modification
Definition: Adjustment.cs:39
string infoButtonText
Text displayed on the button to get more information about the modification
Definition: Adjustment.cs:48
virtual string revertAdjustmentShortExplanation
Short explanation of what will be the actions done while reverting the modification
Definition: Adjustment.cs:34
abstract string infoURL
URL where the information regarding the modification can be found
Definition: Adjustment.cs:52
Interface integrating all the basic elements that an adjustment that can be managed in the "Essential...
Definition: IAdjustment.cs:7