Skip to content

Commit 04655e0

Browse files
author
luiza.torello
committed
fix: add if unity_editor directives
1 parent aade080 commit 04655e0

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

Assets/Scripts/Game/EnemyGenerator/TopdownFitness.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
using System;
44
using System.Linq;
55
using UnityEngine;
6+
#if UNITY_EDITOR
67
using static Codice.Client.Common.Connection.AskCredentialsToUser;
8+
#endif
79

810
namespace TopdownGame.Overlord.Inheritance.RulesGenerator
911
{

Assets/Scripts/Game/NarrativeGenerator/NarrativeExperimentRepository.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
using Game.NarrativeGenerator.Quests;
55
using Overlord.ProfileAnalyst;
66
using System.Collections.Generic;
7+
#if UNITY_EDITOR
78
using UnityEditor;
9+
#endif
810
using Util;
911

1012
namespace Overlord.NarrativeGenerator
@@ -31,6 +33,7 @@ public void Save(QuestLineList questLines, string profileName)
3133
{
3234
SetQuestLineListForProfile(questLines);
3335

36+
#if UNITY_EDITOR
3437
string target = "Assets/Resources/Experiment";
3538
string questLineFile = $"{target}/{profileName}";
3639

@@ -41,6 +44,7 @@ public void Save(QuestLineList questLines, string profileName)
4144

4245
EditorUtility.SetDirty(_playerProfileToQuestLines);
4346
AssetDatabase.SaveAssetIfDirty(_playerProfileToQuestLines);
47+
#endif
4448
}
4549

4650
private void SetQuestLineListForProfile(QuestLineList questLines)

Assets/Scripts/Overlord/RulesGenerator/GeneticAlgorithm/Crossover.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
using System;
22
using UnityEngine;
33
using Util;
4+
#if UNITY_EDITOR
45
using static Codice.Client.Common.Connection.AskCredentialsToUser;
6+
#endif
57

68
namespace Overlord.RulesGenerator.EnemyGeneration
79
{

Assets/Scripts/Overlord/RulesGenerator/GeneticAlgorithm/Mutation.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using Util;
22
using System;
3+
#if UNITY_EDITOR
34
using Codice.Client.Common;
5+
#endif
46

57
namespace Overlord.RulesGenerator.EnemyGeneration
68
{

Assets/Scripts/OverlordData/RulesGenerator/SearchSpaceConfig.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#if UNITY_EDITOR
21
using MyBox;
2+
#if UNITY_EDITOR
33
using UnityEditor;
4+
#endif
45
using UnityEngine;
56
using Overlord.UI;
67

@@ -20,7 +21,7 @@ public class SearchSpaceConfig : ScriptableObject
2021
[DisplayInspector]
2122
public EnemyWeaponsSOInterface WeaponSet;
2223
}
23-
24+
#if UNITY_EDITOR
2425
[CustomEditor(typeof(SearchSpaceConfig))]
2526
public class SearchSpaceConfigEditor : Editor
2627
{

0 commit comments

Comments
 (0)