Skip to content

Commit

Permalink
define use unity 2017
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoqingqing committed Mar 29, 2018
1 parent 0a645df commit ac9a877
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion KSFramework/Assets/Editor/KSFrameworkTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if UNITY_5
#if UNITY_5 || UNITY_2017_1_OR_NEWER
using System.IO;
using KEngine;
using KSFramework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using KEngine;
using KEngine.UI;
using UnityEditor;
#if UNITY_5
#if UNITY_5 || UNITY_2017_1_OR_NEWER
using UnityEditor.SceneManagement;
#endif

Expand Down Expand Up @@ -61,7 +61,7 @@ public static void OpenLastScene()
if (!string.IsNullOrEmpty(lastScene))
{

#if UNITY_5
#if UNITY_5 || UNITY_2017_1_OR_NEWER
EditorSceneManager.OpenScene(lastScene);
#else
EditorApplication.OpenScene(lastScene);
Expand All @@ -77,7 +77,7 @@ public static void OpenLastScene()
[MenuItem("KEngine/Open Main Scene %&i")]
public static void OpenMainScene()
{
#if UNITY_5
#if UNITY_5 || UNITY_2017_1_OR_NEWER
var currentScene = EditorSceneManager.GetActiveScene().path;
#else
var currentScene = EditorApplication.currentScene;
Expand All @@ -87,7 +87,7 @@ public static void OpenMainScene()
EditorPrefs.SetString(LastScenePrefKey, currentScene);

Log.Info("Open Main Game Scene!");
#if UNITY_5
#if UNITY_5 || UNITY_2017_1_OR_NEWER
EditorSceneManager.OpenScene(mainScene);
#else
EditorApplication.OpenScene(mainScene);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public virtual void InitBridge()
{
EventSystem = new GameObject("EventSystem").AddComponent<EventSystem>();
EventSystem.gameObject.AddComponent<StandaloneInputModule>();
#if !UNITY_5
#if UNITY_4
EventSystem.gameObject.AddComponent<TouchInputModule>();
#else
EventSystem.gameObject.GetComponent<StandaloneInputModule>().forceModuleActive = true;
Expand Down

0 comments on commit ac9a877

Please sign in to comment.