Skip to content

Commit

Permalink
Major rewrite to editor window
Browse files Browse the repository at this point in the history
  • Loading branch information
App24 committed May 19, 2023
1 parent 1eae05b commit 01a2e39
Show file tree
Hide file tree
Showing 9 changed files with 486 additions and 178 deletions.
2 changes: 1 addition & 1 deletion Assets/RicUtils/Editor/Settings/RicUtils_EditorSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class RicUtils_EditorSettings : ScriptableObject

public static string version
{
get { return "1.4.3"; }
get { return "1.5.0"; }
}

public static ScriptableEditor[] scriptableEditors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ using UnityEditor;
#ROOTNAMESPACEBEGIN#
public class #SCRIPTNAME# : GenericEditorWindow<#SCRIPTABLEOBJECT#, #AVAILABLESCRIPTABLEOBJECT#>
{
[MenuItem("Window/RicUtil Windows/#SCRIPTNAME#")]
[MenuItem("Window/RicUtils Windows/#SCRIPTNAME#")]
public static #SCRIPTNAME# ShowWindow()
{
return GetWindow<#SCRIPTNAME#>();
return GetWindow<#SCRIPTNAME#>("#SCRIPTNAME#");
}

protected override void CreateAsset(ref #SCRIPTABLEOBJECT# asset)
protected override void DrawGUI()
{

}

protected override void DrawGUI()
protected override void LoadScriptableObject(#SCRIPTABLEOBJECT# so, bool isNull)
{

}

protected override void LoadScriptableObject(#SCRIPTABLEOBJECT# so, bool isNull)
protected override void CreateAsset(ref #SCRIPTABLEOBJECT# asset)
{

}
Expand Down
21 changes: 21 additions & 0 deletions Assets/RicUtils/Editor/Utilities/EditorContainer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace RicUtils.Editor.Utilities
{
public sealed class EditorContainer<T>
{
public T Value { get; set; } = default;

public static implicit operator T(EditorContainer<T> value) { return value.Value; }
public static explicit operator EditorContainer<T>(T value) { return new EditorContainer<T>() { Value = value }; }

public bool IsNull()
{
return Value == null;
}

public override string ToString()
{
if (IsNull()) return null;
return Value.ToString();
}
}
}
11 changes: 11 additions & 0 deletions Assets/RicUtils/Editor/Utilities/EditorContainer.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 01a2e39

Please sign in to comment.