Skip to content

Commit

Permalink
added UNITY_EDITOR conditionals to fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Nesh108 committed Oct 1, 2019
1 parent 5ff17de commit 4fcbb0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/Plugins/GoKit/GoPathSettings.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;

[CreateAssetMenu(fileName = "New GoPath", menuName = "GoKit/Create New GoPath Asset")]
public class GoPathSettings : ScriptableObject
{
public List<Vector3> Nodes;

#if UNITY_EDITOR
// From: https://wiki.unity3d.com/index.php?title=CreateScriptableObjectAsset
public static void CreateAsset(string path, List<Vector3> nodes)
{
Expand All @@ -20,6 +23,7 @@ public static void CreateAsset(string path, List<Vector3> nodes)
EditorUtility.FocusProjectWindow();
Selection.activeObject = asset;
}
#endif
}


0 comments on commit 4fcbb0b

Please sign in to comment.