Skip to content

Commit e1a4e79

Browse files
committed
Removed extraneous ifdefs of UNITY_2022_1_OR_NEWER, keeping only those necessary to hide the Spline option from Unity Editor versions older than 2022.1.
1 parent bf35b32 commit e1a4e79

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

Plugins/HoudiniEngineUnity/Editor/UI/HEU_InputNodeUI.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ public static class HEU_InputNodeUI
4444
private static GUIContent _tilemapColorContent = new GUIContent("Apply Tile color", "If checked, will output a Cd color attribute to point.");
4545
private static GUIContent _tilemapOrientationContent = new GUIContent("Apply Tilemap Orientation", "If checked, will offset position by the tilemap position offset, and produce orient/pscale attributes to the points.");
4646

47-
#if UNITY_2022_1_OR_NEWER
4847
private static GUIContent _samplingResolutionContent = new GUIContent("Sampling Resolution", "Defines the granularity at which a spline's positional data is sampled and marshalled to Houdini. The lower the value, the closer the fit.");
49-
#endif
5048

5149
/// <summary>
5250
/// Populate the UI cache for the given input node
@@ -69,9 +67,7 @@ public static void PopulateCache(HEU_InputNode inputNode)
6967
inputNode._uiCache._meshSettingsProperty = HEU_EditorUtility.GetSerializedProperty(inputNode._uiCache._inputNodeSerializedObject, "_meshSettings");
7068
inputNode._uiCache._tilemapSettingsProperty = HEU_EditorUtility.GetSerializedProperty(inputNode._uiCache._inputNodeSerializedObject, "_tilemapSettings");
7169

72-
#if UNITY_2022_1_OR_NEWER
7370
inputNode._uiCache._splineSettingsProperty = HEU_EditorUtility.GetSerializedProperty(inputNode._uiCache._inputNodeSerializedObject, "_splineSettings");
74-
#endif
7571

7672
int inputCount = inputNode._uiCache._inputObjectsProperty.arraySize;
7773
for (int i = 0; i < inputCount; ++i)

Plugins/HoudiniEngineUnity/Scripts/Asset/HEU_InputNode.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ public class HEU_InputNode : ScriptableObject, IHEU_InputNode, IHEU_HoudiniAsset
9090
/// <inheritdoc />
9191
public HEU_InputInterfaceTilemapSettings TilemapSettings { get { return _tilemapSettings; }}
9292

93-
#if UNITY_2022_1_OR_NEWER
9493
/// <inheritdoc />
9594
public HEU_InputInterfaceSplineSettings SplineSettings { get { return _splineSettings; }}
96-
#endif
9795

9896
// ========================================================================
9997

@@ -122,7 +120,7 @@ internal enum InputObjectType
122120
#if UNITY_2022_1_OR_NEWER
123121
SPLINE,
124122
#endif
125-
TERRAIN,
123+
TERRAIN,
126124
BOUNDING_BOX,
127125
TILEMAP
128126
}
@@ -228,11 +226,9 @@ public enum InputActions
228226
[SerializeField]
229227
private HEU_InputInterfaceTilemapSettings _tilemapSettings = new HEU_InputInterfaceTilemapSettings();
230228

231-
#if UNITY_2022_1_OR_NEWER
232229
// Spline specific settings:
233230
[SerializeField]
234231
private HEU_InputInterfaceSplineSettings _splineSettings = new HEU_InputInterfaceSplineSettings();
235-
#endif
236232

237233
// Field used in UI only.
238234
[SerializeField]
@@ -1763,9 +1759,7 @@ public class HEU_InputNodeUICache
17631759
public UnityEditor.SerializedProperty _meshSettingsProperty;
17641760
public UnityEditor.SerializedProperty _tilemapSettingsProperty;
17651761

1766-
#if UNITY_2022_1_OR_NEWER
17671762
public UnityEditor.SerializedProperty _splineSettingsProperty;
1768-
#endif
17691763

17701764
#endif
17711765

Plugins/HoudiniEngineUnity/Scripts/PublicWrappers/IHEU_InputNode.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public enum HEU_InputObjectTypeWrapper
6767
#if UNITY_2022_1_OR_NEWER
6868
SPLINE,
6969
#endif
70-
TERRAIN,
70+
TERRAIN,
7171
BOUNDING_BOX,
7272
TILEMAP
7373
};
@@ -114,10 +114,8 @@ public interface IHEU_InputNode
114114
/// <summary>Tilemap settings</summary>
115115
HEU_InputInterfaceTilemapSettings TilemapSettings { get; }
116116

117-
#if UNITY_2022_1_OR_NEWER
118117
/// <summary>Spline settings</summary>
119118
HEU_InputInterfaceSplineSettings SplineSettings { get; }
120-
#endif
121119

122120
/// <summary>
123121
/// Whether or not this is an asset input

Plugins/HoudiniEngineUnity/Scripts/Utility/HEU_InputUtility.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ internal static bool CreateInputNodeWithMultiObjects(HEU_SessionBase session, HA
229229
#if UNITY_SPLINES_INSTALLED
230230
if (inputInterfaceType == typeof(HEU_InputInterfaceSpline))
231231
{
232-
HEU_InputInterfaceSpline splineInterface = inputInterface as HEU_InputInterfaceSpline;
233-
splineInterface.Initialize(inputNode.SplineSettings);
232+
HEU_InputInterfaceSpline splineInterface = inputInterface as HEU_InputInterfaceSpline;
233+
splineInterface.Initialize(inputNode.SplineSettings);
234234
}
235235
#endif
236236

0 commit comments

Comments
 (0)