Skip to content

Commit 933cfff

Browse files
svc-reach-platform-supportEvergreen
authored andcommitted
[Port] [6000.4] [HDRP] Fix buiding a player with the water sample in the project
1 parent 762aef3 commit 933cfff

File tree

2 files changed

+9
-9
lines changed
  • Packages
    • com.unity.render-pipelines.core/Samples~/Common/Scripts
    • com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines

2 files changed

+9
-9
lines changed

Packages/com.unity.render-pipelines.core/Samples~/Common/Scripts/InstallPackage.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using UnityEditor;
2-
using UnityEditor.PackageManager;
3-
using UnityEditor.PackageManager.Requests;
41
using UnityEngine;
52

63
public class InstallPackage : MonoBehaviour

Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTexture.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
using UnityEditor;
44
using UnityEngine;
55
using UnityEngine.Rendering.HighDefinition;
6-
using UnityEditor.PackageManager.Requests;
7-
using UnityEditor.PackageManager;
86
#if SPLINE_PACKAGE_INSTALLED
9-
using UnityEditor.Splines;
10-
using UnityEngine.Splines;
7+
#if UNITY_EDITOR
8+
using UnityEditor.Splines;
9+
#endif
10+
using UnityEngine.Splines;
1111
#endif
1212

1313
[ExecuteInEditMode]
@@ -51,7 +51,7 @@ void OnEnable()
5151

5252
void HookCallbacks()
5353
{
54-
#if SPLINE_PACKAGE_INSTALLED
54+
#if SPLINE_PACKAGE_INSTALLED && UNITY_EDITOR
5555
if (splineContainer != null)
5656
foreach (Spline spline in splineContainer.Splines)
5757
EditorSplineUtility.AfterSplineWasModified += OnAfterSplineWasModified;
@@ -60,7 +60,7 @@ void HookCallbacks()
6060

6161
void UnhookCallbacks()
6262
{
63-
#if SPLINE_PACKAGE_INSTALLED
63+
#if SPLINE_PACKAGE_INSTALLED && UNITY_EDITOR
6464
if (splineContainer != null)
6565
foreach (Spline spline in splineContainer.Splines)
6666
EditorSplineUtility.AfterSplineWasModified -= OnAfterSplineWasModified;
@@ -308,6 +308,8 @@ public void RunCompute()
308308
#endif
309309
}
310310
}
311+
312+
#if UNITY_EDITOR
311313
public void OpenDialogAndSaveCurrentMap()
312314
{
313315
var path = EditorUtility.SaveFilePanel("Save current map", "","currentMap","png");
@@ -329,6 +331,7 @@ public static void SaveTextureOnDisk(RenderTexture renderTexture, string path)
329331
File.WriteAllBytes(path, bytesHeight);
330332
AssetDatabase.Refresh();
331333
}
334+
#endif
332335

333336
public static Texture2D ToTexture2D(RenderTexture rTex)
334337
{

0 commit comments

Comments
 (0)