Skip to content

Commit 4a7b7ef

Browse files
committed
Reformated Unity plugin to a consistent code style.
Fixed some issues with tests failing.
1 parent cdcb497 commit 4a7b7ef

File tree

86 files changed

+12972
-12826
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+12972
-12826
lines changed

Plugins/HoudiniEngineUnity/Editor/HEU_EditorApp.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
namespace HoudiniEngineUnity
3333
{
3434
/// <summary>
35-
/// Manages Editor callbacks and events.
35+
/// Manages Editor callbacks and events.
3636
/// </summary>
3737
[InitializeOnLoad]
3838
public static class HEU_EditorApp
3939
{
4040
/// <summary>
41-
/// Executed after script (re)load. Sets up plugin callbacks.
41+
/// Executed after script (re)load. Sets up plugin callbacks.
4242
/// </summary>
4343
static HEU_EditorApp()
4444
{
@@ -51,7 +51,7 @@ static HEU_EditorApp()
5151
#if UNITY_2019_1_OR_NEWER
5252
SceneView.duringSceneGui += OnSceneGUIDelegate;
5353
#else
54-
SceneView.onSceneGUIDelegate += OnSceneGUIDelegate;
54+
SceneView.onSceneGUIDelegate += OnSceneGUIDelegate;
5555
#endif
5656
}
5757

Plugins/HoudiniEngineUnity/Editor/HEU_EditorStrings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
namespace HoudiniEngineUnity
3232
{
3333
/// <summary>
34-
/// Commonly-used strings all in one place.
34+
/// Commonly-used strings all in one place.
3535
/// </summary>
3636
public static class HEU_EditorStrings
3737
{

Plugins/HoudiniEngineUnity/Editor/VisualScripting/HEU_UnitButtonInspector.cs

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88

99
namespace HoudiniEngineUnity
1010
{
11-
[Inspector(typeof(HEU_UnitButton) )]
11+
[Inspector(typeof(HEU_UnitButton))]
1212
public class HEU_UnitButtonInspector : Inspector
1313
{
14-
public HEU_UnitButtonInspector(Metadata metadata) : base(metadata) { }
14+
public HEU_UnitButtonInspector(Metadata metadata) : base(metadata)
15+
{
16+
}
1517

1618
protected override float GetHeight(float width, GUIContent label)
1719
{
@@ -21,29 +23,29 @@ protected override float GetHeight(float width, GUIContent label)
2123
protected override void OnGUI(Rect position, GUIContent label)
2224
{
2325
var attribute = metadata.GetAttribute<HEU_UnitButtonAttribute>(true);
24-
if (attribute != null)
25-
{
26-
string functionName = attribute.functionName;
27-
string btnLabel = attribute.buttonLabel;
28-
int btnWidth = attribute.buttonWidth;
26+
if (attribute != null)
27+
{
28+
string functionName = attribute.functionName;
29+
string btnLabel = attribute.buttonLabel;
30+
int btnWidth = attribute.buttonWidth;
2931

30-
var buttonPosition = new Rect(
31-
position.x,
32-
position.y,
33-
position.width + btnWidth,
34-
16
35-
);
32+
var buttonPosition = new Rect(
33+
position.x,
34+
position.y,
35+
position.width + btnWidth,
36+
16
37+
);
3638

37-
if (GUI.Button(buttonPosition, btnLabel, new GUIStyle(UnityEditor.EditorStyles.miniButton)))
38-
{
39-
if (attribute != null)
40-
{
41-
object typeObject = metadata.parent.value;
42-
GraphReference reference = GraphWindow.activeReference;
43-
typeObject.GetType().GetMethod(functionName).Invoke(typeObject, new object[1] { reference });
44-
}
45-
}
46-
}
39+
if (GUI.Button(buttonPosition, btnLabel, new GUIStyle(UnityEditor.EditorStyles.miniButton)))
40+
{
41+
if (attribute != null)
42+
{
43+
object typeObject = metadata.parent.value;
44+
GraphReference reference = GraphWindow.activeReference;
45+
typeObject.GetType().GetMethod(functionName).Invoke(typeObject, new object[1] { reference });
46+
}
47+
}
48+
}
4749
}
4850
}
4951
}

0 commit comments

Comments
 (0)