#if UNITY_EDITOR

Added '#if UNITY_EDITOR' to all the scripts that should only run/be used in the editor.
This commit is contained in:
max 2019-05-04 13:29:02 +02:00
parent 7990f987dc
commit 78e4fb0ad1
19 changed files with 63 additions and 25 deletions

View File

@ -1,3 +1,4 @@
#if UNITY_EDITOR
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -100,4 +101,5 @@ namespace MA_TextureAtlasserPro
} }
} }
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if UNITY_EDITOR
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -163,4 +164,5 @@ namespace MA_TextureAtlasserPro
debugMode = isDebugging; debugMode = isDebugging;
} }
} }
} }
#endif

View File

@ -1,4 +1,5 @@
using System.Collections; #if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEditor; using UnityEditor;
@ -22,4 +23,5 @@ namespace MA_TextureAtlasserPro
public KeyCode removeQuadHotKey = KeyCode.R; public KeyCode removeQuadHotKey = KeyCode.R;
public KeyCode duplicateHotKey = KeyCode.D; public KeyCode duplicateHotKey = KeyCode.D;
} }
} }
#endif

View File

@ -1,4 +1,5 @@
using System.Collections; #if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -17,3 +18,4 @@ namespace MA_TextureAtlasserPro
public string name; public string name;
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if UNITY_EDITOR
using UnityEngine; using UnityEngine;
using UnityEditor; using UnityEditor;
@ -32,4 +33,5 @@ namespace MA_TextureAtlasserPro
editIcon = new GUIContent("", (Texture)EditorGUIUtility.Load(LOADICONPATH + "editIcon" + ".png")); editIcon = new GUIContent("", (Texture)EditorGUIUtility.Load(LOADICONPATH + "editIcon" + ".png"));
} }
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if UNITY_EDITOR
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -377,4 +378,5 @@ namespace MA_TextureAtlasserPro
} }
} }
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if UNITY_EDITOR
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -75,4 +76,5 @@ namespace MA_TextureAtlasserPro
} }
} }
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if UNITY_EDITOR
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -131,4 +132,5 @@ namespace MA_TextureAtlasserPro
base.ProcessEvents(e, editorViewRect); base.ProcessEvents(e, editorViewRect);
} }
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if UNITY_EDITOR
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -78,4 +79,5 @@ namespace MA_TextureAtlasserPro
base.ProcessEvents(e, editorViewRect); base.ProcessEvents(e, editorViewRect);
} }
} }
} }
#endif

View File

@ -1,4 +1,5 @@
using System.Collections; #if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEditor; using UnityEditor;
@ -52,4 +53,5 @@ namespace MA_TextureAtlasserPro
} }
} }
} }
} }
#endif

View File

@ -1,4 +1,5 @@
using System.Collections; #if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using MA_Editor; using MA_Editor;
@ -147,4 +148,5 @@ namespace MA_TextureAtlasserPro
zoomCoordsOrigin = new Vector2(-(curWindow.position.width / 2) + (curWindow.position.width / 3), -(curWindow.position.height / 2) + (curWindow.position.height / 3)); zoomCoordsOrigin = new Vector2(-(curWindow.position.width / 2) + (curWindow.position.width / 3), -(curWindow.position.height / 2) + (curWindow.position.height / 3));
} }
} }
} }
#endif

View File

@ -1,4 +1,5 @@
using System.Collections; #if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEditor; using UnityEditor;
@ -167,4 +168,5 @@ namespace MA_TextureAtlasserPro
isLoaded = true; isLoaded = true;
} }
} }
} }
#endif

View File

@ -1,4 +1,5 @@
using System.Collections; #if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEditor; using UnityEditor;
@ -132,4 +133,5 @@ namespace MA_TextureAtlasserPro
isLoaded = true; isLoaded = true;
} }
} }
} }
#endif

View File

@ -1,4 +1,5 @@
using System.Collections; #if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEditor; using UnityEditor;
@ -118,4 +119,5 @@ namespace MA_TextureAtlasserPro
isLoaded = true; isLoaded = true;
} }
} }
} }
#endif

View File

@ -1,6 +1,7 @@
//Maxartz15 //Maxartz15
//Version 1.0 //Version 1.0
#if UNITY_EDITOR
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -58,4 +59,5 @@ namespace MA_Editor.Grid
Handles.EndGUI(); Handles.EndGUI();
} }
} }
} }
#endif

View File

@ -1,6 +1,7 @@
//Maxartz15 //Maxartz15
//Version 1.0 //Version 1.0
#if UNITY_EDITOR
using UnityEngine; using UnityEngine;
using MA_Editor; using MA_Editor;
@ -67,4 +68,5 @@ namespace MA_Editor.RectUtils
return multipliedRect; return multipliedRect;
} }
} }
} }
#endif

View File

@ -1,6 +1,7 @@
//Maxartz15 //Maxartz15
//Version 1.0 //Version 1.0
#if UNITY_EDITOR
using UnityEngine; using UnityEngine;
using MA_Editor; using MA_Editor;
using MA_Editor.RectUtils; using MA_Editor.RectUtils;
@ -36,4 +37,5 @@ namespace MA_Editor.GUILayoutZoom
GUI.BeginGroup(new Rect(0.0f, EditorWindowTabHeight, Screen.width, Screen.height)); GUI.BeginGroup(new Rect(0.0f, EditorWindowTabHeight, Screen.width, Screen.height));
} }
} }
} }
#endif

View File

@ -1,6 +1,7 @@
//Maxartz15 //Maxartz15
//Version 1.0 //Version 1.0
#if UNITY_EDITOR
using System; using System;
using System.IO; using System.IO;
using System.Text; using System.Text;
@ -184,4 +185,5 @@ namespace MA_Mesh
public string name; public string name;
public string textureName; public string textureName;
} }
} }
#endif

View File

@ -3,6 +3,7 @@
//Part of MA_TextureUtils //Part of MA_TextureUtils
//https://github.com/maxartz15/MA_TextureUtils //https://github.com/maxartz15/MA_TextureUtils
#if UNITY_EDITOR
using UnityEngine; using UnityEngine;
using UnityEditor; using UnityEditor;
using System.IO; using System.IO;
@ -200,4 +201,5 @@ namespace MA_Texture
} }
#endregion #endregion
} }
} }
#endif