Skip to content

Commit

Permalink
Merge pull request #88 from Nesh108/master
Browse files Browse the repository at this point in the history
added UNITY_EDITOR conditionals to fix build issues
  • Loading branch information
prime31 committed Oct 2, 2020
2 parents 71241a3 + 4fcbb0b commit 58c3eba
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 58c3eba

Please sign in to comment.